@damiro/stylo 0.4.0 → 0.5.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.
@@ -46,5 +46,5 @@ export interface ContextMenu {
46
46
  /** Remove the element and drop document listeners. */
47
47
  destroy: () => void;
48
48
  }
49
- export declare function createContextMenu(doc: Document, className?: string): ContextMenu;
49
+ export declare function createContextMenu(doc: Document, className?: string, onOpenChange?: (open: boolean) => void): ContextMenu;
50
50
  //# sourceMappingURL=context-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/inplace/context-menu.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,8EAA8E;AAC9E,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,IAAI,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;CACvB;AAED,MAA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,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,0EAA0E;IAC1E,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,iFAAiF;IACjF,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB;AAuCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,cAAmB,GAAG,SAAS,CA8DrE"}
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/inplace/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AA8B7C,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,0EAA0E;IAC1E,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,iFAAiF;IACjF,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB;AAuCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,cAAmB,GAAG,SAAS,CA+DrE"}
@@ -0,0 +1,11 @@
1
+ import { StateField } from "@codemirror/state";
2
+ /**
3
+ * Tracks whether the in-place right-click menu is open. The selection bar reads
4
+ * it and steps aside while the menu is up, rather than the two floating popups
5
+ * overlapping at the same `z-index` with no awareness of each other. The menu
6
+ * controller (`menu-plugin.ts`) dispatches `setMenuOpen` on open and on every
7
+ * dismissal path.
8
+ */
9
+ export declare const setMenuOpen: import("@codemirror/state").StateEffectType<boolean>;
10
+ export declare const menuOpenField: StateField<boolean>;
11
+ //# sourceMappingURL=menu-open.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-open.d.ts","sourceRoot":"","sources":["../../src/inplace/menu-open.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,sDAAgC,CAAA;AAExD,eAAO,MAAM,aAAa,qBAMxB,CAAA"}
@@ -19,6 +19,7 @@ declare class ContextMenuController implements PluginValue {
19
19
  * `contextmenu` from the same gesture; one that lands within the window is
20
20
  * swallowed so the menu does not re-open on top of itself. */
21
21
  private longPressAt;
22
+ private destroyed;
22
23
  constructor(view: EditorView);
23
24
  /** Open the canvas menu at a screen point, from a right-click or a long-press.
24
25
  * Reconciles the selection first so the menu offers the right rows. */
@@ -1 +1 @@
1
- {"version":3,"file":"menu-plugin.d.ts","sourceRoot":"","sources":["../../src/inplace/menu-plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAOhF,cAAM,qBAAsB,YAAW,WAAW;IAChD,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,UAAU,CAAa;IAC/B;+EAC2E;IAC3E,OAAO,CAAC,OAAO,CAAgD;IAC/D;;mEAE+D;IAC/D,OAAO,CAAC,WAAW,CAAI;IAEvB,YAAY,IAAI,EAAE,UAAU,EA4C3B;IAED;4EACwE;IACxE,OAAO,CAAC,UAAU;IAiClB,OAAO,SAKN;CACF;AAED,eAAO,MAAM,gBAAgB,8CAA8C,CAAA"}
1
+ {"version":3,"file":"menu-plugin.d.ts","sourceRoot":"","sources":["../../src/inplace/menu-plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CA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}
1
+ {"version":3,"file":"selection-bar.d.ts","sourceRoot":"","sources":["../../src/inplace/selection-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAiBjG,cAAM,YAAa,YAAW,WAAW;IAe3B,OAAO,CAAC,IAAI;IAdxB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,GAAG,CAAoB;IAC/B,OAAO,CAAC,OAAO,CAAiD;IAChE,OAAO,CAAC,QAAQ,CAAa;IAG7B,OAAO,CAAC,QAAQ,CAEf;IAED,OAAO,CAAC,iBAAiB,CAExB;IAED,YAAoB,IAAI,EAAE,UAAU,EAiDnC;IAED,MAAM,CAAC,CAAC,EAAE,UAAU,QAMnB;IAED;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAQhB,2EAA2E;IAC3E,OAAO,CAAC,YAAY;IAwBpB,OAAO,CAAC,OAAO;IAyCf,OAAO,CAAC,KAAK;IAcb,OAAO,SAMN;CACF;AASD,eAAO,MAAM,YAAY,qCAAqC,CAAA"}
package/dist/styles.css CHANGED
@@ -1,2 +1,2 @@
1
- ._root_18e48_1{min-height:0;color:var(--stylo-text);background:var(--stylo-bg);border:1px solid var(--stylo-border);border-radius:var(--stylo-radius);flex-direction:column;display:flex;overflow:hidden}._root_18e48_1 .cm-scroller{scrollbar-width:thin;scrollbar-color:color-mix(in srgb, var(--stylo-border) 90%, transparent) transparent}._root_18e48_1 .cm-scroller::-webkit-scrollbar{width:10px;height:10px}._root_18e48_1 .cm-scroller::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--stylo-border) 90%, transparent);background-clip:padding-box;border:3px solid #0000;border-radius:6px}._root_18e48_1 .cm-scroller::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb, var(--stylo-text-muted) 55%, transparent);background-clip:padding-box}._root_18e48_1 .cm-scroller::-webkit-scrollbar-corner{background:0 0}._source_18e48_42{flex:auto;min-height:0;overflow:auto}._source_18e48_42 .cm-editor{height:100%}._source_18e48_42 .cm-editor.cm-focused{outline:2px solid var(--stylo-ring);outline-offset:-2px}._inplace_18e48_57{flex:auto;min-height:0;overflow:auto}._toolbar_18e48_63{background:var(--stylo-bg);border-bottom:1px solid var(--stylo-border);flex-wrap:wrap;align-items:center;gap:2px;padding:4px 6px;display:flex}._toolbarButton_18e48_73{box-sizing:border-box;border-radius:calc(var(--stylo-radius) - 3px);min-width:28px;height:28px;color:var(--stylo-text-muted);font:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0 5px;font-size:.75rem;font-weight:600;line-height:1;display:inline-flex}._toolbarButton_18e48_73:hover:not(:disabled){background:color-mix(in srgb, var(--stylo-border) 45%, transparent);color:var(--stylo-text)}._toolbarButton_18e48_73[data-active]{background:color-mix(in srgb, var(--stylo-accent) 12%, transparent);color:var(--stylo-text)}._toolbarButton_18e48_73:disabled{opacity:.4;cursor:default}._toolbarButton_18e48_73:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-2px}._toolbarButton_18e48_73 svg{width:16px;height:16px;display:block}._toolbarButton_18e48_73 code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8125rem;font-weight:500}._toolbarSep_18e48_125{background:var(--stylo-border);align-self:stretch;width:1px;margin:4px 3px}._toolbarSticky_18e48_135{z-index:50;-webkit-overflow-scrolling:touch;scrollbar-width:none;flex-wrap:nowrap;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;transition:opacity .15s;overflow-x:auto}._toolbarSticky_18e48_135::-webkit-scrollbar{display:none}._toolbarSticky_18e48_135 ._toolbarButton_18e48_73{flex:none;min-width:40px;height:40px}._toolbarStickyBottom_18e48_135{border-bottom:none;border-top:1px solid var(--stylo-border);box-shadow:0 -2px 8px color-mix(in srgb, var(--stylo-text) 10%, transparent);position:fixed;bottom:0;left:0;right:0}._toolbarStickyTop_18e48_135{box-shadow:0 2px 8px color-mix(in srgb, var(--stylo-text) 10%, transparent);position:fixed;top:0;left:0;right:0}._toolbarStickyHidden_18e48_194{opacity:0;pointer-events:none}._stickyToolbarRootBottom_18e48_205 ._source_18e48_42,._stickyToolbarRootBottom_18e48_205 ._inplace_18e48_57{padding-bottom:52px}._stickyToolbarRootTop_18e48_210 ._source_18e48_42,._stickyToolbarRootTop_18e48_210 ._inplace_18e48_57{padding-top:52px}._inplace_18e48_57 .cm-editor{height:100%}._inplace_18e48_57 .cm-editor.cm-focused{outline:2px solid var(--stylo-ring);outline-offset:-2px}._split_18e48_224{flex:1;grid-template-columns:1fr 1fr;min-height:0;display:grid}._splitPane_18e48_231{box-sizing:border-box;flex-direction:column;min-height:0;display:flex;overflow:auto}._splitPane_18e48_231+._splitPane_18e48_231{border-left:1px solid var(--stylo-border)}._splitPane_18e48_231>._source_18e48_42{flex:1;min-height:0}._preview_18e48_251{overflow-wrap:break-word;padding:.75rem 1rem;font-size:.9375rem;line-height:1.75}._preview_18e48_251>:first-child{margin-top:0}._preview_18e48_251>:last-child{margin-bottom:0}._preview_18e48_251 :is(h1,h2,h3,h4,h5,h6){font-weight:600}._preview_18e48_251 h1{margin:0 0 .888889em;font-size:2.25em;line-height:1.11111}._preview_18e48_251 h2{margin:2em 0 1em;font-size:1.5em;line-height:1.33333}._preview_18e48_251 h3{margin:1.6em 0 .6em;font-size:1.25em;line-height:1.6}._preview_18e48_251 :is(h4,h5,h6){margin:1.5em 0 .5em;line-height:1.5}._preview_18e48_251 p{margin:1.25em 0}._preview_18e48_251 :is(ul,ol){margin:1.25em 0;padding-left:1.625em}._preview_18e48_251 li{margin:.5em 0}._preview_18e48_251 li>:is(ul,ol){margin:.75em 0}._preview_18e48_251 a{color:var(--stylo-link);text-decoration:none}._preview_18e48_251 code{border-radius:calc(var(--stylo-radius) - 3px);background:color-mix(in srgb, var(--stylo-border) 45%, transparent);padding:.1em .35em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}._preview_18e48_251 pre{border-radius:var(--stylo-radius);background:color-mix(in srgb, var(--stylo-border) 35%, transparent);margin:1.71429em 0;padding:.75rem .9rem;overflow-x:auto}._preview_18e48_251 pre code{background:0 0;padding:0;font-size:.85em}.stylo-frontmatter{border-left:3px solid var(--stylo-border);border-radius:calc(var(--stylo-radius) - 3px);background:color-mix(in srgb, var(--stylo-border) 22%, transparent);color:var(--stylo-text-muted);white-space:pre-wrap;margin:0 0 1.2em;padding:.7rem .9rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8125rem;line-height:1.5;overflow-x:auto}.stylo-frontmatter:before{content:"Frontmatter";letter-spacing:.04em;text-transform:uppercase;margin-bottom:.5em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:.7rem;font-weight:600;display:block}._preview_18e48_251 blockquote{border-left:.25rem solid var(--stylo-border);color:var(--stylo-text-muted);margin:1.6em 0;padding-left:1em}._preview_18e48_251 .stylo-callout{border-left:.25rem solid var(--stylo-callout-accent,var(--stylo-border));border-radius:var(--stylo-radius);background:color-mix(in srgb, var(--stylo-callout-accent,var(--stylo-border)) 10%, transparent);color:var(--stylo-text);margin:1.6em 0;padding:.6em 1em}._preview_18e48_251 .stylo-callout:before{content:attr(data-callout);letter-spacing:.04em;text-transform:uppercase;color:var(--stylo-callout-accent,var(--stylo-text-muted));margin-bottom:.2em;font-size:.8em;font-weight:700;display:block}._preview_18e48_251 .stylo-callout-note{--stylo-callout-accent:var(--stylo-callout-note,#3b82f6)}._preview_18e48_251 .stylo-callout-tip{--stylo-callout-accent:var(--stylo-callout-tip,#22c55e)}._preview_18e48_251 .stylo-callout-warn{--stylo-callout-accent:var(--stylo-callout-warn,#f59e0b)}._preview_18e48_251 .stylo-callout-danger{--stylo-callout-accent:var(--stylo-callout-danger,#ef4444)}._preview_18e48_251 .stylo-callout-example{--stylo-callout-accent:var(--stylo-callout-example,#a855f7)}._preview_18e48_251 table{border-collapse:collapse;margin:2em 0;display:block;overflow-x:auto}._preview_18e48_251 :is(th,td){border:1px solid var(--stylo-table-border);text-align:left;padding:.35em .6em}._preview_18e48_251 thead th{background:var(--stylo-table-header-bg);font-weight:600}._preview_18e48_251 tbody tr:nth-child(2n) td{background:var(--stylo-table-stripe-bg)}._preview_18e48_251 hr{border:none;border-top:1px solid var(--stylo-border);margin:1em 0}._preview_18e48_251 .katex-display{padding:.25em 0;overflow:auto hidden}.stylo{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--stylo-bg:#fff;--stylo-surface-floating:#fff;--stylo-text:#09090b;--stylo-text-muted:#71717a;--stylo-border:#e4e4e7;--stylo-accent:#18181b;--stylo-link:#2563eb;--stylo-ring:#a1a1aa;--stylo-radius:.5rem;--stylo-table-border:var(--stylo-border);--stylo-table-header-bg:color-mix(in srgb, var(--stylo-border) 30%, transparent);--stylo-table-stripe-bg:transparent;--stylo-guide:var(--stylo-border);--stylo-syntax-keyword:#7c3aed;--stylo-syntax-string:#0a7c2f;--stylo-syntax-escape:#b45309;--stylo-syntax-comment:#8a8f98;--stylo-syntax-number:#b45309;--stylo-syntax-constant:#b45309;--stylo-syntax-function:#2563eb;--stylo-syntax-type:#a16207;--stylo-syntax-property:#0f766e;--stylo-syntax-tag:#cf222e;--stylo-syntax-invalid:#dc2626}:where(.dark,[data-theme=dark]) .stylo,.stylo:where(.dark,[data-theme=dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--stylo-bg:#09090b;--stylo-surface-floating:#09090b;--stylo-text:#fafafa;--stylo-text-muted:#a1a1aa;--stylo-border:#27272a;--stylo-accent:#fafafa;--stylo-link:#60a5fa;--stylo-ring:#52525b;--stylo-syntax-keyword:#c678dd;--stylo-syntax-string:#98c379;--stylo-syntax-escape:#d19a66;--stylo-syntax-comment:#7f848e;--stylo-syntax-number:#d19a66;--stylo-syntax-constant:#d19a66;--stylo-syntax-function:#61afef;--stylo-syntax-type:#e5c07b;--stylo-syntax-property:#56b6c2;--stylo-syntax-tag:#e06c75;--stylo-syntax-invalid:#e06c75}._root_18hcd_3{color:var(--stylo-text);font:inherit;grid-template-columns:1fr 1fr;gap:12px;display:grid}@media (width<=460px){._root_18hcd_3{grid-template-columns:1fr}}._col_18hcd_17{border:1px solid var(--stylo-border);border-radius:var(--stylo-radius);background:var(--stylo-bg);flex-direction:column;min-width:0;display:flex}._colHead_18hcd_26{border-bottom:1px solid var(--stylo-border);letter-spacing:.04em;text-transform:uppercase;color:var(--stylo-text-muted);margin:0;padding:8px 12px;font-size:.75rem;font-weight:600}._list_18hcd_37{flex-direction:column;flex:1;gap:2px;margin:0;padding:4px;list-style:none;display:flex}._row_18hcd_47{border-radius:calc(var(--stylo-radius) - 3px);background:var(--stylo-bg);align-items:center;gap:8px;padding:5px 6px;display:flex}._row_18hcd_47:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-2px}._row_18hcd_47:hover{background:color-mix(in srgb, var(--stylo-border) 30%, transparent)}._row_18hcd_47[data-dragging]{background:var(--stylo-surface-floating,#fff);opacity:.9;box-shadow:0 4px 16px #00000024}._handle_18hcd_73{border-radius:calc(var(--stylo-radius) - 4px);width:20px;height:22px;color:var(--stylo-text-muted);font:inherit;cursor:grab;touch-action:none;background:0 0;border:1px solid #0000;flex:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}._handle_18hcd_73:hover{background:color-mix(in srgb, var(--stylo-border) 45%, transparent);color:var(--stylo-text)}._handle_18hcd_73:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-1px}._handle_18hcd_73:active{cursor:grabbing}._glyph_18hcd_105{width:18px;height:18px;color:var(--stylo-text-muted);flex:none;justify-content:center;align-items:center;display:inline-flex}._glyph_18hcd_105 svg{width:16px;height:16px;display:block}._label_18hcd_121{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:.8125rem;overflow:hidden}._rowActions_18hcd_130{flex:none;gap:2px;display:flex}._iconButton_18hcd_136,._textButton_18hcd_137{box-sizing:border-box;border-radius:calc(var(--stylo-radius) - 4px);color:var(--stylo-text-muted);font:inherit;cursor:pointer;background:0 0;border:1px solid #0000}._iconButton_18hcd_136{width:22px;height:22px;font-size:.8125rem;line-height:1}._textButton_18hcd_137{padding:3px 8px;font-size:.75rem}._iconButton_18hcd_136:hover:not(:disabled),._textButton_18hcd_137:hover:not(:disabled){background:color-mix(in srgb, var(--stylo-border) 45%, transparent);color:var(--stylo-text)}._iconButton_18hcd_136:focus-visible,._textButton_18hcd_137:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-1px}._iconButton_18hcd_136:disabled{opacity:.35;cursor:default}._footer_18hcd_176{border-top:1px solid var(--stylo-border);flex-wrap:wrap;gap:6px;padding:6px;display:flex}._empty_18hcd_184{color:var(--stylo-text-muted);padding:8px 6px;font-size:.8125rem}._srOnly_18hcd_190{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}
1
+ ._root_18e48_1{min-height:0;color:var(--stylo-text);background:var(--stylo-bg);border:1px solid var(--stylo-border);border-radius:var(--stylo-radius);flex-direction:column;display:flex;overflow:hidden}._root_18e48_1 .cm-scroller{scrollbar-width:thin;scrollbar-color:color-mix(in srgb, var(--stylo-border) 90%, transparent) transparent}._root_18e48_1 .cm-scroller::-webkit-scrollbar{width:10px;height:10px}._root_18e48_1 .cm-scroller::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--stylo-border) 90%, transparent);background-clip:padding-box;border:3px solid #0000;border-radius:6px}._root_18e48_1 .cm-scroller::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb, var(--stylo-text-muted) 55%, transparent);background-clip:padding-box}._root_18e48_1 .cm-scroller::-webkit-scrollbar-corner{background:0 0}._source_18e48_42{flex:auto;min-height:0;overflow:auto}._source_18e48_42 .cm-editor{height:100%}._source_18e48_42 .cm-editor.cm-focused{outline:2px solid var(--stylo-ring);outline-offset:-2px}._inplace_18e48_57{flex:auto;min-height:0;overflow:auto}._toolbar_18e48_63{background:var(--stylo-bg);border-bottom:1px solid var(--stylo-border);flex-wrap:wrap;align-items:center;gap:2px;padding:4px 6px;display:flex}._toolbarButton_18e48_73{box-sizing:border-box;border-radius:calc(var(--stylo-radius) - 3px);min-width:28px;height:28px;color:var(--stylo-text-muted);font:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0 5px;font-size:.75rem;font-weight:600;line-height:1;display:inline-flex}._toolbarButton_18e48_73:hover:not(:disabled){background:color-mix(in srgb, var(--stylo-border) 45%, transparent);color:var(--stylo-text)}._toolbarButton_18e48_73[data-active]{background:color-mix(in srgb, var(--stylo-accent) 12%, transparent);color:var(--stylo-text)}._toolbarButton_18e48_73:disabled{opacity:.4;cursor:default}._toolbarButton_18e48_73:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-2px}._toolbarButton_18e48_73 svg{width:16px;height:16px;display:block}._toolbarButton_18e48_73 code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8125rem;font-weight:500}._toolbarSep_18e48_125{background:var(--stylo-border);align-self:stretch;width:1px;margin:4px 3px}._toolbarSticky_18e48_135{z-index:50;-webkit-overflow-scrolling:touch;scrollbar-width:none;flex-wrap:nowrap;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;transition:opacity .15s;overflow-x:auto}._toolbarSticky_18e48_135::-webkit-scrollbar{display:none}._toolbarSticky_18e48_135 ._toolbarButton_18e48_73{flex:none;min-width:40px;height:40px}._toolbarStickyBottom_18e48_135{border-bottom:none;border-top:1px solid var(--stylo-border);box-shadow:0 -2px 8px color-mix(in srgb, var(--stylo-text) 10%, transparent);position:fixed;bottom:0;left:0;right:0}._toolbarStickyTop_18e48_135{box-shadow:0 2px 8px color-mix(in srgb, var(--stylo-text) 10%, transparent);position:fixed;top:0;left:0;right:0}._toolbarStickyHidden_18e48_194{opacity:0;pointer-events:none}._stickyToolbarRootBottom_18e48_205 ._source_18e48_42,._stickyToolbarRootBottom_18e48_205 ._inplace_18e48_57{padding-bottom:52px}._stickyToolbarRootTop_18e48_210 ._source_18e48_42,._stickyToolbarRootTop_18e48_210 ._inplace_18e48_57{padding-top:52px}._inplace_18e48_57 .cm-editor{height:100%}._inplace_18e48_57 .cm-editor.cm-focused{outline:2px solid var(--stylo-ring);outline-offset:-2px}._split_18e48_224{flex:1;grid-template-columns:1fr 1fr;min-height:0;display:grid}._splitPane_18e48_231{box-sizing:border-box;flex-direction:column;min-height:0;display:flex;overflow:auto}._splitPane_18e48_231+._splitPane_18e48_231{border-left:1px solid var(--stylo-border)}._splitPane_18e48_231>._source_18e48_42{flex:1;min-height:0}._preview_18e48_251{overflow-wrap:break-word;padding:.75rem 1rem;font-size:.9375rem;line-height:1.75}._preview_18e48_251>:first-child{margin-top:0}._preview_18e48_251>:last-child{margin-bottom:0}._preview_18e48_251 :is(h1,h2,h3,h4,h5,h6){font-weight:600}._preview_18e48_251 h1{margin:0 0 .888889em;font-size:2.25em;line-height:1.11111}._preview_18e48_251 h2{margin:2em 0 1em;font-size:1.5em;line-height:1.33333}._preview_18e48_251 h3{margin:1.6em 0 .6em;font-size:1.25em;line-height:1.6}._preview_18e48_251 :is(h4,h5,h6){margin:1.5em 0 .5em;line-height:1.5}._preview_18e48_251 p{margin:1.25em 0}._preview_18e48_251 :is(ul,ol){margin:1.25em 0;padding-left:1.625em}._preview_18e48_251 li{margin:.5em 0}._preview_18e48_251 li>:is(ul,ol){margin:.75em 0}._preview_18e48_251 a{color:var(--stylo-link);text-decoration:none}._preview_18e48_251 code{border-radius:calc(var(--stylo-radius) - 3px);background:color-mix(in srgb, var(--stylo-border) 45%, transparent);padding:.1em .35em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}._preview_18e48_251 pre{border-radius:var(--stylo-radius);background:color-mix(in srgb, var(--stylo-border) 35%, transparent);margin:1.71429em 0;padding:.75rem .9rem;overflow-x:auto}._preview_18e48_251 pre code{background:0 0;padding:0;font-size:.85em}.stylo-frontmatter{border-left:3px solid var(--stylo-border);border-radius:calc(var(--stylo-radius) - 3px);background:color-mix(in srgb, var(--stylo-border) 22%, transparent);color:var(--stylo-text-muted);white-space:pre-wrap;margin:0 0 1.2em;padding:.7rem .9rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8125rem;line-height:1.5;overflow-x:auto}.stylo-frontmatter:before{content:"Frontmatter";letter-spacing:.04em;text-transform:uppercase;margin-bottom:.5em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:.7rem;font-weight:600;display:block}._preview_18e48_251 blockquote{border-left:.25rem solid var(--stylo-border);color:var(--stylo-text-muted);margin:1.6em 0;padding-left:1em}._preview_18e48_251 .stylo-callout{border-left:.25rem solid var(--stylo-callout-accent,var(--stylo-border));border-radius:var(--stylo-radius);background:color-mix(in srgb, var(--stylo-callout-accent,var(--stylo-border)) 10%, transparent);color:var(--stylo-text);margin:1.6em 0;padding:.6em 1em}._preview_18e48_251 .stylo-callout:before{content:attr(data-callout);letter-spacing:.04em;text-transform:uppercase;color:var(--stylo-callout-accent,var(--stylo-text-muted));margin-bottom:.2em;font-size:.8em;font-weight:700;display:block}._preview_18e48_251 .stylo-callout-note{--stylo-callout-accent:var(--stylo-callout-note,#3b82f6)}._preview_18e48_251 .stylo-callout-tip{--stylo-callout-accent:var(--stylo-callout-tip,#22c55e)}._preview_18e48_251 .stylo-callout-warn{--stylo-callout-accent:var(--stylo-callout-warn,#f59e0b)}._preview_18e48_251 .stylo-callout-danger{--stylo-callout-accent:var(--stylo-callout-danger,#ef4444)}._preview_18e48_251 .stylo-callout-example{--stylo-callout-accent:var(--stylo-callout-example,#a855f7)}._preview_18e48_251 table{border-collapse:collapse;margin:2em 0;display:block;overflow-x:auto}._preview_18e48_251 :is(th,td){border:1px solid var(--stylo-table-border);text-align:left;padding:.35em .6em}._preview_18e48_251 thead th{background:var(--stylo-table-header-bg);font-weight:600}._preview_18e48_251 tbody tr:nth-child(2n) td{background:var(--stylo-table-stripe-bg)}._preview_18e48_251 hr{border:none;border-top:1px solid var(--stylo-border);margin:1em 0}._preview_18e48_251 .katex-display{padding:.25em 0;overflow:auto hidden}.stylo{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--stylo-bg:#fff;--stylo-surface-floating:#fff;--stylo-text:#09090b;--stylo-text-muted:#71717a;--stylo-border:#e4e4e7;--stylo-accent:#18181b;--stylo-link:#2563eb;--stylo-ring:#a1a1aa;--stylo-radius:.5rem;--stylo-font-size:.9375rem;--stylo-table-border:var(--stylo-border);--stylo-table-header-bg:color-mix(in srgb, var(--stylo-border) 30%, transparent);--stylo-table-stripe-bg:transparent;--stylo-guide:var(--stylo-border);--stylo-syntax-keyword:#7c3aed;--stylo-syntax-string:#0a7c2f;--stylo-syntax-escape:#b45309;--stylo-syntax-comment:#8a8f98;--stylo-syntax-number:#b45309;--stylo-syntax-constant:#b45309;--stylo-syntax-function:#2563eb;--stylo-syntax-type:#a16207;--stylo-syntax-property:#0f766e;--stylo-syntax-tag:#cf222e;--stylo-syntax-invalid:#dc2626}:where(.dark,[data-theme=dark]) .stylo,.stylo:where(.dark,[data-theme=dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--stylo-bg:#09090b;--stylo-surface-floating:#09090b;--stylo-text:#fafafa;--stylo-text-muted:#a1a1aa;--stylo-border:#27272a;--stylo-accent:#fafafa;--stylo-link:#60a5fa;--stylo-ring:#52525b;--stylo-syntax-keyword:#c678dd;--stylo-syntax-string:#98c379;--stylo-syntax-escape:#d19a66;--stylo-syntax-comment:#7f848e;--stylo-syntax-number:#d19a66;--stylo-syntax-constant:#d19a66;--stylo-syntax-function:#61afef;--stylo-syntax-type:#e5c07b;--stylo-syntax-property:#56b6c2;--stylo-syntax-tag:#e06c75;--stylo-syntax-invalid:#e06c75}._root_18hcd_3{color:var(--stylo-text);font:inherit;grid-template-columns:1fr 1fr;gap:12px;display:grid}@media (width<=460px){._root_18hcd_3{grid-template-columns:1fr}}._col_18hcd_17{border:1px solid var(--stylo-border);border-radius:var(--stylo-radius);background:var(--stylo-bg);flex-direction:column;min-width:0;display:flex}._colHead_18hcd_26{border-bottom:1px solid var(--stylo-border);letter-spacing:.04em;text-transform:uppercase;color:var(--stylo-text-muted);margin:0;padding:8px 12px;font-size:.75rem;font-weight:600}._list_18hcd_37{flex-direction:column;flex:1;gap:2px;margin:0;padding:4px;list-style:none;display:flex}._row_18hcd_47{border-radius:calc(var(--stylo-radius) - 3px);background:var(--stylo-bg);align-items:center;gap:8px;padding:5px 6px;display:flex}._row_18hcd_47:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-2px}._row_18hcd_47:hover{background:color-mix(in srgb, var(--stylo-border) 30%, transparent)}._row_18hcd_47[data-dragging]{background:var(--stylo-surface-floating,#fff);opacity:.9;box-shadow:0 4px 16px #00000024}._handle_18hcd_73{border-radius:calc(var(--stylo-radius) - 4px);width:20px;height:22px;color:var(--stylo-text-muted);font:inherit;cursor:grab;touch-action:none;background:0 0;border:1px solid #0000;flex:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}._handle_18hcd_73:hover{background:color-mix(in srgb, var(--stylo-border) 45%, transparent);color:var(--stylo-text)}._handle_18hcd_73:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-1px}._handle_18hcd_73:active{cursor:grabbing}._glyph_18hcd_105{width:18px;height:18px;color:var(--stylo-text-muted);flex:none;justify-content:center;align-items:center;display:inline-flex}._glyph_18hcd_105 svg{width:16px;height:16px;display:block}._label_18hcd_121{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:.8125rem;overflow:hidden}._rowActions_18hcd_130{flex:none;gap:2px;display:flex}._iconButton_18hcd_136,._textButton_18hcd_137{box-sizing:border-box;border-radius:calc(var(--stylo-radius) - 4px);color:var(--stylo-text-muted);font:inherit;cursor:pointer;background:0 0;border:1px solid #0000}._iconButton_18hcd_136{width:22px;height:22px;font-size:.8125rem;line-height:1}._textButton_18hcd_137{padding:3px 8px;font-size:.75rem}._iconButton_18hcd_136:hover:not(:disabled),._textButton_18hcd_137:hover:not(:disabled){background:color-mix(in srgb, var(--stylo-border) 45%, transparent);color:var(--stylo-text)}._iconButton_18hcd_136:focus-visible,._textButton_18hcd_137:focus-visible{outline:2px solid var(--stylo-ring);outline-offset:-1px}._iconButton_18hcd_136:disabled{opacity:.35;cursor:default}._footer_18hcd_176{border-top:1px solid var(--stylo-border);flex-wrap:wrap;gap:6px;padding:6px;display:flex}._empty_18hcd_184{color:var(--stylo-text-muted);padding:8px 6px;font-size:.8125rem}._srOnly_18hcd_190{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}
2
2
  /*$vite$:1*/
package/dist/stylo.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as e, r as t } from "./wikilink-BFpTehto.js";
2
- import { n, t as r } from "./useCodeMirror-YnIFkvKn.js";
2
+ import { n, t as r } from "./useCodeMirror-hLeJQw6e.js";
3
3
  import { n as i, r as a } from "./config-DTBxVhtH.js";
