@quillmark/svelte 0.5.1 → 0.7.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 (66) hide show
  1. package/README.md +6 -0
  2. package/THEMING.md +13 -17
  3. package/dist/core/address.d.ts +17 -3
  4. package/dist/core/address.js +20 -3
  5. package/dist/core/codec/blocks.d.ts +37 -0
  6. package/dist/core/codec/blocks.js +163 -0
  7. package/dist/core/codec/field.js +5 -6
  8. package/dist/core/codec/index.d.ts +1 -1
  9. package/dist/core/codec/index.js +3 -2
  10. package/dist/core/codec/inputrules.js +24 -144
  11. package/dist/core/codec/prose.css +14 -25
  12. package/dist/core/codec/schema.d.ts +8 -0
  13. package/dist/core/codec/schema.js +33 -1
  14. package/dist/core/codec/slash.d.ts +18 -16
  15. package/dist/core/codec/slash.js +0 -0
  16. package/dist/core/codec/table-view.d.ts +4 -0
  17. package/dist/core/codec/table-view.js +137 -158
  18. package/dist/core/codec/table.d.ts +0 -10
  19. package/dist/core/codec/table.js +0 -15
  20. package/dist/core/theme.css +357 -346
  21. package/dist/preset/recipes.css +25 -21
  22. package/dist/preview/Preview.svelte +4 -2
  23. package/dist/preview/bridge.d.ts +23 -0
  24. package/dist/preview/bridge.js +92 -35
  25. package/dist/preview/controller.d.ts +6 -5
  26. package/dist/preview/controller.js +13 -7
  27. package/dist/preview/geometry.d.ts +10 -9
  28. package/dist/preview/geometry.js +11 -13
  29. package/dist/preview/index.js +3 -2
  30. package/dist/preview/paint.js +9 -1
  31. package/dist/visual/ArrayField.svelte +246 -63
  32. package/dist/visual/ArrayField.svelte.d.ts +5 -1
  33. package/dist/visual/Card.svelte +84 -50
  34. package/dist/visual/EnumField.svelte +37 -3
  35. package/dist/visual/Field.svelte +28 -4
  36. package/dist/visual/FieldLabel.svelte +2 -2
  37. package/dist/visual/FormatPopover.svelte +13 -1
  38. package/dist/visual/ObjectField.svelte +128 -35
  39. package/dist/visual/ObjectField.svelte.d.ts +11 -4
  40. package/dist/visual/ProseArrayElement.svelte +22 -2
  41. package/dist/visual/ProseArrayElement.svelte.d.ts +1 -0
  42. package/dist/visual/SlashMenu.svelte +7 -0
  43. package/dist/visual/TipsCard.svelte +33 -13
  44. package/dist/visual/VariantField.svelte +95 -0
  45. package/dist/visual/VariantField.svelte.d.ts +21 -0
  46. package/dist/visual/VisualEditorInner.svelte +44 -21
  47. package/dist/visual/controls.css +282 -283
  48. package/dist/visual/diagnostics.d.ts +13 -11
  49. package/dist/visual/diagnostics.js +11 -9
  50. package/dist/visual/domid.d.ts +13 -0
  51. package/dist/visual/domid.js +16 -0
  52. package/dist/visual/hold.d.ts +17 -0
  53. package/dist/visual/hold.js +39 -0
  54. package/dist/visual/index.js +1 -1
  55. package/dist/visual/leaves.d.ts +9 -7
  56. package/dist/visual/links.d.ts +5 -2
  57. package/dist/visual/links.js +9 -3
  58. package/dist/visual/motion.d.ts +9 -0
  59. package/dist/visual/motion.js +10 -2
  60. package/dist/visual/strings.d.ts +15 -0
  61. package/dist/visual/strings.js +3 -0
  62. package/dist/visual/structure.d.ts +32 -6
  63. package/dist/visual/structure.js +49 -3
  64. package/package.json +2 -2
  65. package/dist/core/codec/clipboard.d.ts +0 -59
  66. package/dist/core/codec/clipboard.js +0 -202
@@ -71,16 +71,6 @@ export declare function moveColumn(props: TableProps, c: number, by: number): Ta
71
71
  * Alignment is the column's rather than the cells', so it survives a clear that spans one.
72
72
  */
73
73
  export declare function clearCells(props: TableProps, r0: number, c0: number, r1: number, c1: number): TableProps;
74
- /**
75
- * A rectangle written in at `(r, c)`, the table growing to hold whatever runs past its
76
- * edges: what a paste into a cell means (`clipboard.ts`). The alternative is clipping
77
- * to the rectangle that is there, which silently drops the tail of what the author
78
- * copied; growth drops nothing and every added rank is one the ops already remove.
79
- *
80
- * `aligns` is the table's own throughout: a column keeps its alignment under a paste,
81
- * and a column the paste added arrives `none` like any other fresh one.
82
- */
83
- export declare function pasteCells(props: TableProps, r: number, c: number, block: TableCell[][]): TableProps;
84
74
  /** Set column `c`'s alignment: the one table capability the content round-trips
85
75
  * today and nothing in the editor could reach. */
86
76
  export declare function setAlign(props: TableProps, c: number, align: TableAlign): TableProps;
@@ -189,21 +189,6 @@ export function clearCells(props, r0, c0, r1, c1) {
189
189
  aligns: props.aligns
190
190
  });
191
191
  }
192
- /**
193
- * A rectangle written in at `(r, c)`, the table growing to hold whatever runs past its
194
- * edges: what a paste into a cell means (`clipboard.ts`). The alternative is clipping
195
- * to the rectangle that is there, which silently drops the tail of what the author
196
- * copied; growth drops nothing and every added rank is one the ops already remove.
197
- *
198
- * `aligns` is the table's own throughout: a column keeps its alignment under a paste,
199
- * and a column the paste added arrives `none` like any other fresh one.
200
- */
201
- export function pasteCells(props, r, c, block) {
202
- const rows = allRows(props);
203
- const height = Math.max(rows.length, r + block.length);
204
- const width = Math.max(columnCount(props), ...block.map((row) => c + row.length));
205
- return fromRows(Array.from({ length: height }, (_, i) => Array.from({ length: width }, (_, j) => block[i - r]?.[j - c] ?? rows[i]?.[j] ?? emptyCell())), props.aligns);
206
- }
207
192
  /** Set column `c`'s alignment: the one table capability the content round-trips
208
193
  * today and nothing in the editor could reach. */
209
194
  export function setAlign(props, c, align) {