@damiro/stylo 0.7.0 → 0.9.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 (146) hide show
  1. package/README.md +24 -10
  2. package/dist/{InPlaceView-CS1qy-Ba.js → InPlaceView-Bu91_3Ig.js} +1199 -855
  3. package/dist/InPlaceView-Bu91_3Ig.js.map +1 -0
  4. package/dist/Preview-AaGGwLQP.js +170 -0
  5. package/dist/Preview-AaGGwLQP.js.map +1 -0
  6. package/dist/SplitView.d.ts +4 -2
  7. package/dist/SplitView.d.ts.map +1 -1
  8. package/dist/Stylo.d.ts.map +1 -1
  9. package/dist/editor/SourceView.d.ts +4 -2
  10. package/dist/editor/SourceView.d.ts.map +1 -1
  11. package/dist/editor/extensions.d.ts +2 -2
  12. package/dist/editor/extensions.d.ts.map +1 -1
  13. package/dist/editor/useCodeMirror.d.ts +4 -2
  14. package/dist/editor/useCodeMirror.d.ts.map +1 -1
  15. package/dist/editor/wikilink-complete.d.ts +5 -3
  16. package/dist/editor/wikilink-complete.d.ts.map +1 -1
  17. package/dist/embed-B2Dfkpd_.js +124 -0
  18. package/dist/embed-B2Dfkpd_.js.map +1 -0
  19. package/dist/embed.d.ts +14 -0
  20. package/dist/embed.d.ts.map +1 -0
  21. package/dist/frontmatter-DGUkb9z-.js +39 -0
  22. package/dist/frontmatter-DGUkb9z-.js.map +1 -0
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/inplace/InPlaceView.d.ts +11 -2
  26. package/dist/inplace/InPlaceView.d.ts.map +1 -1
  27. package/dist/inplace/config.d.ts +8 -0
  28. package/dist/inplace/config.d.ts.map +1 -1
  29. package/dist/inplace/context-menu-actions.d.ts +5 -14
  30. package/dist/inplace/context-menu-actions.d.ts.map +1 -1
  31. package/dist/inplace/context-menu-helpers.d.ts +30 -0
  32. package/dist/inplace/context-menu-helpers.d.ts.map +1 -0
  33. package/dist/inplace/context-menu-shell.d.ts +23 -0
  34. package/dist/inplace/context-menu-shell.d.ts.map +1 -0
  35. package/dist/inplace/context-menu-types.d.ts +46 -0
  36. package/dist/inplace/context-menu-types.d.ts.map +1 -0
  37. package/dist/inplace/context-menu.d.ts +2 -42
  38. package/dist/inplace/context-menu.d.ts.map +1 -1
  39. package/dist/inplace/decorate.d.ts.map +1 -1
  40. package/dist/inplace/edit-boundaries.d.ts +1 -25
  41. package/dist/inplace/edit-boundaries.d.ts.map +1 -1
  42. package/dist/inplace/edit-divider.d.ts +27 -0
  43. package/dist/inplace/edit-divider.d.ts.map +1 -0
  44. package/dist/inplace/embed-registry.d.ts +39 -0
  45. package/dist/inplace/embed-registry.d.ts.map +1 -0
  46. package/dist/inplace/embed.d.ts +8 -0
  47. package/dist/inplace/embed.d.ts.map +1 -0
  48. package/dist/inplace/extension.d.ts +6 -0
  49. package/dist/inplace/extension.d.ts.map +1 -1
  50. package/dist/inplace/inline-md.d.ts +6 -1
  51. package/dist/inplace/inline-md.d.ts.map +1 -1
  52. package/dist/inplace/link-row.d.ts +21 -0
  53. package/dist/inplace/link-row.d.ts.map +1 -0
  54. package/dist/inplace/math-edit.d.ts +36 -0
  55. package/dist/inplace/math-edit.d.ts.map +1 -0
  56. package/dist/inplace/math.d.ts +12 -0
  57. package/dist/inplace/math.d.ts.map +1 -1
  58. package/dist/inplace/menu-plugin.d.ts.map +1 -1
  59. package/dist/inplace/nodes-blocks.d.ts +14 -0
  60. package/dist/inplace/nodes-blocks.d.ts.map +1 -0
  61. package/dist/inplace/nodes-inline.d.ts +16 -0
  62. package/dist/inplace/nodes-inline.d.ts.map +1 -0
  63. package/dist/inplace/nodes.d.ts +3 -2
  64. package/dist/inplace/nodes.d.ts.map +1 -1
  65. package/dist/inplace/scan.d.ts +6 -0
  66. package/dist/inplace/scan.d.ts.map +1 -1
  67. package/dist/inplace/selection-bar-position.d.ts +31 -0
  68. package/dist/inplace/selection-bar-position.d.ts.map +1 -0
  69. package/dist/inplace/selection-bar.d.ts +0 -2
  70. package/dist/inplace/selection-bar.d.ts.map +1 -1
  71. package/dist/inplace/table-widget-caret.d.ts +11 -0
  72. package/dist/inplace/table-widget-caret.d.ts.map +1 -0
  73. package/dist/inplace/table-widget-render.d.ts +18 -0
  74. package/dist/inplace/table-widget-render.d.ts.map +1 -0
  75. package/dist/inplace/table-widget.d.ts +5 -2
  76. package/dist/inplace/table-widget.d.ts.map +1 -1
  77. package/dist/inplace/tables.d.ts.map +1 -1
  78. package/dist/inplace/theme-callout.d.ts +50 -0
  79. package/dist/inplace/theme-callout.d.ts.map +1 -0
  80. package/dist/inplace/theme-canvas.d.ts +166 -0
  81. package/dist/inplace/theme-canvas.d.ts.map +1 -0
  82. package/dist/inplace/theme-fonts.d.ts +4 -0
  83. package/dist/inplace/theme-fonts.d.ts.map +1 -0
  84. package/dist/inplace/theme-menu.d.ts +87 -0
  85. package/dist/inplace/theme-menu.d.ts.map +1 -0
  86. package/dist/inplace/theme-popups.d.ts +94 -0
  87. package/dist/inplace/theme-popups.d.ts.map +1 -0
  88. package/dist/inplace/theme-table-gizmos.d.ts +57 -0
  89. package/dist/inplace/theme-table-gizmos.d.ts.map +1 -0
  90. package/dist/inplace/theme-table.d.ts +30 -0
  91. package/dist/inplace/theme-table.d.ts.map +1 -0
  92. package/dist/inplace/theme.d.ts +5 -0
  93. package/dist/inplace/theme.d.ts.map +1 -1
  94. package/dist/inplace/wikilinks.d.ts.map +1 -1
  95. package/dist/inplace/wrap-at.d.ts +32 -0
  96. package/dist/inplace/wrap-at.d.ts.map +1 -0
  97. package/dist/{markdown-N3lRmU2n.js → markdown-BYXs9Tj8.js} +2 -2
  98. package/dist/{markdown-N3lRmU2n.js.map → markdown-BYXs9Tj8.js.map} +1 -1
  99. package/dist/render/Embed.d.ts +24 -0
  100. package/dist/render/Embed.d.ts.map +1 -0
  101. package/dist/render/Preview.d.ts +6 -2
  102. package/dist/render/Preview.d.ts.map +1 -1
  103. package/dist/render/embed-cache.d.ts +10 -0
  104. package/dist/render/embed-cache.d.ts.map +1 -0
  105. package/dist/render/remark-embed.d.ts +19 -0
  106. package/dist/render/remark-embed.d.ts.map +1 -0
  107. package/dist/styles.css +1 -1
  108. package/dist/stylo.js +70 -54
  109. package/dist/stylo.js.map +1 -1
  110. package/dist/toolbar/block.d.ts +0 -26
  111. package/dist/toolbar/block.d.ts.map +1 -1
  112. package/dist/toolbar/command-helpers.d.ts +57 -0
  113. package/dist/toolbar/command-helpers.d.ts.map +1 -0
  114. package/dist/toolbar/commands.d.ts +1 -21
  115. package/dist/toolbar/commands.d.ts.map +1 -1
  116. package/dist/toolbar/frontmatter-toggle.d.ts +13 -0
  117. package/dist/toolbar/frontmatter-toggle.d.ts.map +1 -0
  118. package/dist/toolbar/heading.d.ts +10 -0
  119. package/dist/toolbar/heading.d.ts.map +1 -0
  120. package/dist/toolbar/inline-ops.d.ts +3 -53
  121. package/dist/toolbar/inline-ops.d.ts.map +1 -1
  122. package/dist/toolbar/link-ops.d.ts +22 -0
  123. package/dist/toolbar/link-ops.d.ts.map +1 -0
  124. package/dist/toolbar/rule.d.ts +11 -0
  125. package/dist/toolbar/rule.d.ts.map +1 -0
  126. package/dist/toolbar/table-position.d.ts +32 -0
  127. package/dist/toolbar/table-position.d.ts.map +1 -0
  128. package/dist/toolbar/table.d.ts +1 -16
  129. package/dist/toolbar/table.d.ts.map +1 -1
  130. package/dist/toolbar/underline-ops.d.ts +15 -0
  131. package/dist/toolbar/underline-ops.d.ts.map +1 -0
  132. package/dist/toolbar/wikilink-ops.d.ts +22 -0
  133. package/dist/toolbar/wikilink-ops.d.ts.map +1 -0
  134. package/dist/types.d.ts +48 -0
  135. package/dist/types.d.ts.map +1 -1
  136. package/dist/{useCodeMirror-GPSkaYW6.js → useCodeMirror-DtwupFgc.js} +559 -531
  137. package/dist/useCodeMirror-DtwupFgc.js.map +1 -0
  138. package/package.json +2 -1
  139. package/dist/InPlaceView-CS1qy-Ba.js.map +0 -1
  140. package/dist/Preview-Bw0k3Mev.js +0 -93
  141. package/dist/Preview-Bw0k3Mev.js.map +0 -1
  142. package/dist/callout-oLE630ZP.js +0 -37
  143. package/dist/callout-oLE630ZP.js.map +0 -1
  144. package/dist/useCodeMirror-GPSkaYW6.js.map +0 -1
  145. package/dist/wikilink-CTR8IFKc.js +0 -42
  146. package/dist/wikilink-CTR8IFKc.js.map +0 -1
