mirror of
https://github.com/simonw/datasette.git
synced 2026-07-13 11:04:37 +02:00
Single source of truth for the CodeMirror setup: SQLiteDialect, createSqlEditor() (delegable history with host undo/redo forwarding, hostChange annotation for echo suppression, submit/escape callbacks, fixed-tooltip mode, per-editor Compartment updateSchema), and datasetteSchema() which fetches /-/editor-schema.json and maps it to a lang-sql SQLNamespace identical to the server-inlined shape. cm-editor.js is now a thin consumer; rollup emits both the IIFE and an importable ESM bundle. Submit key is Mod-Enter (Cmd on mac as before, now also Ctrl elsewhere) plus Shift-Enter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
26 lines
724 B
JSON
26 lines
724 B
JSON
{
|
|
"name": "datasette",
|
|
"private": true,
|
|
"devDependencies": {
|
|
"prettier": "^3.0.0"
|
|
},
|
|
"scripts": {
|
|
"build:codemirror": "rollup -c",
|
|
"fix": "npm run prettier -- --write",
|
|
"prettier": "prettier 'datasette/static/*[!.min|bundle].js'"
|
|
},
|
|
"dependencies": {
|
|
"@codemirror/autocomplete": "^6.20.3",
|
|
"@codemirror/commands": "^6.10.4",
|
|
"@codemirror/lang-sql": "^6.10.0",
|
|
"@codemirror/language": "^6.12.4",
|
|
"@codemirror/lint": "^6.9.7",
|
|
"@codemirror/search": "^6.7.1",
|
|
"@codemirror/state": "^6.7.1",
|
|
"@codemirror/view": "^6.43.6",
|
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
"@rollup/plugin-terser": "^0.1.0",
|
|
"codemirror": "^6.0.2",
|
|
"rollup": "^3.30.0"
|
|
}
|
|
}
|