@sheetxl/utils-react 0.8.0-beta.1 → 0.8.0-beta.10

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 (59) hide show
  1. package/browser/esm/{BT6JG-bEtM8ou0Xr.mjs → C61KRGJ5SxolPzsV.mjs} +182 -9
  2. package/browser/esm/{CKvLZo8keTi4hdRr.mjs → MX1mB0lFgdtW9vqX.mjs} +1 -1
  3. package/browser/esm/{BIb3Fag4wDs4Gro1.mjs → c6p-JLuLHZbSS4lS.mjs} +19 -18
  4. package/browser/esm/index.mjs +2353 -1909
  5. package/licenses/dependencies.txt +1 -39
  6. package/node/esm/{CdJ0O_khlsS4DqVj.mjs → DgX4rJhtPuZxWvt5.mjs} +181 -8
  7. package/node/esm/{TlOKuBGsozMYzzBC.mjs → DluzVx_97eND2sL7.mjs} +1 -1
  8. package/node/esm/index.mjs +2085 -1652
  9. package/package.json +8 -11
  10. package/types/src/animation/useAnimatedMeasure.d.ts +2 -3
  11. package/types/src/command/CommandCatalog.d.ts +2 -2
  12. package/types/src/command/CommandScope.d.ts +23 -2
  13. package/types/src/command/index.d.ts +1 -0
  14. package/types/src/command/tags.d.ts +19 -0
  15. package/types/src/components/index.d.ts +0 -1
  16. package/types/src/float/FloatPanel.d.ts +20 -1
  17. package/types/src/float/FloatPopper.d.ts +84 -10
  18. package/types/src/float/index.d.ts +0 -1
  19. package/types/src/hooks/LanguageState.d.ts +1 -1
  20. package/types/src/hooks/index.d.ts +4 -0
  21. package/types/src/hooks/useCallbackRef.d.ts +19 -6
  22. package/types/src/hooks/useEditMode.d.ts +5 -3
  23. package/types/src/hooks/useImperativeElement.d.ts +1 -1
  24. package/types/src/hooks/useInputModality.d.ts +26 -0
  25. package/types/src/hooks/useLocationSearch.d.ts +9 -0
  26. package/types/src/hooks/useMeasure.d.ts +32 -0
  27. package/types/src/hooks/useNotifier.d.ts +7 -4
  28. package/types/src/hooks/useSynchronizedPointerHandler.d.ts +3 -7
  29. package/types/src/hooks/useVisualViewportRect.d.ts +39 -0
  30. package/types/src/index.d.ts +1 -0
  31. package/types/src/lazy/index.d.ts +2 -0
  32. package/types/src/lazy/lazyComponent.d.ts +43 -0
  33. package/types/src/persistence/PersistentStateProvider.d.ts +3 -0
  34. package/types/src/persistence/Types.d.ts +18 -4
  35. package/types/src/persistence/_Context.d.ts +3 -2
  36. package/types/src/persistence/index.d.ts +2 -2
  37. package/types/src/persistence/usePersistentState.d.ts +39 -0
  38. package/types/src/scroll/AxisViewport.d.ts +6 -2
  39. package/types/src/scroll/IScrollPane.d.ts +10 -1
  40. package/types/src/scroll/Utils.d.ts +1 -0
  41. package/types/src/scroll/Viewport.d.ts +50 -2
  42. package/types/src/scroll/touchOwner.d.ts +19 -0
  43. package/types/src/scroll/useWheelScroll.d.ts +15 -2
  44. package/types/src/scroll/wheelOwner.d.ts +18 -0
  45. package/types/src/scroller/Scroller.d.ts +44 -5
  46. package/types/src/theme/TokenTheme.d.ts +14 -5
  47. package/types/src/theme/index.d.ts +1 -0
  48. package/types/src/theme/zIndex.d.ts +24 -0
  49. package/types/src/utils/index.d.ts +1 -0
  50. package/types/src/utils/textSelectionDrag.d.ts +52 -0
  51. package/browser/cjs/D02anPwyfYZxlZmG.cjs +0 -1
  52. package/browser/cjs/DZSvmqU8nRas1uz6.cjs +0 -1
  53. package/browser/cjs/Dc-AA0ooFLVdAhbT.cjs +0 -1
  54. package/browser/cjs/index.cjs +0 -5
  55. package/types/src/components/ITooltip.d.ts +0 -38
  56. package/types/src/float/FloatTooltip.d.ts +0 -22
  57. package/types/src/persistence/PersistenceStateProvider.d.ts +0 -3
  58. package/types/src/persistence/usePersistenceState.d.ts +0 -33
  59. package/types/src/utils/PinchZoom.d.ts +0 -3
@@ -45,7 +45,7 @@ export type PersistenceSerializer<T = any> = {
45
45
  parse: (raw: string | null) => T;
46
46
  stringify: (val: T) => string;
47
47
  };
