@sheetxl/utils-react 0.7.22 → 0.7.23-beta.2
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/browser/cjs/C7jPCqFJNiWyD2pr.cjs +1 -0
- package/browser/cjs/CyWMySHsu-RvsIGs.cjs +1 -0
- package/browser/cjs/DZSvmqU8nRas1uz6.cjs +1 -0
- package/browser/cjs/index.cjs +5 -7
- package/browser/esm/BlY25fmBdmHNyBqo.mjs +139 -0
- package/browser/esm/CQUN3sZz7IrPMYIa.mjs +2171 -0
- package/browser/esm/DpI3aVOBON4B0xID.mjs +390 -0
- package/browser/esm/index.mjs +6128 -1806
- package/licenses/dependencies.txt +246 -39
- package/node/esm/B8EaqTMia4qMXy5z.mjs +139 -0
- package/node/esm/D9Xo9E4JB3ReeH-J.mjs +2171 -0
- package/node/esm/index.mjs +5141 -1774
- package/package.json +8 -5
- package/types/index.d.ts +2 -2043
- package/types/src/animation/AnimationModeContext.d.ts +10 -0
- package/types/src/animation/AnimationModeContext.d.ts.map +1 -0
- package/types/src/animation/index.d.ts +3 -0
- package/types/src/animation/index.d.ts.map +1 -0
- package/types/src/animation/useAnimatedMeasure.d.ts +39 -0
- package/types/src/animation/useAnimatedMeasure.d.ts.map +1 -0
- package/types/src/command/ActivationTracker.d.ts +53 -0
- package/types/src/command/ActivationTracker.d.ts.map +1 -0
- package/types/src/command/CommandAnchorProvider.d.ts +64 -0
- package/types/src/command/CommandAnchorProvider.d.ts.map +1 -0
- package/types/src/command/CommandButtonEntryLabel.d.ts +25 -0
- package/types/src/command/CommandButtonEntryLabel.d.ts.map +1 -0
- package/types/src/command/CommandButtonRegistry.d.ts +159 -0
- package/types/src/command/CommandButtonRegistry.d.ts.map +1 -0
- package/types/src/command/CommandButtonRegistryContext.d.ts +35 -0
- package/types/src/command/CommandButtonRegistryContext.d.ts.map +1 -0
- package/types/src/command/CommandCatalog.d.ts +155 -0
- package/types/src/command/CommandCatalog.d.ts.map +1 -0
- package/types/src/command/CommandCatalogResource.d.ts +7 -0
- package/types/src/command/CommandCatalogResource.d.ts.map +1 -0
- package/types/src/command/CommandCatalogService.d.ts +61 -0
- package/types/src/command/CommandCatalogService.d.ts.map +1 -0
- package/types/src/command/CommandChainContext.d.ts +32 -0
- package/types/src/command/CommandChainContext.d.ts.map +1 -0
- package/types/src/command/CommandFallbackContext.d.ts +30 -0
- package/types/src/command/CommandFallbackContext.d.ts.map +1 -0
- package/types/src/command/CommandFocusContext.d.ts +21 -0
- package/types/src/command/CommandFocusContext.d.ts.map +1 -0
- package/types/src/command/CommandRegistry.d.ts +164 -0
- package/types/src/command/CommandRegistry.d.ts.map +1 -0
- package/types/src/command/CommandRegistryContext.d.ts +16 -0
- package/types/src/command/CommandRegistryContext.d.ts.map +1 -0
- package/types/src/command/CommandResolver.d.ts +162 -0
- package/types/src/command/CommandResolver.d.ts.map +1 -0
- package/types/src/command/CommandScope.d.ts +343 -0
- package/types/src/command/CommandScope.d.ts.map +1 -0
- package/types/src/command/CommandScopeContext.d.ts +205 -0
- package/types/src/command/CommandScopeContext.d.ts.map +1 -0
- package/types/src/command/FocusActivation.d.ts +140 -0
- package/types/src/command/FocusActivation.d.ts.map +1 -0
- package/types/src/command/ICommand.d.ts +31 -0
- package/types/src/command/ICommand.d.ts.map +1 -0
- package/types/src/command/ICommandDefinition.d.ts +82 -0
- package/types/src/command/ICommandDefinition.d.ts.map +1 -0
- package/types/src/command/KeyBindingDispatcher.d.ts +150 -0
- package/types/src/command/KeyBindingDispatcher.d.ts.map +1 -0
- package/types/src/command/LayerActivation.d.ts +45 -0
- package/types/src/command/LayerActivation.d.ts.map +1 -0
- package/types/src/command/Types.d.ts +80 -0
- package/types/src/command/Types.d.ts.map +1 -0
- package/types/src/command/createResolvedCommand.d.ts +91 -0
- package/types/src/command/createResolvedCommand.d.ts.map +1 -0
- package/types/src/command/index.d.ts +26 -0
- package/types/src/command/index.d.ts.map +1 -0
- package/types/src/command/reduceDefinitions.d.ts +33 -0
- package/types/src/command/reduceDefinitions.d.ts.map +1 -0
- package/types/src/command/useCommands.d.ts +22 -0
- package/types/src/command/useCommands.d.ts.map +1 -0
- package/types/src/command/useContributeCommands.d.ts +18 -0
- package/types/src/command/useContributeCommands.d.ts.map +1 -0
- package/types/src/components/FocusKeyNavigation.d.ts +22 -0
- package/types/src/components/FocusKeyNavigation.d.ts.map +1 -0
- package/types/src/components/ITooltip.d.ts +38 -0
- package/types/src/components/ITooltip.d.ts.map +1 -0
- package/types/src/components/RoundedTab.d.ts +26 -0
- package/types/src/components/RoundedTab.d.ts.map +1 -0
- package/types/src/components/index.d.ts +4 -0
- package/types/src/components/index.d.ts.map +1 -0
- package/types/src/error/ErrorPanel.d.ts +14 -0
- package/types/src/error/ErrorPanel.d.ts.map +1 -0
- package/types/src/error/ReactErrorBoundary.d.ts +7 -0
- package/types/src/error/ReactErrorBoundary.d.ts.map +1 -0
- package/types/src/error/UncaughtErrorBoundary.d.ts +5 -0
- package/types/src/error/UncaughtErrorBoundary.d.ts.map +1 -0
- package/types/src/error/index.d.ts +4 -0
- package/types/src/error/index.d.ts.map +1 -0
- package/types/src/float/FloatPanel.d.ts +57 -0
- package/types/src/float/FloatPanel.d.ts.map +1 -0
- package/types/src/float/FloatPopper.d.ts +85 -0
- package/types/src/float/FloatPopper.d.ts.map +1 -0
- package/types/src/float/FloatPopup.d.ts +19 -0
- package/types/src/float/FloatPopup.d.ts.map +1 -0
- package/types/src/float/FloatProvider.d.ts +60 -0
- package/types/src/float/FloatProvider.d.ts.map +1 -0
- package/types/src/float/FloatStackContext.d.ts +25 -0
- package/types/src/float/FloatStackContext.d.ts.map +1 -0
- package/types/src/float/FloatTooltip.d.ts +22 -0
- package/types/src/float/FloatTooltip.d.ts.map +1 -0
- package/types/src/float/FloatUtils.d.ts +55 -0
- package/types/src/float/FloatUtils.d.ts.map +1 -0
- package/types/src/float/_FloatUtils.d.ts +51 -0
- package/types/src/float/_FloatUtils.d.ts.map +1 -0
- package/types/src/float/index.d.ts +9 -0
- package/types/src/float/index.d.ts.map +1 -0
- package/types/src/float/useFloatStack.d.ts +92 -0
- package/types/src/float/useFloatStack.d.ts.map +1 -0
- package/types/src/hooks/LanguageState.d.ts +15 -0
- package/types/src/hooks/LanguageState.d.ts.map +1 -0
- package/types/src/hooks/index.d.ts +19 -0
- package/types/src/hooks/index.d.ts.map +1 -0
- package/types/src/hooks/useBoundSyncExternalStore.d.ts +23 -0
- package/types/src/hooks/useBoundSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useCallbackRef.d.ts +11 -0
- package/types/src/hooks/useCallbackRef.d.ts.map +1 -0
- package/types/src/hooks/useDevicePixelRatio.d.ts +37 -0
- package/types/src/hooks/useDevicePixelRatio.d.ts.map +1 -0
- package/types/src/hooks/useEditMode.d.ts +66 -0
- package/types/src/hooks/useEditMode.d.ts.map +1 -0
- package/types/src/hooks/useGlobalClipboard.d.ts +7 -0
- package/types/src/hooks/useGlobalClipboard.d.ts.map +1 -0
- package/types/src/hooks/useId.d.ts +9 -0
- package/types/src/hooks/useId.d.ts.map +1 -0
- package/types/src/hooks/useImperativeElement.d.ts +3 -0
- package/types/src/hooks/useImperativeElement.d.ts.map +1 -0
- package/types/src/hooks/useLanguage.d.ts +13 -0
- package/types/src/hooks/useLanguage.d.ts.map +1 -0
- package/types/src/hooks/useMouseDownAndHoldListener.d.ts +13 -0
- package/types/src/hooks/useMouseDownAndHoldListener.d.ts.map +1 -0
- package/types/src/hooks/useNotifier.d.ts +330 -0
- package/types/src/hooks/useNotifier.d.ts.map +1 -0
- package/types/src/hooks/useOnClickOrFocusAway.d.ts +8 -0
- package/types/src/hooks/useOnClickOrFocusAway.d.ts.map +1 -0
- package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts +20 -0
- package/types/src/hooks/useOptionalBoundSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useOptionalSyncExternalStore.d.ts +18 -0
- package/types/src/hooks/useOptionalSyncExternalStore.d.ts.map +1 -0
- package/types/src/hooks/useSynchronizedPointerHandler.d.ts +54 -0
- package/types/src/hooks/useSynchronizedPointerHandler.d.ts.map +1 -0
- package/types/src/hooks/useTextareaCaretRect.d.ts +85 -0
- package/types/src/hooks/useTextareaCaretRect.d.ts.map +1 -0
- package/types/src/hooks/useTraceUpdate.d.ts +2 -0
- package/types/src/hooks/useTraceUpdate.d.ts.map +1 -0
- package/types/src/hooks/useTranslator.d.ts +32 -0
- package/types/src/hooks/useTranslator.d.ts.map +1 -0
- package/types/src/icons/DynamicIcon.d.ts +17 -0
- package/types/src/icons/DynamicIcon.d.ts.map +1 -0
- package/types/src/icons/DynamicIconService.d.ts +39 -0
- package/types/src/icons/DynamicIconService.d.ts.map +1 -0
- package/types/src/icons/ErrorIcon.d.ts +6 -0
- package/types/src/icons/ErrorIcon.d.ts.map +1 -0
- package/types/src/icons/Types.d.ts +81 -0
- package/types/src/icons/Types.d.ts.map +1 -0
- package/types/src/icons/WalkingIcon.d.ts +27 -0
- package/types/src/icons/WalkingIcon.d.ts.map +1 -0
- package/types/src/icons/_Utils.d.ts +3 -0
- package/types/src/icons/_Utils.d.ts.map +1 -0
- package/types/src/icons/index.d.ts +5 -0
- package/types/src/icons/index.d.ts.map +1 -0
- package/types/src/icons/packs/Base.d.ts +4 -0
- package/types/src/icons/packs/Base.d.ts.map +1 -0
- package/types/src/icons/packs/Conditional.d.ts +4 -0
- package/types/src/icons/packs/Conditional.d.ts.map +1 -0
- package/types/src/index.d.ts +18 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/loading/LoadingPanel.d.ts +31 -0
- package/types/src/loading/LoadingPanel.d.ts.map +1 -0
- package/types/src/loading/index.d.ts +2 -0
- package/types/src/loading/index.d.ts.map +1 -0
- package/types/src/persistence/InMemoryStore.d.ts +12 -0
- package/types/src/persistence/InMemoryStore.d.ts.map +1 -0
- package/types/src/persistence/LocalStorageStore.d.ts +15 -0
- package/types/src/persistence/LocalStorageStore.d.ts.map +1 -0
- package/types/src/persistence/PersistenceStateProvider.d.ts +3 -0
- package/types/src/persistence/PersistenceStateProvider.d.ts.map +1 -0
- package/types/src/persistence/Types.d.ts +95 -0
- package/types/src/persistence/Types.d.ts.map +1 -0
- package/types/src/persistence/_Context.d.ts +9 -0
- package/types/src/persistence/_Context.d.ts.map +1 -0
- package/types/src/persistence/index.d.ts +6 -0
- package/types/src/persistence/index.d.ts.map +1 -0
- package/types/src/persistence/usePersistenceState.d.ts +33 -0
- package/types/src/persistence/usePersistenceState.d.ts.map +1 -0
- package/types/src/react-resizable/Resizable.d.ts +30 -0
- package/types/src/react-resizable/Resizable.d.ts.map +1 -0
- package/types/src/react-resizable/ResizableBox.d.ts +18 -0
- package/types/src/react-resizable/ResizableBox.d.ts.map +1 -0
- package/types/src/react-resizable/index.d.ts +11 -0
- package/types/src/react-resizable/index.d.ts.map +1 -0
- package/types/src/react-resizable/propTypes.d.ts +56 -0
- package/types/src/react-resizable/propTypes.d.ts.map +1 -0
- package/types/src/react-resizable/utils.d.ts +3 -0
- package/types/src/react-resizable/utils.d.ts.map +1 -0
- package/types/src/scroll/AxisViewport.d.ts +73 -0
- package/types/src/scroll/AxisViewport.d.ts.map +1 -0
- package/types/src/scroll/IScrollPane.d.ts +63 -0
- package/types/src/scroll/IScrollPane.d.ts.map +1 -0
- package/types/src/scroll/IScrollbar.d.ts +94 -0
- package/types/src/scroll/IScrollbar.d.ts.map +1 -0
- package/types/src/scroll/NativeScrollbar.d.ts +7 -0
- package/types/src/scroll/NativeScrollbar.d.ts.map +1 -0
- package/types/src/scroll/ScrollButton.d.ts +29 -0
- package/types/src/scroll/ScrollButton.d.ts.map +1 -0
- package/types/src/scroll/ScrollPane.d.ts +4 -0
- package/types/src/scroll/ScrollPane.d.ts.map +1 -0
- package/types/src/scroll/Scrollbar.d.ts +4 -0
- package/types/src/scroll/Scrollbar.d.ts.map +1 -0
- package/types/src/scroll/TouchThumbContext.d.ts +93 -0
- package/types/src/scroll/TouchThumbContext.d.ts.map +1 -0
- package/types/src/scroll/TouchThumbHandle.d.ts +64 -0
- package/types/src/scroll/TouchThumbHandle.d.ts.map +1 -0
- package/types/src/scroll/TrackDrag.d.ts +107 -0
- package/types/src/scroll/TrackDrag.d.ts.map +1 -0
- package/types/src/scroll/Utils.d.ts +8 -0
- package/types/src/scroll/Utils.d.ts.map +1 -0
- package/types/src/scroll/Viewport.d.ts +285 -0
- package/types/src/scroll/Viewport.d.ts.map +1 -0
- package/types/src/scroll/VirtualScrollbar.d.ts +49 -0
- package/types/src/scroll/VirtualScrollbar.d.ts.map +1 -0
- package/types/src/scroll/index.d.ts +14 -0
- package/types/src/scroll/index.d.ts.map +1 -0
- package/types/src/scroll/scrollbarTheming.d.ts +27 -0
- package/types/src/scroll/scrollbarTheming.d.ts.map +1 -0
- package/types/src/scroll/useWheelScroll.d.ts +27 -0
- package/types/src/scroll/useWheelScroll.d.ts.map +1 -0
- package/types/src/scroller/Scroller.d.ts +260 -0
- package/types/src/scroller/Scroller.d.ts.map +1 -0
- package/types/src/scroller/animate.d.ts +30 -0
- package/types/src/scroller/animate.d.ts.map +1 -0
- package/types/src/scroller/index.d.ts +2 -0
- package/types/src/scroller/index.d.ts.map +1 -0
- package/types/src/singletonHook/components/SingleItemContainer.d.ts +6 -0
- package/types/src/singletonHook/components/SingleItemContainer.d.ts.map +1 -0
- package/types/src/singletonHook/components/SingletonHooksContainer.d.ts +7 -0
- package/types/src/singletonHook/components/SingletonHooksContainer.d.ts.map +1 -0
- package/types/src/singletonHook/index.d.ts +11 -0
- package/types/src/singletonHook/index.d.ts.map +1 -0
- package/types/src/singletonHook/singletonHook.d.ts +6 -0
- package/types/src/singletonHook/singletonHook.d.ts.map +1 -0
- package/types/src/singletonHook/utils/env.d.ts +4 -0
- package/types/src/singletonHook/utils/env.d.ts.map +1 -0
- package/types/src/singletonHook/utils/env.native.d.ts +1 -0
- package/types/src/singletonHook/utils/env.native.d.ts.map +1 -0
- package/types/src/singletonHook/utils/warning.d.ts +2 -0
- package/types/src/singletonHook/utils/warning.d.ts.map +1 -0
- package/types/src/splitPane/SplitPane.d.ts +91 -0
- package/types/src/splitPane/SplitPane.d.ts.map +1 -0
- package/types/src/splitPane/SplitPaneResizer.d.ts +11 -0
- package/types/src/splitPane/SplitPaneResizer.d.ts.map +1 -0
- package/types/src/splitPane/index.d.ts +3 -0
- package/types/src/splitPane/index.d.ts.map +1 -0
- package/types/src/theme/TokenTheme.d.ts +196 -0
- package/types/src/theme/TokenTheme.d.ts.map +1 -0
- package/types/src/theme/TokenThemeProvider.d.ts +97 -0
- package/types/src/theme/TokenThemeProvider.d.ts.map +1 -0
- package/types/src/theme/buildThemeCSS.d.ts +54 -0
- package/types/src/theme/buildThemeCSS.d.ts.map +1 -0
- package/types/src/theme/createThemeVars.d.ts +15 -0
- package/types/src/theme/createThemeVars.d.ts.map +1 -0
- package/types/src/theme/defaultTheme.d.ts +15 -0
- package/types/src/theme/defaultTheme.d.ts.map +1 -0
- package/types/src/theme/index.d.ts +9 -0
- package/types/src/theme/index.d.ts.map +1 -0
- package/types/src/theme/resolveTokens.d.ts +21 -0
- package/types/src/theme/resolveTokens.d.ts.map +1 -0
- package/types/src/theme/themeAttrs.d.ts +32 -0
- package/types/src/theme/themeAttrs.d.ts.map +1 -0
- package/types/src/theme/useResolvedThemeMode.d.ts +17 -0
- package/types/src/theme/useResolvedThemeMode.d.ts.map +1 -0
- package/types/src/types/Types.d.ts +71 -0
- package/types/src/types/Types.d.ts.map +1 -0
- package/types/src/types/index.d.ts +2 -0
- package/types/src/types/index.d.ts.map +1 -0
- package/types/src/utils/FullScreenPortal.d.ts +6 -0
- package/types/src/utils/FullScreenPortal.d.ts.map +1 -0
- package/types/src/utils/PinchZoom.d.ts +3 -0
- package/types/src/utils/PinchZoom.d.ts.map +1 -0
- package/types/src/utils/ReactUtils.d.ts +134 -0
- package/types/src/utils/ReactUtils.d.ts.map +1 -0
- package/types/src/utils/index.d.ts +4 -0
- package/types/src/utils/index.d.ts.map +1 -0
- package/types/src/utils/useFullScreen.d.ts +47 -0
- package/types/src/utils/useFullScreen.d.ts.map +1 -0
- package/browser/cjs/O75UN37bxYdOt58p.cjs +0 -6
- package/browser/esm/r7vPXPCC6zFI-B4m.mjs +0 -12
- package/node/assets/style.css +0 -1
- package/node/esm/CJ8rg6a2gULy0991.mjs +0 -12
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SheetXL theming — a `TokenTheme` is a **flat set of token values** (one light/dark mode's worth). The type
|
|
3
|
+
* IS the CSS-variable list: each key is exactly the variable name minus the `--sxl-` prefix, so an author
|
|
4
|
+
* never learns a mapping (`'color-base-100'` → `--sxl-color-base-100`, `'font-family'` → `--sxl-font-family`).
|
|
5
|
+
* The generator just prepends `--sxl-`.
|
|
6
|
+
*
|
|
7
|
+
* A **token** is one named entry (a key); a **`TokenTheme`** is a set of their values. There is no "surface" or
|
|
8
|
+
* "mode" object — those are composition: mode is a `themeVars` / `buildThemeCSS` argument, and a surface is
|
|
9
|
+
* a `Partial<TokenTheme>` merged on top (grid/header surfaces live in grid-react — grid additions, not generic).
|
|
10
|
+
*
|
|
11
|
+
* Colors, fonts, and geometry all live here together. Document colors/fonts (`--sxl-sys-color-*`, `--sxl-doc-*`,
|
|
12
|
+
* cell content) are a separate layer, not modeled here.
|
|
13
|
+
*
|
|
14
|
+
* ## The token test
|
|
15
|
+
*
|
|
16
|
+
* A key exists here **iff a host theming system would name that color**. Surfaces, interaction states, and
|
|
17
|
+
* semantic hues pass — MUI names `background.paper` / `action.hover` / `palette.primary`; VS Code names
|
|
18
|
+
* `input.background` / `list.hoverBackground`. *Techniques* and *app regions* fail: "elevation", a wash, a
|
|
19
|
+
* toolbar, a titlebar are style choices an app composes FROM tokens, never tokens themselves. That is what
|
|
20
|
+
* keeps this vocabulary mappable onto any theming system instead of duplicating one. It cuts both ways: an
|
|
21
|
+
* app-level idea (a brighter toolbar, a titlebar that dims when unfocused) is expressed in the app's own
|
|
22
|
+
* styles — apps are free to make such additions; they don't get to grow the vocabulary.
|
|
23
|
+
*
|
|
24
|
+
* ## The four categories, and which `-border` / `-content` goes with each
|
|
25
|
+
*
|
|
26
|
+
* | category | tokens | `-border` | `-content` |
|
|
27
|
+
* | --- | --- | --- | --- |
|
|
28
|
+
* | ground | `base-100/200/300`, `base-content` | yes — `base-border` | yes |
|
|
29
|
+
* | role surfaces | `input`, `elevated` | yes, each its own | no — inherit `base-content` |
|
|
30
|
+
* | interaction states | `base-hover`, `base-selected`, `base-emphasis` | no | `selected`/`emphasis` yes; `hover` no |
|
|
31
|
+
* | semantic hues | `primary`, `info`, `success`, `warning`, `error`, `accent` | no | yes |
|
|
32
|
+
*
|
|
33
|
+
* - **Each opaque surface has its own `-border`.** The ground's is `base-border`; the role surfaces have
|
|
34
|
+
* `input-border` and `elevated-border`. Draw a surface's edge with the one that belongs to it. They are
|
|
35
|
+
* independent values, not shades of each other — a host can give fields a hard edge and the grid a faint
|
|
36
|
+
* one. Interaction states have none: they are translucent, so whatever is under them still shows its edge.
|
|
37
|
+
* - **Fills that change the text color name their own `-content`.** Text is `base-content` by default; paint
|
|
38
|
+
* with `selected`, `emphasis`, or a semantic hue and you take that fill's `-content` for text on it.
|
|
39
|
+
* `hover` and the role surfaces have none, so `base-content` still applies — for `input` and `elevated`
|
|
40
|
+
* that is a contract, and a host must choose fills it stays readable on.
|
|
41
|
+
*
|
|
42
|
+
* (`neutral`, `shadow`, the categorical `series` ramp, fonts, geometry, and `image-background` sit outside
|
|
43
|
+
* the surface/state system — standalone named values.)
|
|
44
|
+
*/
|
|
45
|
+
export interface TokenTheme {
|
|
46
|
+
'color-base-100'?: string;
|
|
47
|
+
'color-base-200'?: string;
|
|
48
|
+
'color-base-300'?: string;
|
|
49
|
+
'color-base-content'?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The **ground's border** — what separates a ground surface from an adjacent one: the seam framing the
|
|
52
|
+
* grid body, the rule above the status bar, the line the sheet tabs notch into.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Distinct from `base-300`, which is the faint gridline and the ramp's third *fill* step. This one carries
|
|
56
|
+
* structure, so it is normally the stronger of the two — set both if the grid's outline should differ from
|
|
57
|
+
* its gridlines.
|
|
58
|
+
*
|
|
59
|
+
* Hosts name this: MUI `palette.divider`, VS Code `panel.border` / `editorGroup.border` / `contrastBorder`.
|
|
60
|
+
* Translucent by default, so it composes over whichever ground it lands on.
|
|
61
|
+
*
|
|
62
|
+
* The seam it draws is **not owned by one component**. Its segments belong to several — the sheet's grid
|
|
63
|
+
* edge, the tab strip's top line and the notch the selected tab cuts into it, the scrollbar and
|
|
64
|
+
* split-resizer dividers, the status bar's rule — and they must read as a single continuous line. Any of
|
|
65
|
+
* them open-coding its own color is what lets the seam drift apart, so each paints from THIS token.
|
|
66
|
+
*
|
|
67
|
+
* A segment rendered from inside another surface (the grid edge, drawn from within the grid) declares
|
|
68
|
+
* `themeSurfaceProps('app', …)` so the token resolves as chrome. That is the ordinary surface mechanism,
|
|
69
|
+
* nothing specific to borders.
|
|
70
|
+
*/
|
|
71
|
+
'color-base-border'?: string;
|
|
72
|
+
'color-base-hover'?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The **selected** interaction state — the fill for a selected row / column header, list row, tab.
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* The sibling of {@link TokenTheme['color-base-hover'] color-base-hover}, and it exists for the same
|
|
78
|
+
* reason: selection is an interaction *state*, and `base-100/200/300` is a depth *ramp* with no slot for
|
|
79
|
+
* one. Without it, selection was open-coded at the call site as a fixed `color-mix(primary 20%,
|
|
80
|
+
* transparent)` — a ratio tuned against a light surface, which collapses on a dark one (20% of a mid
|
|
81
|
+
* accent over a near-black header lands within a few units of the header itself). A per-mode token lets
|
|
82
|
+
* each mode carry a ratio that actually reads. Stated relative to `--sxl-color-primary`, so it still
|
|
83
|
+
* follows a host's accent.
|
|
84
|
+
*/
|
|
85
|
+
'color-base-selected'?: string;
|
|
86
|
+
/** Text/iconography on {@link TokenTheme['color-base-selected'] color-base-selected}. */
|
|
87
|
+
'color-base-selected-content'?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The **emphatic** selection state — a whole row/column selected rather than touched (select-all).
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* A third state token rather than a reuse of `color-accent`: `accent` is a different *hue role*
|
|
93
|
+
* (decoration — icon accent layers, chart series), and its `-content` means "text on the accent fill",
|
|
94
|
+
* which this is not. Its own pair also fixes a broken guarantee. The call site painted a muted accent
|
|
95
|
+
* (`color-mix(primary 75%, base-100)`) but took `primary-content` for text — and `primary-content` is
|
|
96
|
+
* MUI's `contrastText`, *computed against pure `primary.main`*. The mute silently invalidates it: in
|
|
97
|
+
* light that pairing measures 3.17:1, under AA, where MUI believed it was guaranteeing 4.60:1. Authoring
|
|
98
|
+
* the content per mode against the ACTUAL fill removes the computation from the loop entirely.
|
|
99
|
+
*/
|
|
100
|
+
'color-base-emphasis'?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Text/iconography on {@link TokenTheme['color-base-emphasis'] color-base-emphasis}.
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* Authored against a *mid-luminance* muted accent, which is what the default fill resolves to in both
|
|
106
|
+
* modes — so both modes want dark-ish text, and neither can be derived from the accent's own contrast
|
|
107
|
+
* pairing. A host whose `primary` is unusually dark or light should state this alongside the fill.
|
|
108
|
+
*/
|
|
109
|
+
'color-base-emphasis-content'?: string;
|
|
110
|
+
/**
|
|
111
|
+
* The **field** surface — the formula bar, the name box, and text inputs. A *role* token, deliberately
|
|
112
|
+
* not a step of the `base-*` ramp: the ramp expresses elevation (a Material idea, where "raised" implies
|
|
113
|
+
* "lighter"), while a flat design language (VS Code, Fluent) gives fields their own named color that is
|
|
114
|
+
* often DARKER than the chrome around them. A host that has such a color sets this; otherwise the app
|
|
115
|
+
* layer derives it from the paper surface and nothing changes.
|
|
116
|
+
*/
|
|
117
|
+
'color-input'?: string;
|
|
118
|
+
/**
|
|
119
|
+
* The field border — what separates {@link TokenTheme['color-input'] color-input} from the surface it sits
|
|
120
|
+
* on. Its own token (not `base-300`) for the same reason: in a flat language the field border is the ONLY
|
|
121
|
+
* thing carrying the field's structure, so it must be settable at full strength and never derived by
|
|
122
|
+
* multiplying a divider's alpha.
|
|
123
|
+
*/
|
|
124
|
+
'color-input-border'?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The fill of a **floating container** — popup panels, menus, popovers: chrome that leaves the layout
|
|
127
|
+
* and covers arbitrary content. A docked region that wants to read as the same surface (the toolbar
|
|
128
|
+
* palette) reads this same token; that is an app style choice, not a second token.
|
|
129
|
+
*
|
|
130
|
+
* @remarks
|
|
131
|
+
* Must be **opaque** — it is applied as `background-color`, which replaces the surface, and there is no
|
|
132
|
+
* guarantee about what it covers.
|
|
133
|
+
*
|
|
134
|
+
* Material gets this for free by washing the paper lighter ({@link TokenTheme['color-elevated-border']}
|
|
135
|
+
* explains why that stops working in a flat host). Stating it as a token lets a host put the step back
|
|
136
|
+
* deliberately, in whichever direction its language wants — lighter on dark, darker on light — instead of
|
|
137
|
+
* inheriting Material's "up is lighter" assumption. Defaults to the paper surface, so unset changes nothing.
|
|
138
|
+
*
|
|
139
|
+
* **One step per kind, not a scale.** There is deliberately no `elevated-2` / `elevated-3`, and no
|
|
140
|
+
* "elevation" token at all — elevation is a *technique*, which fails the token test above. Material needs
|
|
141
|
+
* a numbered ramp because lightness is its ONLY depth signal; once depth is carried by border + shadow
|
|
142
|
+
* those compose on their own (a submenu over a menu still reads), so a second *fill* buys nothing. A
|
|
143
|
+
* region that wants a subtle lift rather than this fill (a titlebar) paints its own wash over whatever it
|
|
144
|
+
* sits on — an app style, not a token.
|
|
145
|
+
*/
|
|
146
|
+
'color-elevated'?: string;
|
|
147
|
+
/**
|
|
148
|
+
* The border on a **raised container** — popup panels, menus, the toolbar palette.
|
|
149
|
+
*
|
|
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.
|
|
156
|
+
*/
|
|
157
|
+
'color-elevated-border'?: string;
|
|
158
|
+
'color-accent'?: string;
|
|
159
|
+
'color-accent-content'?: string;
|
|
160
|
+
'color-primary'?: string;
|
|
161
|
+
'color-primary-content'?: string;
|
|
162
|
+
'color-info'?: string;
|
|
163
|
+
'color-info-content'?: string;
|
|
164
|
+
'color-success'?: string;
|
|
165
|
+
'color-success-content'?: string;
|
|
166
|
+
'color-warning'?: string;
|
|
167
|
+
'color-warning-content'?: string;
|
|
168
|
+
'color-error'?: string;
|
|
169
|
+
'color-error-content'?: string;
|
|
170
|
+
'color-neutral'?: string;
|
|
171
|
+
'color-shadow'?: string;
|
|
172
|
+
'color-series'?: string[];
|
|
173
|
+
'font-family'?: string;
|
|
174
|
+
/** Monospace stack for code-ish chrome (the formula signature, argument names, evaluated-run tips). */
|
|
175
|
+
'font-family-mono'?: string;
|
|
176
|
+
'font-size'?: string;
|
|
177
|
+
'font-weight'?: string;
|
|
178
|
+
'font-style'?: string;
|
|
179
|
+
'radius-field'?: string;
|
|
180
|
+
'radius-box'?: string;
|
|
181
|
+
'border'?: string;
|
|
182
|
+
/**
|
|
183
|
+
* The `background-image` painted behind image-bearing placeholders/frames (charts, shapes, slicers, the
|
|
184
|
+
* column button) — a faint light wash over a dark surface, `none` in light. Mode-driven, so consumers just
|
|
185
|
+
* read `var(--sxl-image-background)` and it follows the surface.
|
|
186
|
+
*
|
|
187
|
+
* @remarks
|
|
188
|
+
* The sibling `--sxl-image-filter` (dark-image invert) is deliberately NOT a token: it carries a runtime
|
|
189
|
+
* preference gate (`enableDarkImages`) that a pure mode-driven token can't express — a descendant grid scope
|
|
190
|
+
* would re-emit and un-gate it. It's a single workbook-root computed var instead (see WorkbookElement).
|
|
191
|
+
*/
|
|
192
|
+
'image-background'?: string;
|
|
193
|
+
}
|
|
194
|
+
/** Light / dark selector — the one axis `themeVars` resolves; a `TokenTheme` is the values for one mode. */
|
|
195
|
+
export type ThemeMode = 'light' | 'dark';
|
|
196
|
+
//# sourceMappingURL=TokenTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenTheme.d.ts","sourceRoot":"","sources":["../../../../src/theme/TokenTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,WAAW,UAAU;IAEzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAI7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yFAAyF;IACzF,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;;;OAOG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;OASG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IAKxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uGAAuG;IACvG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,4GAA4G;AAC5G,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TokenTheme, ThemeMode } from './TokenTheme';
|
|
3
|
+
import { ThemeCSSOptions } from './buildThemeCSS';
|
|
4
|
+
/**
|
|
5
|
+
* What a {@link TokenThemeProvider} publishes to descendants — the *handle*, not resolved values (resolution
|
|
6
|
+
* stays in CSS). A portaled float is a React descendant but NOT a DOM descendant, so the cascade can't reach
|
|
7
|
+
* it; a float layer reads this to re-attach the theme (stamp `scopeClass` + `mode` on its portal root).
|
|
8
|
+
* `light`/`dark` are the already-MERGED inputs so a nested provider can merge further.
|
|
9
|
+
*/
|
|
10
|
+
export interface TokenThemeContextValue {
|
|
11
|
+
/**
|
|
12
|
+
* Per-instance scope class (no leading dot) — present ONLY when the provider is `isolate`d (i.e. it emits
|
|
13
|
+
* `@scope`d rules). A float carries it so those scoped rules apply on the portal root; `undefined` for a
|
|
14
|
+
* global provider (nothing to carry — global rules reach the float anyway).
|
|
15
|
+
*/
|
|
16
|
+
scopeClass?: string;
|
|
17
|
+
/** The mode a float should stamp, when this provider (or an ancestor provider) pins one. */
|
|
18
|
+
mode?: ThemeMode;
|
|
19
|
+
/** Merged light-mode token inputs (base/parent ⊕ own) — a child provider merges on top of these. */
|
|
20
|
+
light?: Partial<TokenTheme>;
|
|
21
|
+
/** Merged dark-mode token inputs. */
|
|
22
|
+
dark?: Partial<TokenTheme>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The raw context. Exported so a non-`TokenThemeProvider` theme root (e.g. the MUI studio, which builds its
|
|
26
|
+
* own sheet) can still PUBLISH the handle — `<TokenThemeContext.Provider value={{ scopeClass, mode }}>` — so
|
|
27
|
+
* floats and nested `TokenThemeProvider`s see it. Prefer {@link useTokenThemeContext} to read it.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TokenThemeContext: React.Context<TokenThemeContextValue | null>;
|
|
30
|
+
/** Read the nearest {@link TokenThemeProvider}'s handle (scope class + mode + merged inputs), or `null`. */
|
|
31
|
+
export declare const useTokenThemeContext: () => TokenThemeContextValue | null;
|
|
32
|
+
export interface TokenThemeProviderProps {
|
|
33
|
+
/** Light-mode token overrides. Shallow-merged over the base (parent provider ?? `base` prop). Own wins. */
|
|
34
|
+
light?: Partial<TokenTheme>;
|
|
35
|
+
/** Dark-mode token overrides. Shallow-merged over the base. Own wins. */
|
|
36
|
+
dark?: Partial<TokenTheme>;
|
|
37
|
+
/**
|
|
38
|
+
* The app baseline both modes start from, for the **from-scratch** case (theming a bare `Grid`, which has
|
|
39
|
+
* no surfaces of its own). Omit it in the **common** case — wrap a component that already brings its base +
|
|
40
|
+
* surfaces (`Studio`, `WorkbookElement`) and this provider is a pure override layer. Layered low → high as
|
|
41
|
+
* `base` ⊕ parent-provider ⊕ own, so a nested provider keeps `base` as a floor under the inherited tokens.
|
|
42
|
+
*/
|
|
43
|
+
base?: Record<ThemeMode, TokenTheme>;
|
|
44
|
+
/**
|
|
45
|
+
* Named surface overrides (e.g. `{ grid: GRID_SURFACE, header: HEADER_SURFACE }`), passed straight to
|
|
46
|
+
* {@link buildThemeCSS}. Only for the from-scratch case; a wrapped `Studio`/`WorkbookElement` supplies its
|
|
47
|
+
* own. Pass a stable object (it re-emits the sheet when the reference changes).
|
|
48
|
+
*/
|
|
49
|
+
surfaces?: ThemeCSSOptions['surfaces'];
|
|
50
|
+
/**
|
|
51
|
+
* Pin the mode by stamping `data-sxl-theme-mode` on this provider's root (`'auto'` follows the OS / a
|
|
52
|
+
* `light`|`dark` class). **Omit it in the common case** — the wrapped component stamps its own mode, and
|
|
53
|
+
* the mode-keyed overrides follow it via the cascade. Pin it only when the themed content sits on this
|
|
54
|
+
* provider's own root with no inner mode (the from-scratch bare-`Grid` case).
|
|
55
|
+
*/
|
|
56
|
+
mode?: ThemeMode | 'auto';
|
|
57
|
+
/** Stamp `data-sxl-theme-surface` on the root (e.g. `'grid'`). Optional — app is the default surface. */
|
|
58
|
+
surface?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Isolate this instance in an `@scope` so its tokens don't collide with another provider on the page.
|
|
61
|
+
* Default `false` (global) — correct for the common "theme the whole app" case, and it reaches portaled
|
|
62
|
+
* popups for free. Set `true` for multiple independently-themed instances on one page (note: an isolated
|
|
63
|
+
* provider's overrides don't yet reach a WRAPPED component's own portaled floats — that needs float-layer
|
|
64
|
+
* wiring off {@link useTokenThemeContext}). @defaultValue false
|
|
65
|
+
*/
|
|
66
|
+
isolate?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The `@layer` the tokens emit into. Default `'sxl-overrides'` — the top layer, so overrides win over the
|
|
69
|
+
* app/defaults regardless of specificity. Pass `'sxl-app'` to act as an app baseline instead.
|
|
70
|
+
* @defaultValue 'sxl-overrides'
|
|
71
|
+
*/
|
|
72
|
+
layer?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The content to theme. A provider renders **no DOM box of its own** — when a `mode`/`surface` is pinned or
|
|
75
|
+
* the instance is `isolate`d, those are cloned ONTO this child, so in that case it must be a **single**
|
|
76
|
+
* element that forwards `className` / DOM attributes to its root (`Studio`, `WorkbookElement`, and intrinsic
|
|
77
|
+
* elements all do). In the common case (global, no pinned mode) nothing is injected and children render as-is.
|
|
78
|
+
*/
|
|
79
|
+
children?: React.ReactNode;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A thin React wrapper around the CSS-variable theme model — the ergonomic form of the hand-written
|
|
83
|
+
* `<style>` + `data-sxl-theme-*` ceremony (see the "CSS Variables" story). It builds the `--sxl-*` stylesheet
|
|
84
|
+
* from `light`/`dark` token sets (via {@link buildThemeCSS}) and injects it, so the common flow is: render a
|
|
85
|
+
* workbook, wrap it, pass your brand tokens. It renders **no DOM box of its own** — when a mode/surface is
|
|
86
|
+
* pinned or the instance is `isolate`d, those attributes are cloned onto its single child instead.
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* **Resolution stays in CSS** — this only *emits* CSS and publishes a {@link TokenThemeContextValue} handle.
|
|
90
|
+
* The default is an **override layer over a wrapped component that already defines base + surfaces** (Studio /
|
|
91
|
+
* WorkbookElement); `base`/`surfaces` are the from-scratch escape hatch. Nesting is a **shallow input merge**
|
|
92
|
+
* (base/parent ⊕ own) — a `TokenTheme` is flat, so a shallow spread is the correct merge (the one array token
|
|
93
|
+
* `color-series` is replaced wholesale by design). There is intentionally **no shared-`theme` prop**: put
|
|
94
|
+
* shared tokens in both modes, or in a parent provider both modes inherit (nesting IS the shared layer).
|
|
95
|
+
*/
|
|
96
|
+
export declare const TokenThemeProvider: React.FC<TokenThemeProviderProps>;
|
|
97
|
+
//# sourceMappingURL=TokenThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/TokenThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4FAA4F;IAC5F,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oGAAoG;IACpG,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5B,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,8CAAqD,CAAC;AAEpF,4GAA4G;AAC5G,eAAO,MAAM,oBAAoB,QAAO,sBAAsB,GAAG,IAAqC,CAAC;AAEvG,MAAM,WAAW,uBAAuB;IACtC,2GAA2G;IAC3G,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5B,yEAAyE;IACzE,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,yGAAyG;IACzG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+EhE,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { TokenTheme, ThemeMode } from './TokenTheme';
|
|
2
|
+
/**
|
|
3
|
+
* Per-element override hook for the generic text-selection tint (below). An element sets this custom
|
|
4
|
+
* property to retint or clear (`transparent`) its own selection without a bespoke `::selection` rule —
|
|
5
|
+
* e.g. the formula editor clears it while its hover eval-run band is shown so the two same-colored
|
|
6
|
+
* highlights don't stack.
|
|
7
|
+
*/
|
|
8
|
+
export declare const INPUT_SELECTION_VAR = "--sxl-input-selection";
|
|
9
|
+
/**
|
|
10
|
+
* The generic selection tint: `--sxl-color-primary` at a low alpha, so text stays readable through it and
|
|
11
|
+
* it follows light/dark + any brand override automatically. Shared so a component painting its own matching
|
|
12
|
+
* "highlight" surface (the formula editor's eval-run band) reads as the same system, not a hardcoded blue.
|
|
13
|
+
*/
|
|
14
|
+
export declare const INPUT_SELECTION_TINT = "color-mix(in srgb, var(--sxl-color-primary, rgb(0, 120, 215)) 20%, transparent)";
|
|
15
|
+
/**
|
|
16
|
+
* The canonical `@layer` cascade (lowest → highest priority). A later layer wins over an earlier one
|
|
17
|
+
* regardless of specificity, so the whole model is: grid-react emits neutral defaults into `sxl-defaults`,
|
|
18
|
+
* studio-mui emits its MUI-derived values into `sxl-app`, and clients override in `sxl-overrides`. Consumers
|
|
19
|
+
* read `var(--sxl-*)` UNLAYERED, so they (and inline one-offs) still beat every layer.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SXL_THEME_LAYERS: readonly ["sxl-defaults", "sxl-app", "sxl-overrides"];
|
|
22
|
+
export type SxlThemeLayer = typeof SXL_THEME_LAYERS[number];
|
|
23
|
+
/**
|
|
24
|
+
* The `@layer a, b, c;` order statement. Emit it at the top of EVERY layered sheet (idempotent): CSS derives
|
|
25
|
+
* layer order from first appearance, so without an explicit declaration the order would depend on which sheet
|
|
26
|
+
* (studio vs. Sheet) mounted first. Declaring it makes `sxl-app` beat `sxl-defaults` regardless of load order.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SXL_THEME_LAYER_ORDER: string;
|
|
29
|
+
export interface ThemeCSSOptions {
|
|
30
|
+
/** App baseline per mode. @defaultValue `defaultTheme` */
|
|
31
|
+
app?: Record<ThemeMode, TokenTheme>;
|
|
32
|
+
/** Extra surfaces: name → per-mode partial overrides (e.g. `{ grid: GRID_SURFACE, header: HEADER_SURFACE }`). */
|
|
33
|
+
surfaces?: Record<string, Partial<Record<ThemeMode, Partial<TokenTheme>>>>;
|
|
34
|
+
/** High-contrast override tokens (rides the `mode="hc"` value). */
|
|
35
|
+
hc?: Partial<TokenTheme>;
|
|
36
|
+
modeAttr?: string;
|
|
37
|
+
surfaceAttr?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Wrap all emitted rules in `@layer <layer>{…}` (and prepend {@link SXL_THEME_LAYER_ORDER} so the cascade
|
|
40
|
+
* order is deterministic). Omit for an unlayered sheet (e.g. storybook one-offs). See {@link SXL_THEME_LAYERS}.
|
|
41
|
+
*/
|
|
42
|
+
layer?: SxlThemeLayer | string;
|
|
43
|
+
/**
|
|
44
|
+
* Wrap the theme rules in `@scope (<scopeSelector>){…}` so this instance's tokens don't collide with
|
|
45
|
+
* other instances or shadow DOM boundaries (design §6). When both `layer` and `scope` are set the nesting
|
|
46
|
+
* is `@layer <layer>{ @scope (<sel>){ rules } }` — the layer-order statement stays top-level (layers are
|
|
47
|
+
* document-global) and `@scope` binds only the rules. Inside a scope the defaults attach to `:scope`
|
|
48
|
+
* (the scope root), not `:root`. Omit for a global sheet.
|
|
49
|
+
*/
|
|
50
|
+
scope?: string;
|
|
51
|
+
}
|
|
52
|
+
/** Build the injectable theme CSS from the app baseline + surface overrides. */
|
|
53
|
+
export declare function buildThemeCSS(options?: ThemeCSSOptions): string;
|
|
54
|
+
//# sourceMappingURL=buildThemeCSS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildThemeCSS.d.ts","sourceRoot":"","sources":["../../../../src/theme/buildThemeCSS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAsB/D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,oFAAoF,CAAC;AAiBtH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,uDAAwD,CAAC;AACtF,MAAM,MAAM,aAAa,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAA2C,CAAC;AAqB9E,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACpC,iHAAiH;IACjH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,mEAAmE;IACnE,EAAE,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,OAAO,GAAE,eAAoB,GAAG,MAAM,CAuGnE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TokenTheme, ThemeMode } from './TokenTheme';
|
|
3
|
+
/**
|
|
4
|
+
* Flat theme (token values) → `--sxl-*` style object (skips `undefined`). An **array** token expands to a
|
|
5
|
+
* 1-based numbered ramp (`--sxl-color-series-1`, `-2`, …), matching {@link buildThemeCSS}'s stylesheet form.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toVars(theme: Partial<TokenTheme> | Record<string, string | string[] | undefined>): CSSProperties;
|
|
8
|
+
/**
|
|
9
|
+
* The single entry: resolve `--sxl-*` vars for a mode, with any number of partial overrides merged over
|
|
10
|
+
* the default theme (later wins). A *surface* is just an overrides partial — e.g. grid-react's
|
|
11
|
+
* `GRID_SURFACE[mode]` — so `themeVars(mode, GRID_SURFACE[mode])` yields the grid surface, and a client's
|
|
12
|
+
* brand tweak is one more partial: `themeVars(mode, GRID_SURFACE[mode], { 'color-accent': 'purple' })`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function themeVars(mode: ThemeMode, ...overrides: Array<Partial<TokenTheme> | undefined>): CSSProperties;
|
|
15
|
+
//# sourceMappingURL=createThemeVars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createThemeVars.d.ts","sourceRoot":"","sources":["../../../../src/theme/createThemeVars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAU/D;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,aAAa,CAYhH;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,GAAG,aAAa,CAG9G"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TokenTheme, ThemeMode } from './TokenTheme';
|
|
2
|
+
/**
|
|
3
|
+
* The length of the categorical `color-series` palette (the `--sxl-color-series-1..N` ramp). **Fixed** — like
|
|
4
|
+
* MUI's grey ramp, this is a constant the whole system agrees on, never a tunable. A client may swap the seven
|
|
5
|
+
* hues (replace the `color-series` array), but never the count. Consumers rotate with `i % SERIES_COUNT`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SERIES_COUNT = 7;
|
|
8
|
+
/**
|
|
9
|
+
* The default theme — the framework-neutral, **unbranded** baseline (per mode) every surface inherits.
|
|
10
|
+
* The floor for an app with no theme at all; a themed app (MUI, VS Code, …) injects its own palette over
|
|
11
|
+
* it, and branding is expressed in THAT layer, never here. Grid/header surfaces (in grid-react) layer
|
|
12
|
+
* their overrides on top of this.
|
|
13
|
+
*/
|
|
14
|
+
export declare const defaultTheme: Record<ThemeMode, TokenTheme>;
|
|
15
|
+
//# sourceMappingURL=defaultTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../../../src/theme/defaultTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAuHtD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './TokenTheme';
|
|
2
|
+
export * from './defaultTheme';
|
|
3
|
+
export * from './createThemeVars';
|
|
4
|
+
export * from './buildThemeCSS';
|
|
5
|
+
export * from './themeAttrs';
|
|
6
|
+
export * from './TokenThemeProvider';
|
|
7
|
+
export * from './useResolvedThemeMode';
|
|
8
|
+
export * from './resolveTokens';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read resolved `--sxl-*` token values off a live element via `getComputedStyle`.
|
|
3
|
+
*
|
|
4
|
+
* This is the escape hatch for the few consumers that CSS `var()` cannot reach — a `<canvas>`, an SVG
|
|
5
|
+
* `data:` URI, or SDK interop — where a concrete color string is required. Because it reads the *computed*
|
|
6
|
+
* style of `el`, the value already reflects that element's surface, mode, and any override, with no
|
|
7
|
+
* configuration and no theme context (see THEMING-DESIGN.md, decision 1). It is the counterpart to the
|
|
8
|
+
* CSS-first read path; do NOT use it where a plain `var(--sxl-*)` works.
|
|
9
|
+
*
|
|
10
|
+
* SSR / detached element: returns `undefined` / `{}` so the caller falls back to its literal. Never throws.
|
|
11
|
+
*
|
|
12
|
+
* `name` is a {@link TokenTheme} key (e.g. `'color-base-100'`) or a full custom-property name
|
|
13
|
+
* (e.g. `'--sxl-color-base-100'`); the `--sxl-` prefix is added when absent.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveToken(el: Element | null | undefined, name: string): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Batch form of {@link resolveToken} — resolves several tokens from a single `getComputedStyle` read.
|
|
18
|
+
* Returns a record keyed by the input `names` (unresolved/empty tokens are omitted).
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveTokens(el: Element | null | undefined, names: string[]): Record<string, string>;
|
|
21
|
+
//# sourceMappingURL=resolveTokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveTokens.d.ts","sourceRoot":"","sources":["../../../../src/theme/resolveTokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI7F;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EAC9B,KAAK,EAAE,MAAM,EAAE,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ThemeMode } from './TokenTheme';
|
|
2
|
+
/**
|
|
3
|
+
* The two attributes a container sets to **select** a cell of the `(token × surface × mode)` matrix. The
|
|
4
|
+
* value cells live in the injected stylesheet (see {@link buildThemeCSS}); a consumer just reads
|
|
5
|
+
* `var(--sxl-*)` and knows nothing about mode/surface. See THEMING-DESIGN.md.
|
|
6
|
+
*/
|
|
7
|
+
export declare const THEME_MODE_ATTR = "data-sxl-theme-mode";
|
|
8
|
+
export declare const THEME_SURFACE_ATTR = "data-sxl-theme-surface";
|
|
9
|
+
export interface ThemeAttrs {
|
|
10
|
+
'data-sxl-theme-mode'?: ThemeMode;
|
|
11
|
+
'data-sxl-theme-surface'?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The selection attributes for a surface container, ready to spread onto the element — e.g.
|
|
15
|
+
* `<div {...themeSurfaceProps('grid', 'dark')}>`. `mode` is optional: omit it to inherit the ancestor's
|
|
16
|
+
* mode via the CSS cascade; pass it when the region flips mode (a light grid in a dark app), which selects
|
|
17
|
+
* the compound `[mode][surface]` cell.
|
|
18
|
+
*/
|
|
19
|
+
export declare const themeSurfaceProps: (surface: string, mode?: ThemeMode) => ThemeAttrs;
|
|
20
|
+
/**
|
|
21
|
+
* A stable, CSS-safe per-instance scope **class name** (no leading dot) for a theme instance root — e.g.
|
|
22
|
+
* `sheetxl-studio-r0`. Set it as the element's `className` and, for the matching `@scope` selector, prefix a
|
|
23
|
+
* dot: `@scope (.${cls})`.
|
|
24
|
+
*
|
|
25
|
+
* `id` is typically a React `useId()` value, which is wrapped in colons (`":r0:"`) — invalid in a class name
|
|
26
|
+
* and, unescaped, a broken selector. Every non-`[A-Za-z0-9_-]` character is stripped so the result is valid
|
|
27
|
+
* in both a `class` attribute and a selector, while staying unique (the colons only delimit, they don't
|
|
28
|
+
* distinguish). Prefer a component-instance id (`useId()`) over data ids so the scope is stable across the
|
|
29
|
+
* data the component renders.
|
|
30
|
+
*/
|
|
31
|
+
export declare const createThemeScopeClass: (instanceType: string, id: string) => string;
|
|
32
|
+
//# sourceMappingURL=themeAttrs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeAttrs.d.ts","sourceRoot":"","sources":["../../../../src/theme/themeAttrs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,MAAM,WAAW,UAAU;IACzB,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,EAAE,OAAO,SAAS,KAAG,UAIrE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,GAAI,cAAc,MAAM,EAAE,IAAI,MAAM,KAAG,MAGxE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ThemeMode } from './TokenTheme';
|
|
2
|
+
type Source = 'prop' | 'class' | 'media';
|
|
3
|
+
interface UseThemeOptions {
|
|
4
|
+
mode?: ThemeMode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the effective light/dark mode from (in priority order) an explicit `mode`, a `dark`/`light`
|
|
8
|
+
* class on `<html>`/`<body>`, then `prefers-color-scheme`. Framework-neutral (DOM only) — lives here so
|
|
9
|
+
* both the neutral `@sheetxl/react` layer and the MUI studio resolve the SAME preference the same way
|
|
10
|
+
* (no drift). Re-resolves on class mutations + media changes when no explicit `mode` is given.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useResolvedThemeMode(options?: UseThemeOptions): {
|
|
13
|
+
themeMode: ThemeMode;
|
|
14
|
+
source: Source;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useResolvedThemeMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResolvedThemeMode.d.ts","sourceRoot":"","sources":["../../../../src/theme/useResolvedThemeMode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEzC,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG;IAAE,SAAS,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA0DxG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export declare const KeyModifiers: {
|
|
2
|
+
readonly Shift: "shift";
|
|
3
|
+
readonly Alt: "alt";
|
|
4
|
+
readonly Ctrl: "ctrl";
|
|
5
|
+
readonly Meta: "meta";
|
|
6
|
+
};
|
|
7
|
+
export type KeyModifiers = typeof KeyModifiers[keyof typeof KeyModifiers];
|
|
8
|
+
export interface IKeyStroke {
|
|
9
|
+
readonly key: string;
|
|
10
|
+
readonly modifiers?: KeyModifiers[];
|
|
11
|
+
}
|
|
12
|
+
export declare const KeyCodes: {
|
|
13
|
+
readonly BackSpace: 8;
|
|
14
|
+
readonly Tab: 9;
|
|
15
|
+
readonly Clear: 12;
|
|
16
|
+
readonly Enter: 13;
|
|
17
|
+
readonly Shift: 16;
|
|
18
|
+
readonly Control: 17;
|
|
19
|
+
readonly Alt: 18;
|
|
20
|
+
readonly Pause: 19;
|
|
21
|
+
readonly CapsLock: 20;
|
|
22
|
+
readonly Escape: 27;
|
|
23
|
+
readonly Space: 32;
|
|
24
|
+
readonly PageUp: 33;
|
|
25
|
+
readonly PageDown: 34;
|
|
26
|
+
readonly End: 35;
|
|
27
|
+
readonly Home: 36;
|
|
28
|
+
readonly Left: 37;
|
|
29
|
+
readonly Up: 38;
|
|
30
|
+
readonly Right: 39;
|
|
31
|
+
readonly Down: 40;
|
|
32
|
+
readonly Insert: 45;
|
|
33
|
+
readonly Delete: 46;
|
|
34
|
+
readonly Digit_8: 56;
|
|
35
|
+
readonly Y: 89;
|
|
36
|
+
readonly Z: 90;
|
|
37
|
+
readonly Meta: 91;
|
|
38
|
+
readonly F1: 112;
|
|
39
|
+
readonly F2: 113;
|
|
40
|
+
readonly F3: 114;
|
|
41
|
+
readonly F4: 115;
|
|
42
|
+
readonly F5: 116;
|
|
43
|
+
readonly F6: 117;
|
|
44
|
+
readonly F7: 118;
|
|
45
|
+
readonly F8: 119;
|
|
46
|
+
readonly F9: 120;
|
|
47
|
+
readonly F10: 121;
|
|
48
|
+
readonly F11: 122;
|
|
49
|
+
readonly F12: 123;
|
|
50
|
+
readonly NumLock: 144;
|
|
51
|
+
readonly ScrollLock: 145;
|
|
52
|
+
readonly BackSlash: 220;
|
|
53
|
+
readonly Slash: 191;
|
|
54
|
+
readonly BracketRight: 221;
|
|
55
|
+
readonly BracketLeft: 219;
|
|
56
|
+
/** Android/IME composition key - used when virtual keyboards send composite input */
|
|
57
|
+
readonly Composition: 229;
|
|
58
|
+
};
|
|
59
|
+
export type KeyCodes = typeof KeyCodes[keyof typeof KeyCodes];
|
|
60
|
+
export declare const MouseButtonCodes: {
|
|
61
|
+
readonly Left: 1;
|
|
62
|
+
readonly Middle: 2;
|
|
63
|
+
readonly Right: 3;
|
|
64
|
+
};
|
|
65
|
+
export type MouseButtonCodes = typeof MouseButtonCodes[keyof typeof MouseButtonCodes];
|
|
66
|
+
export interface TextSelectionRange {
|
|
67
|
+
start: number;
|
|
68
|
+
end: number;
|
|
69
|
+
direction?: 'forward' | 'backward' | 'none';
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../../src/types/Types.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE1E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAOrB,QAAQ,CAAC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+CnB,qFAAqF;;CAI7E,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAG9D,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAEtF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAA;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FullScreenPortal.d.ts","sourceRoot":"","sources":["../../../../src/utils/FullScreenPortal.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACnC,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;CACvB;AA6CD,wBAAgB,mBAAmB,IAAI,oBAAoB,CAkC1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PinchZoom.d.ts","sourceRoot":"","sources":["../../../../src/utils/PinchZoom.ts"],"names":[],"mappings":"AAi/BA,QAAA,IAAI,SAAS,iCAAoB,CAAC;AAElC,eAAe,SAAS,CAAC"}
|