@damiro/stylo 0.7.0 → 0.9.1
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.
- package/README.md +41 -14
- package/dist/{InPlaceView-CS1qy-Ba.js → InPlaceView-Bu91_3Ig.js} +1199 -855
- package/dist/InPlaceView-Bu91_3Ig.js.map +1 -0
- package/dist/Preview-AaGGwLQP.js +170 -0
- package/dist/Preview-AaGGwLQP.js.map +1 -0
- package/dist/SplitView.d.ts +4 -2
- package/dist/SplitView.d.ts.map +1 -1
- package/dist/Stylo.d.ts.map +1 -1
- package/dist/editor/SourceView.d.ts +4 -2
- package/dist/editor/SourceView.d.ts.map +1 -1
- package/dist/editor/extensions.d.ts +2 -2
- package/dist/editor/extensions.d.ts.map +1 -1
- package/dist/editor/useCodeMirror.d.ts +4 -2
- package/dist/editor/useCodeMirror.d.ts.map +1 -1
- package/dist/editor/wikilink-complete.d.ts +5 -3
- package/dist/editor/wikilink-complete.d.ts.map +1 -1
- package/dist/embed-B2Dfkpd_.js +124 -0
- package/dist/embed-B2Dfkpd_.js.map +1 -0
- package/dist/embed.d.ts +14 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/frontmatter-DGUkb9z-.js +39 -0
- package/dist/frontmatter-DGUkb9z-.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/inplace/InPlaceView.d.ts +11 -2
- package/dist/inplace/InPlaceView.d.ts.map +1 -1
- package/dist/inplace/config.d.ts +8 -0
- package/dist/inplace/config.d.ts.map +1 -1
- package/dist/inplace/context-menu-actions.d.ts +5 -14
- package/dist/inplace/context-menu-actions.d.ts.map +1 -1
- package/dist/inplace/context-menu-helpers.d.ts +30 -0
- package/dist/inplace/context-menu-helpers.d.ts.map +1 -0
- package/dist/inplace/context-menu-shell.d.ts +23 -0
- package/dist/inplace/context-menu-shell.d.ts.map +1 -0
- package/dist/inplace/context-menu-types.d.ts +46 -0
- package/dist/inplace/context-menu-types.d.ts.map +1 -0
- package/dist/inplace/context-menu.d.ts +2 -42
- package/dist/inplace/context-menu.d.ts.map +1 -1
- package/dist/inplace/decorate.d.ts.map +1 -1
- package/dist/inplace/edit-boundaries.d.ts +1 -25
- package/dist/inplace/edit-boundaries.d.ts.map +1 -1
- package/dist/inplace/edit-divider.d.ts +27 -0
- package/dist/inplace/edit-divider.d.ts.map +1 -0
- package/dist/inplace/embed-registry.d.ts +39 -0
- package/dist/inplace/embed-registry.d.ts.map +1 -0
- package/dist/inplace/embed.d.ts +8 -0
- package/dist/inplace/embed.d.ts.map +1 -0
- package/dist/inplace/extension.d.ts +6 -0
- package/dist/inplace/extension.d.ts.map +1 -1
- package/dist/inplace/inline-md.d.ts +6 -1
- package/dist/inplace/inline-md.d.ts.map +1 -1
- package/dist/inplace/link-row.d.ts +21 -0
- package/dist/inplace/link-row.d.ts.map +1 -0
- package/dist/inplace/math-edit.d.ts +36 -0
- package/dist/inplace/math-edit.d.ts.map +1 -0
- package/dist/inplace/math.d.ts +12 -0
- package/dist/inplace/math.d.ts.map +1 -1
- package/dist/inplace/menu-plugin.d.ts.map +1 -1
- package/dist/inplace/nodes-blocks.d.ts +14 -0
- package/dist/inplace/nodes-blocks.d.ts.map +1 -0
- package/dist/inplace/nodes-inline.d.ts +16 -0
- package/dist/inplace/nodes-inline.d.ts.map +1 -0
- package/dist/inplace/nodes.d.ts +3 -2
- package/dist/inplace/nodes.d.ts.map +1 -1
- package/dist/inplace/scan.d.ts +6 -0
- package/dist/inplace/scan.d.ts.map +1 -1
- package/dist/inplace/selection-bar-position.d.ts +31 -0
- package/dist/inplace/selection-bar-position.d.ts.map +1 -0
- package/dist/inplace/selection-bar.d.ts +0 -2
- package/dist/inplace/selection-bar.d.ts.map +1 -1
- package/dist/inplace/table-widget-caret.d.ts +11 -0
- package/dist/inplace/table-widget-caret.d.ts.map +1 -0
- package/dist/inplace/table-widget-render.d.ts +18 -0
- package/dist/inplace/table-widget-render.d.ts.map +1 -0
- package/dist/inplace/table-widget.d.ts +5 -2
- package/dist/inplace/table-widget.d.ts.map +1 -1
- package/dist/inplace/tables.d.ts.map +1 -1
- package/dist/inplace/theme-callout.d.ts +50 -0
- package/dist/inplace/theme-callout.d.ts.map +1 -0
- package/dist/inplace/theme-canvas.d.ts +166 -0
- package/dist/inplace/theme-canvas.d.ts.map +1 -0
- package/dist/inplace/theme-fonts.d.ts +4 -0
- package/dist/inplace/theme-fonts.d.ts.map +1 -0
- package/dist/inplace/theme-menu.d.ts +87 -0
- package/dist/inplace/theme-menu.d.ts.map +1 -0
- package/dist/inplace/theme-popups.d.ts +94 -0
- package/dist/inplace/theme-popups.d.ts.map +1 -0
- package/dist/inplace/theme-table-gizmos.d.ts +57 -0
- package/dist/inplace/theme-table-gizmos.d.ts.map +1 -0
- package/dist/inplace/theme-table.d.ts +30 -0
- package/dist/inplace/theme-table.d.ts.map +1 -0
- package/dist/inplace/theme.d.ts +5 -0
- package/dist/inplace/theme.d.ts.map +1 -1
- package/dist/inplace/wikilinks.d.ts.map +1 -1
- package/dist/inplace/wrap-at.d.ts +32 -0
- package/dist/inplace/wrap-at.d.ts.map +1 -0
- package/dist/{markdown-N3lRmU2n.js → markdown-BYXs9Tj8.js} +2 -2
- package/dist/{markdown-N3lRmU2n.js.map → markdown-BYXs9Tj8.js.map} +1 -1
- package/dist/render/Embed.d.ts +24 -0
- package/dist/render/Embed.d.ts.map +1 -0
- package/dist/render/Preview.d.ts +6 -2
- package/dist/render/Preview.d.ts.map +1 -1
- package/dist/render/embed-cache.d.ts +10 -0
- package/dist/render/embed-cache.d.ts.map +1 -0
- package/dist/render/remark-embed.d.ts +19 -0
- package/dist/render/remark-embed.d.ts.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/stylo.js +70 -54
- package/dist/stylo.js.map +1 -1
- package/dist/toolbar/block.d.ts +0 -26
- package/dist/toolbar/block.d.ts.map +1 -1
- package/dist/toolbar/command-helpers.d.ts +57 -0
- package/dist/toolbar/command-helpers.d.ts.map +1 -0
- package/dist/toolbar/commands.d.ts +1 -21
- package/dist/toolbar/commands.d.ts.map +1 -1
- package/dist/toolbar/frontmatter-toggle.d.ts +13 -0
- package/dist/toolbar/frontmatter-toggle.d.ts.map +1 -0
- package/dist/toolbar/heading.d.ts +10 -0
- package/dist/toolbar/heading.d.ts.map +1 -0
- package/dist/toolbar/inline-ops.d.ts +3 -53
- package/dist/toolbar/inline-ops.d.ts.map +1 -1
- package/dist/toolbar/link-ops.d.ts +22 -0
- package/dist/toolbar/link-ops.d.ts.map +1 -0
- package/dist/toolbar/rule.d.ts +11 -0
- package/dist/toolbar/rule.d.ts.map +1 -0
- package/dist/toolbar/table-position.d.ts +32 -0
- package/dist/toolbar/table-position.d.ts.map +1 -0
- package/dist/toolbar/table.d.ts +1 -16
- package/dist/toolbar/table.d.ts.map +1 -1
- package/dist/toolbar/underline-ops.d.ts +15 -0
- package/dist/toolbar/underline-ops.d.ts.map +1 -0
- package/dist/toolbar/wikilink-ops.d.ts +22 -0
- package/dist/toolbar/wikilink-ops.d.ts.map +1 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/{useCodeMirror-GPSkaYW6.js → useCodeMirror-DtwupFgc.js} +559 -531
- package/dist/useCodeMirror-DtwupFgc.js.map +1 -0
- package/package.json +2 -1
- package/dist/InPlaceView-CS1qy-Ba.js.map +0 -1
- package/dist/Preview-Bw0k3Mev.js +0 -93
- package/dist/Preview-Bw0k3Mev.js.map +0 -1
- package/dist/callout-oLE630ZP.js +0 -37
- package/dist/callout-oLE630ZP.js.map +0 -1
- package/dist/useCodeMirror-GPSkaYW6.js.map +0 -1
- package/dist/wikilink-CTR8IFKc.js +0 -42
- 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"}
|
package/dist/inplace/theme.d.ts
CHANGED
|
@@ -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
|
|
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;
|
|
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-
|
|
8524
|
+
//# sourceMappingURL=markdown-BYXs9Tj8.js.map
|