@gramlot/gramlot 0.3.20 → 0.3.24
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/dist/components/chat/__init__.py +13 -0
- package/dist/components/chat/assets/collection.js +9 -0
- package/dist/components/chat/assets/index.js +3 -0
- package/dist/components/chat/commands.json +7 -0
- package/dist/components/chat/grammar.json +48 -0
- package/dist/components/editors/__init__.py +2 -2
- package/dist/components/editors/assets/collection.js +22 -120909
- package/dist/components/editors/assets/index.js +2 -1
- package/dist/components/editors/assets/modules/chunk-AU4HFPIY.js +1 -0
- package/dist/components/editors/assets/modules/chunk-MMJXUHRQ.js +3 -0
- package/dist/components/editors/assets/modules/chunk-OCFLP2K4.js +16 -0
- package/dist/components/editors/assets/modules/chunk-YSGSC7KM.js +1 -0
- package/dist/components/editors/assets/modules/code-mirror-engine-QX4A5FVO.js +92 -0
- package/dist/components/editors/assets/modules/jodit-engine-MMSPIWM7.js +1853 -0
- package/dist/components/editors/assets/modules/prose-mirror-engine-IXTRTG6B.js +24 -0
- package/dist/components/grid/__init__.py +13 -0
- package/dist/components/grid/assets/collection.js +211 -0
- package/dist/components/grid/assets/index.js +3 -0
- package/dist/components/grid/commands.json +7 -0
- package/dist/components/grid/grammar.json +714 -0
- package/dist/components/grouplets/__init__.py +13 -0
- package/dist/components/grouplets/assets/collection.js +202 -0
- package/dist/components/grouplets/assets/index.js +3 -0
- package/dist/components/grouplets/commands.json +7 -0
- package/dist/components/grouplets/grammar.json +355 -0
- package/dist/components/inputs/__init__.py +1 -1
- package/dist/components/inputs/assets/collection.js +32 -24503
- package/dist/components/inputs/assets/index.js +2 -1
- package/dist/components/inputs/grammar.json +214 -6
- package/dist/components/layout/__init__.py +1 -1
- package/dist/components/layout/assets/collection.js +27 -26701
- package/dist/components/layout/assets/index.js +2 -1
- package/dist/components/layout/grammar.json +4 -0
- package/dist/components/selection_trial/__init__.py +13 -0
- package/dist/components/selection_trial/assets/collection.js +4 -0
- package/dist/components/selection_trial/assets/index.js +3 -0
- package/dist/components/selection_trial/commands.json +7 -0
- package/dist/components/selection_trial/grammar.json +552 -0
- package/dist/components/tree/__init__.py +1 -1
- package/dist/components/tree/assets/collection.js +24 -24612
- package/dist/components/tree/assets/index.js +2 -1
- package/dist/components/typst/__init__.py +2 -2
- package/dist/components/typst/assets/collection.js +12 -4
- package/dist/components/typst/assets/index.js +2 -1
- package/dist/components/typst/assets/modules/chunk-BLMUM44K.js +1 -0
- package/dist/components/typst/assets/modules/typst-client-JHC6UVYG.js +4 -0
- package/dist/gramlot.js +2749 -1627
- package/dist/gramlot.min.js +46 -41
- package/package.json +7 -2
- package/src/binding/grid-struct.js +63 -0
- package/src/binding/installation.js +5 -2
- package/src/binding/runtime.js +51 -6
- package/src/builder/gramlot-builder.d.ts +5 -0
- package/src/builder/gramlot-builder.js +16 -0
- package/src/builder/source.js +23 -0
- package/src/chat.d.ts +12 -0
- package/src/chat.js +198 -0
- package/src/collection-artifact.js +1 -1
- package/src/components/bases.js +2 -0
- package/src/components/chat.js +28 -0
- package/src/components/choice-editor.js +89 -34
- package/src/components/database-choices.js +131 -9
- package/src/components/field-state.js +10 -1
- package/src/components/grid-grammar.json +237 -0
- package/src/components/grid-header-interaction.js +196 -0
- package/src/components/grid-row-interaction.js +184 -0
- package/src/components/grid-row-layout.js +96 -0
- package/src/components/grid-rows.js +28 -0
- package/src/components/grid-search-box.js +142 -0
- package/src/components/grid-search-styles.js +42 -0
- package/src/components/grid-search.js +37 -0
- package/src/components/grid-structure.js +84 -0
- package/src/components/grid-styles.js +151 -0
- package/src/components/grid.js +589 -0
- package/src/components/grouplet-card.js +437 -0
- package/src/components/grouplets.js +17 -0
- package/src/components/menus.js +1 -0
- package/src/components/registry.js +4 -3
- package/src/components/tray-pane.js +32 -4
- package/src/components/typed-editor.js +4 -2
- package/src/experiments/selection-transfer.js +78 -0
- package/src/experiments/selection-trial.js +48 -0
- package/src/experiments/window-selection.js +124 -0
- package/src/form-state.d.ts +20 -0
- package/src/form-state.js +198 -0
- package/src/index-page-styles.js +1 -1
- package/src/index.d.ts +3 -1
- package/src/index.js +3 -1
- package/src/renderer/gramlot-renderer.js +8 -1
- package/src/server/gramlot-server.d.ts +2 -0
- package/src/server/gramlot-server.js +13 -1
- package/src/stores/bag-collection-store.js +51 -0
- package/src/stores/bag-collection-view.js +127 -0
- package/src/stores/collection-filter.js +77 -0
- package/src/view/controls.js +33 -1
- package/src/view/grouplet-card.js +54 -0
- package/src/view/html.js +20 -3
- package/src/view/labelbox.js +7 -3
- package/themes/gramlot-base/theme.css +28 -0
- package/themes/gramlot-compact/theme.css +8 -0
- package/themes/joanna/theme.css +8 -0
- package/themes/mimi/theme.css +8 -0
package/src/index-page-styles.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated from canonical themes; edit themes/, not this file.
|
|
2
|
-
export const appearanceStyles = {"base":"","compact":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n","mimi":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* mimi: professional density profile; load after Base and Compact. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #edf1ef;\n --gramlot-surface: #fbfcfb;\n --gramlot-header-background: #30473c;\n --gramlot-header-color: #fbfcfb;\n --gramlot-surface-subtle: #e2e9e5;\n --gramlot-ink: #24332e;\n --gramlot-text-secondary: #52655d;\n --gramlot-border: #c4d0c9;\n --gramlot-border-control: #768a7e;\n --gramlot-action: #176b61;\n --gramlot-action-hover: #105247;\n --gramlot-selected: #dceee8;\n --gramlot-field-background: #fbfcfb;\n --gramlot-field-readonly-background: #e2e9e5;\n --gramlot-label-color: #52655d;\n --gramlot-focus-ring: #176b61;\n --gramlot-brand-blue: #176b61;\n --gramlot-brand-yellow: #176b61;\n --gramlot-navigation: #24332e;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 24px;\n --gramlot-field-padding: 1px 5px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 1px 5px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 3px;\n --gramlot-radius: 3px;\n --gramlot-radius-lg: 5px;\n --gramlot-window-radius: 5px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 3px;\n --gramlot-space-3: 6px;\n --gramlot-space-4: 6px;\n --gramlot-space-6: 9px;\n --gramlot-space-8: 12px;\n --gramlot-space-12: 18px;\n --gramlot-tab-height: 24px;\n --gramlot-tab-padding: 1px 5px;\n --gramlot-tab-radius: 3px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #17201d;\n --gramlot-surface: #202c27;\n --gramlot-header-background: #334d40;\n --gramlot-header-color: #ebf3ee;\n --gramlot-surface-subtle: #2a3932;\n --gramlot-ink: #ebf3ee;\n --gramlot-text-secondary: #b6c9be;\n --gramlot-border: #40594a;\n --gramlot-border-control: #7c9987;\n --gramlot-action: #8ad8c4;\n --gramlot-action-hover: #b0eadc;\n --gramlot-selected: #2d4c40;\n --gramlot-field-background: #202c27;\n --gramlot-field-readonly-background: #2a3932;\n --gramlot-label-color: #b6c9be;\n --gramlot-focus-ring: #8ad8c4;\n --gramlot-brand-blue: #8ad8c4;\n --gramlot-brand-yellow: #8ad8c4;\n --gramlot-navigation: #17201d;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #17201d;\n --gramlot-surface: #202c27;\n --gramlot-header-background: #334d40;\n --gramlot-header-color: #ebf3ee;\n --gramlot-surface-subtle: #2a3932;\n --gramlot-ink: #ebf3ee;\n --gramlot-text-secondary: #b6c9be;\n --gramlot-border: #40594a;\n --gramlot-border-control: #7c9987;\n --gramlot-action: #8ad8c4;\n --gramlot-action-hover: #b0eadc;\n --gramlot-selected: #2d4c40;\n --gramlot-field-background: #202c27;\n --gramlot-field-readonly-background: #2a3932;\n --gramlot-label-color: #b6c9be;\n --gramlot-focus-ring: #8ad8c4;\n --gramlot-brand-blue: #8ad8c4;\n --gramlot-brand-yellow: #8ad8c4;\n --gramlot-navigation: #17201d;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 12.5px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n","joanna":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* joanna: professional density profile; load after Base and Compact. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f5f4f2;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #3f4249;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #eeece8;\n --gramlot-ink: #292c31;\n --gramlot-text-secondary: #5d636c;\n --gramlot-border: #d5d2cc;\n --gramlot-border-control: #858990;\n --gramlot-action: #245fb4;\n --gramlot-action-hover: #194880;\n --gramlot-selected: #e6eef9;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #eeece8;\n --gramlot-label-color: #5d636c;\n --gramlot-focus-ring: #245fb4;\n --gramlot-brand-blue: #245fb4;\n --gramlot-brand-yellow: #245fb4;\n --gramlot-navigation: #292c31;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 32px;\n --gramlot-field-padding: 3px 9px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 3px 9px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 6px;\n --gramlot-radius: 6px;\n --gramlot-radius-lg: 8px;\n --gramlot-window-radius: 8px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 5px;\n --gramlot-space-3: 10px;\n --gramlot-space-4: 10px;\n --gramlot-space-6: 15px;\n --gramlot-space-8: 20px;\n --gramlot-space-12: 30px;\n --gramlot-tab-height: 32px;\n --gramlot-tab-padding: 3px 9px;\n --gramlot-tab-radius: 6px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #1b1c20;\n --gramlot-surface: #25272c;\n --gramlot-header-background: #41444c;\n --gramlot-header-color: #f3f2ef;\n --gramlot-surface-subtle: #303239;\n --gramlot-ink: #f3f2ef;\n --gramlot-text-secondary: #c4c3c0;\n --gramlot-border: #454951;\n --gramlot-border-control: #858c99;\n --gramlot-action: #abcbff;\n --gramlot-action-hover: #cedfff;\n --gramlot-selected: #324765;\n --gramlot-field-background: #25272c;\n --gramlot-field-readonly-background: #303239;\n --gramlot-label-color: #c4c3c0;\n --gramlot-focus-ring: #abcbff;\n --gramlot-brand-blue: #abcbff;\n --gramlot-brand-yellow: #abcbff;\n --gramlot-navigation: #1b1c20;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #1b1c20;\n --gramlot-surface: #25272c;\n --gramlot-header-background: #41444c;\n --gramlot-header-color: #f3f2ef;\n --gramlot-surface-subtle: #303239;\n --gramlot-ink: #f3f2ef;\n --gramlot-text-secondary: #c4c3c0;\n --gramlot-border: #454951;\n --gramlot-border-control: #858c99;\n --gramlot-action: #abcbff;\n --gramlot-action-hover: #cedfff;\n --gramlot-selected: #324765;\n --gramlot-field-background: #25272c;\n --gramlot-field-readonly-background: #303239;\n --gramlot-label-color: #c4c3c0;\n --gramlot-focus-ring: #abcbff;\n --gramlot-brand-blue: #abcbff;\n --gramlot-brand-yellow: #abcbff;\n --gramlot-navigation: #1b1c20;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 14px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n","mela":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Mela: Apple-inspired desktop and touch appearance; load after Base and Compact. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-font-ui: -apple-system, BlinkMacSystemFont, \"Helvetica Neue\", system-ui, sans-serif;\n --gramlot-font-code: ui-monospace, SFMono-Regular, Menlo, monospace;\n --gramlot-tree-hover-background: var(--gramlot-surface-subtle);\n --gramlot-tree-selected-background: var(--gramlot-selected);\n --gramlot-tree-selected-color: var(--gramlot-ink);\n --gramlot-window-backdrop: rgb(0 0 0 / 24%);\n --gramlot-background: #f2f2f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #38383d;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #eaeaed;\n --gramlot-ink: #1d1d1f;\n --gramlot-text-secondary: #636366;\n --gramlot-border: #d9d9de;\n --gramlot-border-control: #8a8a8e;\n --gramlot-action: #0066cc;\n --gramlot-action-hover: #004c99;\n --gramlot-selected: #dceaff;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #eaeaed;\n --gramlot-label-color: #636366;\n --gramlot-focus-ring: #0066cc;\n --gramlot-brand-blue: #0066cc;\n --gramlot-brand-yellow: #0066cc;\n --gramlot-navigation: #eaeaed;\n --gramlot-navigation-text: #1d1d1f;\n --gramlot-error: #b42318;\n --gramlot-error-background: #fff0ee;\n --gramlot-success: #20783d;\n --gramlot-success-background: #eaf7ed;\n --gramlot-warning: #805500;\n --gramlot-warning-background: #fff5dc;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 3px 8px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 3px 9px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: #0066cc;\n --gramlot-button-color: #ffffff;\n --gramlot-chrome-background: var(--gramlot-surface);\n --gramlot-button-hover: #004c99;\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 4px;\n --gramlot-radius-sm: 6px;\n --gramlot-radius: 8px;\n --gramlot-radius-lg: 10px;\n --gramlot-window-radius: 12px;\n --gramlot-toolbar-gap: 3px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 12px;\n --gramlot-space-6: 16px;\n --gramlot-space-8: 20px;\n --gramlot-space-12: 28px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 3px 10px;\n --gramlot-tab-radius: 6px;\n --gramlot-tab-gap: 3px;\n --gramlot-tab-strip-padding: 3px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 8px 28px rgb(0 0 0 / 16%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #000000;\n --gramlot-surface: #1c1c1e;\n --gramlot-header-background: #323236;\n --gramlot-header-color: #f5f5f7;\n --gramlot-surface-subtle: #38383a;\n --gramlot-ink: #f5f5f7;\n --gramlot-text-secondary: #bdbdc4;\n --gramlot-border: #48484c;\n --gramlot-border-control: #74747c;\n --gramlot-action: #70b7ff;\n --gramlot-action-hover: #abd5ff;\n --gramlot-selected: #244367;\n --gramlot-field-background: #1c1c1e;\n --gramlot-field-readonly-background: #38383a;\n --gramlot-label-color: #bdbdc4;\n --gramlot-focus-ring: #70b7ff;\n --gramlot-brand-blue: #70b7ff;\n --gramlot-brand-yellow: #70b7ff;\n --gramlot-navigation: #1c1c1e;\n --gramlot-navigation-text: #f5f5f7;\n --gramlot-error: #ffb4ab;\n --gramlot-error-background: #492926;\n --gramlot-success: #8ddb9d;\n --gramlot-success-background: #263e2c;\n --gramlot-warning: #f5d581;\n --gramlot-warning-background: #433a26;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #000000;\n --gramlot-surface: #1c1c1e;\n --gramlot-header-background: #323236;\n --gramlot-header-color: #f5f5f7;\n --gramlot-surface-subtle: #38383a;\n --gramlot-ink: #f5f5f7;\n --gramlot-text-secondary: #bdbdc4;\n --gramlot-border: #48484c;\n --gramlot-border-control: #74747c;\n --gramlot-action: #70b7ff;\n --gramlot-action-hover: #abd5ff;\n --gramlot-selected: #244367;\n --gramlot-field-background: #1c1c1e;\n --gramlot-field-readonly-background: #38383a;\n --gramlot-label-color: #bdbdc4;\n --gramlot-focus-ring: #70b7ff;\n --gramlot-brand-blue: #70b7ff;\n --gramlot-brand-yellow: #70b7ff;\n --gramlot-navigation: #1c1c1e;\n --gramlot-navigation-text: #f5f5f7;\n --gramlot-error: #ffb4ab;\n --gramlot-error-background: #492926;\n --gramlot-success: #8ddb9d;\n --gramlot-success-background: #263e2c;\n --gramlot-warning: #f5d581;\n --gramlot-warning-background: #433a26;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: #ffffff; border-color: transparent;\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: #004c99; color: #ffffff; border-color: transparent;\n }\n gramlot-button.button--secondary,gramlot-toggle-button.button--secondary,gramlot-drop-down-button.button--secondary { background:transparent; border-color:transparent; }\n :where(.button--secondary,button.secondary) { background:var(--gramlot-selected); color:var(--gramlot-action); border-color:transparent; }\n :where(.button--secondary,button.secondary):hover:not(:disabled) { background:var(--gramlot-selected); color:var(--gramlot-action-hover); border-color:var(--gramlot-action); }\n :where(button,.button):active:not(:disabled) { transform:none; filter:brightness(.9); }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Responsive density changes appearance only; Source owns layout and modality. */\n@layer gramlot.tokens {\n @media (max-width: 640px), (pointer: coarse) {\n :root {\n --gramlot-field-height: 44px;\n --gramlot-touch-target: 44px;\n --gramlot-field-font-size: 16px;\n --gramlot-field-padding: 8px 12px;\n --gramlot-button-padding: 8px 12px;\n --gramlot-tab-height: 44px;\n --gramlot-radius-sm: 9px;\n --gramlot-radius: 12px;\n --gramlot-radius-lg: 14px;\n --gramlot-window-radius: 16px;\n --gramlot-space-4: 16px;\n }\n }\n}\n@layer gramlot.base {\n @media (max-width: 640px), (pointer: coarse) {\n html { font-size: 17px; }\n @supports (font: -apple-system-body) { html { font: -apple-system-body; } }\n body { line-height:1.4; }\n h1 { font-size:2rem; font-weight:700; letter-spacing:-.025em; }\n h2 { font-size:1.3rem; font-weight:650; }\n h3 { font-size:1.05rem; font-weight:600; }\n }\n}\n\n/* Touch presentation follows the existing density setting; minimums grow with text. */\n@layer gramlot.touch {\n @media (max-width:640px), (pointer:coarse) {\n :root:not([data-gramlot-touch=\"off\"]) {\n --gramlot-field-height:max(44px,2.65rem); --gramlot-field-font-size:max(16px,1rem);\n --gramlot-field-padding:.55rem .75rem; --gramlot-button-padding:.6rem 1rem;\n --gramlot-label-size:.88rem; --gramlot-label-gap:.4rem;\n --gramlot-tree-row-height:max(44px,2.65rem); --gramlot-tab-height:max(44px,2.65rem);\n }\n :where(button,.button,summary,[role=\"tab\"],a) { min-block-size:44px; }\n :where(nav a,.actions a) { display:inline-flex; align-items:center; }\n :where(label:has(input[type=\"checkbox\"]),label:has(input[type=\"radio\"])) { min-block-size:44px; display:inline-flex; align-items:center; gap:.6rem; }\n }\n}\n/* Content stays opaque. Materials are confined to navigation controls. */\n@layer gramlot.components {\n :where([role=\"toolbar\"]) { --gramlot-button-padding:4px 6px; background:var(--gramlot-surface); color:var(--gramlot-ink); }\n @supports (backdrop-filter:blur(16px)) {\n :where([role=\"toolbar\"]) { background:color-mix(in srgb,var(--gramlot-surface) 92%,transparent); backdrop-filter:blur(16px) saturate(1.2); }\n }\n @media (prefers-reduced-transparency:reduce), (prefers-contrast:more) {\n :where([role=\"toolbar\"]) { background:var(--gramlot-surface); backdrop-filter:none; }\n }\n @media (prefers-contrast:more) {\n :where(input,select,textarea,button,.button) { border:2px solid currentColor; }\n :where(a) { text-decoration:underline; }\n }\n @media (prefers-reduced-motion:reduce) {\n :where(button,.button) { transition:none; transform:none; }\n }\n @media (forced-colors:active) {\n :where(button,.button) { background:ButtonFace; color:ButtonText; border-color:ButtonText; filter:none; }\n :where([role=\"toolbar\"]) { background:Canvas; color:CanvasText; backdrop-filter:none; }\n }\n}\n"};
|
|
2
|
+
export const appearanceStyles = {"base":"","compact":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Resident Bag grid: shared palette and theme density. */\n:root {\n --gramlot-grid-row-height: 32px;\n --gramlot-grid-header-height: 30px;\n --gramlot-grid-group-height: 22px;\n --gramlot-grid-cell-padding: .25rem .65rem;\n}\n","mimi":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Resident Bag grid: shared palette and theme density. */\n:root {\n --gramlot-grid-row-height: 32px;\n --gramlot-grid-header-height: 30px;\n --gramlot-grid-group-height: 22px;\n --gramlot-grid-cell-padding: .25rem .65rem;\n}\n\n/* mimi: professional density profile; load after Base and Compact. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #edf1ef;\n --gramlot-surface: #fbfcfb;\n --gramlot-header-background: #30473c;\n --gramlot-header-color: #fbfcfb;\n --gramlot-surface-subtle: #e2e9e5;\n --gramlot-ink: #24332e;\n --gramlot-text-secondary: #52655d;\n --gramlot-border: #c4d0c9;\n --gramlot-border-control: #768a7e;\n --gramlot-action: #176b61;\n --gramlot-action-hover: #105247;\n --gramlot-selected: #dceee8;\n --gramlot-field-background: #fbfcfb;\n --gramlot-field-readonly-background: #e2e9e5;\n --gramlot-label-color: #52655d;\n --gramlot-focus-ring: #176b61;\n --gramlot-brand-blue: #176b61;\n --gramlot-brand-yellow: #176b61;\n --gramlot-navigation: #24332e;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 24px;\n --gramlot-field-padding: 1px 5px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 1px 5px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 3px;\n --gramlot-radius: 3px;\n --gramlot-radius-lg: 5px;\n --gramlot-window-radius: 5px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 3px;\n --gramlot-space-3: 6px;\n --gramlot-space-4: 6px;\n --gramlot-space-6: 9px;\n --gramlot-space-8: 12px;\n --gramlot-space-12: 18px;\n --gramlot-tab-height: 24px;\n --gramlot-tab-padding: 1px 5px;\n --gramlot-tab-radius: 3px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #17201d;\n --gramlot-surface: #202c27;\n --gramlot-header-background: #334d40;\n --gramlot-header-color: #ebf3ee;\n --gramlot-surface-subtle: #2a3932;\n --gramlot-ink: #ebf3ee;\n --gramlot-text-secondary: #b6c9be;\n --gramlot-border: #40594a;\n --gramlot-border-control: #7c9987;\n --gramlot-action: #8ad8c4;\n --gramlot-action-hover: #b0eadc;\n --gramlot-selected: #2d4c40;\n --gramlot-field-background: #202c27;\n --gramlot-field-readonly-background: #2a3932;\n --gramlot-label-color: #b6c9be;\n --gramlot-focus-ring: #8ad8c4;\n --gramlot-brand-blue: #8ad8c4;\n --gramlot-brand-yellow: #8ad8c4;\n --gramlot-navigation: #17201d;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #17201d;\n --gramlot-surface: #202c27;\n --gramlot-header-background: #334d40;\n --gramlot-header-color: #ebf3ee;\n --gramlot-surface-subtle: #2a3932;\n --gramlot-ink: #ebf3ee;\n --gramlot-text-secondary: #b6c9be;\n --gramlot-border: #40594a;\n --gramlot-border-control: #7c9987;\n --gramlot-action: #8ad8c4;\n --gramlot-action-hover: #b0eadc;\n --gramlot-selected: #2d4c40;\n --gramlot-field-background: #202c27;\n --gramlot-field-readonly-background: #2a3932;\n --gramlot-label-color: #b6c9be;\n --gramlot-focus-ring: #8ad8c4;\n --gramlot-brand-blue: #8ad8c4;\n --gramlot-brand-yellow: #8ad8c4;\n --gramlot-navigation: #17201d;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 12.5px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Resident Bag grid: shared palette and theme density. */\n:root {\n --gramlot-grid-row-height: 24px;\n --gramlot-grid-header-height: 24px;\n --gramlot-grid-group-height: 20px;\n --gramlot-grid-cell-padding: 2px 6px;\n}\n","joanna":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Resident Bag grid: shared palette and theme density. */\n:root {\n --gramlot-grid-row-height: 32px;\n --gramlot-grid-header-height: 30px;\n --gramlot-grid-group-height: 22px;\n --gramlot-grid-cell-padding: .25rem .65rem;\n}\n\n/* joanna: professional density profile; load after Base and Compact. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f5f4f2;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #3f4249;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #eeece8;\n --gramlot-ink: #292c31;\n --gramlot-text-secondary: #5d636c;\n --gramlot-border: #d5d2cc;\n --gramlot-border-control: #858990;\n --gramlot-action: #245fb4;\n --gramlot-action-hover: #194880;\n --gramlot-selected: #e6eef9;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #eeece8;\n --gramlot-label-color: #5d636c;\n --gramlot-focus-ring: #245fb4;\n --gramlot-brand-blue: #245fb4;\n --gramlot-brand-yellow: #245fb4;\n --gramlot-navigation: #292c31;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 32px;\n --gramlot-field-padding: 3px 9px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 3px 9px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 6px;\n --gramlot-radius: 6px;\n --gramlot-radius-lg: 8px;\n --gramlot-window-radius: 8px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 5px;\n --gramlot-space-3: 10px;\n --gramlot-space-4: 10px;\n --gramlot-space-6: 15px;\n --gramlot-space-8: 20px;\n --gramlot-space-12: 30px;\n --gramlot-tab-height: 32px;\n --gramlot-tab-padding: 3px 9px;\n --gramlot-tab-radius: 6px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #1b1c20;\n --gramlot-surface: #25272c;\n --gramlot-header-background: #41444c;\n --gramlot-header-color: #f3f2ef;\n --gramlot-surface-subtle: #303239;\n --gramlot-ink: #f3f2ef;\n --gramlot-text-secondary: #c4c3c0;\n --gramlot-border: #454951;\n --gramlot-border-control: #858c99;\n --gramlot-action: #abcbff;\n --gramlot-action-hover: #cedfff;\n --gramlot-selected: #324765;\n --gramlot-field-background: #25272c;\n --gramlot-field-readonly-background: #303239;\n --gramlot-label-color: #c4c3c0;\n --gramlot-focus-ring: #abcbff;\n --gramlot-brand-blue: #abcbff;\n --gramlot-brand-yellow: #abcbff;\n --gramlot-navigation: #1b1c20;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #1b1c20;\n --gramlot-surface: #25272c;\n --gramlot-header-background: #41444c;\n --gramlot-header-color: #f3f2ef;\n --gramlot-surface-subtle: #303239;\n --gramlot-ink: #f3f2ef;\n --gramlot-text-secondary: #c4c3c0;\n --gramlot-border: #454951;\n --gramlot-border-control: #858c99;\n --gramlot-action: #abcbff;\n --gramlot-action-hover: #cedfff;\n --gramlot-selected: #324765;\n --gramlot-field-background: #25272c;\n --gramlot-field-readonly-background: #303239;\n --gramlot-label-color: #c4c3c0;\n --gramlot-focus-ring: #abcbff;\n --gramlot-brand-blue: #abcbff;\n --gramlot-brand-yellow: #abcbff;\n --gramlot-navigation: #1b1c20;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 14px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Resident Bag grid: shared palette and theme density. */\n:root {\n --gramlot-grid-row-height: 26px;\n --gramlot-grid-header-height: 26px;\n --gramlot-grid-group-height: 22px;\n --gramlot-grid-cell-padding: 3px 8px;\n}\n","mela":"/* gramlot-compact: professional density profile; load after Base. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-background: #f3f5f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #303946;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #e9edf2;\n --gramlot-ink: #202936;\n --gramlot-text-secondary: #526174;\n --gramlot-border: #ccd3dc;\n --gramlot-border-control: #7b899b;\n --gramlot-action: #235db2;\n --gramlot-action-hover: #194987;\n --gramlot-selected: #e3edfb;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #e9edf2;\n --gramlot-label-color: #526174;\n --gramlot-focus-ring: #235db2;\n --gramlot-brand-blue: #235db2;\n --gramlot-brand-yellow: #235db2;\n --gramlot-navigation: #202936;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #aa2637;\n --gramlot-error-background: #fff0f1;\n --gramlot-success: #236747;\n --gramlot-success-background: #e9f4ec;\n --gramlot-warning: #735313;\n --gramlot-warning-background: #fff5da;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 2px 7px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 2px 7px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: var(--gramlot-surface);\n --gramlot-button-hover: var(--gramlot-selected);\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 3px;\n --gramlot-radius-sm: 4px;\n --gramlot-radius: 4px;\n --gramlot-radius-lg: 6px;\n --gramlot-window-radius: 6px;\n --gramlot-toolbar-gap: 2px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 8px;\n --gramlot-space-6: 12px;\n --gramlot-space-8: 16px;\n --gramlot-space-12: 24px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 2px 7px;\n --gramlot-tab-radius: 4px;\n --gramlot-tab-gap: 2px;\n --gramlot-tab-strip-padding: 2px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #171c24;\n --gramlot-surface: #222a35;\n --gramlot-header-background: #354152;\n --gramlot-header-color: #edf1f7;\n --gramlot-surface-subtle: #2b3543;\n --gramlot-ink: #edf1f7;\n --gramlot-text-secondary: #b8c4d4;\n --gramlot-border: #435064;\n --gramlot-border-control: #7f90a7;\n --gramlot-action: #9dbff4;\n --gramlot-action-hover: #c1d6ff;\n --gramlot-selected: #314766;\n --gramlot-field-background: #222a35;\n --gramlot-field-readonly-background: #2b3543;\n --gramlot-label-color: #b8c4d4;\n --gramlot-focus-ring: #9dbff4;\n --gramlot-brand-blue: #9dbff4;\n --gramlot-brand-yellow: #9dbff4;\n --gramlot-navigation: #171c24;\n --gramlot-navigation-text: #f6f8fb;\n --gramlot-error: #ffb4b4;\n --gramlot-error-background: #48292f;\n --gramlot-success: #98dfbd;\n --gramlot-success-background: #243f32;\n --gramlot-warning: #f3d58c;\n --gramlot-warning-background: #413820;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: var(--gramlot-ink); border-color: var(--gramlot-border-control);\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: var(--gramlot-selected); color: var(--gramlot-action-hover); border-color: var(--gramlot-action);\n }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Resident Bag grid: shared palette and theme density. */\n:root {\n --gramlot-grid-row-height: 32px;\n --gramlot-grid-header-height: 30px;\n --gramlot-grid-group-height: 22px;\n --gramlot-grid-cell-padding: .25rem .65rem;\n}\n\n/* Mela: Apple-inspired desktop and touch appearance; load after Base and Compact. */\n@layer gramlot.tokens {\n :root {\n color-scheme: light;\n --gramlot-font-ui: -apple-system, BlinkMacSystemFont, \"Helvetica Neue\", system-ui, sans-serif;\n --gramlot-font-code: ui-monospace, SFMono-Regular, Menlo, monospace;\n --gramlot-tree-hover-background: var(--gramlot-surface-subtle);\n --gramlot-tree-selected-background: var(--gramlot-selected);\n --gramlot-tree-selected-color: var(--gramlot-ink);\n --gramlot-window-backdrop: rgb(0 0 0 / 24%);\n --gramlot-background: #f2f2f7;\n --gramlot-surface: #ffffff;\n --gramlot-header-background: #38383d;\n --gramlot-header-color: #ffffff;\n --gramlot-surface-subtle: #eaeaed;\n --gramlot-ink: #1d1d1f;\n --gramlot-text-secondary: #636366;\n --gramlot-border: #d9d9de;\n --gramlot-border-control: #8a8a8e;\n --gramlot-action: #0066cc;\n --gramlot-action-hover: #004c99;\n --gramlot-selected: #dceaff;\n --gramlot-field-background: #ffffff;\n --gramlot-field-readonly-background: #eaeaed;\n --gramlot-label-color: #636366;\n --gramlot-focus-ring: #0066cc;\n --gramlot-brand-blue: #0066cc;\n --gramlot-brand-yellow: #0066cc;\n --gramlot-navigation: #eaeaed;\n --gramlot-navigation-text: #1d1d1f;\n --gramlot-error: #b42318;\n --gramlot-error-background: #fff0ee;\n --gramlot-success: #20783d;\n --gramlot-success-background: #eaf7ed;\n --gramlot-warning: #805500;\n --gramlot-warning-background: #fff5dc;\n --gramlot-field-height: 28px;\n --gramlot-field-padding: 3px 8px;\n --gramlot-field-line-height: 1.3;\n --gramlot-field-font-size: 1rem;\n --gramlot-button-padding: 3px 9px;\n --gramlot-button-gap: 4px;\n --gramlot-button-background: #0066cc;\n --gramlot-button-color: #ffffff;\n --gramlot-chrome-background: var(--gramlot-surface);\n --gramlot-button-hover: #004c99;\n --gramlot-label-size: 1em;\n --gramlot-label-gap: 4px;\n --gramlot-radius-sm: 6px;\n --gramlot-radius: 8px;\n --gramlot-radius-lg: 10px;\n --gramlot-window-radius: 12px;\n --gramlot-toolbar-gap: 3px;\n --gramlot-tree-row-height: var(--gramlot-field-height);\n --gramlot-space-1: 3px;\n --gramlot-space-2: 4px;\n --gramlot-space-3: 8px;\n --gramlot-space-4: 12px;\n --gramlot-space-6: 16px;\n --gramlot-space-8: 20px;\n --gramlot-space-12: 28px;\n --gramlot-tab-height: 28px;\n --gramlot-tab-padding: 3px 10px;\n --gramlot-tab-radius: 6px;\n --gramlot-tab-gap: 3px;\n --gramlot-tab-strip-padding: 3px;\n --gramlot-tab-background: var(--gramlot-surface-subtle);\n --gramlot-tab-selected-background: var(--gramlot-surface);\n --gramlot-tab-selected-color: var(--gramlot-action);\n --gramlot-tab-border: var(--gramlot-border);\n --gramlot-shadow: 0 8px 28px rgb(0 0 0 / 16%);\n }\n @media (prefers-color-scheme: dark) {\n :root:not([data-theme=\"light\"]) {\n color-scheme: dark;\n --gramlot-background: #000000;\n --gramlot-surface: #1c1c1e;\n --gramlot-header-background: #323236;\n --gramlot-header-color: #f5f5f7;\n --gramlot-surface-subtle: #38383a;\n --gramlot-ink: #f5f5f7;\n --gramlot-text-secondary: #bdbdc4;\n --gramlot-border: #48484c;\n --gramlot-border-control: #74747c;\n --gramlot-action: #70b7ff;\n --gramlot-action-hover: #abd5ff;\n --gramlot-selected: #244367;\n --gramlot-field-background: #1c1c1e;\n --gramlot-field-readonly-background: #38383a;\n --gramlot-label-color: #bdbdc4;\n --gramlot-focus-ring: #70b7ff;\n --gramlot-brand-blue: #70b7ff;\n --gramlot-brand-yellow: #70b7ff;\n --gramlot-navigation: #1c1c1e;\n --gramlot-navigation-text: #f5f5f7;\n --gramlot-error: #ffb4ab;\n --gramlot-error-background: #492926;\n --gramlot-success: #8ddb9d;\n --gramlot-success-background: #263e2c;\n --gramlot-warning: #f5d581;\n --gramlot-warning-background: #433a26;\n }\n }\n :root[data-theme=\"dark\"] {\n color-scheme: dark;\n --gramlot-background: #000000;\n --gramlot-surface: #1c1c1e;\n --gramlot-header-background: #323236;\n --gramlot-header-color: #f5f5f7;\n --gramlot-surface-subtle: #38383a;\n --gramlot-ink: #f5f5f7;\n --gramlot-text-secondary: #bdbdc4;\n --gramlot-border: #48484c;\n --gramlot-border-control: #74747c;\n --gramlot-action: #70b7ff;\n --gramlot-action-hover: #abd5ff;\n --gramlot-selected: #244367;\n --gramlot-field-background: #1c1c1e;\n --gramlot-field-readonly-background: #38383a;\n --gramlot-label-color: #bdbdc4;\n --gramlot-focus-ring: #70b7ff;\n --gramlot-brand-blue: #70b7ff;\n --gramlot-brand-yellow: #70b7ff;\n --gramlot-navigation: #1c1c1e;\n --gramlot-navigation-text: #f5f5f7;\n --gramlot-error: #ffb4ab;\n --gramlot-error-background: #492926;\n --gramlot-success: #8ddb9d;\n --gramlot-success-background: #263e2c;\n --gramlot-warning: #f5d581;\n --gramlot-warning-background: #433a26;\n }\n}\n@layer gramlot.base {\n html { font-size: 13px; }\n body { line-height: 1.4; }\n :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,pre,figure) { margin-block: 0 var(--gramlot-space-3); }\n h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }\n :where(h1,h2,h3) { letter-spacing: -.015em; }\n pre { padding: var(--gramlot-space-3); }\n hr { margin-block: var(--gramlot-space-6); }\n}\n@layer gramlot.components {\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button) {\n min-block-size: var(--gramlot-field-height); padding: var(--gramlot-button-padding);\n font-size: 1rem; line-height: 1.3; font-weight: 500;\n background: var(--gramlot-button-background); color: #ffffff; border-color: transparent;\n }\n :where(button,input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"],.button):hover:not(:disabled) {\n background: #004c99; color: #ffffff; border-color: transparent;\n }\n gramlot-button.button--secondary,gramlot-toggle-button.button--secondary,gramlot-drop-down-button.button--secondary { background:transparent; border-color:transparent; }\n :where(.button--secondary,button.secondary) { background:var(--gramlot-selected); color:var(--gramlot-action); border-color:transparent; }\n :where(.button--secondary,button.secondary):hover:not(:disabled) { background:var(--gramlot-selected); color:var(--gramlot-action-hover); border-color:var(--gramlot-action); }\n :where(button,.button):active:not(:disabled) { transform:none; filter:brightness(.9); }\n :where(label) { font-size: 1em; font-weight: 400; color: var(--gramlot-label-color); margin-block-end: var(--gramlot-label-gap); }\n :where(input[readonly],textarea[readonly]) { background: var(--gramlot-field-readonly-background); }\n :where(.button--quiet,button.quiet) { background: transparent; color: var(--gramlot-action); border-color: transparent; }\n :where(.button--quiet,button.quiet):hover:not(:disabled) { background: var(--gramlot-selected); border-color: transparent; }\n :where(textarea) { min-block-size: 4.5rem; }\n :where(input[type=\"color\"]) { min-block-size: var(--gramlot-field-height); }\n :where(input[type=\"file\"])::file-selector-button { padding: var(--gramlot-field-padding); }\n :where(fieldset,details) { padding: var(--gramlot-space-3); margin-block-end: var(--gramlot-space-3); }\n :where(table) { font-size: 1rem; }\n :where(th,td) { padding: var(--gramlot-field-padding); height: var(--gramlot-field-height); vertical-align: middle; }\n :where(details[open]>summary) { margin-block-end: var(--gramlot-space-3); }\n :where(dialog) { padding: var(--gramlot-space-4); }\n}\n@layer gramlot.utilities {\n .example-page { inline-size: min(100% - 2 * var(--gramlot-space-4),var(--gramlot-page-width)); padding-block: var(--gramlot-space-4); }\n .card { padding: var(--gramlot-space-4); box-shadow: none; }\n}\n\n/* Responsive density changes appearance only; Source owns layout and modality. */\n@layer gramlot.tokens {\n @media (max-width: 640px), (pointer: coarse) {\n :root {\n --gramlot-field-height: 44px;\n --gramlot-touch-target: 44px;\n --gramlot-field-font-size: 16px;\n --gramlot-field-padding: 8px 12px;\n --gramlot-button-padding: 8px 12px;\n --gramlot-tab-height: 44px;\n --gramlot-radius-sm: 9px;\n --gramlot-radius: 12px;\n --gramlot-radius-lg: 14px;\n --gramlot-window-radius: 16px;\n --gramlot-space-4: 16px;\n }\n }\n}\n@layer gramlot.base {\n @media (max-width: 640px), (pointer: coarse) {\n html { font-size: 17px; }\n @supports (font: -apple-system-body) { html { font: -apple-system-body; } }\n body { line-height:1.4; }\n h1 { font-size:2rem; font-weight:700; letter-spacing:-.025em; }\n h2 { font-size:1.3rem; font-weight:650; }\n h3 { font-size:1.05rem; font-weight:600; }\n }\n}\n\n/* Touch presentation follows the existing density setting; minimums grow with text. */\n@layer gramlot.touch {\n @media (max-width:640px), (pointer:coarse) {\n :root:not([data-gramlot-touch=\"off\"]) {\n --gramlot-field-height:max(44px,2.65rem); --gramlot-field-font-size:max(16px,1rem);\n --gramlot-field-padding:.55rem .75rem; --gramlot-button-padding:.6rem 1rem;\n --gramlot-label-size:.88rem; --gramlot-label-gap:.4rem;\n --gramlot-tree-row-height:max(44px,2.65rem); --gramlot-tab-height:max(44px,2.65rem);\n }\n :where(button,.button,summary,[role=\"tab\"],a) { min-block-size:44px; }\n :where(nav a,.actions a) { display:inline-flex; align-items:center; }\n :where(label:has(input[type=\"checkbox\"]),label:has(input[type=\"radio\"])) { min-block-size:44px; display:inline-flex; align-items:center; gap:.6rem; }\n }\n}\n/* Content stays opaque. Materials are confined to navigation controls. */\n@layer gramlot.components {\n :where([role=\"toolbar\"]) { --gramlot-button-padding:4px 6px; background:var(--gramlot-surface); color:var(--gramlot-ink); }\n @supports (backdrop-filter:blur(16px)) {\n :where([role=\"toolbar\"]) { background:color-mix(in srgb,var(--gramlot-surface) 92%,transparent); backdrop-filter:blur(16px) saturate(1.2); }\n }\n @media (prefers-reduced-transparency:reduce), (prefers-contrast:more) {\n :where([role=\"toolbar\"]) { background:var(--gramlot-surface); backdrop-filter:none; }\n }\n @media (prefers-contrast:more) {\n :where(input,select,textarea,button,.button) { border:2px solid currentColor; }\n :where(a) { text-decoration:underline; }\n }\n @media (prefers-reduced-motion:reduce) {\n :where(button,.button) { transition:none; transform:none; }\n }\n @media (forced-colors:active) {\n :where(button,.button) { background:ButtonFace; color:ButtonText; border-color:ButtonText; filter:none; }\n :where([role=\"toolbar\"]) { background:Canvas; color:CanvasText; backdrop-filter:none; }\n }\n}\n"};
|
package/src/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export {GramlotRenderer} from './renderer/gramlot-renderer.js';
|
|
|
20
20
|
export {GramlotHtmlRenderer} from './renderer/gramlot-html-renderer.js';
|
|
21
21
|
export {GramlotSvgRenderer} from './renderer/gramlot-svg-renderer.js';
|
|
22
22
|
export {Bag, BagNode} from '@genrojs/bag';
|
|
23
|
-
export {createDecimal} from '@genrojs/tytx';
|
|
23
|
+
export {createDecimal, toTytx, fromTytx, fromTytxIter} from '@genrojs/tytx';
|
|
24
24
|
export {References} from './references.js';
|
|
25
25
|
export type {SourceReference} from './references.js';
|
|
26
26
|
export {HttpTransport} from './http-transport.js';
|
|
@@ -52,3 +52,5 @@ export {DeviceHandler} from './handlers/device-handler.js';
|
|
|
52
52
|
export type {DeviceProvider, DeviceClipboard, DeviceName, DeviceAudio, DeviceAudioSession, DeviceNetwork, DeviceLifecycleEvent, DeviceHapticStyle, AppInfo, DeviceLocation, DevicePhoto, DeviceBarcode, DeviceBiometrics, DeviceNotificationRequest, DeviceNotificationSchedule, DeviceNotificationEvent, DevicePushRegistration, DevicePushEvent, DeviceShortcutRequest, DeviceLinkRequest} from './handlers/device-handler.js';
|
|
53
53
|
|
|
54
54
|
export {MobileEnvironment} from './mobile-environment.js';
|
|
55
|
+
|
|
56
|
+
export {chatRender, chatSend, chatCompleted, chatReset, chatResize, chatPickAttachments, chatRenderAttachments, chatRemoveAttachment} from './chat.js';
|
package/src/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export {GramlotSvgRenderer} from './renderer/gramlot-svg-renderer.js';
|
|
|
22
22
|
export {Bag, BagNode} from '@genrojs/bag';
|
|
23
23
|
// createDecimal and Bag are the typed literals of a page module, as in server/page.js: the import map of the browser
|
|
24
24
|
// resolves @gramlot/gramlot/page to this entry only.
|
|
25
|
-
export {createDecimal} from '@genrojs/tytx';
|
|
25
|
+
export {createDecimal, toTytx, fromTytx, fromTytxIter} from '@genrojs/tytx';
|
|
26
26
|
export {References} from './references.js';
|
|
27
27
|
export {HttpTransport} from './http-transport.js';
|
|
28
28
|
export {ServerAdapter} from './server-adapter.js';
|
|
@@ -46,3 +46,5 @@ export {collectionBuildId, verifyCollectionArtifact} from './collection-artifact
|
|
|
46
46
|
export {DeviceHandler} from './handlers/device-handler.js';
|
|
47
47
|
|
|
48
48
|
export {MobileEnvironment} from './mobile-environment.js';
|
|
49
|
+
|
|
50
|
+
export {chatRender, chatSend, chatCompleted, chatReset, chatResize, chatPickAttachments, chatRenderAttachments, chatRemoveAttachment} from './chat.js';
|
|
@@ -10,6 +10,7 @@ import {HtmlElement} from '../view/html.js';
|
|
|
10
10
|
import {ControlAdapter, RadioControl, RadioGroups, SelectControl} from '../view/controls.js';
|
|
11
11
|
import {ButtonBinding} from '../view/button.js';
|
|
12
12
|
import {MenuBinding} from '../view/menu.js';
|
|
13
|
+
import {GroupletCardActions} from '../view/grouplet-card.js';
|
|
13
14
|
import {NativeEventBinding} from '../view/events.js';
|
|
14
15
|
import {References} from '../references.js';
|
|
15
16
|
import {randomId} from '../random-id.js';
|
|
@@ -48,6 +49,7 @@ export class GramlotRenderer extends GramlotHtmlRenderer {
|
|
|
48
49
|
this.source = source;
|
|
49
50
|
this.destination = destination;
|
|
50
51
|
this.html = new HtmlElement({metadataAttributes: ['__ref'],
|
|
52
|
+
format: (value, options) => binding.gramlot.format(value, options),
|
|
51
53
|
reportError: (node, error, title) => { if (this.records.has(node)) binding.reportError(error, title); },
|
|
52
54
|
callLogic: (node, name, keywords) => {
|
|
53
55
|
const {group, method} = binding.gramlot.src.logicRegistry.resolve(name, node);
|
|
@@ -228,6 +230,11 @@ export class GramlotRenderer extends GramlotHtmlRenderer {
|
|
|
228
230
|
record.menu.attach();
|
|
229
231
|
record.cleanup.push(() => record.menu.detach());
|
|
230
232
|
}
|
|
233
|
+
if (node.nodeTag === 'groupletCard') {
|
|
234
|
+
const actions = new GroupletCardActions(record.binding, record.element);
|
|
235
|
+
actions.attach();
|
|
236
|
+
record.cleanup.push(() => actions.detach());
|
|
237
|
+
}
|
|
231
238
|
this.#connectEvents(record);
|
|
232
239
|
this.references?.register(node, record.element);
|
|
233
240
|
for (const element of children) {
|
|
@@ -571,7 +578,7 @@ export class GramlotRenderer extends GramlotHtmlRenderer {
|
|
|
571
578
|
(value, options) => this._binding.gramlot.format(value, options));
|
|
572
579
|
}
|
|
573
580
|
attrs = this.componentAttributes(node, attrs);
|
|
574
|
-
this.html.update(record, node, attrs, branch ? attrs._text : text, resolved.visible ?? null);
|
|
581
|
+
this.html.update(record, node, attrs, branch ? attrs._text : text, resolved.visible ?? null, change);
|
|
575
582
|
if (replaceControl && Control) {
|
|
576
583
|
record.control = new Control(record.binding, record);
|
|
577
584
|
record.control.attach();
|
|
@@ -126,6 +126,8 @@ export class GramlotServer {
|
|
|
126
126
|
/** Create a server. */
|
|
127
127
|
/** Resolve class-local declarations and their named dependencies, base first. */
|
|
128
128
|
pageCollections(PageClass: typeof Page): PreparedCollection[];
|
|
129
|
+
/** Environment-local Page class; the imported class remains unchanged. */
|
|
130
|
+
environmentPage(PageClass: typeof Page): typeof Page;
|
|
129
131
|
collectionGraph(collections: PreparedCollection[]): PreparedCollection[];
|
|
130
132
|
loadCollections(builder: GramlotBuilder, collections: PreparedCollection[]): void;
|
|
131
133
|
constructor(options?: GramlotServerOptions);
|
|
@@ -120,6 +120,7 @@ export class GramlotServer {
|
|
|
120
120
|
this.pages = new Map();
|
|
121
121
|
this.collections = [...collections];
|
|
122
122
|
this.preparedGrammars = new WeakMap();
|
|
123
|
+
this.environmentPages = new WeakMap();
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
/** The Page class of path, or PageNotFound. */
|
|
@@ -132,6 +133,16 @@ export class GramlotServer {
|
|
|
132
133
|
return this.collectionGraph([...this.collections, ...classes.flatMap(cls => Object.hasOwn(cls, 'gramlots') ? cls.gramlots : [])]);
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
/** Bind this environment without modifying a module shared by other hosts. */
|
|
137
|
+
environmentPage(PageClass) {
|
|
138
|
+
if (!this.collections.length) return PageClass;
|
|
139
|
+
if (!this.environmentPages.has(PageClass)) {
|
|
140
|
+
const gramlots = this.pageCollections(PageClass);
|
|
141
|
+
this.environmentPages.set(PageClass, class extends PageClass {static gramlots = gramlots;});
|
|
142
|
+
}
|
|
143
|
+
return this.environmentPages.get(PageClass);
|
|
144
|
+
}
|
|
145
|
+
|
|
135
146
|
/** Resolve named dependencies among prepared records; reject ambiguous identities. */
|
|
136
147
|
collectionGraph(collections) {
|
|
137
148
|
const byName = new Map(), visiting = new Set(), done = new Set(), ordered = [];
|
|
@@ -264,10 +275,11 @@ export class GramlotServer {
|
|
|
264
275
|
* position. */
|
|
265
276
|
async registerPage(path, {owner = null} = {}) {
|
|
266
277
|
if (path.endsWith('/index.html')) path = path.slice(0, -'index.html'.length);
|
|
267
|
-
|
|
278
|
+
let PageClass = await this.resolvePage(path);
|
|
268
279
|
if (typeof PageClass !== 'function' || !(PageClass.prototype instanceof Page)) {
|
|
269
280
|
throw new TypeError('Page modules must export a subclass of Page');
|
|
270
281
|
}
|
|
282
|
+
PageClass = this.environmentPage(PageClass);
|
|
271
283
|
const selected = this.pageCollections(PageClass);
|
|
272
284
|
const resolved = await this.resolveResources(path, PageClass);
|
|
273
285
|
const resources = loadOrder({...resolved, css: [...this.themeCss(PageClass), ...selected.flatMap(collection=>collection.css ?? []), ...resolved.css]});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {Bag} from '@genrojs/bag';
|
|
2
|
+
|
|
3
|
+
/** Shared resident data. Ordering and filtering belong to each consuming view. */
|
|
4
|
+
export class BagCollectionStore {
|
|
5
|
+
#listeners = new Set();
|
|
6
|
+
constructor(bag, rowMode) {
|
|
7
|
+
if (!(bag instanceof Bag)) throw new TypeError('collection store requires a Bag');
|
|
8
|
+
if (!['values','attributes'].includes(rowMode)) throw new TypeError('collection store rowMode must explicitly be values or attributes');
|
|
9
|
+
if (!bag.parentNode) throw new TypeError('collection store requires a Bag attached to Data');
|
|
10
|
+
this.bag = bag;
|
|
11
|
+
this.rowMode = rowMode;
|
|
12
|
+
}
|
|
13
|
+
subscribe(listener) {
|
|
14
|
+
this.#listeners.add(listener);
|
|
15
|
+
return () => this.#listeners.delete(listener);
|
|
16
|
+
}
|
|
17
|
+
/** Called by the page's single Data subscription. Each view reconciles independently. */
|
|
18
|
+
receiveData(event, row = null) {
|
|
19
|
+
publishCollection(this.#listeners, {full:row === null, rows:row ? [row] : []});
|
|
20
|
+
}
|
|
21
|
+
getRows() {
|
|
22
|
+
const nodes = this.bag.getNodes();
|
|
23
|
+
for (const node of nodes) {
|
|
24
|
+
if (node.resolver) throw new TypeError('collection store requires loaded rows');
|
|
25
|
+
if (this.rowMode === 'values' && !(node.staticValue instanceof Bag)) {
|
|
26
|
+
throw new TypeError(`collection store row ${node.label} must contain a Bag`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return nodes;
|
|
30
|
+
}
|
|
31
|
+
value(node, field) {
|
|
32
|
+
if (node.resolver) throw new TypeError('collection store requires loaded rows');
|
|
33
|
+
if (this.rowMode === 'attributes') return node.getAttr(field);
|
|
34
|
+
const row = node.staticValue;
|
|
35
|
+
if (!(row instanceof Bag)) throw new TypeError(`collection store row ${node.label} must contain a Bag`);
|
|
36
|
+
const cell = row.getNode(field);
|
|
37
|
+
if (cell?.resolver) throw new TypeError('collection store requires loaded cells');
|
|
38
|
+
return cell?.staticValue;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** One invalidation protocol at both collection levels; failures cannot skip siblings. */
|
|
43
|
+
export function publishCollection(listeners, change) {
|
|
44
|
+
const errors = [];
|
|
45
|
+
const notice = Object.freeze({full:change.full, rows:Object.freeze([...change.rows])});
|
|
46
|
+
for (const listener of [...listeners]) {
|
|
47
|
+
if (!listeners.has(listener)) continue;
|
|
48
|
+
try { listener(notice); } catch (error) { errors.push(error); }
|
|
49
|
+
}
|
|
50
|
+
if (errors.length) throw new AggregateError(errors, 'Collection notification failed');
|
|
51
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {isDecimal} from '@genrojs/tytx';
|
|
2
|
+
import {compileFilter} from './collection-filter.js';
|
|
3
|
+
import {publishCollection} from './bag-collection-store.js';
|
|
4
|
+
|
|
5
|
+
/** Source-owned view: original BagNodes, independent indices and criteria. */
|
|
6
|
+
export class BagCollectionView {
|
|
7
|
+
#store;
|
|
8
|
+
#release = null;
|
|
9
|
+
#listeners = new Set();
|
|
10
|
+
#indices = new Map();
|
|
11
|
+
#sortedBy = '';
|
|
12
|
+
#filter = null;
|
|
13
|
+
#predicate = null;
|
|
14
|
+
#filtered = null;
|
|
15
|
+
constructor(store) { this.bindStore(store); }
|
|
16
|
+
get bag() { return this.#store.bag; }
|
|
17
|
+
get rowMode() { return this.#store.rowMode; }
|
|
18
|
+
get sortedBy() { return this.#sortedBy; }
|
|
19
|
+
get criteria() { return parseSort(this.#sortedBy); }
|
|
20
|
+
get filter() { return this.#filter; }
|
|
21
|
+
get filtered() { return this.#filtered === null ? null : [...this.#filtered]; }
|
|
22
|
+
isFiltered() { return this.#filtered !== null; }
|
|
23
|
+
value(node, field) { return this.#store.value(node, field); }
|
|
24
|
+
subscribe(listener) {
|
|
25
|
+
this.#listeners.add(listener);
|
|
26
|
+
return () => this.#listeners.delete(listener);
|
|
27
|
+
}
|
|
28
|
+
connect() {
|
|
29
|
+
if (this.#release) return;
|
|
30
|
+
this.synchronize();
|
|
31
|
+
this.#release = this.#store.subscribe(change => this.synchronize(change));
|
|
32
|
+
}
|
|
33
|
+
disconnect() { this.#release?.(); this.#release = null; }
|
|
34
|
+
bindStore(store) {
|
|
35
|
+
if (this.#store === store) return;
|
|
36
|
+
const connected = this.#release !== null;
|
|
37
|
+
this.disconnect();
|
|
38
|
+
this.#store = store;
|
|
39
|
+
// Only node identities are retained, never cell values. A replacement Bag
|
|
40
|
+
// keeps this widget's criteria but starts a fresh manual index.
|
|
41
|
+
this.#indices.clear();
|
|
42
|
+
if (connected) this.connect(); else this.synchronize();
|
|
43
|
+
}
|
|
44
|
+
getRows(filtered = true) {
|
|
45
|
+
const nodes = this.#orderedNodes();
|
|
46
|
+
return filtered && this.#filtered !== null ? this.#filtered.map(index => nodes[index]) : nodes;
|
|
47
|
+
}
|
|
48
|
+
#orderedNodes() {
|
|
49
|
+
return this.#store.getRows().toSorted((a,b) => (this.#indices.get(a) ?? Infinity) - (this.#indices.get(b) ?? Infinity));
|
|
50
|
+
}
|
|
51
|
+
synchronize(change = {full:true, rows:[]}) {
|
|
52
|
+
if (!change.full && !this.#sortedBy && !this.#predicate) {
|
|
53
|
+
publishCollection(this.#listeners,change);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.#commit(this.#sorted(this.#orderedNodes(),this.criteria),this.#sortedBy,this.#filter,this.#predicate,change);
|
|
57
|
+
}
|
|
58
|
+
sort(sortedBy) {
|
|
59
|
+
const nodes = this.#sorted(this.#orderedNodes(),parseSort(sortedBy));
|
|
60
|
+
this.#commit(nodes,sortedBy,this.#filter,this.#predicate);
|
|
61
|
+
}
|
|
62
|
+
moveRow(node, target, after = false) {
|
|
63
|
+
if (node === target || node.parentBag !== this.bag || target.parentBag !== this.bag) return;
|
|
64
|
+
const nodes = this.getRows(false);
|
|
65
|
+
nodes.splice(nodes.indexOf(node),1);
|
|
66
|
+
nodes.splice(nodes.indexOf(target)+Number(after),0,node);
|
|
67
|
+
this.#commit(nodes,'',this.#filter,this.#predicate);
|
|
68
|
+
}
|
|
69
|
+
applyFilter(filter) {
|
|
70
|
+
// The accepted definition is immutable Source-owned state. Invalid drafts
|
|
71
|
+
// cannot replace it, the predicate or the visible index.
|
|
72
|
+
const definition = filter === null ? null : Object.freeze({...filter,columns:Object.freeze([...filter.columns])});
|
|
73
|
+
const predicate = compileFilter(definition);
|
|
74
|
+
this.#commit(this.#orderedNodes(),this.#sortedBy,definition,predicate);
|
|
75
|
+
}
|
|
76
|
+
#commit(nodes, sortedBy, filter, predicate, change = {full:false, rows:[]}) {
|
|
77
|
+
const filtered = predicate ? nodes.flatMap((node,index) => predicate(field => this.value(node,field)) ? [index] : []) : null;
|
|
78
|
+
const full = change.full || sortedBy !== this.#sortedBy || JSON.stringify(filter) !== JSON.stringify(this.#filter) ||
|
|
79
|
+
nodes.length !== this.#indices.size || nodes.some((node,index) => this.#indices.get(node) !== index) ||
|
|
80
|
+
JSON.stringify(filtered) !== JSON.stringify(this.#filtered);
|
|
81
|
+
this.#indices = new Map(nodes.map((node,index) => [node,index]));
|
|
82
|
+
this.#sortedBy = sortedBy; this.#filter = filter; this.#predicate = predicate; this.#filtered = filtered;
|
|
83
|
+
const visible = filtered === null ? null : new Set(filtered);
|
|
84
|
+
const rows = full ? [] : change.rows.filter(node => this.#indices.has(node) && (visible === null || visible.has(this.#indices.get(node))));
|
|
85
|
+
if (full || rows.length) publishCollection(this.#listeners,{full,rows});
|
|
86
|
+
}
|
|
87
|
+
#sorted(nodes, criteria) {
|
|
88
|
+
if (!criteria.length) return nodes;
|
|
89
|
+
const keyed = nodes.map(node => ({node,keys:criteria.map(({field}) => this.value(node,field))}));
|
|
90
|
+
for (let index=0; index<criteria.length; index++) {
|
|
91
|
+
const kinds = new Set(keyed.map(row => scalarKind(row.keys[index])).filter(kind => kind !== null));
|
|
92
|
+
if (kinds.size > 1) throw new TypeError(`collection view cannot compare mixed types in ${criteria[index].field}`);
|
|
93
|
+
}
|
|
94
|
+
return keyed.sort((a,b) => {
|
|
95
|
+
for (const [index,{direction}] of criteria.entries()) {
|
|
96
|
+
const result = compare(a.keys[index],b.keys[index]);
|
|
97
|
+
if (result) return direction === 'a' ? result : -result;
|
|
98
|
+
}
|
|
99
|
+
return 0;
|
|
100
|
+
}).map(row => row.node);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function parseSort(sortedBy) {
|
|
105
|
+
if (typeof sortedBy !== 'string') throw new TypeError('collection view sortedBy must be a string');
|
|
106
|
+
if (sortedBy === '') return [];
|
|
107
|
+
const seen = new Set();
|
|
108
|
+
return sortedBy.split(',').map(item => {
|
|
109
|
+
const match = /^([^,:]+):([ad])$/.exec(item);
|
|
110
|
+
if (!match || seen.has(match[1])) throw new TypeError(`Invalid collection view sort criterion: ${item}`);
|
|
111
|
+
seen.add(match[1]);
|
|
112
|
+
return {field:match[1], direction:match[2]};
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function scalarKind(value) {
|
|
116
|
+
if (value == null) return null;
|
|
117
|
+
if (typeof value === 'number' && Number.isFinite(value) || isDecimal(value) && value.isFinite()) return 'number';
|
|
118
|
+
if (value instanceof Date && Number.isFinite(value.getTime())) return 'date';
|
|
119
|
+
if (typeof value === 'string' || typeof value === 'boolean') return typeof value;
|
|
120
|
+
throw new TypeError('collection view sort requires loaded finite scalar values');
|
|
121
|
+
}
|
|
122
|
+
function compare(a, b) {
|
|
123
|
+
if (a == null || b == null) return a == null ? (b == null ? 0 : -1) : 1;
|
|
124
|
+
if (isDecimal(a)) return a.comparedTo(b);
|
|
125
|
+
if (isDecimal(b)) return -b.comparedTo(a);
|
|
126
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
127
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {createDecimal, isDecimal} from '@genrojs/tytx';
|
|
2
|
+
import {parseDateExpression} from '@genrojs/toolbox';
|
|
3
|
+
import {formatValue} from '../format.js';
|
|
4
|
+
|
|
5
|
+
/** Legacy search syntax, independent of grid DOM and collection ordering. */
|
|
6
|
+
export function compileFilter(filter) {
|
|
7
|
+
if (filter === null) return null;
|
|
8
|
+
const {value, columns, dtype, locale} = filter;
|
|
9
|
+
if (typeof value !== 'string' || !Array.isArray(columns) || !columns.length ||
|
|
10
|
+
columns.some(field => typeof field !== 'string' || !field || field === 'rowidx') ||
|
|
11
|
+
!['T', 'L', 'R', 'N', 'D'].includes(dtype)) throw new TypeError('Invalid collection filter');
|
|
12
|
+
if (!value.trim()) return null;
|
|
13
|
+
if (dtype === 'T') {
|
|
14
|
+
const expression = new RegExp(value, 'i');
|
|
15
|
+
return read => expression.test(columns.map(field => searchText(read(field), locale, filter.timeZone)).join(' '));
|
|
16
|
+
}
|
|
17
|
+
if (columns.length !== 1) throw new TypeError('Typed filters require one column');
|
|
18
|
+
const match = /^\s*(<=|>=|==|!=|[<>=!#])\s*(.+?)\s*$/.exec(value);
|
|
19
|
+
if (!match) throw new Error('Enter a comparison, for example > 100 or = 12.');
|
|
20
|
+
const [, operator, text] = match;
|
|
21
|
+
let operand;
|
|
22
|
+
if (dtype === 'D') {
|
|
23
|
+
const now = new Date();
|
|
24
|
+
const workdate = `${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-${String(now.getDate()).padStart(2,'0')}`;
|
|
25
|
+
const parsed = parseDateExpression(text, {locale, workdate});
|
|
26
|
+
if (!parsed.ok || parsed.kind !== 'date') throw new Error('Enter one complete date after the comparison.');
|
|
27
|
+
operand = new Date(`${parsed.date}T00:00:00Z`);
|
|
28
|
+
} else operand = parseNumber(text, locale);
|
|
29
|
+
return read => {
|
|
30
|
+
const actual = read(columns[0]);
|
|
31
|
+
if (actual == null) return false;
|
|
32
|
+
if (dtype === 'D' ? !(actual instanceof Date) || !Number.isFinite(actual.getTime())
|
|
33
|
+
: !(typeof actual === 'number' && Number.isFinite(actual) || isDecimal(actual) && actual.isFinite())) {
|
|
34
|
+
throw new TypeError(`Filter value does not match ${dtype}`);
|
|
35
|
+
}
|
|
36
|
+
const order = isDecimal(operand) ? -operand.comparedTo(actual) : actual < operand ? -1 : actual > operand ? 1 : 0;
|
|
37
|
+
switch (operator) {
|
|
38
|
+
case '=': case '==': return order === 0;
|
|
39
|
+
case '!': case '#': case '!=': return order !== 0;
|
|
40
|
+
case '<': return order < 0;
|
|
41
|
+
case '>': return order > 0;
|
|
42
|
+
case '<=': return order <= 0;
|
|
43
|
+
case '>=': return order >= 0;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function searchText(value, locale, timeZone) {
|
|
49
|
+
if (value == null) return '';
|
|
50
|
+
if (typeof value === 'string' || typeof value === 'boolean') return String(value);
|
|
51
|
+
return formatValue(value, {pattern:value instanceof Date ? 'short' : '#,##0.####################'}, {locale, timeZone});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function parseNumber(text, locale) {
|
|
55
|
+
const parts = new Intl.NumberFormat(locale).formatToParts(-12345.6);
|
|
56
|
+
const decimal = parts.find(part => part.type === 'decimal').value;
|
|
57
|
+
const group = parts.find(part => part.type === 'group')?.value;
|
|
58
|
+
const minus = parts.find(part => part.type === 'minusSign').value;
|
|
59
|
+
let number = text.replaceAll(minus, '-');
|
|
60
|
+
if (group && number.includes(group)) {
|
|
61
|
+
const integer = number.split(decimal)[0].replace(/^[+-]/, '');
|
|
62
|
+
const groups = integer.split(group);
|
|
63
|
+
const sizes = new Intl.NumberFormat(locale).formatToParts(1234567890123).filter(part => part.type === 'integer').map(part => part.value.length);
|
|
64
|
+
const last = sizes.at(-1), middle = sizes.at(-2);
|
|
65
|
+
if (number.split(decimal).slice(1).some(part => part.includes(group)) ||
|
|
66
|
+
!/^\d+$/.test(groups[0]) || groups[0].length > middle ||
|
|
67
|
+
groups.slice(1).some((item,index) => !/^\d+$/.test(item) || item.length !== (index === groups.length - 2 ? last : middle))) {
|
|
68
|
+
throw new Error('Invalid numeric grouping.');
|
|
69
|
+
}
|
|
70
|
+
number = number.replaceAll(group, '');
|
|
71
|
+
}
|
|
72
|
+
number = number.replace(decimal, '.');
|
|
73
|
+
if (!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(number)) throw new Error('Enter a complete number.');
|
|
74
|
+
const result = createDecimal(number);
|
|
75
|
+
if (!isDecimal(result) || !result.isFinite()) throw new Error('A finite Decimal backend is required.');
|
|
76
|
+
return result;
|
|
77
|
+
}
|