48
- export type PersistenceStateOptions<T = any> = {
48
+ export type PersistentStateOptions<T = any> = {
49
49
  /**
50
50
  * Convert the value to/from a string for storage
51
51
  *
@@ -54,10 +54,9 @@ export type PersistenceStateOptions<T = any> = {
54
54
  serializer?: PersistenceSerializer<T>;
55
55
  version?: number;
56
56
  migrate?: (oldValue: unknown, oldVersion: number | undefined) => T;
57
- lazy?: boolean;
58
57
  };
59
- export type PersistenceStateSetter<T> = (next: T | ((prev: T) => T)) => void;
60
- export type PersistenceProviderProps = {
58
+ export type PersistentStateSetter<T> = (next: T | ((prev: T) => T)) => void;
59
+ export type PersistentStateProviderProps = {
61
60
  /**
62
61
  * Storage backend to use
63
62
  */
@@ -84,6 +83,21 @@ export type PersistenceProviderProps = {
84
83
  * @defaultValue `150`
85
84
  */
86
85
  debounceMs?: number;
86
+ /**
87
+ * Default values by key, used for any key with no stored value.
88
+ *
89
+ * @remarks
90
+ * Lets a host change the starting value of user-adjustable state without taking the choice away from
91
+ * the user — for example, enabling the dark grid by default while the user can still turn it off.
92
+ *
93
+ * Keys are the same logical keys passed to `usePersistentState` (without the namespace). Values are
94
+ * the typed values, not serialized strings. A value here wins over the default passed to
95
+ * `usePersistentState`; a stored value wins over both. Defaults are never written to the store, so
96
+ * changing one later applies to every user who has not made a choice.
97
+ *
98
+ * @defaultValue none
99
+ */
100
+ defaultValues?: Readonly<Record<string, unknown>>;
87
101
  /**
88
102
  * Children elements that will have access to the persistence context.
89
103
  *
@@ -1,9 +1,10 @@
1
- import { PersistenceProviderProps, PersistenceSerializer } from './Types';
2
- export type Ctx = Required<Omit<PersistenceProviderProps, 'children'>> & {
1
+ import { PersistentStateProviderProps, PersistenceSerializer } from './Types';
2
+ export type Ctx = Required<Omit<PersistentStateProviderProps, 'children'>> & {
3
3
  notify(key: string, value?: string): void;
4
4
  subscribeKey(key: string, fn: (value?: string) => void): () => void;
5
5
  };
6
6
  export declare const PersistenceContext: import('react').Context<Ctx | null>;
7
+ export declare const EmptyDefaultValues: Readonly<Record<string, unknown>>;
7
8
  export declare const DefaultSerializer: PersistenceSerializer;
8
9
  export declare function usePersistenceContext(): Ctx;
9
10
  //# sourceMappingURL=_Context.d.ts.map
@@ -1,6 +1,6 @@
1
1
  export * from './Types';
2
- export * from './usePersistenceState';
3
- export * from './PersistenceStateProvider';
2
+ export * from './usePersistentState';
3
+ export * from './PersistentStateProvider';
4
4
  export * from './InMemoryStore';
5
5
  export * from './LocalStorageStore';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { PersistentStateOptions, PersistentStateSetter } from './Types';
2
+ /**
3
+ * Persisted state hook backed by the current persistence context.
4
+ *
5
+ * This works like `useState`, but:
6
+ *
7
+ * - The value is persisted under `namespace:key` using the current store.
8
+ * - With no stored value, it uses the provider's `defaultValues[key]` if present, otherwise `defaultValue`.
9
+ * Defaults are never written to the store; only values passed to `setState` are.
10
+ * - Then it **hydrates asynchronously** from the configured store
11
+ * (memory, localStorage, IndexedDB, remote, etc.). Hydration is *seeding*: a value written with
12
+ * `setState` while the read is still in flight is newer, so it wins and the read is discarded.
13
+ * - Writes are **debounced** according to `debounceMs` from the context.
14
+ * - Optional **versioning + migration** lets you evolve stored shapes over time.
15
+ *
16
+ * ### Optional persistence
17
+ *
18
+ * If `key` is `null`, **persistence is disabled** and the hook behaves like
19
+ * a plain `useState` with the same `defaultValue` semantics:
20
+ *
21
+ * - No reads or writes go to the persistence store.
22
+ * - No cross-tab / cross-hook subscription is set up.
23
+ * - `clear()` simply resets back to `defaultValue` (or `undefined`).
24
+ *
25
+ * @typeParam T - Type of the stored value.
26
+ * @param key - Logical storage key; use `null` to disable persistence entirely.
27
+ * @param defaultValue - Value used when nothing is stored and the provider has no default for `key`; a
28
+ * function is called lazily to produce it.
29
+ * @param opts - Options controlling serialization, versioning, and migration.
30
+ * @returns A tuple of `[state, setState, clear]`:
31
+ * - `state` – The current value.
32
+ * - `setState(next)` – Updates the value and persists it (unless `key === null`).
33
+ * - `clear()` – Removes the persisted value and resets to the default.
34
+ *
35
+ * Like `useState`'s setter, `setState` and `clear` keep a stable identity across renders, so they are
36
+ * safe in dependency lists.
37
+ */
38
+ export declare function usePersistentState<T = unknown>(key: string | null, defaultValue?: T | (() => T), opts?: PersistentStateOptions<T>): [T, PersistentStateSetter<T>, () => void];
39
+ //# sourceMappingURL=usePersistentState.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { TopLeft, Size } from '@sheetxl/utils';
2
- import { IViewport, Viewport, ViewportMetrics, ClampBounds } from './Viewport';
2
+ import { IViewport, Viewport, ViewportMetrics, ClampBounds, ViewportZoomStep } from './Viewport';
3
3
  /**
4
4
  * Per-axis routing over (up to) two {@link Viewport}s so one viewport can bind its horizontal and
5
5
  * vertical axes to different controllers. Implements {@link IViewport}, so it is interchangeable with a
@@ -59,7 +59,11 @@ export declare class AxisViewport implements IViewport {
59
59
  /** @inheritdoc IViewport.setTarget */
60
60
  setTarget(left: number, top: number, animate?: boolean): boolean;
61
61
  /** @inheritdoc IViewport.setZoom */
62
- setZoom(zoom: number): void;
62
+ setZoom(zoom: number, left?: number, top?: number): void;
63
+ /** @inheritdoc IViewport.requestZoom — zoom is whole-grid state, so the relay is the zoom controller's. */
64
+ requestZoom(step: ViewportZoomStep): void;
65
+ /** @inheritdoc IViewport.subscribeZoom */
66
+ subscribeZoom(listener: (step: ViewportZoomStep) => void): () => void;
63
67
  /**
64
68
  * @inheritdoc IViewport.observe
65
69
  * Route the observed element to each OWNED axis only. A followed axis is driven by its owner (the main
@@ -41,9 +41,18 @@ export interface ScrollPaneProps extends React.HTMLAttributes<HTMLDivElement> {
41
41
  */
42
42
  disableMouseWheel?: boolean;
43
43
  /**
44
- * Wheel intercept. Return `false` to consume the event (skip scrolling) — e.g. ctrl/⌘+wheel zoom.
44
+ * Wheel intercept. Return `false` to consume the event (skip scrolling).
45
45
  */
46
46
  onWheelScroll?: (event: globalThis.WheelEvent) => boolean | void;
47
+ /**
48
+ * Enable the zoom gesture (ctrl/⌘+wheel; pinch). The ScrollPane's scroller owns the gesture — the
49
+ * proportional factor, the clamp, the continuous level — and requests each step on the
50
+ * {@link ScrollPaneProps.viewport} (`requestZoom`), exactly as it drives scroll into it; whoever owns
51
+ * the zoom's model listens there (`subscribeZoom`) and commits.
52
+ *
53
+ * @defaultValue false
54
+ */
55
+ zoomable?: boolean;
47
56
  showHorizontalScrollbar?: boolean;
48
57
  showVerticalScrollbar?: boolean;
49
58
  renderScrollCorner?: (props: ScrollCornerProps) => React.ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { ScrollbarProps } from './IScrollbar';
2
+ export { getWheelOwner, PANE_SCROLLER_ATTRIBUTE } from './wheelOwner';
2
3
  /**
3
4
  * scan all elements until we find one in the given direction
4
5
  * Note - only horizontal at the moment
@@ -28,6 +28,34 @@ export interface ViewportMetrics extends TopLeft, Size {
28
28
  */
29
29
  totalHeight: number;
30
30
  }
31
+ /**
32
+ * One step of a zoom gesture (ctrl/⌘+wheel; pinch), requested on the viewport by the ScrollPane that
33
+ * owns the gesture and applied by whoever owns the zoom's model (a sheet element) — the viewport itself
34
+ * only relays it (see {@link IViewport.requestZoom}).
35
+ */
36
+ export interface ViewportZoomStep {
37
+ /** The new zoom factor (`1` = 100 %), continuous and already clamped to the gesture's range. */
38
+ zoom: number;
39
+ /** The gesture's own scroll position for this level, in screen (zoomed) px. */
40
+ left: number;
41
+ top: number;
42
+ /** The focal point (cursor, or finger midpoint) in viewport client coordinates. */
43
+ clientX: number;
44
+ clientY: number;
45
+ /**
46
+ * The pan that rode along with this step — how far the fingers' midpoint moved on screen since the
47
+ * previous step, in px, positive toward the right/bottom (so the content follows and scroll
48
+ * decreases). `0` for a wheel, and on `end`.
49
+ */
50
+ panX: number;
51
+ panY: number;
52
+ /**
53
+ * `start` on the first change of a gesture, `move` while it runs, `end` once it is over — for a
54
+ * wheel, after the stream has been quiet for a moment; for touch, on the fingers lifting. `end`
55
+ * repeats the final level so the owner can round, snap and settle.
56
+ */
57
+ phase: 'start' | 'move' | 'end';
58
+ }
31
59
  /**
32
60
  * Read-only view of the scroll store. Layers/panes read the current scroll here and subscribe for
33
61
  * changes.
@@ -100,8 +128,23 @@ export interface IViewport extends ViewportStore {
100
128
  * (the zoom-independent base position) is preserved. Because zoom and scroll are mutated together
101
129
  * before the single emit, a listener that reads scroll on this emit sees screen px already consistent
102
130
  * with the new zoom.
131
+ *
132
+ * With `left`/`top` (screen px for the NEW zoom) the position is set to them instead of the
133
+ * ratio-rescale, current and target alike, in the same single emit — a focal-point zoom lands zoom
134
+ * and scroll together, with no frame painted at the top-left-anchored position in between.
135
+ */
136
+ setZoom(zoom: number, left?: number, top?: number): void;
137
+ /**
138
+ * Relay a zoom-gesture step to the zoom's owner. The ScrollPane that runs the gesture calls this (as
139
+ * it calls {@link setTarget} for a scroll); the viewport does NOT apply it — zoom is a whole percent
140
+ * owned by a model the viewport knows nothing about — it hands the step to {@link subscribeZoom}
141
+ * listeners, who commit it and push the result back in through {@link setZoom}.
142
+ */
143
+ requestZoom(step: ViewportZoomStep): void;
144
+ /**
145
+ * Listen for zoom-gesture steps ({@link requestZoom}). Returns the unsubscribe.
103
146
  */
104
- setZoom(zoom: number): void;
147
+ subscribeZoom(listener: (step: ViewportZoomStep) => void): () => void;
105
148
  /**
106
149
  * Push the measured viewport sizes (the grid measures them where it pushes {@link setBounds}; a
107
150
  * subscribed ScrollPane reads them via {@link getViewport} to size its scrollbar thumbs). Emits on
@@ -194,6 +237,11 @@ export declare class Viewport implements IViewport {
194
237
  isSettled(): boolean;
195
238
  /** @inheritdoc ViewportStore.getZoom */
196
239
  getZoom(): number;
240
+ private readonly _zoomListeners;
241
+ /** @inheritdoc IViewport.requestZoom */
242
+ requestZoom(step: ViewportZoomStep): void;
243
+ /** @inheritdoc IViewport.subscribeZoom */
244
+ subscribeZoom(listener: (step: ViewportZoomStep) => void): () => void;
197
245
  /** @inheritdoc ViewportStore.getMetrics */
198
246
  getMetrics(): ViewportMetrics;
199
247
  /** @inheritdoc ViewportStore.getClient */
@@ -254,7 +302,7 @@ export declare class Viewport implements IViewport {
254
302
  */
255
303
  private _startAnimation;
256
304
  /** @inheritdoc IViewport.setZoom */
257
- setZoom(zoom: number): void;
305
+ setZoom(zoom: number, left?: number, top?: number): void;
258
306
  private _emit;
259
307
  private _ensureTicking;
260
308
  private _tick;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Whether a touch that landed on `target` belongs to the content rather than to the pane's own
3
+ * touch scroller: the same rule the browser's native pan follows for `touch-action`.
4
+ *
5
+ * @remarks
6
+ * The browser pans only when every element from the touch target up to the scrolling element allows
7
+ * it. A `touch-action` that permits no panning on any of them (`none`, or `pinch-zoom` alone) means
8
+ * the element handles the touch itself. The pane's JavaScript scroller is a stand-in for that native
9
+ * pan, so it honors the same declaration: a resize handle, a drag grip, or a selected drawing says
10
+ * `touch-action: none` once, for the browser and for the scroller alike.
11
+ *
12
+ * Only the chain strictly below `root` is read; `root` is the scroller's own element.
13
+ *
14
+ * @param target The element the touch started on.
15
+ * @param root The scrolling element; the walk stops before it.
16
+ * @param touchActionOf Reads an element's computed `touch-action`. Defaults to the DOM's.
17
+ */
18
+ export declare const isTouchOwned: (target: EventTarget | null, root: Element | null, touchActionOf?: (element: Element) => string) => boolean;
19
+ //# sourceMappingURL=touchOwner.d.ts.map
@@ -11,17 +11,30 @@ export interface UseWheelScrollOptions {
11
11
  */
12
12
  onScrollBy: (delta: Partial<TopLeft>) => void;
13
13
  /**
14
- * Intercept hook. Return `false` to consume the event (skip scrolling) — e.g. ctrl/⌘+wheel zoom.
14
+ * Intercept hook. Return `false` to consume the event (skip scrolling).
15
15
  */
16
16
  onWheelScroll?: (event: globalThis.WheelEvent) => boolean | void;
17
+ /**
18
+ * ctrl/⌘+wheel ⇒ zoom. Receives the frame's accumulated `deltaY` in PIXELS (`deltaMode` lines and
19
+ * pages are normalized) and the last event's client focal point. Coalesced to one call per
20
+ * animation frame — a touchpad pinch arrives as dozens of ctrl+wheel events a second. When not
21
+ * provided, a ctrl+wheel falls through to {@link onWheelScroll} and scrolling as any other wheel.
22
+ */
23
+ onZoomBy?: (deltaY: number, clientX: number, clientY: number) => void;
17
24
  }
18
25
  /**
19
26
  * Attach a non-passive `wheel` listener to `ref` that translates wheel deltas into single-axis
20
27
  * scroll deltas (shift ⇒ horizontal, rAF-coalesced to one per frame) and applies them via
21
- * `onScrollBy`. Returns the handler (for imperative reuse).
28
+ * `onScrollBy`; a ctrl/⌘+wheel goes to `onZoomBy` instead (also one per frame). Returns the handler
29
+ * (for imperative reuse).
22
30
  *
23
31
  * @remarks
24
32
  * Lives here (not in the grid) so the ScrollPane owns wheel alongside touch.
33
+ *
34
+ * A wheel over an element inside `ref` that can still scroll that way (`overflow: auto` or `scroll`)
35
+ * is left to the browser, which scrolls that element. At its end the wheel passes on to the pane,
36
+ * unless the element sets `overscroll-behavior: contain`, which keeps it. Mark an element that
37
+ * scrolls on the pane's behalf with `PANE_SCROLLER_ATTRIBUTE` (`ScrollUtils`).
25
38
  */
26
39
  export declare const useWheelScroll: (ref: RefObject<HTMLElement | null>, options: UseWheelScrollOptions) => ((event: globalThis.WheelEvent) => void);
27
40
  //# sourceMappingURL=useWheelScroll.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Marks an element inside a scroll pane that scrolls on the pane's behalf (its own native scrollbar),
3
+ * so a wheel over it scrolls the pane rather than being left to the element.
4
+ */
5
+ export declare const PANE_SCROLLER_ATTRIBUTE = "data-sxl-pane-scroller";
6
+ /**
7
+ * Who a wheel belongs to when it lands inside `root`: a scrolling element between the target and
8
+ * `root` takes it, as the browser would give it to that element. The wheel scrolls across when
9
+ * Shift is held or its horizontal delta is the larger.
10
+ *
11
+ * @returns
12
+ * - `'native'`: an element can still scroll that way; the browser scrolls it.
13
+ * - `'contained'`: an element scrolls on that axis and is at its end, but its `overscroll-behavior`
14
+ * is `contain` or `none`, so the wheel stops there and scrolls nothing.
15
+ * - `null`: nothing inside takes it; `root` scrolls.
16
+ */
17
+ export declare const getWheelOwner: (event: globalThis.WheelEvent, root: HTMLElement) => "native" | "contained" | null;
18
+ //# sourceMappingURL=wheelOwner.d.ts.map
@@ -1,6 +1,12 @@
1
1
  export interface ScrollerCallback {
2
2
  (left: number, top: number, zoom: number): void;
3
3
  }
4
+ /**
5
+ * Wheel-to-zoom gain: `level *= exp(-deltaY * K)`. Tuned so one mouse notch (`deltaY` = 100 in
6
+ * Chrome on Windows) is ≈ 15 % — the step `ISheetView.zoomIn` takes — and a touchpad pinch's
7
+ * fractional deltas ramp smoothly.
8
+ */
9
+ export declare const WHEEL_ZOOM_K: number;
4
10
  export interface ScrollerOptions {
5
11
  /** Enable scrolling on x-axis */
6
12
  scrollingX?: boolean;
@@ -50,6 +56,25 @@ export declare class Scroller {
50
56
  * a gestureStart event happens. This has higher priority than dragging.
51
57
  */
52
58
  __isGesturing: boolean;
59
+ /**
60
+ * {Boolean} True for the duration of a zoom publish (`zoomTo` / `zoomBy` / `doMouseZoom`), so an
61
+ * owner that otherwise admits only live touch publishes (tracking / decelerating) can tell a zoom
62
+ * from a re-clamp echo (`setDimensions`) and let it through.
63
+ */
64
+ __isZooming: boolean;
65
+ /**
66
+ * {Number} Distance between the two fingers at `doTouchStart` (0 with one finger). The pinch level is
67
+ * `__zoomLevelStart × (current distance / this)`.
68
+ */
69
+ __pinchStartDistance: number;
70
+ /**
71
+ * {Number} The pan of the LAST published touch move — how far the finger (or the two-finger midpoint)
72
+ * moved on screen since the previous move, in px, positive toward the right/bottom. `0` for any publish
73
+ * that is not a touch move (a wheel zoom, a sync). An owner that applies a pinch to its own model
74
+ * reads these so the pan that rode along with the zoom is not lost.
75
+ */
76
+ __gestureMoveX: number;
77
+ __gestureMoveY: number;
53
78
  /**
54
79
  * {Boolean} Whether the user has moved by such a distance that we have enabled
55
80
  * dragging mode. Hint: It's only enabled after some pixels of movement to
@@ -189,6 +214,12 @@ export declare class Scroller {
189
214
  * @param callback {Function ? null} A callback that gets fired when the zoom is complete.
190
215
  */
191
216
  zoomTo(level: number, isAnimated?: boolean, fixedLeft?: number, fixedTop?: number, callback?: () => void): void;
217
+ /**
218
+ * Sets the zoom level WITHOUT publishing — the owner is telling the scroller where the zoom
219
+ * already is (the sync direction, the mirror of `scrollTo(left, top, false)` for position), so the
220
+ * next gesture starts from the right level and the scroll maximums are right for it.
221
+ */
222
+ setZoomLevel(level: number): void;
192
223
  /**
193
224
  * Zooms the content by the given factor.
194
225
  *
@@ -205,7 +236,8 @@ export declare class Scroller {
205
236
  * @param left {Number?null} Horizontal scroll position, keeps current if value is <code>null</code>
206
237
  * @param top {Number?null} Vertical scroll position, keeps current if value is <code>null</code>
207
238
  * @param isAnimated {Boolean?false} Whether the scrolling should happen using an animation
208
- * @param zoom {Number} [1.0] Zoom level to go to
239
+ * @param zoom {Number?} Zoom level to go to; `left`/`top` are then content (base, zoom-independent) px. Keeps the
240
+ * current level when omitted.
209
241
  */
210
242
  scrollTo(left: number, top: number, isAnimated?: boolean, zoom?: number): void;
211
243
  /**
@@ -217,7 +249,13 @@ export declare class Scroller {
217
249
  */
218
250
  scrollBy(left?: number, top?: number, isAnimated?: boolean): void;
219
251
  /**
220
- * Mouse wheel handler for zooming support
252
+ * Mouse wheel handler for zooming support. Proportional: the level is multiplied by
253
+ * `exp(-wheelDelta * WHEEL_ZOOM_K)`, so a mouse notch (`deltaY` ≈ 100) is one zoom step and a
254
+ * touchpad pinch (many small fractional deltas, delivered as ctrl+wheel) is a smooth ramp instead
255
+ * of a burst of steps. Positive delta (wheel toward the user) zooms out.
256
+ *
257
+ * @param wheelDelta `deltaY` in PIXELS (the caller normalizes `deltaMode`), accumulated per frame.
258
+ * @param pageX Focal point, in the same client space as `setPosition`.
221
259
  */
222
260
  doMouseZoom(wheelDelta: number, timeStamp: number, pageX: number, pageY: number): void;
223
261
  /**
@@ -225,10 +263,11 @@ export declare class Scroller {
225
263
  */
226
264
  doTouchStart(touches: TouchList, timeStamp: number | Date): void;
227
265
  /**
228
- * Touch move handler for scrolling support
229
- * @param {Number} [1.0] scale - ....
266
+ * Touch move handler for scrolling and pinch-zoom support. With two fingers the pinch scale is
267
+ * measured here (current distance over the `doTouchStart` distance) and the midpoint pan rides along
268
+ * in the same move; see `__gestureMoveX`.
230
269
  */
231
- doTouchMove(touches: TouchList, timeStamp: number | Date, scale?: number): void;
270
+ doTouchMove(touches: TouchList, timeStamp: number | Date): void;
232
271
  /**
233
272
  * Touch end handler for scrolling support
234
273
  */
@@ -148,11 +148,12 @@ export interface TokenTheme {
148
148
  * The border on a **raised container** — popup panels, menus, the toolbar palette.
149
149
  *
150
150
  * @remarks
151
- * In Material, "raised" is expressed as *lightness*: these surfaces take the `raisedSurface` wash and
152
- * carry no border. A flat design language expresses it as **border + shadow** with the fill held nearly
153
- * constant (VS Code's own find widget and menus do exactly this). A host that flattens the wash — see
154
- * `--sxl-surface-raised` — therefore has to put the structure back somewhere, and this is it.
155
- * Defaults to `transparent`, so the Material presentation is unchanged unless a host opts in.
151
+ * In Material, "raised" is expressed as *lightness*: these surfaces take a lighter fill
152
+ * ({@link TokenTheme['color-elevated'] color-elevated}) and carry no border. A flat design language holds
153
+ * the fill nearly constant and expresses it as **border + shadow** instead (VS Code's own find widget
154
+ * and menus do exactly this), so a host whose float fill sits within a shade of the ground has to put the
155
+ * structure back somewhere — and this is it. Defaults to `transparent`, so the Material presentation is
156
+ * unchanged unless a host opts in.
156
157
  */
157
158
  'color-elevated-border'?: string;
158
159
  'color-accent'?: string;
@@ -179,6 +180,14 @@ export interface TokenTheme {
179
180
  'radius-field'?: string;
180
181
  'radius-box'?: string;
181
182
  'border'?: string;
183
+ /**
184
+ * The stacking bands floating UI sits in (`--sxl-z-grid` / `-popup` / `-tooltip`): grid-anchored floats,
185
+ * popups + menus + modals, tooltips. See `zIndex.ts` for the order and the defaults; consumers read a
186
+ * band through `zIndexVar` and never write a number. Mode-independent, so both modes carry the same values.
187
+ */
188
+ 'z-grid'?: string;
189
+ 'z-popup'?: string;
190
+ 'z-tooltip'?: string;
182
191
  /**
183
192
  * The `background-image` painted behind image-bearing placeholders/frames (charts, shapes, slicers, the
184
193
  * column button) — a faint light wash over a dark surface, `none` in light. Mode-driven, so consumers just
@@ -3,6 +3,7 @@ export * from './defaultTheme';
3
3
  export * from './createThemeVars';
4
4
  export * from './buildThemeCSS';
5
5
  export * from './themeAttrs';
6
+ export * from './zIndex';
6
7
  export * from './TokenThemeProvider';
7
8
  export * from './useResolvedThemeMode';
8
9
  export * from './resolveTokens';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The stacking bands floating UI sits in. Three tokens (`--sxl-z-*`), ordered:
3
+ *
4
+ * | token | default | what sits there |
5
+ * | --- | --- | --- |
6
+ * | `grid` | 1250 | floats anchored to the grid — labels, chips, readouts, touch grips. Above app chrome (an app drawer is 1200), below the popup band so a menu covers them. |
7
+ * | `popup` | 1300 | popups, menus and panels (the float stack), modal windows. MUI's modal band. |
8
+ * | `tooltip` | 1500 | tooltips — out-stack menus, as MUI's do. |
9
+ *
10
+ * The values are tokens so a host can move a band (`'z-popup'` in its {@link TokenTheme}) without every
11
+ * consumer knowing; a consumer reads the band through {@link zIndexVar} and never writes a number.
12
+ */
13
+ export type ZIndexToken = 'grid' | 'popup' | 'tooltip';
14
+ /** The default value of each band — what {@link zIndexVar} falls back to when the token is unset. */
15
+ export declare const Z_INDEX: Readonly<Record<ZIndexToken, number>>;
16
+ /**
17
+ * A band as a CSS `z-index` value: `var(--sxl-z-<token>, <default>)`, optionally offset (`delta`) within
18
+ * the band — `zIndexVar('grid', 1)` lifts one float above its siblings. The result is a string for an
19
+ * inline `zIndex` style (or a stylesheet), not a number.
20
+ */
21
+ export declare const zIndexVar: (token: ZIndexToken, delta?: number) => string;
22
+ /** `z` moved by `delta` — arithmetic on a number, `calc()` on a var expression. */
23
+ export declare const offsetZIndex: (z: number | string, delta: number) => number | string;
24
+ //# sourceMappingURL=zIndex.d.ts.map
@@ -1,4 +1,5 @@
1
1
  export * as ReactUtils from './ReactUtils';
2
2
  export * from './useFullScreen';
3
3
  export * from './FullScreenPortal';
4
+ export * from './textSelectionDrag';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,52 @@
1
+ /** The press {@link TextSelectionDrag.onPointerDown} reads — a React pointer event satisfies it. */
2
+ export interface TextSelectionPress {
3
+ button?: number;
4
+ shiftKey?: boolean;
5
+ clientX?: number;
6
+ clientY?: number;
7
+ target?: EventTarget | null;
8
+ }
9
+ /** {@link useTextSelectionDrag}'s handle — spread onto the field, or wire each handler by name. */
10
+ export interface TextSelectionDrag {
11
+ /** Call from the field's `pointerdown` — non-primary buttons are ignored. */
12
+ onPointerDown: (e?: TextSelectionPress) => void;
13
+ /**
14
+ * Refuses the browser's text DRAG-AND-DROP, so a press on the field always means "select".
15
+ *
16
+ * Once a field holds a selection, pressing ON that selection starts a drag of the text instead of a
17
+ * new one — which in app chrome has nowhere to land, so it reads as the no-drop cursor and eats the
18
+ * gesture. It costs most where a click selects the whole value (the font size and name boxes): the
19
+ * next drag, the one meant to pick out part of it, is the one that can't happen.
20
+ */
21
+ onDragStart: (e: {
22
+ preventDefault: () => void;
23
+ }) => void;
24
+ }
25
+ /**
26
+ * Keeps a text-selection drag alive once the pointer leaves the field, by two mechanisms.
27
+ *
28
+ * **Driving the selection.** From the press, each move re-reads the character under the pointer
29
+ * (clamped into the field) and sets the selection itself. This is what makes the gesture behave the
30
+ * same wherever the field is: the browser's own drag-extension resolves against the pointer's raw
31
+ * position, which comes out wrong for a field inside a transformed ancestor — the in-grid cell editor
32
+ * is placed by a `transform: translate(…)`, and its selection tracked an x offset by that translate.
33
+ * Asking for the offset explicitly goes through the same hit-test a click does, which is correct there.
34
+ *
35
+ * **Suspending the chrome's veto,** for the presses the first mechanism does not take: a `number` input
36
+ * (the selection API throws on one), a double/triple press (word and line granularity are the browser's),
37
+ * or a shift-press (it extends an existing selection from its own far end). App chrome is
38
+ * `user-select: none` — legitimately, since a drag over a toolbar
39
+ * or the grid means something other than selecting their text — and a browser abandons a drag-selection
40
+ * the moment the node under the pointer can't start one. That `none` states an intent that only holds
41
+ * BETWEEN gestures, and CSS has no way to say "except while a drag is in flight", so the class says it
42
+ * for exactly one. Nothing else becomes selectable in practice: a text control confines its own
43
+ * selection, so the selection cannot leave the field.
44
+ *
45
+ * Wire it to any field whose text is worth dragging across:
46
+ * ```tsx
47
+ * const textDrag = useTextSelectionDrag();
48
+ * <input onPointerDown={textDrag.onPointerDown} onDragStart={textDrag.onDragStart} />
49
+ * ```
50
+ */
51
+ export declare const useTextSelectionDrag: () => TextSelectionDrag;
52
+ //# sourceMappingURL=textSelectionDrag.d.ts.map
@@ -1 +0,0 @@
1
- let e=require("@sheetxl/utils"),t=require("react"),n=require("react/jsx-runtime");function r(e){if(typeof e==`function`)return e;if(typeof e==`string`){let t=e.trim();if(t.startsWith(`data:image/svg+xml`)){let e=function(e){let t=/^data:image\/svg\+xml(;[^,]*)?,(.*)$/i.exec(e.trim());if(!t)return null;let n=t[1]||``,r=t[2]||``;try{if(/;base64/i.test(n)){if(typeof atob<`u`){let e=atob(r),t=e.length;if(typeof TextDecoder<`u`){let n=new Uint8Array(t);for(let r=0;r<t;r++)n[r]=e.charCodeAt(r);return new TextDecoder(`utf-8`).decode(n)}let n=``;for(let r=0;r<t;r++)n+=`%${e.charCodeAt(r).toString(16).padStart(2,`0`)}`;return decodeURIComponent(n)}return globalThis.Buffer.from(r,`base64`).toString(`utf-8`)}try{return decodeURIComponent(r)}catch{return r}}catch{return null}}(t);if(e)return o(e)}if(t.startsWith(`<`)){if(/^<\s*svg\b/i.test(t))return o(t);if(/^<\s*path\b/i.test(t)){let e=i(t);if(e)return{paths:[{d:e}]}}return{paths:[{d:t}]}}return{paths:[{d:t}]}}if(Array.isArray(e)){let t=[];for(let n of e)if(typeof n==`string`){let e=String(n).trim();if(e.startsWith(`<path`)){let n=i(e);n&&t.push({d:n})}else t.push({d:e})}else n&&typeof n==`object`&&`d`in n&&typeof n.d==`string`&&t.push({...n});return{paths:t}}return e}function i(e){let t=/\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(e);return t?t[1]??t[2]??null:null}function a(e){if(`svg`in e)return{...e,svg:r(e.svg)};if(`url`in e){let t=typeof e.url==`string`?{src:e.url}:e.url;return{...e,url:t}}if(`emoji`in e){let t=typeof e.emoji==`string`?e.emoji:e.emoji.text;return{...e,emoji:t}}return e}function o(e){try{if(typeof DOMParser<`u`){let t=new DOMParser().parseFromString(e,`image/svg+xml`),n=t.querySelector(`svg`)?.getAttribute(`viewBox`)??void 0,r=[];return t.querySelectorAll(`path`).forEach(e=>{let t=e.getAttribute(`d`);if(!t)return;let n={d:t},i=e.getAttribute(`class`);i&&(n.className=i);let a=e.getAttribute(`fill`);a&&a!==`none`&&(n.fill=a);let o=e.getAttribute(`stroke`);o&&(n.stroke=o);let s=e.getAttribute(`opacity`);s&&(n.opacity=Number(s));let c=e.getAttribute(`fill-rule`);c&&(n.fillRule=c);let l=e.getAttribute(`clip-rule`);l&&(n.clipRule=l),r.push(n)}),{viewBox:n,paths:r}}}catch{}let t=e.match(/viewBox="([^"]+)"/i),n=t?t[1]:void 0,r=[],i=/<path\b[^>]*\sd="([^"]+)"[^>]*>/gi,a;for(;a=i.exec(e);)r.push({d:a[1]});return{viewBox:n,paths:r}}function s(e){let t={};for(let[n,r]of Object.entries(e.icons))t[n]=a(r);let n={label:e.meta?.label??`Unnamed`,version:e.meta?.version??`1.0.0`,license:e.meta?.license??`MIT`,defaultViewBox:`0 0 24 24`,extends:e.meta?.extends??[]};n.extends.includes(`base`)||n.extends.push(`base`);let r={meta:n,icons:t},i=e.overrides;if(i){let e={};for(let[t,n]of Object.entries(i)){let r={};for(let[e,t]of Object.entries(n))r[e]=a(t);e[t]=r}r.__overrides=e}return r}function c(){let e=new Map,t=new Map,n=`base`,r=new Map;async function i(t){let r=e.get(t??n);if(!r)throw Error(`Icon pack not registered: ${t}`);if(!r.pack){if(!r.loading){if(!r.loader)throw Error(`No loader for icon pack: ${t}`);r.loading=r.loader().then(e=>{let t=e&&typeof e==`object`&&`default`in e?e.default:e;r.pack=s(t)}).catch(e=>{throw r.loading=void 0,e})}await r.loading}}function a(e){let t=e.indexOf(`:`);return t>0?{ns:e.slice(0,t),key:e.slice(t+1)}:{key:e}}function o(n,r){let i=[n,...e.get(n)?.pack?.meta.extends??[]];for(let n of i){let i=e.get(n);if(!i?.pack)continue;let{icons:a}=i.pack,o=a[t.get(n)?.get(r)??r]??a[r];if(o)return{glyph:o,pack:i.pack,packKey:n}}return null}function c(t,r){let i=r?.packKey??n;if(r?.packKey)return o(r.packKey,t);if(!t)return null;let{ns:s,key:c}=a(t);if(s){let t=e.get(s)?.pack;if(t){if(e.get(n)?.pack){let e=t.__overrides?.[n]?.[c];if(e)return{glyph:e,pack:t,packKey:s}}let r=o(s,c);if(r)return r}return null}return o(i,t)}return{register:function(t,r){let i=e.get(t)??{};typeof r==`function`?i.loader=r:i.pack=s(r),e.set(t,i),n||=t},prefetch:async function(e=n){let t=Array.isArray(e)?e:[e];await Promise.all(t.map(i))},setActive:function(e){n=e;for(let t of r.keys())try{t(e)}catch{}},getActive:function(){return n},resolve:async function(t,r){let o=c(t,r);if(o)return o;let s=r?.packKey??n,{ns:l,key:u}=a(t);if(r?.packKey){if(await i(s),o=c(t,r),o)return o;let n=e.get(s)?.pack?.meta?.extends??[];if(n.length&&(await Promise.all(n.map(i)),o=c(t,r),o))return o}else if(l){if(await i(l),o=c(t,r),o)return o;let n=e.get(l)?.pack?.meta?.extends??[];if(n.length&&(await Promise.all(n.map(i)),o=c(t,r),o))return o}else{if(await i(s),o=c(t,r),o)return o;let n=e.get(s)?.pack?.meta?.extends??[];if(n.length&&(await Promise.all(n.map(i)),o=c(t,r),o))return o}return null},registerAlias:function(e,n,r){t.has(e)||t.set(e,new Map),t.get(e).set(n,r)},has:function(e,t){return!!c(e,t)},getPack:function(t){return e.get(t??n)?.pack},hasPack:function(t){return!!e.get(t)?.pack},listPacks:function(){return Array.from(e.keys())},listIcons:function(t){let n=e.get(t)?.pack;return n?Object.keys(n.icons):[]},addActiveListener:function(e){let t=r.get(e);if(t)return t;let n=()=>{r.delete(e)};return r.set(e,n),n}}}var l=c();l.register(`base`,()=>Promise.resolve().then(()=>require("./Dc-AA0ooFLVdAhbT.cjs"))),l.register(`cf`,()=>Promise.resolve().then(()=>require("./DZSvmqU8nRas1uz6.cjs")));var u=e=>(0,n.jsx)(`svg`,{...e,children:(0,n.jsx)(`path`,{})}),d={Icon:`_Icon_16f7r_10`,"sxl-walk":`_sxl-walk_16f7r_1`},f=(0,t.memo)(r=>{let{iconKey:i,packKey:a,className:o,style:s,role:c,title:f,size:p,ariaHidden:m,propsSource:h,children:g,..._}=r,[v,y]=(0,t.useState)(null);(0,t.useEffect)(()=>{let t=!0,n=a,r=i;if(!r){let t=l.getPack(n);y({glyph:t?{svg:e.CommonUtils.EmptyArray}:void 0,pack:t??void 0,packKey:n??l.getActive()});return}if(r.includes(`:`)){let[e,t]=r.split(`:`);n=e,r=t}return l.resolve(r,{packKey:n}).then(e=>{t&&y(e)}),()=>{t=!1}},[i,a]);let b=v?.pack,x=v?.glyph,S=v?.packKey,C=x?x.svg:void 0,w=x&&!C?x.url:void 0,T=!x||C||w?void 0:x.emoji,E=p==null?void 0:typeof p==`number`?`${p}px`:p,D=(0,t.useMemo)(()=>[d.Icon,`icon`,o].filter(Boolean).join(` `),[o]),O=(0,t.useMemo)(()=>{let e={...s};return e[`--icon-size`]=E,e},[s,E]),k=c??(f?`img`:`presentation`),A=m??(!f||void 0),j=e=>(0,n.jsx)(`span`,{className:D,style:O,role:k,"aria-hidden":A,title:f,"data-icon-glyph":i,"data-icon-pack":S,..._,children:e});if(g)return j(g);if(T)return j((0,n.jsx)(`span`,{children:typeof T==`string`?T:T.text}));if(w)return j((0,n.jsx)(`img`,{src:w.src,alt:f??``}));if(x&&`react`in x){let e=x.react;return j((0,n.jsx)(e,{className:D,style:O,role:k,"aria-hidden":A,title:f,..._,...h}))}let M={viewBox:C?.viewBox??b?.meta.defaultViewBox??`0 0 24 24`};if(typeof C==`function`)return j(C(M)??(0,n.jsx)(u,{...M}));if(!C)return j((0,n.jsx)(u,{...M}));let N=C.paths;return j((0,n.jsx)(`svg`,{...M,children:N?N.map((e,t)=>(0,n.jsx)(`path`,{d:e.d,className:e.className,fill:e.fill,stroke:e.stroke,opacity:e.opacity,fillRule:e.fillRule,clipRule:e.clipRule},t)):null}))});function p(e){let{isWalking:r=!1,themedType:i=`primary`,speed:a=120,dashGap:o=3,dashLength:s=5,iconKey:c,packKey:l,style:u,className:d,...p}=e,m=(0,t.useMemo)(()=>{if(!r)return;let e={"--walk-duration":`${a*(o+s)}ms`,"--walk-dash-length":`${s}px`,"--walk-dash-gap":`${o}px`};return i&&i!==`primary`&&(e[`--icon-primary`]=`var(--sxl-color-${i})`),e},[r,a,o,s,i]);return(0,n.jsx)(f,{iconKey:c,packKey:l,className:(0,t.useMemo)(()=>r?d+` walking`:d,[r,d]),style:{...u,...m},...p})}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
@@ -1 +0,0 @@
1
- var e=e=>Math.round(100*e)/100,t=t=>t.map(([t,n],r)=>`${r?`L`:`M`}${e(t)} ${e(n)}`).join(` `)+`Z`,n=(e,t)=>{let n=t*Math.PI/180,r=Math.cos(n),i=Math.sin(n);return e.map(([e,t])=>{let n=e-12,a=t-12;return[12+n*r-a*i,12+n*i+a*r]})},r=[[12,2.5],[19.5,12],[15.25,12],[15.25,21.5],[8.75,21.5],[8.75,12],[4.5,12]],i=e=>({svg:[{d:t(n(r,e)),className:`fill outlined`}]}),a=[[12,5.5],[21,18.5],[3,18.5]],o=e=>({svg:[{d:t(n(a,e)),className:`fill outlined`}]}),s=(...e)=>e.map(e=>({d:e,className:`fill outlined`})),c=(...e)=>e.map(e=>({d:e,className:`line heavy knockout`})),l=(...e)=>e.map(e=>({d:e,className:`line heavy`})),u=`M2 12a10 10 0 1 0 20 0a10 10 0 1 0-20 0`,d=[5,9,13,17].map((e,t)=>({d:`M${3+5*t} ${21-e}h3.5v${e}h-3.5z`})),f=e=>({svg:d.map((t,n)=>({...t,className:n<e?`fill`:`fill tertiary`}))}),p=[`M12 2a10 10 0 0 1 10 10h-10z`,`M22 12a10 10 0 0 1-10 10v-10z`,`M12 22a10 10 0 0 1-10-10h10z`,`M2 12a10 10 0 0 1 10-10v10z`],m=Array.from({length:10},(e,t)=>{let n=t%2==0?10.5:4.4,r=(36*t-90)*Math.PI/180;return[12+n*Math.cos(r),12+n*Math.sin(r)]}),h=(e,t)=>{let n=[],r=e=>{let t=n[n.length-1];t&&t[0]===e[0]&&t[1]===e[1]||n.push(e)},i=e.length;for(let n=0;n<i;n++){let a=e[n],o=e[(n+i-1)%i],s=a[0]<=t;if(s!==o[0]<=t){let e=(t-o[0])/(a[0]-o[0]);r([t,o[1]+e*(a[1]-o[1])])}s&&r(a)}return n},g=e=>({svg:[{d:t(m),className:e===2?`fill`:`fill tertiary`},...e===1?[{d:t(h(m,12)),className:`fill`}]:[]]}),_=[0,1,2,3].map(e=>`M${2.25+5*e} 9.75h4.5v4.5h-4.5z`),v=e=>({svg:_.map((t,n)=>({d:t,className:n<e?`fill`:`fill tertiary`}))}),y=e=>({svg:[...p.slice(0,e).map(e=>({d:e,className:`fill`})),{d:u,className:`line heavy`}]}),b={meta:{label:`Conditional Formatting`,license:`ISC (Lucide)`,defaultViewBox:`0 0 24 24`},icons:{arrowUp:i(0),arrowUpRight:i(45),arrowRight:i(90),arrowDownRight:i(135),arrowDown:i(180),triangleUpSharp:o(0),triangleDownSharp:o(180),dash:{svg:s(`M3 10.4h18v3.2H3z`)},circle:{svg:s(u)},circleRimmed:{svg:[{d:u,className:`fill outlined rimmed`}]},triangleUp:{svg:s(`M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`)},diamond:{svg:s(`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0Z`)},flag:{svg:s(`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2a8 8 0 0 1 4 1 8 8 0 0 0 4 1 6 6 0 0 0 2.8-.7 1 1 0 0 1 1.2.15 1 1 0 0 1 0 .85V13a1 1 0 0 1-.6.9A6 6 0 0 1 16 14a8 8 0 0 1-4-1 8 8 0 0 0-4-1 6 6 0 0 0-4 1.4`)},check:{svg:l(`M20 6.5 9.5 17 4 11.5`)},cross:{svg:l(`M18.5 5.5 5.5 18.5`,`M5.5 5.5 18.5 18.5`)},exclamation:{svg:l(`M12 4v10`,`M12 19.5h.01`)},circleCheck:{svg:[...s(u),...c(`m8 12.2 2.6 2.6L16 9.4`)]},circleCross:{svg:[...s(u),...c(`m15.5 8.5-7 7`,`m8.5 8.5 7 7`)]},circleExclamation:{svg:[...s(u),...c(`M12 6.5v6`,`M12 16.6h.01`)]},rating0:f(0),rating1:f(1),rating2:f(2),rating3:f(3),rating4:f(4),star0:g(0),star1:g(1),star2:g(2),boxes0:v(0),boxes1:v(1),boxes2:v(2),boxes3:v(3),boxes4:v(4),quarters0:y(0),quarters1:y(1),quarters2:y(2),quarters3:y(3),quarters4:y(4)}};exports.default=b;