@fusion.dev/helix-sandbox 0.0.0-dev → 0.207.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 (61) hide show
  1. package/api.json +1 -1
  2. package/custom-elements.json +1 -1182
  3. package/dist/code-block/code-block-highlight.d.ts +0 -1
  4. package/dist/code-block/code-block-highlight.js +0 -1
  5. package/dist/code-block/index.d.ts +0 -1
  6. package/dist/code-block/index.js +0 -1
  7. package/dist/editor/index.d.ts +0 -1
  8. package/dist/editor/index.js +0 -1
  9. package/dist/highlight/highlight.d.ts +0 -1
  10. package/dist/highlight/highlight.js +0 -1
  11. package/dist/highlight/index.d.ts +0 -1
  12. package/dist/highlight/index.js +0 -1
  13. package/dist/highlight/language.d.ts +0 -1
  14. package/dist/highlight/language.js +0 -1
  15. package/dist/highlight/shell.d.ts +0 -1
  16. package/dist/highlight/shell.js +0 -1
  17. package/dist/highlight/stream.d.ts +0 -1
  18. package/dist/highlight/stream.js +0 -1
  19. package/dist/highlight/syntax.d.ts +0 -1
  20. package/dist/highlight/syntax.js +0 -1
  21. package/dist/index.d.ts +0 -1
  22. package/dist/index.js +0 -1
  23. package/dist/sandbox/editor/sandbox-editor.css.d.ts +0 -1
  24. package/dist/sandbox/editor/sandbox-editor.css.js +0 -1
  25. package/dist/sandbox/editor/sandbox-editor.d.ts +0 -1
  26. package/dist/sandbox/editor/sandbox-editor.js +0 -1
  27. package/examples.json +1 -1
  28. package/lint.json +1 -1
  29. package/package.json +8 -8
  30. package/dist/code-block/code-block-highlight.d.ts.map +0 -1
  31. package/dist/code-block/code-block-highlight.js.map +0 -1
  32. package/dist/code-block/index.d.ts.map +0 -1
  33. package/dist/code-block/index.js.map +0 -1
  34. package/dist/editor/index.d.ts.map +0 -1
  35. package/dist/editor/index.js.map +0 -1
  36. package/dist/editor/root/editor-root.css.d.ts +0 -2
  37. package/dist/editor/root/editor-root.css.d.ts.map +0 -1
  38. package/dist/editor/root/editor-root.css.js +0 -3
  39. package/dist/editor/root/editor-root.css.js.map +0 -1
  40. package/dist/editor/root/editor-root.d.ts +0 -146
  41. package/dist/editor/root/editor-root.d.ts.map +0 -1
  42. package/dist/editor/root/editor-root.js +0 -199
  43. package/dist/editor/root/editor-root.js.map +0 -1
  44. package/dist/highlight/highlight.d.ts.map +0 -1
  45. package/dist/highlight/highlight.js.map +0 -1
  46. package/dist/highlight/index.d.ts.map +0 -1
  47. package/dist/highlight/index.js.map +0 -1
  48. package/dist/highlight/language.d.ts.map +0 -1
  49. package/dist/highlight/language.js.map +0 -1
  50. package/dist/highlight/shell.d.ts.map +0 -1
  51. package/dist/highlight/shell.js.map +0 -1
  52. package/dist/highlight/stream.d.ts.map +0 -1
  53. package/dist/highlight/stream.js.map +0 -1
  54. package/dist/highlight/syntax.d.ts.map +0 -1
  55. package/dist/highlight/syntax.js.map +0 -1
  56. package/dist/index.d.ts.map +0 -1
  57. package/dist/index.js.map +0 -1
  58. package/dist/sandbox/editor/sandbox-editor.css.d.ts.map +0 -1
  59. package/dist/sandbox/editor/sandbox-editor.css.js.map +0 -1
  60. package/dist/sandbox/editor/sandbox-editor.d.ts.map +0 -1
  61. package/dist/sandbox/editor/sandbox-editor.js.map +0 -1
