@damiro/stylo 0.9.0 → 0.10.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.
@@ -1 +1 @@
1
- {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/editor/extensions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,SAAS,EAAQ,MAAM,mBAAmB,CAAA;AAIrE,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAM/E;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,aAAa,CAAC,EAAE,aAAa,EAC7B,cAAc,CAAC,EAAE,cAAc,EAC/B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,KAAK,IAAI,GAChE,SAAS,CAqBX;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B,GAAG,SAAS,CAOZ"}
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/editor/extensions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,SAAS,EAAQ,MAAM,mBAAmB,CAAA;AAIrE,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAO/E;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,aAAa,CAAC,EAAE,aAAa,EAC7B,cAAc,CAAC,EAAE,cAAc,EAC/B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,KAAK,IAAI,GAChE,SAAS,CAuBX;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B,GAAG,SAAS,CAOZ"}
@@ -0,0 +1,27 @@
1
+ import type { EditorView } from "@codemirror/view";
2
+ /** Class stylo tags its panel root with; CM6 adds its own `cm-panel` alongside it. */
3
+ export declare const PANEL_CLASS = "stylo-search-panel";
4
+ /** The panel's elements, in the order they're appended — which is also Tab order. */
5
+ export interface SearchDom {
6
+ root: HTMLDivElement;
7
+ find: HTMLInputElement;
8
+ next: HTMLButtonElement;
9
+ prev: HTMLButtonElement;
10
+ all: HTMLButtonElement;
11
+ replace: HTMLInputElement;
12
+ replaceBtn: HTMLButtonElement;
13
+ replaceAllBtn: HTMLButtonElement;
14
+ caseSensitive: HTMLInputElement;
15
+ regexp: HTMLInputElement;
16
+ wholeWord: HTMLInputElement;
17
+ close: HTMLButtonElement;
18
+ }
19
+ /**
20
+ * Builds the find/replace row in reading order — find, next/prev/all, replace,
21
+ * replace/replace-all, the three checkboxes, close — so Tab order matches the visual
22
+ * layout. `@codemirror/search`'s own panel is fixed markup restyled from outside, which
23
+ * only ever let stylo reorder the *paint*, not the DOM; owning construction removes that
24
+ * ceiling entirely.
25
+ */
26
+ export declare function buildSearchDom(view: EditorView): SearchDom;
27
+ //# sourceMappingURL=search-panel-dom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-panel-dom.d.ts","sourceRoot":"","sources":["../../src/editor/search-panel-dom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,sFAAsF;AACtF,eAAO,MAAM,WAAW,uBAAuB,CAAA;AAE/C,qFAAqF;AACrF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,cAAc,CAAA;IACpB,IAAI,EAAE,gBAAgB,CAAA;IACtB,IAAI,EAAE,iBAAiB,CAAA;IACvB,IAAI,EAAE,iBAAiB,CAAA;IACvB,GAAG,EAAE,iBAAiB,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;IACzB,UAAU,EAAE,iBAAiB,CAAA;IAC7B,aAAa,EAAE,iBAAiB,CAAA;IAChC,aAAa,EAAE,gBAAgB,CAAA;IAC/B,MAAM,EAAE,gBAAgB,CAAA;IACxB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,KAAK,EAAE,iBAAiB,CAAA;CACzB;AA0CD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAgD1D"}
@@ -0,0 +1,13 @@
1
+ import { type EditorView, type Panel } from "@codemirror/view";
2
+ /** Toolbar "search" command: opens the panel, or animates it closed if it's already open. */
3
+ export declare function toggleSearchPanel(view: EditorView): boolean;
4
+ /**
5
+ * Stylo's replacement for `@codemirror/search`'s default panel, built through the
6
+ * `search()` extension's `createPanel` hook instead of restyling the library's fixed
7
+ * markup with CSS `order` (the previous approach — see the 0.10.0 journal entry). Owning
8
+ * the DOM means the row is already built in reading order, so Tab now follows the same
9
+ * left-to-right layout that's on screen, and the close animation is a plain listener on
10
+ * our own button instead of a capture-phase interception of the library's.
11
+ */
12
+ export declare function createStyloSearchPanel(view: EditorView): Panel;
13
+ //# sourceMappingURL=search-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-panel.d.ts","sourceRoot":"","sources":["../../src/editor/search-panel.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,KAAK,EAAoB,MAAM,kBAAkB,CAAA;AAOhF,6FAA6F;AAC7F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAE3D;AAeD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,KAAK,CAuE9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/editor/theme.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,eAAO,MAAM,UAAU,uCAuFrB,CAAA"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/editor/theme.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,eAAO,MAAM,UAAU,uCAoIrB,CAAA"}
package/dist/stylo.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as e, n as t } from "./frontmatter-DGUkb9z-.js";
2
- import { n, t as r } from "./useCodeMirror-DtwupFgc.js";
2
+ import { n, t as r } from "./useCodeMirror-CpE_Ncfn.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";
@@ -24,7 +24,7 @@ function _({ value: t, onChange: n, readOnly: i, placeholder: a, codeLanguages:
24
24
  }
25
25
  //#endregion
26
26
  //#region src/inplace/lazyInPlace.ts
27
- var v = c(async () => ({ default: (await import("./InPlaceView-Bu91_3Ig.js")).InPlaceView })), y = c(async () => ({ default: (await import("./Preview-AaGGwLQP.js")).Preview }));
27
+ var v = c(async () => ({ default: (await import("./InPlaceView-CkbMemAa.js")).InPlaceView })), y = c(async () => ({ default: (await import("./Preview-AaGGwLQP.js")).Preview }));
28
28
  //#endregion
29
29
  //#region src/SplitView.tsx
30
30
  function b({ value: t, onChange: n, onWikiLinkClick: r, readOnly: i, placeholder: a, codeLanguages: s, wikiLinkSource: c, embedSource: u, onResolveError: d, frontmatter: m, onSave: v, onViewChange: b }) {
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/toolbar/commands.ts"],"names":[],"mappings":"AAIA,OAAO,EAcL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAA;AAmB1B,qFAAqF;AACrF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAgI5C,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAExD,CAAA"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/toolbar/commands.ts"],"names":[],"mappings":"AAGA,OAAO,EAcL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAA;AAoB1B,qFAAqF;AACrF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAiI5C,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAExD,CAAA"}