4
4
  import { Suspense as o, forwardRef as s, lazy as c, useEffect as l, useImperativeHandle as u, useReducer as d, useRef as f, useState as p } from "react";
5
5
  import { EditorView as m } from "@codemirror/view";
@@ -22,7 +22,7 @@ function _({ value: t, onChange: n, readOnly: i, placeholder: a, codeLanguages:
22
22
  }
23
23
  //#endregion
24
24
  //#region src/inplace/lazyInPlace.ts
25
- var v = c(async () => ({ default: (await import("./InPlaceView-Ba7JCZ2Y.js")).InPlaceView })), y = c(async () => ({ default: (await import("./Preview-Dxb9zPVv.js")).Preview }));
25
+ var v = c(async () => ({ default: (await import("./InPlaceView-B1GXXnoz.js")).InPlaceView })), y = c(async () => ({ default: (await import("./Preview-Dxb9zPVv.js")).Preview }));
26
26
  //#endregion
27
27
  //#region src/SplitView.tsx
28
28
  function b({ value: t, onChange: n, onWikiLinkClick: r, readOnly: i, placeholder: a, codeLanguages: s, frontmatter: c, onSave: u, onViewChange: d }) {
@@ -1200,7 +1200,7 @@ var yt = [
1200
1200
  "&": {
1201
1201
  color: "var(--stylo-text)",
1202
1202
  backgroundColor: "var(--stylo-bg)",
1203
- fontSize: "0.9375rem"
1203
+ fontSize: "var(--stylo-font-size, 0.9375rem)"
1204
1204
  },
1205
1205
  ".cm-content": {
1206
1206
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
@@ -1358,4 +1358,4 @@ function Dt({ value: e, onChange: t, readOnly: o = !1, placeholder: s, onSave: c
1358
1358
  //#endregion
1359
1359
  export { Oe as _, B as a, k as b, Pe as c, je as d, j as f, De as g, Ae as h, z as i, Le as l, Ne as m, bt as n, ze as o, ke as p, at as r, P as s, Dt as t, Ee as u, xe as v, O as y };
1360
1360
 
1361
- //# sourceMappingURL=useCodeMirror-YnIFkvKn.js.map
1361
+ //# sourceMappingURL=useCodeMirror-hLeJQw6e.js.map