@quillmark/svelte 0.30.0 → 0.32.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 (82) hide show
  1. package/README.md +5 -5
  2. package/dist/core/address.d.ts +1 -1
  3. package/dist/core/address.js +1 -1
  4. package/dist/core/codec/atoms.js +1 -1
  5. package/dist/core/codec/breaks.js +3 -2
  6. package/dist/core/codec/decode.d.ts +4 -3
  7. package/dist/core/codec/decode.js +17 -13
  8. package/dist/core/codec/field.d.ts +5 -4
  9. package/dist/core/codec/field.js +139 -49
  10. package/dist/core/codec/index.d.ts +2 -0
  11. package/dist/core/codec/index.js +5 -1
  12. package/dist/core/codec/inputrules.js +3 -3
  13. package/dist/core/codec/islands.d.ts +1 -1
  14. package/dist/core/codec/islands.js +3 -3
  15. package/dist/core/codec/keymap.d.ts +1 -1
  16. package/dist/core/codec/keymap.js +3 -2
  17. package/dist/core/codec/list-move.js +2 -1
  18. package/dist/core/codec/list-paste.js +1 -1
  19. package/dist/core/codec/lists.d.ts +1 -1
  20. package/dist/core/codec/lists.js +7 -6
  21. package/dist/core/codec/markdown-paste.js +2 -2
  22. package/dist/core/codec/positions.d.ts +12 -1
  23. package/dist/core/codec/prose.css +3 -11
  24. package/dist/core/codec/schema.d.ts +3 -3
  25. package/dist/core/codec/schema.js +6 -6
  26. package/dist/core/codec/shortcuts.d.ts +91 -0
  27. package/dist/core/codec/shortcuts.js +135 -0
  28. package/dist/core/codec/slash.d.ts +4 -2
  29. package/dist/core/codec/slash.js +11 -1
  30. package/dist/core/codec/table-paste.js +1 -1
  31. package/dist/core/codec/table-view.d.ts +1 -1
  32. package/dist/core/codec/table-view.js +27 -37
  33. package/dist/core/codec/tasks.js +1 -1
  34. package/dist/core/index.d.ts +1 -0
  35. package/dist/core/theme.css +16 -8
  36. package/dist/preset/scale.css +1 -1
  37. package/dist/preview/Preview.svelte +2 -3
  38. package/dist/preview/bridge.js +2 -2
  39. package/dist/preview/geometry.d.ts +2 -2
  40. package/dist/preview/geometry.js +2 -2
  41. package/dist/preview/paint.js +1 -1
  42. package/dist/visual/ArrayField.svelte +172 -87
  43. package/dist/visual/BooleanField.svelte +3 -3
  44. package/dist/visual/Card.svelte +68 -47
  45. package/dist/visual/CardControls.svelte +1 -1
  46. package/dist/visual/DateField.svelte +17 -2
  47. package/dist/visual/DiagnosticList.svelte +35 -3
  48. package/dist/visual/EnumField.svelte +59 -45
  49. package/dist/visual/Field.svelte +16 -6
  50. package/dist/visual/Field.svelte.d.ts +3 -1
  51. package/dist/visual/FieldHint.svelte +10 -3
  52. package/dist/visual/FormatPopover.svelte +9 -3
  53. package/dist/visual/MatrixAdd.svelte +4 -19
  54. package/dist/visual/MatrixField.svelte +21 -13
  55. package/dist/visual/NumberField.svelte +2 -3
  56. package/dist/visual/ObjectField.svelte +166 -147
  57. package/dist/visual/ProseField.svelte +8 -3
  58. package/dist/visual/SlashMenu.svelte +24 -12
  59. package/dist/visual/SlashMenu.svelte.d.ts +2 -0
  60. package/dist/visual/TextField.svelte +1 -1
  61. package/dist/visual/VariantField.svelte +1 -1
  62. package/dist/visual/VisualEditor.svelte +1 -1
  63. package/dist/visual/VisualEditor.svelte.d.ts +1 -1
  64. package/dist/visual/VisualEditorInner.svelte +159 -24
  65. package/dist/visual/VisualEditorInner.svelte.d.ts +1 -1
  66. package/dist/visual/controls.css +43 -5
  67. package/dist/visual/diagnostics.d.ts +2 -2
  68. package/dist/visual/diagnostics.js +2 -2
  69. package/dist/visual/index.d.ts +2 -0
  70. package/dist/visual/index.js +3 -0
  71. package/dist/visual/leaves.js +1 -1
  72. package/dist/visual/props.d.ts +2 -2
  73. package/dist/visual/strings.d.ts +33 -15
  74. package/dist/visual/strings.js +42 -7
  75. package/dist/visual/structure.d.ts +27 -18
  76. package/dist/visual/structure.js +32 -28
  77. package/dist/visual/tips.js +1 -1
  78. package/dist/visual/undo.svelte.d.ts +36 -0
  79. package/dist/visual/undo.svelte.js +119 -0
  80. package/package.json +2 -2
  81. package/dist/visual/hold.d.ts +0 -17
  82. package/dist/visual/hold.js +0 -39
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/svelte",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "description": "Editor, live-preview and source surfaces over a Quillmark WASM session.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -69,7 +69,7 @@
69
69
  "check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings"