package/api.json CHANGED
@@ -1 +1 @@
1
- {"families":[{"contributes":true,"elements":[{"attributes":[{"description":"Accessible name for the editable region.","name":"field-label","type":"string"},{"description":"The language of the source, which decides how it is highlighted. A name\nthe editor does not read draws the source plain.","name":"language","type":"'css' | 'html' | 'javascript' | 'js' | 'jsx' | 'mjs' | 'sh' | 'ts' | 'tsx'"},{"description":"Which source this pane holds, echoed in every change.","name":"name","type":"string"},{"description":"Whether the text can be changed.\n\n`EditorState.readOnly` rather than removing the editor's focus or its\nkeymap: a reader still needs to select the text, scroll it, and put a\ncursor in it to read a long line. What it stops is the typing.","name":"readonly","type":"boolean"},{"description":"The source being edited.","name":"value","type":"string"}],"cssParts":[{"description":"The element CodeMirror is mounted into.","name":"editor","type":""}],"cssProperties":[],"cssStates":[{"description":"While the source differs from the source the editor was given, until `reset()` or a new `value`.","name":"modified","type":""},{"description":"Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.","name":"settled","type":""}],"description":"CodeMirror, not a `<textarea>`. A textarea cannot highlight what it holds,\nnumber its lines, or say where the cursor is, and a status bar reading line\nand column has to ask something.\n\n**On its own path.** This is `@fusion.dev/helix-sandbox/editor`, and the\npackage's root exports its class as a type only, because CodeMirror is most\nof what the package weighs over the wire. A sandbox with no editable pane\npays for none, and neither does a site that registers its elements once.\n\n`language` names the grammar by the name a file or a sandbox pane carries:\n`css`, `html`, `js`, `jsx`, `mjs`, `sh`, `ts` or `tsx`. A name the editor\ndoes not read draws the source plain, and the console says so once.\n\nEach edit a reader makes is `helix-before-edit` first, which you can cancel\nto refuse the edit, and `helix-edit` once the source holds it, as\n`helix-sandbox-source` sends them. A `value` set from outside is the source the editor is given, and\nsends neither. **The editor is `:state(modified)` while its source differs\nfrom the source it was given**, the first `value` or the last one set from\noutside, and `reset()` puts that source back as an edit.\n\nThe view is built once and reconfigured, not rebuilt. Replacing it on every\nchange would throw away the undo history, the scroll position, and the\nselection, which is most of what an editor is.","entry":"editor","events":[{"bubbles":true,"description":"Fired before the source is edited. Cancelable: refusing it takes the decision and nothing moves.","name":"helix-before-edit","reactProp":"onhelix-before-edit","type":"HelixBeforeEditEvent"},{"bubbles":true,"description":"Fired when the cursor moves, with its line and column.","name":"helix-caret","reactProp":"onhelix-caret","type":"HelixCaretEvent"},{"bubbles":true,"description":"Fired after the source was edited, with the new source.","name":"helix-edit","reactProp":"onhelix-edit","type":"HelixEditEvent"}],"label":"Sandbox Editor","methods":[{"description":"Puts back the source the editor was given, as an edit: `helix-before-edit`\nis sent first and can refuse it, and a sandbox passes it to its preview.","name":"reset","type":"() => void"},{"description":"Moves focus into the text, not onto the host.\n\nThe host is not focusable: what a reader types into is CodeMirror's\ncontenteditable, several nodes down inside this shadow root. Without this,\n`editor.focus()` from outside silently does nothing.","name":"focus","type":"() => void"}],"package":"@fusion.dev/helix-sandbox","part":"Editor","properties":[{"default":"'Example source'","description":"Accessible name for the editable region.","name":"fieldLabel","readonly":false,"references":[],"type":"string"},{"default":"'html'","description":"The language of the source, which decides how it is highlighted. A name\nthe editor does not read draws the source plain.","name":"language","readonly":false,"references":[],"type":"'css' | 'html' | 'javascript' | 'js' | 'jsx' | 'mjs' | 'sh' | 'ts' | 'tsx'"},{"default":"'html'","description":"Which source this pane holds, echoed in every change.","name":"name","readonly":false,"references":[],"type":"string"},{"default":"false","description":"Whether the text can be changed.\n\n`EditorState.readOnly` rather than removing the editor's focus or its\nkeymap: a reader still needs to select the text, scroll it, and put a\ncursor in it to read a long line. What it stops is the typing.","name":"readOnly","readonly":false,"references":[],"type":"boolean"},{"default":"''","description":"The source being edited.","name":"value","readonly":false,"references":[],"type":"string"},{"default":"","description":"Whether the source differs from the source the editor was given: its\nfirst `value`, or the last one set from outside.","name":"modified","readonly":true,"references":[],"type":"boolean"},{"default":"","description":"Where the cursor is, counted from one, as an editor reports it.","name":"caret","readonly":true,"references":[],"type":"CaretDetail"},{"default":"new Promise<void>((resolve) => { this.resolveSettled = resolve })","description":"Resolves a frame after the first update, when transitions are switched on.\n\n**Named `whenSettled` because `settled` is taken four times over**, by\nImage, Splitter and both color controls, none of them about transitions. A\nbase class takes the name every subclass then cannot use.\n\n**The state it reports cannot be watched, which is why this exists.** A\ncustom state is deliberately not in the DOM, so there is no\n`MutationObserver` equivalent for `ElementInternals.states`. Await this\ninstead.\n\nSeparate from `updateComplete`, which resolves in the microtask checkpoint\nthe suppression is still active in. That is the distinction `readyToMove`\nin `@fusion.dev/helix-testing` is written around.\n\nIt never resolves where `requestAnimationFrame` never fires, which is a\nserver, a hidden tab, and happy-dom. Callers that must not hang there race\nit against a timeout, as the happy-dom harness's `readyToMove` does. The\nbrowser harness's awaits it alone: a browser always runs the frame, and a\ntimer beside it was a bet on how long one takes, which a busy run lost.","name":"whenSettled","readonly":true,"references":[],"type":"Promise<void>"}],"slots":[],"specifier":"@fusion.dev/helix-sandbox/editor","status":"experimental","summary":"An editable pane of source, with highlighting and line numbers.","tagName":"helix-sandbox-editor","tier":"styled","words":["fieldLabel"]}],"label":"Sandbox","package":"@fusion.dev/helix","slug":"sandbox"}],"package":"@fusion.dev/helix-sandbox"}
1
+ {"families":[{"contributes":true,"elements":[{"attributes":[{"description":"Accessible name for the editable region.","name":"field-label","type":"string"},{"description":"The language of the source, which decides how it is highlighted. A name\nthe editor does not read draws the source plain.","name":"language","type":"'css' | 'html' | 'javascript' | 'js' | 'jsx' | 'mjs' | 'sh' | 'ts' | 'tsx'"},{"description":"Which source this pane holds, echoed in every change.","name":"name","type":"string"},{"description":"Whether the text can be changed.\n\n`EditorState.readOnly` rather than removing the editor's focus or its\nkeymap: a reader still needs to select the text, scroll it, and put a\ncursor in it to read a long line. What it stops is the typing.","name":"readonly","type":"boolean"},{"description":"The source being edited.","name":"value","type":"string"}],"cssParts":[{"description":"The element CodeMirror is mounted into.","name":"editor","type":""}],"cssProperties":[],"cssStates":[{"description":"While the source differs from the source the editor was given, until `reset()` or a new `value`.","name":"modified","type":""},{"description":"Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.","name":"settled","type":""}],"description":"CodeMirror, not a `<textarea>`. A textarea cannot highlight what it holds,\nnumber its lines, or say where the cursor is, and a status bar reading line\nand column has to ask something.\n\n**On its own path.** This is `@fusion.dev/helix-sandbox/editor`, and the\npackage's root exports its class as a type only, because CodeMirror is most\nof what the package weighs over the wire. A sandbox with no editable pane\npays for none, and neither does a site that registers its elements once.\n\n`language` names the grammar by the name a file or a sandbox pane carries:\n`css`, `html`, `js`, `jsx`, `mjs`, `sh`, `ts` or `tsx`. A name the editor\ndoes not read draws the source plain, and the console says so once.\n\nEach edit a reader makes is `helix-before-edit` first, which you can cancel\nto refuse the edit, and `helix-edit` once the source holds it, as\n`helix-sandbox-source` sends them. A `value` set from outside is the source the editor is given, and\nsends neither. **The editor is `:state(modified)` while its source differs\nfrom the source it was given**, the first `value` or the last one set from\noutside, and `reset()` puts that source back as an edit.\n\nThe view is built once and reconfigured, not rebuilt. Replacing it on every\nchange would throw away the undo history, the scroll position, and the\nselection, which is most of what an editor is.","entry":"editor","events":[{"bubbles":true,"description":"Fired before the source is edited. Cancelable: refusing it takes the decision and nothing moves.","name":"helix-before-edit","reactProp":"onhelix-before-edit","type":"HelixBeforeEditEvent"},{"bubbles":true,"description":"Fired when the cursor moves, with its line and column.","name":"helix-caret","reactProp":"onhelix-caret","type":"HelixCaretEvent"},{"bubbles":true,"description":"Fired after the source was edited, with the new source.","name":"helix-edit","reactProp":"onhelix-edit","type":"HelixEditEvent"}],"label":"Sandbox Editor","methods":[{"description":"Puts back the source the editor was given, as an edit: `helix-before-edit`\nis sent first and can refuse it, and a sandbox passes it to its preview.","name":"reset","type":"() => void"},{"description":"Moves focus into the text, not onto the host.\n\nThe host is not focusable: what a reader types into is CodeMirror's\ncontenteditable, several nodes down inside this shadow root. Without this,\n`editor.focus()` from outside silently does nothing.","name":"focus","type":"() => void"}],"package":"@fusion.dev/helix-sandbox","part":"Editor","properties":[{"default":"'Example source'","description":"Accessible name for the editable region.","name":"fieldLabel","readonly":false,"references":[],"type":"string"},{"default":"'html'","description":"The language of the source, which decides how it is highlighted. A name\nthe editor does not read draws the source plain.","name":"language","readonly":false,"references":[],"type":"'css' | 'html' | 'javascript' | 'js' | 'jsx' | 'mjs' | 'sh' | 'ts' | 'tsx'"},{"default":"'html'","description":"Which source this pane holds, echoed in every change.","name":"name","readonly":false,"references":[],"type":"string"},{"default":"false","description":"Whether the text can be changed.\n\n`EditorState.readOnly` rather than removing the editor's focus or its\nkeymap: a reader still needs to select the text, scroll it, and put a\ncursor in it to read a long line. What it stops is the typing.","name":"readOnly","readonly":false,"references":[],"type":"boolean"},{"default":"''","description":"The source being edited.","name":"value","readonly":false,"references":[],"type":"string"},{"default":"","description":"Whether the source differs from the source the editor was given: its\nfirst `value`, or the last one set from outside.","name":"modified","readonly":true,"references":[],"type":"boolean"},{"default":"","description":"Where the cursor is, counted from one, as an editor reports it.","name":"caret","readonly":true,"references":[],"type":"CaretDetail"},{"default":"new Promise<void>((resolve) => { this.resolveSettled = resolve })","description":"Resolves a frame after the first update, when transitions are switched on.\n\n**Named `whenSettled` because `settled` is taken four times over**, by\nImage, Splitter and both color controls, none of them about transitions. A\nbase class takes the name every subclass then cannot use.\n\n**The state it reports cannot be watched, which is why this exists.** A\ncustom state is deliberately not in the DOM, so there is no\n`MutationObserver` equivalent for `ElementInternals.states`. Await this\ninstead.\n\nSeparate from `updateComplete`, which resolves in the microtask checkpoint\nthe suppression is still active in. That is the distinction `readyToMove`\nin `@fusion.dev/helix-testing` is written around.\n\nIt never resolves where `requestAnimationFrame` never fires, which is a\nserver, a hidden tab, and happy-dom. Callers that must not hang there race\nit against a timeout, as the happy-dom harness's `readyToMove` does. The\nbrowser harness's awaits it alone: a browser always runs the frame, and a\ntimer beside it was a bet on how long one takes, which a busy run lost.","name":"whenSettled","readonly":true,"references":[],"type":"Promise<void>"}],"slots":[],"specifier":"@fusion.dev/helix-sandbox/editor","status":"experimental","summary":"An editable pane of source, with highlighting and line numbers.","tagName":"helix-sandbox-editor","tier":"styled","words":["fieldLabel"]}],"label":"Sandbox","package":"@fusion.dev/helix","slug":"sandbox"}],"package":"@fusion.dev/helix-sandbox"}