@@ -0,0 +1,30 @@
1
+ /** GFM table rendering and the editable-cell surface. Split out of `theme.ts`. */
2
+ export declare const tableTheme: {
3
+ ".cm-inplace-table": {
4
+ borderCollapse: string;
5
+ padding: string;
6
+ fontSize: string;
7
+ };
8
+ ".cm-inplace-table th": {
9
+ padding: string;
10
+ border: string;
11
+ background: string;
12
+ fontWeight: string;
13
+ };
14
+ ".cm-inplace-table td": {
15
+ padding: string;
16
+ border: string;
17
+ };
18
+ ".cm-inplace-table tbody tr:nth-child(even) td": {
19
+ background: string;
20
+ };
21
+ ".cm-inplace-table-edit .cm-inplace-tcell": {
22
+ minWidth: string;
23
+ cursor: string;
24
+ outline: string;
25
+ };
26
+ ".cm-inplace-table-edit .cm-inplace-tcell:focus": {
27
+ boxShadow: string;
28
+ };
29
+ };
30
+ //# sourceMappingURL=theme-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-table.d.ts","sourceRoot":"","sources":["../../src/inplace/theme-table.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAElF,eAAO,MAAM,UAAU;IACrB,mBAAmB;QACjB,cAAc;QACd,OAAO;QACP,QAAQ;;IAEV,sBAAsB;QACpB,OAAO;QACP,MAAM;QACN,UAAU;QACV,UAAU;;IAEZ,sBAAsB;QACpB,OAAO;QACP,MAAM;;IAGR,+CAA+C;QAC7C,UAAU;;IAGZ,0CAA0C;QACxC,QAAQ;QACR,MAAM;QACN,OAAO;;IAET,gDAAgD;QAC9C,SAAS;;CAEZ,CAAA"}
@@ -9,6 +9,11 @@
9
9
  * `.cm-line` cannot take a `margin` without drifting click-to-position (see the
10
10
  * 2026-09-02 click-mapping note), and a blank source line already supplies most
