deictic 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/API.md +17 -0
  2. package/dist/bun.d.ts.map +1 -1
  3. package/dist/bun.js +26 -8
  4. package/dist/bun.js.map +1 -1
  5. package/dist/client/index.js +8 -0
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/next.d.ts.map +1 -1
  8. package/dist/next.js +45 -25
  9. package/dist/next.js.map +1 -1
  10. package/dist/setup.d.ts +20 -0
  11. package/dist/setup.d.ts.map +1 -0
  12. package/dist/setup.js +1 -0
  13. package/dist/shared/endpoints.js +26 -6
  14. package/dist/shared/endpoints.js.map +1 -1
  15. package/dist/shared/index.d.ts +10 -0
  16. package/dist/shared/index.d.ts.map +1 -1
  17. package/dist/shared/init.js +13 -132
  18. package/dist/shared/init.js.map +1 -1
  19. package/dist/shared/integration.d.ts +6 -0
  20. package/dist/shared/integration.d.ts.map +1 -1
  21. package/dist/shared/integration.js +31 -3
  22. package/dist/shared/integration.js.map +1 -1
  23. package/dist/shared/package.js +1 -1
  24. package/dist/shared/setup.js +152 -0
  25. package/dist/shared/setup.js.map +1 -0
  26. package/dist/shared/src.js.map +1 -1
  27. package/dist/shared/vite.d.ts +1 -1
  28. package/dist/shared/vite.d.ts.map +1 -1
  29. package/dist/shared/vite.js +33 -11
  30. package/dist/shared/vite.js.map +1 -1
  31. package/dist/webpack.d.ts +9 -0
  32. package/dist/webpack.d.ts.map +1 -1
  33. package/dist/webpack.js +42 -15
  34. package/dist/webpack.js.map +1 -1
  35. package/package.json +8 -1
  36. package/src/bun.ts +32 -8
  37. package/src/cli/edit.ts +14 -0
  38. package/src/cli/init.ts +14 -118
  39. package/src/client/index.ts +4 -0
  40. package/src/index.ts +10 -0
  41. package/src/next.ts +34 -15
  42. package/src/setup.ts +132 -0
  43. package/src/tools/endpoints.ts +23 -4
  44. package/src/tools/integration.ts +33 -0
  45. package/src/tools/plugins.ts +7 -2
  46. package/src/tools/source.ts +14 -2
  47. package/src/vite.ts +38 -12
  48. package/src/webpack.ts +54 -17
package/API.md CHANGED
@@ -23,6 +23,10 @@ it adds, and what to add by hand where it can't (a config it can't read). Every
23
23
  and runs in the dev server only. deictic goes first among the plugins: one before it that changes a module would have
24
24
  the page point at that plugin's code, not the file.
25
25
 
26
+ `deictic/setup` is how `init` edits a config, for another tool's own setup: `addToConfig(file, code, entry)` adds
27
+ `entry.imports` after the config's and `entry.value` to its `list`, first or, with `last`, after the rest, or passes the
28
+ whole config to `wrap`. It answers nothing where it can't tell where, so the tool can print its snippet instead.
29
+
26
30
  ```ts
27
31
  // Vite, and anything on it (React Router, TanStack Start…): vite.config.ts
28
32
  import { deictic } from 'deictic/vite';
@@ -82,6 +86,12 @@ deictic({
82
86
  | ---------- | -------------------------------------------------------------------------------------------- |
83
87
  | `plugins` | The plugins to load. None by default. |
84
88
  | `shortcut` | `{ modifiers, button }`: held to point, pressed to open. Alt and the left button by default. |
89
+ | `defaults` | For a package that adds deictic with its own plugin: these options give way to the app's. |
90
+
91
+ A build may have deictic more than once: the app's, and one a package adds with its own plugin, as prosebook's
92
+ integrations add its copy inspector. They become one: every plugin, each name once, and every other option from the
93
+ first that sets it. One given with `defaults: true` comes after the app's, so the app's shortcut and its own plugin
94
+ of the same name win; two others that set an option two ways stop the dev server.
85
95
 
86
96
  The button is `'left'`, `'middle'` or `'right'`: `shortcut: { modifiers: ['Alt'], button: 'right' }` opens on Alt
87
97
  and a right-click, which the browser's own menu then doesn't answer. A plugin's own `shortcut` is the same, for its
@@ -450,6 +460,8 @@ export default defineClientPlugin<Model, Op>({
450
460
  ```