70
70
  },
71
71
  "peerDependencies": {
72
- "@quillmark/wasm": ">=0.134.1-0 <0.135.0-0",
72
+ "@quillmark/wasm": ">=0.135.0-0",
73
73
  "svelte": "^5.33.0"
74
74
  },
75
75
  "dependencies": {
@@ -1,17 +0,0 @@
1
- /**
2
- * Run `change` and keep `anchor` inside the fold for the length of the move.
3
- *
4
- * A section closing above the pressed control carries that control off the fold with it,
5
- * and what answers that is the trip every landing here already takes: the minimum, to the
6
- * nearest edge, never a centring (VISUAL_EDITOR §"Focus and the preview bridge"). So a
7
- * control the collapse never carries out of view costs no scroll at all, and one it would
8
- * rides up and parks at the edge, which is where a section just opened wants its header:
9
- * the fold below it is the room its fields unfold into, where a control held on the line
10
- * it was pressed on opens its section into the screen it sits on the edge of.
11
- *
12
- * Per frame, because both panels move over the motion rung: a trip taken once is taken
13
- * against a track that has not moved yet, the same flush a reveal's landing measures in
14
- * (`Card.revealLeaf`). `instant`, because a host's `scroll-behavior: smooth` would
15
- * otherwise animate each frame's correction toward the one before it.
16
- */
17
- export declare function holdInView(anchor: HTMLElement | undefined, change: () => void): void;
@@ -1,39 +0,0 @@
1
- // The gesture's anchor, which scroll anchoring is not: the platform picks its anchor off
2
- // the layout, and what fills the viewport as a section collapses is that section's own
3
- // content, whose top never moves.
4
- import { flushSync } from 'svelte';
5
- import { rungMs, rungStyle } from '../core/rungs.js';
6
- /**
7
- * Run `change` and keep `anchor` inside the fold for the length of the move.
8
- *
9
- * A section closing above the pressed control carries that control off the fold with it,
10
- * and what answers that is the trip every landing here already takes: the minimum, to the
11
- * nearest edge, never a centring (VISUAL_EDITOR §"Focus and the preview bridge"). So a
12
- * control the collapse never carries out of view costs no scroll at all, and one it would
13
- * rides up and parks at the edge, which is where a section just opened wants its header:
14
- * the fold below it is the room its fields unfold into, where a control held on the line
15
- * it was pressed on opens its section into the screen it sits on the edge of.
16
- *
17
- * Per frame, because both panels move over the motion rung: a trip taken once is taken
18
- * against a track that has not moved yet, the same flush a reveal's landing measures in
19
- * (`Card.revealLeaf`). `instant`, because a host's `scroll-behavior: smooth` would
20
- * otherwise animate each frame's correction toward the one before it.
21
- */
22
- export function holdInView(anchor, change) {
23
- if (!anchor)
24
- return void change();
25
- change();
26
- flushSync();
27
- const reveal = () => anchor.scrollIntoView({ block: 'nearest', behavior: 'instant' });
28
- reveal();
29
- const rung = rungMs(rungStyle(anchor), '--_qm-duration-slow');
30
- if (rung === undefined)
31
- return;
32
- const until = performance.now() + rung;
33
- const step = (now) => {
34
- reveal();
35
- if (now < until)
36
- requestAnimationFrame(step);
37
- };
38
- requestAnimationFrame(step);
39
- }