11
11
  * of the inter-block gap, so heading `padding-top` is trimmed accordingly.
12
+ *
13
+ * Split by concern across `theme-*.ts` files — canvas prose, callouts, table,
14
+ * the editable-table `+` gizmos, the right-click menu, and the floating popups
15
+ * (selection bar, touch sizing, hover bubble) — and merged here into the one
16
+ * style-spec object `EditorView.theme` takes.
12
17
  */
13
18
  export declare const inPlaceTheme: import("@codemirror/state").Extension;
14
19
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/inplace/theme.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,uCAuavB,CAAA"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/inplace/theme.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,YAAY,uCAOvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"wikilinks.d.ts","sourceRoot":"","sources":["../../src/inplace/wikilinks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE9D,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,QAAQ,CAAA;AAEjD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EACrB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,EAAE,GACvB,IAAI,CAyBN"}
1
+ {"version":3,"file":"wikilinks.d.ts","sourceRoot":"","sources":["../../src/inplace/wikilinks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG9D,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,QAAQ,CAAA;AAEjD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EACrB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,EAAE,GACvB,IAAI,CA8BN"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The hidden-marker inline construct at a document position — used by
3
+ * `edit-boundaries.ts`'s Backspace/Delete/arrow commands, `edit-insert-assoc.ts`,
4
+ * and the right-click menu's phrase-select (`menu-plugin.ts`). Split out of
5
+ * `edit-boundaries.ts` since it is detection, not editing.
6
+ */
7
+ import type { EditorState } from "@codemirror/state";
8
+ export interface Wrap {
9
+ from: number;
10
+ to: number;
11
+ contentFrom: number;
12
+ contentTo: number;
13
+ /** `"mark"` — a paired inline mark (`**`, `*`, `~~`, `` ` ``); `"link"` — a
14
+ * link or wikilink, whose label is not itself a Markdown context, so a
15
+ * right-click formats the *whole* construct rather than the label. */
16
+ kind: "mark" | "link";
17
+ }
18
+ /** Are inline markers on this line hidden right now? */
19
+ export declare function markersHidden(state: EditorState, lineNumber: number): boolean;
20
+ /**
21
+ * The hidden-marker inline construct enclosing `pos`, or `null`. With
22
+ * `emphasisOnly`, only the paired-mark constructs whose *both* delimiters are
23
+ * hidden count (strong / emphasis / strike / inline code) — links and wikilinks
24
+ * keep a directly editable label, so their edges are not boundary-escaped.
25
+ *
26
+ * By default the construct's markers must be hidden right now (boundary editing
27
+ * only applies then); `ignoreReveal` drops that check for callers that just want
28
+ * the span — the right-click menu selecting the whole phrase, which should work
29
+ * whether or not the caret has revealed the line.
30
+ */
31
+ export declare function wrapAt(state: EditorState, pos: number, emphasisOnly?: boolean, ignoreReveal?: boolean): Wrap | null;
32
+ //# sourceMappingURL=wrap-at.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrap-at.d.ts","sourceRoot":"","sources":["../../src/inplace/wrap-at.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAcpD,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB;;2EAEuE;IACvE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAE7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CACpB,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,YAAY,UAAQ,EACpB,YAAY,UAAQ,GACnB,IAAI,GAAG,IAAI,CA0Db"}
@@ -8519,6 +8519,6 @@ function zu(e) {
8519
8519
  i.push(Lu(n)), a.push(Ou()), o.push(ku(n));
8520
8520
  }
8521
8521
  //#endregion
8522
- export { io as a, cs as i, Du as n, ca as o, As as r, zu as t };
8522
+ export { io as a, cs as i, Du as n, ca as o, As as r, aa as s, zu as t };
8523
8523
 
8524
- //# sourceMappingURL=markdown-N3lRmU2n.js.map
8524
+ //# sourceMappingURL=markdown-BYXs9Tj8.js.map