451
461
 
452
462
  - `routes` adds routes to the dev server, which the page half reaches with `request(route)`.
463
+ - `edit(place)` on the page half opens a place in a file under the root in the editor, as the popup's own link opens the
464
+ element's: a catalog entry, say. It goes through the dev server, or the `standalone` module where there's none.
453
465
  - `packages` names what it imports that the project installs itself (its optional peers): as the dev server starts,
454
466
  one that's missing is reported, with the command that installs it.
455
467
  - `context.report(problem)`, on either half, reports a problem of the plugin's own (a `Problem`: a `key` that's the
@@ -459,8 +471,13 @@ export default defineClientPlugin<Model, Op>({
459
471
  with anything but a `Refusal` are reported for it.
460
472
  - `setup` answers an API for other plugins, which reach it with `context.use(name)`. That's how tasks attaches
461
473
  screenshots and recordings.
474
+ - `context.onClose(callback)`, from `setup`, runs `callback` as the dev server closes: undo there what `setup` did beyond
475
+ the plugin, a global it set or a watcher it started. Vite and webpack close their servers; under Next and Bun the dev
476
+ server ends with its process, and nothing runs.
462
477
  - A change that isn't to a file answers `{ done: record }`, and the plugin's `undo` and `redo` get the record back.
463
478
  - Throw a `Refusal` for an op the plugin won't make. The panel shows its message.
479
+ - An edit's `file` names another file under the root than the element's (a catalog's entry). One that isn't there is
480
+ made where every edit to it is at its start, `start: 0, end: 0`, and undo takes it away again.
464
481
  - `read` and `apply` get the element's source, or a `Refusal` saying why it isn't to be found (the file doesn't parse,
465
482
  or the page runs other code than the file has): throw it where the plugin needs the source, or go on without, as
466
483
  tasks do. Text edits without it are refused.
package/dist/bun.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bun.d.ts","names":[],"sources":["../src/bun.ts"],"mappings":";;iBA0BiB,0BAA0B;;EAEzC;;YAGU,mBAAmB;;EAE7B,QAAQ,gBAAgB,KAAK,YAAY,QAAQ;;wBAGnC,QAAQ,UAAS,oBAAyB"}
1
+ {"version":3,"file":"bun.d.ts","names":[],"sources":["../src/bun.ts"],"mappings":";;iBA+BiB,0BAA0B;;EAEzC;;YAGU,mBAAmB;;EAE7B,QAAQ,gBAAgB,KAAK,YAAY,QAAQ;;wBAYnC,QAAQ,UAAS,oBAAyB"}
package/dist/bun.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { resolve } from "node:path";
2
2
  import { t as endpoints } from "./shared/endpoints.js";
3
- import { h as JSX, i as mark, o as prepare, r as importOf, s as writeClient } from "./shared/integration.js";
3
+ import { c as writeClient, g as JSX, i as mark, o as merge, r as importOf, s as prepare } from "./shared/integration.js";
4
4
  // src/bun.ts
5
5
  /**
6
6
  * `deictic/bun`: deictic in Bun's dev server, the bundler `Bun.serve` runs for HTML imports. Nothing
@@ -19,15 +19,28 @@ import { h as JSX, i as mark, o as prepare, r as importOf, s as writeClient } fr
19
19
  * // server.ts
20
20
  * import tools from './deictic.ts';
21
21
  * Bun.serve({ routes: { ...tools.routes, '/*': index }, development: true });
22
+ *
23
+ * bunfig may name deictic more than once: the app's, and a package's that adds its own plugin (`defaults`), as
24
+ * prosebook's does. Each made in the process for a root is kept (`made`), the first set up marks the modules, and
25
+ * the client and the endpoints, made when first needed, load all of their options merged (`merge`); any of them
26
+ * has the routes.
22
27
  */
28
+ const made = /* @__PURE__ */ new Map();
23
29
  function deictic(options = {}) {
24
- const { plugins, shortcut } = prepare(options);
30
+ prepare(options);
25
31
  const root = resolve(options.root ?? process.cwd());
26
- let handle;
32
+ let all = made.get(root);
33
+ if (all === void 0) made.set(root, all = {
34
+ given: [],
35
+ marking: false
36
+ });
37
+ all.given.push(options);
38
+ const shared = all;
39
+ const merged = () => prepare(shared.given.length === 1 ? shared.given[0] : merge(shared.given));
27
40
  const route = async (req) => {
28
- handle ??= endpoints({
41
+ shared.handle ??= endpoints({
29
42
  root,
30
- plugins,
43
+ plugins: merged().plugins,
31
44
  open: (path, { line, column }) => {
32
45
  try {
33
46
  Bun.openInEditor(path, {
@@ -40,18 +53,23 @@ function deictic(options = {}) {
40
53
  }
41
54
  }
42
55
  });
43
- return await handle(req) ?? new Response(null, { status: 404 });
56
+ return await shared.handle(req) ?? new Response(null, { status: 404 });
44
57
  };
45
58
  return {
46
59
  name: "deictic",
47
60
  routes: { "/__deictic/*": route },
48
61
  setup(build) {
49
- if ("entrypoints" in build.config) return;
50
- const client = writeClient(root, plugins, "/", shortcut);
62
+ if ("entrypoints" in build.config || shared.marking) return;
63
+ shared.marking = true;
64
+ let client;
51
65
  const forBrowser = (args) => !("side" in args) || args.side === "client";
52
66
  build.onLoad({ filter: JSX }, async (args) => {
53
67
  if (/[\\/]node_modules[\\/]/.test(args.path)) return void 0;
54
68
  const code = await Bun.file(args.path).text();
69
+ if (client === void 0) {
70
+ const { plugins, shortcut } = merged();
71
+ client = writeClient(root, plugins, "/", shortcut);
72
+ }
55
73
  const marked = mark(code, args.path, root, forBrowser(args) ? importOf(client, args.path) : "");
56
74
  if (marked === void 0) return void 0;
57
75
  return {
package/dist/bun.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bun.js","names":[],"sources":["../src/bun.ts"],"sourcesContent":["/**\n * `deictic/bun`: deictic in Bun's dev server, the bundler `Bun.serve` runs for HTML imports. Nothing\n * runs in `Bun.build`.\n *\n * Named in bunfig.toml's `[serve.static] plugins`, it marks each JSX module as it loads, and in the\n * browser appends the import of the client module, written to `.deictic/client.js`, as Bun has no\n * virtual modules for it. A bundler plugin can't add routes to the server, so the endpoints are the\n * plugin's `routes`, spread into `Bun.serve`'s; a place opens in the editor `Bun.openInEditor` finds.\n *\n * bunfig names a module whose default export is the plugin, so the plugin lives in a file of its own,\n * which the server imports too, for its routes:\n *\n * // deictic.ts\n * export default deictic({ plugins: [tailwind()] });\n * // server.ts\n * import tools from './deictic.ts';\n * Bun.serve({ routes: { ...tools.routes, '/*': index }, development: true });\n */\nimport { resolve } from 'node:path';\n\nimport type { BunPlugin } from 'bun';\n\nimport { endpoints } from './tools/endpoints.ts';\nimport { type DeicticOptions, importOf, mark, prepare, writeClient } from './tools/integration.ts';\nimport { JSX } from './tools/locate.ts';\n\nexport interface DeicticBunOptions extends DeicticOptions {\n /** The project's root, which marks and edits are from: the working directory by default. */\n root?: string;\n}\n\nexport type DeicticBunPlugin = BunPlugin & {\n /** The endpoints, as `Bun.serve` routes: `routes: { ...plugin.routes, '/*': index }`. */\n routes: Record<string, (req: Request) => Promise<Response>>;\n};\n\nexport function deictic(options: DeicticBunOptions = {}): DeicticBunPlugin {\n // Now, so a wrong set of plugins stops the dev server as it starts, rather than the page.\n const { plugins, shortcut } = prepare(options);\n const root = resolve(options.root ?? process.cwd());\n let handle: ((req: Request) => Promise<Response | undefined>) | undefined;\n const route = async (req: Request) => {\n handle ??= endpoints({\n root,\n plugins,\n open: (path, { line, column }) => {\n try {\n Bun.openInEditor(path, { line, column });\n return new Response(null, { status: 204 });\n } catch (e) {\n return new Response(`${e instanceof Error ? e.message : String(e)}: set VISUAL or EDITOR to the editor's command`, {\n status: 500,\n });\n }\n },\n });\n return (await handle(req)) ?? new Response(null, { status: 404 });\n };\n\n return {\n name: 'deictic',\n routes: { '/__deictic/*': route },\n setup(build) {\n // A build names its entry points; the dev server's bundler doesn't.\n if ('entrypoints' in build.config) return;\n const client = writeClient(root, plugins, '/', shortcut);\n // Bun names the side it loads a module for (undocumented, and not in Bun's types); the dev server's is the browser's.\n const forBrowser = (args: object) => !('side' in args) || args.side === 'client';\n build.onLoad({ filter: JSX }, async (args) => {\n // A dependency's is left to Bun, unread.\n if (/[\\\\/]node_modules[\\\\/]/.test(args.path)) return undefined;\n const code = await Bun.file(args.path).text();\n const marked = mark(code, args.path, root, forBrowser(args) ? importOf(client, args.path) : '');\n if (marked === undefined) return undefined;\n return { contents: marked.code, loader: args.path.endsWith('tsx') ? 'tsx' : 'jsx' };\n });\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAgB,QAAQ,UAA6B,CAAC,GAAqB;CAEzE,MAAM,EAAE,SAAS,aAAa,QAAQ,OAAO;CAC7C,MAAM,OAAO,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CAClD,IAAI;CACJ,MAAM,QAAQ,OAAO,QAAiB;EACpC,WAAW,UAAU;GACnB;GACA;GACA,OAAO,MAAM,EAAE,MAAM,aAAa;IAChC,IAAI;KACF,IAAI,aAAa,MAAM;MAAE;MAAM;KAAO,CAAC;KACvC,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;IAC3C,SAAS,GAAG;KACV,OAAO,IAAI,SAAS,GAAG,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC,EAAE,iDAAiD,EACjH,QAAQ,IACV,CAAC;IACH;GACF;EACF,CAAC;EACD,OAAQ,MAAM,OAAO,GAAG,KAAM,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;CAClE;CAEA,OAAO;EACL,MAAM;EACN,QAAQ,EAAE,gBAAgB,MAAM;EAChC,MAAM,OAAO;GAEX,IAAI,iBAAiB,MAAM,QAAQ;GACnC,MAAM,SAAS,YAAY,MAAM,SAAS,KAAK,QAAQ;GAEvD,MAAM,cAAc,SAAiB,EAAE,UAAU,SAAS,KAAK,SAAS;GACxE,MAAM,OAAO,EAAE,QAAQ,IAAI,GAAG,OAAO,SAAS;IAE5C,IAAI,yBAAyB,KAAK,KAAK,IAAI,GAAG,OAAO,KAAA;IACrD,MAAM,OAAO,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,KAAK;IAC5C,MAAM,SAAS,KAAK,MAAM,KAAK,MAAM,MAAM,WAAW,IAAI,IAAI,SAAS,QAAQ,KAAK,IAAI,IAAI,EAAE;IAC9F,IAAI,WAAW,KAAA,GAAW,OAAO,KAAA;IACjC,OAAO;KAAE,UAAU,OAAO;KAAM,QAAQ,KAAK,KAAK,SAAS,KAAK,IAAI,QAAQ;IAAM;GACpF,CAAC;EACH;CACF;AACF"}
1
+ {"version":3,"file":"bun.js","names":[],"sources":["../src/bun.ts"],"sourcesContent":["/**\n * `deictic/bun`: deictic in Bun's dev server, the bundler `Bun.serve` runs for HTML imports. Nothing\n * runs in `Bun.build`.\n *\n * Named in bunfig.toml's `[serve.static] plugins`, it marks each JSX module as it loads, and in the\n * browser appends the import of the client module, written to `.deictic/client.js`, as Bun has no\n * virtual modules for it. A bundler plugin can't add routes to the server, so the endpoints are the\n * plugin's `routes`, spread into `Bun.serve`'s; a place opens in the editor `Bun.openInEditor` finds.\n *\n * bunfig names a module whose default export is the plugin, so the plugin lives in a file of its own,\n * which the server imports too, for its routes:\n *\n * // deictic.ts\n * export default deictic({ plugins: [tailwind()] });\n * // server.ts\n * import tools from './deictic.ts';\n * Bun.serve({ routes: { ...tools.routes, '/*': index }, development: true });\n *\n * bunfig may name deictic more than once: the app's, and a package's that adds its own plugin (`defaults`), as\n * prosebook's does. Each made in the process for a root is kept (`made`), the first set up marks the modules, and\n * the client and the endpoints, made when first needed, load all of their options merged (`merge`); any of them\n * has the routes.\n */\nimport { resolve } from 'node:path';\n\nimport type { BunPlugin } from 'bun';\n\nimport { endpoints } from './tools/endpoints.ts';\nimport { type DeicticOptions, importOf, mark, merge, prepare, writeClient } from './tools/integration.ts';\nimport { JSX } from './tools/locate.ts';\n\nexport interface DeicticBunOptions extends DeicticOptions {\n /** The project's root, which marks and edits are from: the working directory by default. */\n root?: string;\n}\n\nexport type DeicticBunPlugin = BunPlugin & {\n /** The endpoints, as `Bun.serve` routes: `routes: { ...plugin.routes, '/*': index }`. */\n routes: Record<string, (req: Request) => Promise<Response>>;\n};\n\n/** Every deictic made in the process, by its root: what it was given, whether one set up its marking, and its endpoints. */\ninterface Made {\n given: DeicticBunOptions[];\n marking: boolean;\n handle?: (req: Request) => Promise<Response | undefined>;\n}\n\nconst made = new Map<string, Made>();\n\nexport function deictic(options: DeicticBunOptions = {}): DeicticBunPlugin {\n // Now, so a wrong set of plugins stops the dev server as it starts, rather than the page.\n prepare(options);\n const root = resolve(options.root ?? process.cwd());\n let all = made.get(root);\n if (all === undefined) made.set(root, (all = { given: [], marking: false }));\n all.given.push(options);\n const shared = all;\n const merged = () => prepare(shared.given.length === 1 ? shared.given[0]! : merge(shared.given));\n const route = async (req: Request) => {\n shared.handle ??= endpoints({\n root,\n plugins: merged().plugins,\n open: (path, { line, column }) => {\n try {\n Bun.openInEditor(path, { line, column });\n return new Response(null, { status: 204 });\n } catch (e) {\n return new Response(`${e instanceof Error ? e.message : String(e)}: set VISUAL or EDITOR to the editor's command`, {\n status: 500,\n });\n }\n },\n });\n return (await shared.handle(req)) ?? new Response(null, { status: 404 });\n };\n\n return {\n name: 'deictic',\n routes: { '/__deictic/*': route },\n setup(build) {\n // A build names its entry points; the dev server's bundler doesn't.\n if ('entrypoints' in build.config || shared.marking) return;\n shared.marking = true;\n let client: string | undefined;\n // Bun names the side it loads a module for (undocumented, and not in Bun's types); the dev server's is the browser's.\n const forBrowser = (args: object) => !('side' in args) || args.side === 'client';\n build.onLoad({ filter: JSX }, async (args) => {\n // A dependency's is left to Bun, unread.\n if (/[\\\\/]node_modules[\\\\/]/.test(args.path)) return undefined;\n const code = await Bun.file(args.path).text();\n // Written as the first module loads, once bunfig's every deictic has been made.\n if (client === undefined) {\n const { plugins, shortcut } = merged();\n client = writeClient(root, plugins, '/', shortcut);\n }\n const marked = mark(code, args.path, root, forBrowser(args) ? importOf(client, args.path) : '');\n if (marked === undefined) return undefined;\n return { contents: marked.code, loader: args.path.endsWith('tsx') ? 'tsx' : 'jsx' };\n });\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAM,uBAAO,IAAI,IAAkB;AAEnC,SAAgB,QAAQ,UAA6B,CAAC,GAAqB;CAEzE,QAAQ,OAAO;CACf,MAAM,OAAO,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CAClD,IAAI,MAAM,KAAK,IAAI,IAAI;CACvB,IAAI,QAAQ,KAAA,GAAW,KAAK,IAAI,MAAO,MAAM;EAAE,OAAO,CAAC;EAAG,SAAS;CAAM,CAAE;CAC3E,IAAI,MAAM,KAAK,OAAO;CACtB,MAAM,SAAS;CACf,MAAM,eAAe,QAAQ,OAAO,MAAM,WAAW,IAAI,OAAO,MAAM,KAAM,MAAM,OAAO,KAAK,CAAC;CAC/F,MAAM,QAAQ,OAAO,QAAiB;EACpC,OAAO,WAAW,UAAU;GAC1B;GACA,SAAS,OAAO,CAAC,CAAC;GAClB,OAAO,MAAM,EAAE,MAAM,aAAa;IAChC,IAAI;KACF,IAAI,aAAa,MAAM;MAAE;MAAM;KAAO,CAAC;KACvC,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;IAC3C,SAAS,GAAG;KACV,OAAO,IAAI,SAAS,GAAG,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC,EAAE,iDAAiD,EACjH,QAAQ,IACV,CAAC;IACH;GACF;EACF,CAAC;EACD,OAAQ,MAAM,OAAO,OAAO,GAAG,KAAM,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;CACzE;CAEA,OAAO;EACL,MAAM;EACN,QAAQ,EAAE,gBAAgB,MAAM;EAChC,MAAM,OAAO;GAEX,IAAI,iBAAiB,MAAM,UAAU,OAAO,SAAS;GACrD,OAAO,UAAU;GACjB,IAAI;GAEJ,MAAM,cAAc,SAAiB,EAAE,UAAU,SAAS,KAAK,SAAS;GACxE,MAAM,OAAO,EAAE,QAAQ,IAAI,GAAG,OAAO,SAAS;IAE5C,IAAI,yBAAyB,KAAK,KAAK,IAAI,GAAG,OAAO,KAAA;IACrD,MAAM,OAAO,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,KAAK;IAE5C,IAAI,WAAW,KAAA,GAAW;KACxB,MAAM,EAAE,SAAS,aAAa,OAAO;KACrC,SAAS,YAAY,MAAM,SAAS,KAAK,QAAQ;IACnD;IACA,MAAM,SAAS,KAAK,MAAM,KAAK,MAAM,MAAM,WAAW,IAAI,IAAI,SAAS,QAAQ,KAAK,IAAI,IAAI,EAAE;IAC9F,IAAI,WAAW,KAAA,GAAW,OAAO,KAAA;IACjC,OAAO;KAAE,UAAU,OAAO;KAAM,QAAQ,KAAK,KAAK,SAAS,KAAK,IAAI,QAAQ;IAAM;GACpF,CAAC;EACH;CACF;AACF"}
@@ -1553,6 +1553,14 @@ function start({ base, shortcut: own, plugins: given, server }) {
1553
1553
  ...problem,
1554
1554
  plugin: name
1555
1555
  }),
1556
+ edit: async ({ file, line, column }) => {
1557
+ const res = await send(`${base}__deictic/open?${new URLSearchParams({
1558
+ file,
1559
+ line: String(line),
1560
+ column: String(column)
1561
+ })}`);
1562
+ if (!res.ok) throw new Error(await res.text());
1563
+ },
1556
1564
  open: (plugin, element, at) => panel?.guard() !== true && openAt(plugin, element, at),
1557
1565
  lightbox: (items, options) => openLightbox(root, items, options),
1558
1566
  drawer,