@neetechs/ui 0.0.3 → 0.0.4
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/README.md +118 -16
- package/dist/ai/ai-action-button/ai-action-button.css +36 -35
- package/dist/ai/ai-approval-card/ai-approval-card.css +20 -17
- package/dist/ai/ai-conversation-panel/ai-conversation-panel.css +70 -26
- package/dist/ai/ai-prompt-input/ai-prompt-input.css +36 -33
- package/dist/ai/ai-proposal-card/ai-proposal-card.css +17 -17
- package/dist/ai/ai-suggestion-card/ai-suggestion-card.css +27 -25
- package/dist/ai/ai-tool-call/ai-tool-call.css +15 -14
- package/dist/appearance/cache.d.ts +6 -1
- package/dist/appearance/cache.d.ts.map +1 -1
- package/dist/appearance/cache.js +57 -1
- package/dist/appearance/cache.js.map +1 -1
- package/dist/appearance/cookie.d.ts +16 -1
- package/dist/appearance/cookie.d.ts.map +1 -1
- package/dist/appearance/cookie.js +73 -4
- package/dist/appearance/cookie.js.map +1 -1
- package/dist/appearance/index.d.ts +7 -6
- package/dist/appearance/index.d.ts.map +1 -1
- package/dist/appearance/index.js +4 -4
- package/dist/appearance/index.js.map +1 -1
- package/dist/appearance/preference.d.ts +9 -1
- package/dist/appearance/preference.d.ts.map +1 -1
- package/dist/appearance/preference.js +54 -0
- package/dist/appearance/preference.js.map +1 -1
- package/dist/appearance/theme-controller.d.ts +31 -49
- package/dist/appearance/theme-controller.d.ts.map +1 -1
- package/dist/appearance/theme-controller.js +150 -145
- package/dist/appearance/theme-controller.js.map +1 -1
- package/dist/appearance/types.d.ts +29 -2
- package/dist/appearance/types.d.ts.map +1 -1
- package/dist/behaviors/announcer.d.ts +34 -0
- package/dist/behaviors/announcer.d.ts.map +1 -0
- package/dist/behaviors/announcer.js +150 -0
- package/dist/behaviors/announcer.js.map +1 -0
- package/dist/behaviors/calendar.d.ts +15 -0
- package/dist/behaviors/calendar.d.ts.map +1 -0
- package/dist/behaviors/calendar.js +77 -0
- package/dist/behaviors/calendar.js.map +1 -0
- package/dist/behaviors/data-grid.d.ts +18 -0
- package/dist/behaviors/data-grid.d.ts.map +1 -0
- package/dist/behaviors/data-grid.js +114 -0
- package/dist/behaviors/data-grid.js.map +1 -0
- package/dist/behaviors/dialog.d.ts +14 -0
- package/dist/behaviors/dialog.d.ts.map +1 -1
- package/dist/behaviors/dialog.js +24 -6
- package/dist/behaviors/dialog.js.map +1 -1
- package/dist/behaviors/direction.d.ts +10 -0
- package/dist/behaviors/direction.d.ts.map +1 -0
- package/dist/behaviors/direction.js +24 -0
- package/dist/behaviors/direction.js.map +1 -0
- package/dist/behaviors/drawer.d.ts +15 -3
- package/dist/behaviors/drawer.d.ts.map +1 -1
- package/dist/behaviors/drawer.js +25 -10
- package/dist/behaviors/drawer.js.map +1 -1
- package/dist/behaviors/dropdown.d.ts +11 -0
- package/dist/behaviors/dropdown.d.ts.map +1 -1
- package/dist/behaviors/dropdown.js +53 -11
- package/dist/behaviors/dropdown.js.map +1 -1
- package/dist/behaviors/focus-trap.d.ts.map +1 -1
- package/dist/behaviors/focus-trap.js +45 -5
- package/dist/behaviors/focus-trap.js.map +1 -1
- package/dist/behaviors/forms.d.ts +32 -0
- package/dist/behaviors/forms.d.ts.map +1 -0
- package/dist/behaviors/forms.js +147 -0
- package/dist/behaviors/forms.js.map +1 -0
- package/dist/behaviors/index.d.ts +8 -0
- package/dist/behaviors/index.d.ts.map +1 -1
- package/dist/behaviors/index.js +8 -0
- package/dist/behaviors/index.js.map +1 -1
- package/dist/behaviors/keyboard.d.ts.map +1 -1
- package/dist/behaviors/keyboard.js +4 -2
- package/dist/behaviors/keyboard.js.map +1 -1
- package/dist/behaviors/overlay.d.ts +6 -0
- package/dist/behaviors/overlay.d.ts.map +1 -1
- package/dist/behaviors/overlay.js +93 -3
- package/dist/behaviors/overlay.js.map +1 -1
- package/dist/behaviors/state.d.ts +49 -0
- package/dist/behaviors/state.d.ts.map +1 -0
- package/dist/behaviors/state.js +220 -0
- package/dist/behaviors/state.js.map +1 -0
- package/dist/behaviors/tabs.d.ts +18 -0
- package/dist/behaviors/tabs.d.ts.map +1 -0
- package/dist/behaviors/tabs.js +103 -0
- package/dist/behaviors/tabs.js.map +1 -0
- package/dist/behaviors/viewport.d.ts +40 -0
- package/dist/behaviors/viewport.d.ts.map +1 -0
- package/dist/behaviors/viewport.js +47 -0
- package/dist/behaviors/viewport.js.map +1 -0
- package/dist/components/alert/alert.css +13 -10
- package/dist/components/avatar/avatar.css +16 -15
- package/dist/components/badge/badge.css +6 -6
- package/dist/components/breadcrumb/breadcrumb.css +12 -10
- package/dist/components/button/button.css +65 -37
- package/dist/components/card/card.css +15 -14
- package/dist/components/checkbox/checkbox.css +13 -11
- package/dist/components/chip/chip.css +22 -20
- package/dist/components/data-grid/data-grid.css +167 -16
- package/dist/components/dialog/dialog.css +127 -63
- package/dist/components/drawer/drawer.css +117 -36
- package/dist/components/dropdown/dropdown.css +32 -14
- package/dist/components/icon-button/icon-button.css +41 -37
- package/dist/components/index.css +1 -2
- package/dist/components/input/input.css +10 -10
- package/dist/components/menu/menu.css +18 -17
- package/dist/components/pagination/pagination.css +13 -12
- package/dist/components/panel/panel.css +13 -12
- package/dist/components/progress/progress.css +20 -12
- package/dist/components/radio/radio.css +11 -9
- package/dist/components/segmented-control/segmented-control.css +20 -20
- package/dist/components/select/select.css +23 -9
- package/dist/components/skeleton/skeleton.css +14 -14
- package/dist/components/split-button/split-button.css +38 -31
- package/dist/components/switch/switch.css +25 -11
- package/dist/components/table/table.css +220 -0
- package/dist/components/tabs/tabs.css +36 -32
- package/dist/components/textarea/textarea.css +13 -13
- package/dist/components/toast/toast.css +43 -21
- package/dist/components/tooltip/tooltip.css +22 -19
- package/dist/domain/billing/index.css +19 -19
- package/dist/domain/calendar/agenda-list/agenda-list.css +224 -0
- package/dist/domain/calendar/day-slice/day-slice.css +18 -17
- package/dist/domain/calendar/day-timeline/day-timeline.css +42 -34
- package/dist/domain/calendar/event-card/event-card.css +20 -18
- package/dist/domain/calendar/index.css +2 -1
- package/dist/domain/calendar/month-grid/month-grid.css +34 -28
- package/dist/domain/calendar/week-grid/week-grid.css +63 -53
- package/dist/domain/companies/index.css +30 -29
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/localization/index.d.ts +8 -0
- package/dist/localization/index.d.ts.map +1 -0
- package/dist/localization/index.js +22 -0
- package/dist/localization/index.js.map +1 -0
- package/dist/patterns/command-palette/command-palette.css +39 -31
- package/dist/patterns/company-switcher/company-switcher.css +112 -85
- package/dist/patterns/content-state/content-state.css +236 -0
- package/dist/patterns/empty-state/empty-state.css +16 -15
- package/dist/patterns/error-state/error-state.css +14 -13
- package/dist/patterns/form-layout/form-layout.css +106 -0
- package/dist/patterns/index.css +8 -3
- package/dist/patterns/loading-state/loading-state.css +9 -9
- package/dist/patterns/master-detail/master-detail.css +103 -0
- package/dist/patterns/notification-center/notification-center.css +38 -33
- package/dist/patterns/page/page.css +219 -0
- package/dist/patterns/profile-menu/profile-menu.css +15 -14
- package/dist/patterns/search-bar/search-bar.css +38 -25
- package/dist/patterns/settings-layout/settings-layout.css +150 -0
- package/dist/patterns/workflow/workflow.css +168 -0
- package/dist/shell/app-shell/app-shell.css +8 -1
- package/dist/shell/header/header.css +14 -12
- package/dist/shell/index.css +2 -2
- package/dist/shell/mobile-nav/mobile-nav.css +18 -16
- package/dist/shell/sidebar/sidebar.css +10 -10
- package/dist/styles/accessibility.css +116 -0
- package/dist/styles/animations/motion.css +2 -2
- package/dist/styles/appearance/accent.css +173 -0
- package/dist/styles/appearance/density.css +61 -0
- package/dist/styles/appearance/motion.css +40 -0
- package/dist/styles/base.css +6 -5
- package/dist/styles/index.css +8 -1
- package/dist/styles/localization.css +56 -0
- package/dist/styles/reset.css +1 -0
- package/dist/styles/responsive.css +101 -0
- package/dist/styles/themes/dark.css +95 -13
- package/dist/styles/themes/high-contrast.css +182 -11
- package/dist/styles/themes/light.css +97 -15
- package/dist/styles/tokens/breakpoints.css +29 -7
- package/dist/styles/tokens/compatibility.css +33 -0
- package/dist/styles/tokens/elevation.css +1 -7
- package/dist/styles/tokens/index.css +2 -1
- package/dist/styles/tokens/radius.css +6 -1
- package/dist/styles/tokens/spacing.css +12 -6
- package/dist/styles/tokens/typography.css +3 -2
- package/dist/styles/utilities/layout.css +20 -2
- package/dist/styles/utilities/text.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/docs/accessibility.md +218 -0
- package/docs/appearance-and-theming.md +118 -0
- package/docs/component-architecture.md +137 -0
- package/docs/component-guidelines.md +64 -0
- package/docs/content-and-terminology.md +207 -0
- package/docs/design-system-baseline-audit.md +226 -0
- package/docs/design-token-contract.md +279 -0
- package/docs/localization-and-rtl.md +147 -0
- package/docs/migration.md +142 -0
- package/docs/page-patterns-and-workflows.md +260 -0
- package/docs/responsive-and-adaptive-design.md +351 -0
- package/docs/semantic-role-migration-audit.md +77 -0
- package/docs/states-feedback-and-recovery.md +206 -0
- package/docs/theming.md +3 -225
- package/package.json +32 -3
- package/src/ai/ai-action-button/ai-action-button.css +36 -35
- package/src/ai/ai-approval-card/ai-approval-card.css +20 -17
- package/src/ai/ai-conversation-panel/ai-conversation-panel.css +70 -26
- package/src/ai/ai-prompt-input/ai-prompt-input.css +36 -33
- package/src/ai/ai-proposal-card/ai-proposal-card.css +17 -17
- package/src/ai/ai-suggestion-card/ai-suggestion-card.css +27 -25
- package/src/ai/ai-tool-call/ai-tool-call.css +15 -14
- package/src/appearance/cache.ts +78 -2
- package/src/appearance/cookie.ts +123 -7
- package/src/appearance/index.ts +44 -2
- package/src/appearance/preference.ts +87 -1
- package/src/appearance/theme-controller.ts +221 -233
- package/src/appearance/types.ts +40 -2
- package/src/behaviors/announcer.ts +222 -0
- package/src/behaviors/calendar.ts +92 -0
- package/src/behaviors/data-grid.ts +133 -0
- package/src/behaviors/dialog.ts +42 -7
- package/src/behaviors/direction.ts +34 -0
- package/src/behaviors/drawer.ts +48 -15
- package/src/behaviors/dropdown.ts +76 -13
- package/src/behaviors/focus-trap.ts +49 -6
- package/src/behaviors/forms.ts +205 -0
- package/src/behaviors/index.ts +9 -1
- package/src/behaviors/keyboard.ts +5 -3
- package/src/behaviors/overlay.ts +116 -3
- package/src/behaviors/state.ts +282 -0
- package/src/behaviors/tabs.ts +137 -0
- package/src/behaviors/viewport.ts +61 -0
- package/src/components/alert/alert.css +13 -10
- package/src/components/avatar/avatar.css +16 -15
- package/src/components/badge/badge.css +6 -6
- package/src/components/breadcrumb/breadcrumb.css +12 -10
- package/src/components/button/button.css +65 -37
- package/src/components/card/card.css +15 -14
- package/src/components/checkbox/checkbox.css +13 -11
- package/src/components/chip/chip.css +22 -20
- package/src/components/data-grid/data-grid.css +167 -16
- package/src/components/dialog/dialog.css +127 -63
- package/src/components/drawer/drawer.css +117 -36
- package/src/components/dropdown/dropdown.css +32 -14
- package/src/components/icon-button/icon-button.css +41 -37
- package/src/components/index.css +1 -2
- package/src/components/input/input.css +10 -10
- package/src/components/menu/menu.css +18 -17
- package/src/components/pagination/pagination.css +13 -12
- package/src/components/panel/panel.css +13 -12
- package/src/components/progress/progress.css +20 -12
- package/src/components/radio/radio.css +11 -9
- package/src/components/segmented-control/segmented-control.css +20 -20
- package/src/components/select/select.css +23 -9
- package/src/components/skeleton/skeleton.css +14 -14
- package/src/components/split-button/split-button.css +38 -31
- package/src/components/switch/switch.css +25 -11
- package/src/components/table/table.css +220 -0
- package/src/components/tabs/tabs.css +36 -32
- package/src/components/textarea/textarea.css +13 -13
- package/src/components/toast/toast.css +43 -21
- package/src/components/tooltip/tooltip.css +22 -19
- package/src/domain/billing/index.css +19 -19
- package/src/domain/calendar/agenda-list/agenda-list.css +224 -0
- package/src/domain/calendar/day-slice/day-slice.css +18 -17
- package/src/domain/calendar/day-timeline/day-timeline.css +42 -34
- package/src/domain/calendar/event-card/event-card.css +20 -18
- package/src/domain/calendar/index.css +2 -1
- package/src/domain/calendar/month-grid/month-grid.css +34 -28
- package/src/domain/calendar/week-grid/week-grid.css +63 -53
- package/src/domain/companies/index.css +30 -29
- package/src/index.ts +3 -2
- package/src/localization/index.ts +56 -0
- package/src/patterns/command-palette/command-palette.css +39 -31
- package/src/patterns/company-switcher/company-switcher.css +112 -85
- package/src/patterns/content-state/content-state.css +236 -0
- package/src/patterns/empty-state/empty-state.css +16 -15
- package/src/patterns/error-state/error-state.css +14 -13
- package/src/patterns/form-layout/form-layout.css +106 -0
- package/src/patterns/index.css +8 -3
- package/src/patterns/loading-state/loading-state.css +9 -9
- package/src/patterns/master-detail/master-detail.css +103 -0
- package/src/patterns/notification-center/notification-center.css +38 -33
- package/src/patterns/page/page.css +219 -0
- package/src/patterns/profile-menu/profile-menu.css +15 -14
- package/src/patterns/search-bar/search-bar.css +38 -25
- package/src/patterns/settings-layout/settings-layout.css +150 -0
- package/src/patterns/workflow/workflow.css +168 -0
- package/src/shell/app-shell/app-shell.css +8 -1
- package/src/shell/header/header.css +14 -12
- package/src/shell/index.css +2 -2
- package/src/shell/mobile-nav/mobile-nav.css +18 -16
- package/src/shell/sidebar/sidebar.css +10 -10
- package/src/styles/accessibility.css +116 -0
- package/src/styles/animations/motion.css +2 -2
- package/src/styles/appearance/accent.css +173 -0
- package/src/styles/appearance/density.css +61 -0
- package/src/styles/appearance/motion.css +40 -0
- package/src/styles/base.css +6 -5
- package/src/styles/index.css +8 -1
- package/src/styles/localization.css +56 -0
- package/src/styles/reset.css +1 -0
- package/src/styles/responsive.css +101 -0
- package/src/styles/themes/dark.css +95 -13
- package/src/styles/themes/high-contrast.css +182 -11
- package/src/styles/themes/light.css +97 -15
- package/src/styles/tokens/breakpoints.css +29 -7
- package/src/styles/tokens/compatibility.css +33 -0
- package/src/styles/tokens/elevation.css +1 -7
- package/src/styles/tokens/index.css +2 -1
- package/src/styles/tokens/radius.css +6 -1
- package/src/styles/tokens/spacing.css +12 -6
- package/src/styles/tokens/typography.css +3 -2
- package/src/styles/utilities/layout.css +20 -2
- package/src/styles/utilities/text.css +1 -1
- package/src/types/index.ts +2 -1
- package/dist/components/modal/modal.css +0 -318
- package/dist/patterns/workspace-switcher/workspace-switcher.css +0 -380
- package/dist/shell/right-drawer/right-drawer.css +0 -108
- package/src/components/modal/modal.css +0 -318
- package/src/patterns/workspace-switcher/workspace-switcher.css +0 -380
- package/src/shell/right-drawer/right-drawer.css +0 -108
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
gap: var(--nt-space-4);
|
|
5
5
|
min-width: 0;
|
|
6
6
|
overflow: hidden;
|
|
7
|
-
border: 1px solid var(--nt-border
|
|
8
|
-
border-radius: var(--nt-radius-
|
|
7
|
+
border: 1px solid var(--nt-ai-border);
|
|
8
|
+
border-radius: var(--nt-radius-card);
|
|
9
9
|
background: var(--nt-bg-surface);
|
|
10
10
|
color: var(--nt-text-primary);
|
|
11
|
-
box-shadow: var(--nt-
|
|
11
|
+
box-shadow: var(--nt-elevation-card);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.nt-ai-proposal-card__header {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
gap: var(--nt-space-3);
|
|
19
19
|
padding: var(--nt-space-4);
|
|
20
20
|
border-bottom: 1px solid var(--nt-border-subtle);
|
|
21
|
-
background: var(--nt-
|
|
21
|
+
background: var(--nt-ai-bg-subtle);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.nt-ai-proposal-card__icon {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
justify-content: center;
|
|
28
28
|
width: 2.25rem;
|
|
29
29
|
height: 2.25rem;
|
|
30
|
-
border: 1px solid var(--nt-
|
|
31
|
-
border-radius: var(--nt-radius-
|
|
32
|
-
background: var(--nt-
|
|
33
|
-
color: var(--nt-
|
|
30
|
+
border: 1px solid var(--nt-ai-border);
|
|
31
|
+
border-radius: var(--nt-radius-card);
|
|
32
|
+
background: var(--nt-ai-bg-subtle);
|
|
33
|
+
color: var(--nt-ai-fg);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.nt-ai-proposal-card__header-main {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.nt-ai-proposal-card__eyebrow {
|
|
44
|
-
color: var(--nt-
|
|
44
|
+
color: var(--nt-ai-fg);
|
|
45
45
|
font: var(--nt-text-label-xs);
|
|
46
46
|
letter-spacing: var(--nt-letter-spacing-label);
|
|
47
47
|
text-transform: uppercase;
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
min-height: 1.5rem;
|
|
69
69
|
padding: 0 var(--nt-space-2);
|
|
70
70
|
border: 1px solid var(--nt-border-subtle);
|
|
71
|
-
border-radius: var(--nt-radius-
|
|
71
|
+
border-radius: var(--nt-radius-pill);
|
|
72
72
|
background: var(--nt-bg-surface);
|
|
73
73
|
color: var(--nt-text-muted);
|
|
74
74
|
font: var(--nt-text-label-xs);
|
|
@@ -137,8 +137,8 @@
|
|
|
137
137
|
min-width: 0;
|
|
138
138
|
padding: var(--nt-space-3);
|
|
139
139
|
border: 1px solid var(--nt-border-subtle);
|
|
140
|
-
border-radius: var(--nt-radius-
|
|
141
|
-
background: var(--nt-bg-muted);
|
|
140
|
+
border-radius: var(--nt-radius-item);
|
|
141
|
+
background: var(--nt-bg-surface-muted);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.nt-ai-proposal-card__item-icon {
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
justify-content: center;
|
|
148
148
|
width: 1.75rem;
|
|
149
149
|
height: 1.75rem;
|
|
150
|
-
border-radius: var(--nt-radius-
|
|
150
|
+
border-radius: var(--nt-radius-item);
|
|
151
151
|
background: var(--nt-bg-surface);
|
|
152
152
|
color: var(--nt-text-muted);
|
|
153
153
|
}
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
min-height: 1.375rem;
|
|
189
189
|
padding: 0 var(--nt-space-2);
|
|
190
190
|
border: 1px solid var(--nt-border-subtle);
|
|
191
|
-
border-radius: var(--nt-radius-
|
|
191
|
+
border-radius: var(--nt-radius-pill);
|
|
192
192
|
background: var(--nt-bg-surface);
|
|
193
193
|
color: var(--nt-text-muted);
|
|
194
194
|
font: var(--nt-text-label-xs);
|
|
@@ -217,8 +217,8 @@
|
|
|
217
217
|
min-width: 0;
|
|
218
218
|
padding: var(--nt-space-3);
|
|
219
219
|
border: 1px solid var(--nt-border-subtle);
|
|
220
|
-
border-radius: var(--nt-radius-
|
|
221
|
-
background: var(--nt-bg-muted);
|
|
220
|
+
border-radius: var(--nt-radius-item);
|
|
221
|
+
background: var(--nt-bg-surface-muted);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
.nt-ai-proposal-card__reasoning-title {
|
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
color: var(--nt-warning-text);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
@media (max-width:
|
|
328
|
+
@media (max-width: 40rem) {
|
|
329
329
|
.nt-ai-proposal-card__header {
|
|
330
330
|
grid-template-columns: auto minmax(0, 1fr);
|
|
331
331
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
.nt-ai-suggestion-card {
|
|
1
|
+
.nt-ai-suggestion-card {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--nt-space-3);
|
|
5
5
|
min-width: 0;
|
|
6
6
|
padding: var(--nt-space-4);
|
|
7
7
|
border: 1px solid var(--nt-border-subtle);
|
|
8
|
-
border-radius: var(--nt-radius-
|
|
8
|
+
border-radius: var(--nt-radius-card);
|
|
9
9
|
background: var(--nt-bg-surface);
|
|
10
10
|
color: var(--nt-text-primary);
|
|
11
|
-
box-shadow: var(--nt-
|
|
11
|
+
box-shadow: var(--nt-elevation-card);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.nt-ai-suggestion-card--interactive {
|
|
@@ -21,16 +21,17 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.nt-ai-suggestion-card--interactive:hover {
|
|
24
|
-
border-color: var(--nt-border
|
|
24
|
+
border-color: var(--nt-ai-border);
|
|
25
25
|
background: var(--nt-bg-surface-hover);
|
|
26
|
-
box-shadow: var(--nt-
|
|
26
|
+
box-shadow: var(--nt-elevation-card-hover);
|
|
27
27
|
transform: translateY(-1px);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.nt-ai-suggestion-card--interactive:focus-visible {
|
|
31
|
-
outline:
|
|
31
|
+
outline: var(--nt-focus-ring-width) solid var(--nt-focus-ring-color);
|
|
32
|
+
outline-offset: var(--nt-focus-ring-offset);
|
|
32
33
|
border-color: var(--nt-control-border-focus);
|
|
33
|
-
box-shadow: 0 0 0 3px var(--nt-focus-ring-muted), var(--nt-
|
|
34
|
+
box-shadow: 0 0 0 3px var(--nt-focus-ring-muted), var(--nt-elevation-card-hover);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
.nt-ai-suggestion-card__header {
|
|
@@ -47,10 +48,10 @@
|
|
|
47
48
|
justify-content: center;
|
|
48
49
|
width: 2.25rem;
|
|
49
50
|
height: 2.25rem;
|
|
50
|
-
border: 1px solid var(--nt-
|
|
51
|
-
border-radius: var(--nt-radius-
|
|
52
|
-
background: var(--nt-
|
|
53
|
-
color: var(--nt-
|
|
51
|
+
border: 1px solid var(--nt-ai-border);
|
|
52
|
+
border-radius: var(--nt-radius-card);
|
|
53
|
+
background: var(--nt-ai-bg-subtle);
|
|
54
|
+
color: var(--nt-ai-fg);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
.nt-ai-suggestion-card__main {
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
.nt-ai-suggestion-card__eyebrow {
|
|
64
|
-
color: var(--nt-
|
|
65
|
+
color: var(--nt-ai-fg);
|
|
65
66
|
font: var(--nt-text-label-xs);
|
|
66
67
|
letter-spacing: var(--nt-letter-spacing-label);
|
|
67
68
|
text-transform: uppercase;
|
|
@@ -87,8 +88,8 @@
|
|
|
87
88
|
min-height: 1.5rem;
|
|
88
89
|
padding: 0 var(--nt-space-2);
|
|
89
90
|
border: 1px solid var(--nt-border-subtle);
|
|
90
|
-
border-radius: var(--nt-radius-
|
|
91
|
-
background: var(--nt-bg-muted);
|
|
91
|
+
border-radius: var(--nt-radius-pill);
|
|
92
|
+
background: var(--nt-bg-surface-muted);
|
|
92
93
|
color: var(--nt-text-muted);
|
|
93
94
|
font: var(--nt-text-label-xs);
|
|
94
95
|
letter-spacing: var(--nt-letter-spacing-label);
|
|
@@ -106,8 +107,8 @@
|
|
|
106
107
|
margin: 0;
|
|
107
108
|
padding: var(--nt-space-3);
|
|
108
109
|
border: 1px solid var(--nt-border-subtle);
|
|
109
|
-
border-radius: var(--nt-radius-
|
|
110
|
-
background: var(--nt-bg-muted);
|
|
110
|
+
border-radius: var(--nt-radius-item);
|
|
111
|
+
background: var(--nt-bg-surface-muted);
|
|
111
112
|
color: var(--nt-text-primary);
|
|
112
113
|
font: var(--nt-text-body-sm);
|
|
113
114
|
}
|
|
@@ -148,26 +149,27 @@
|
|
|
148
149
|
display: inline-flex;
|
|
149
150
|
align-items: center;
|
|
150
151
|
gap: var(--nt-space-1);
|
|
151
|
-
color: var(--nt-
|
|
152
|
+
color: var(--nt-ai-fg);
|
|
152
153
|
font: var(--nt-text-label-sm);
|
|
153
154
|
letter-spacing: var(--nt-letter-spacing-label);
|
|
154
155
|
text-decoration: none;
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
.nt-ai-suggestion-card__link:hover {
|
|
158
|
-
color: var(--nt-
|
|
159
|
+
color: var(--nt-ai-action-hover);
|
|
159
160
|
text-decoration: underline;
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
.nt-ai-suggestion-card__link:focus-visible {
|
|
163
|
-
outline:
|
|
164
|
-
|
|
164
|
+
outline: var(--nt-focus-ring-width) solid var(--nt-focus-ring-color);
|
|
165
|
+
outline-offset: var(--nt-focus-ring-offset);
|
|
166
|
+
border-radius: var(--nt-radius-indicator);
|
|
165
167
|
box-shadow: 0 0 0 3px var(--nt-focus-ring-muted);
|
|
166
168
|
}
|
|
167
169
|
|
|
168
170
|
.nt-ai-suggestion-card--accent {
|
|
169
|
-
border-color: var(--nt-border
|
|
170
|
-
background: var(--nt-
|
|
171
|
+
border-color: var(--nt-ai-border);
|
|
172
|
+
background: var(--nt-ai-bg-subtle);
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
.nt-ai-suggestion-card--success {
|
|
@@ -208,7 +210,7 @@
|
|
|
208
210
|
.nt-ai-suggestion-card--compact .nt-ai-suggestion-card__icon {
|
|
209
211
|
width: 1.875rem;
|
|
210
212
|
height: 1.875rem;
|
|
211
|
-
border-radius: var(--nt-radius-
|
|
213
|
+
border-radius: var(--nt-radius-item);
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
.nt-ai-suggestion-card--horizontal {
|
|
@@ -230,7 +232,7 @@
|
|
|
230
232
|
}
|
|
231
233
|
|
|
232
234
|
.nt-ai-suggestion-card--muted {
|
|
233
|
-
background: var(--nt-bg-muted);
|
|
235
|
+
background: var(--nt-bg-surface-muted);
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
.nt-ai-suggestion-card-grid {
|
|
@@ -247,7 +249,7 @@
|
|
|
247
249
|
min-width: 0;
|
|
248
250
|
}
|
|
249
251
|
|
|
250
|
-
@media (max-width:
|
|
252
|
+
@media (max-width: 40rem) {
|
|
251
253
|
.nt-ai-suggestion-card__header {
|
|
252
254
|
grid-template-columns: auto minmax(0, 1fr);
|
|
253
255
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.nt-ai-tool-call {
|
|
1
|
+
.nt-ai-tool-call {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--nt-space-3);
|
|
5
5
|
min-width: 0;
|
|
6
6
|
padding: var(--nt-space-3);
|
|
7
7
|
border: 1px solid var(--nt-border-subtle);
|
|
8
|
-
border-radius: var(--nt-radius-
|
|
9
|
-
background: var(--nt-bg-muted);
|
|
8
|
+
border-radius: var(--nt-radius-item);
|
|
9
|
+
background: var(--nt-bg-surface-muted);
|
|
10
10
|
color: var(--nt-text-primary);
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
width: 1.75rem;
|
|
26
26
|
height: 1.75rem;
|
|
27
27
|
border: 1px solid var(--nt-border-subtle);
|
|
28
|
-
border-radius: var(--nt-radius-
|
|
28
|
+
border-radius: var(--nt-radius-item);
|
|
29
29
|
background: var(--nt-bg-surface);
|
|
30
|
-
color: var(--nt-
|
|
30
|
+
color: var(--nt-ai-fg);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.nt-ai-tool-call__main {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
min-height: 1.375rem;
|
|
65
65
|
padding: 0 var(--nt-space-2);
|
|
66
66
|
border: 1px solid var(--nt-border-subtle);
|
|
67
|
-
border-radius: var(--nt-radius-
|
|
67
|
+
border-radius: var(--nt-radius-pill);
|
|
68
68
|
background: var(--nt-bg-surface);
|
|
69
69
|
color: var(--nt-text-muted);
|
|
70
70
|
font: var(--nt-text-label-xs);
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
display: inline-block;
|
|
77
77
|
width: 0.375rem;
|
|
78
78
|
height: 0.375rem;
|
|
79
|
-
border-radius: var(--nt-radius-
|
|
79
|
+
border-radius: var(--nt-radius-pill);
|
|
80
80
|
background: currentColor;
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
overflow: auto;
|
|
94
94
|
padding: var(--nt-space-3);
|
|
95
95
|
border: 1px solid var(--nt-border-subtle);
|
|
96
|
-
border-radius: var(--nt-radius-
|
|
96
|
+
border-radius: var(--nt-radius-control);
|
|
97
97
|
background: var(--nt-bg-surface);
|
|
98
98
|
color: var(--nt-text-primary);
|
|
99
|
-
font: var(--nt-text-
|
|
99
|
+
font: var(--nt-text-mono-sm);
|
|
100
100
|
white-space: pre-wrap;
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -131,20 +131,21 @@
|
|
|
131
131
|
gap: var(--nt-space-1);
|
|
132
132
|
border: 0;
|
|
133
133
|
background: transparent;
|
|
134
|
-
color: var(--nt-
|
|
134
|
+
color: var(--nt-ai-fg);
|
|
135
135
|
font: var(--nt-text-label-sm);
|
|
136
136
|
letter-spacing: var(--nt-letter-spacing-label);
|
|
137
137
|
cursor: pointer;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.nt-ai-tool-call__toggle:hover {
|
|
141
|
-
color: var(--nt-
|
|
141
|
+
color: var(--nt-ai-action-hover);
|
|
142
142
|
text-decoration: underline;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.nt-ai-tool-call__toggle:focus-visible {
|
|
146
|
-
outline:
|
|
147
|
-
|
|
146
|
+
outline: var(--nt-focus-ring-width) solid var(--nt-focus-ring-color);
|
|
147
|
+
outline-offset: var(--nt-focus-ring-offset);
|
|
148
|
+
border-radius: var(--nt-radius-indicator);
|
|
148
149
|
box-shadow: 0 0 0 3px var(--nt-focus-ring-muted);
|
|
149
150
|
}
|
|
150
151
|
|
|
@@ -225,7 +226,7 @@
|
|
|
225
226
|
min-width: 0;
|
|
226
227
|
}
|
|
227
228
|
|
|
228
|
-
@media (max-width:
|
|
229
|
+
@media (max-width: 40rem) {
|
|
229
230
|
.nt-ai-tool-call__header {
|
|
230
231
|
grid-template-columns: auto minmax(0, 1fr);
|
|
231
232
|
}
|
package/src/appearance/cache.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
appearanceFromTheme,
|
|
3
|
+
normalizeAppearancePreference,
|
|
4
|
+
normalizeThemePreference,
|
|
5
|
+
} from './preference.js';
|
|
6
|
+
import type { NtAppearancePreference, ThemePreference } from './types.js';
|
|
7
|
+
|
|
8
|
+
/** Complete appearance cache. This remains a startup optimization, never account truth. */
|
|
9
|
+
export const NT_APPEARANCE_CACHE_KEY = 'nt_appearance_preference';
|
|
3
10
|
|
|
4
11
|
/**
|
|
5
12
|
* Canonical local-storage cache key. The cache is a bootstrap fallback
|
|
@@ -86,6 +93,75 @@ export function writeThemeCache(
|
|
|
86
93
|
}
|
|
87
94
|
}
|
|
88
95
|
|
|
96
|
+
export function readAppearanceCache(
|
|
97
|
+
storage: ThemeStorage | null = getDefaultThemeStorage(),
|
|
98
|
+
): NtAppearancePreference | null {
|
|
99
|
+
if (!storage) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
try {
|
|
104
|
+
const raw = storage.getItem(NT_APPEARANCE_CACHE_KEY);
|
|
105
|
+
|
|
106
|
+
if (raw !== null) {
|
|
107
|
+
try {
|
|
108
|
+
const preference = normalizeAppearancePreference(JSON.parse(raw));
|
|
109
|
+
|
|
110
|
+
if (preference !== null) {
|
|
111
|
+
return preference;
|
|
112
|
+
}
|
|
113
|
+
} catch {
|
|
114
|
+
/* Removed below. */
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
storage.removeItem(NT_APPEARANCE_CACHE_KEY);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const legacyTheme = readThemeCache(storage);
|
|
121
|
+
return legacyTheme === null ? null : appearanceFromTheme(legacyTheme);
|
|
122
|
+
} catch {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function writeAppearanceCache(
|
|
128
|
+
preference: NtAppearancePreference,
|
|
129
|
+
storage: ThemeStorage | null = getDefaultThemeStorage(),
|
|
130
|
+
): void {
|
|
131
|
+
if (!storage) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const normalized = normalizeAppearancePreference(preference);
|
|
136
|
+
|
|
137
|
+
if (normalized === null) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
try {
|
|
142
|
+
storage.setItem(NT_APPEARANCE_CACHE_KEY, JSON.stringify(normalized));
|
|
143
|
+
// Keep the frozen theme-only key synchronized for older applications.
|
|
144
|
+
storage.setItem(NT_THEME_CACHE_KEY, normalized.theme);
|
|
145
|
+
} catch {
|
|
146
|
+
/* Cache is best-effort only. */
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function clearAppearanceCache(
|
|
151
|
+
storage: ThemeStorage | null = getDefaultThemeStorage(),
|
|
152
|
+
): void {
|
|
153
|
+
if (!storage) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
try {
|
|
158
|
+
storage.removeItem(NT_APPEARANCE_CACHE_KEY);
|
|
159
|
+
storage.removeItem(NT_THEME_CACHE_KEY);
|
|
160
|
+
} catch {
|
|
161
|
+
/* Cache is best-effort only. */
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
89
165
|
/**
|
|
90
166
|
* Removes the cached preference. Storage errors never throw.
|
|
91
167
|
*/
|
package/src/appearance/cookie.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
appearanceFromTheme,
|
|
3
|
+
normalizeAppearancePreference,
|
|
4
|
+
normalizeThemePreference,
|
|
5
|
+
} from './preference.js';
|
|
6
|
+
import type {
|
|
7
|
+
NtAppearancePreference,
|
|
8
|
+
NtSystemPreference,
|
|
9
|
+
ThemePreference,
|
|
10
|
+
} from './types.js';
|
|
3
11
|
|
|
4
12
|
/**
|
|
5
13
|
* Shared-domain bootstrap cookie set by the backend
|
|
@@ -8,6 +16,15 @@ import type { ThemePreference } from './types.js';
|
|
|
8
16
|
* source of truth.
|
|
9
17
|
*/
|
|
10
18
|
export const NT_THEME_COOKIE_NAME = 'nt_theme';
|
|
19
|
+
const COOKIE_VERSION = 'v1';
|
|
20
|
+
|
|
21
|
+
export interface NtAppearanceCookieOptions {
|
|
22
|
+
domain?: string;
|
|
23
|
+
path?: string;
|
|
24
|
+
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
25
|
+
secure?: boolean;
|
|
26
|
+
maxAge?: number;
|
|
27
|
+
}
|
|
11
28
|
|
|
12
29
|
/**
|
|
13
30
|
* Reads the `nt_theme` bootstrap cookie. Only reads this single cookie —
|
|
@@ -18,6 +35,13 @@ export const NT_THEME_COOKIE_NAME = 'nt_theme';
|
|
|
18
35
|
* otherwise `null` is returned.
|
|
19
36
|
*/
|
|
20
37
|
export function readThemeCookie(cookieString?: string): ThemePreference | null {
|
|
38
|
+
return readAppearanceCookie(cookieString)?.theme ?? null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Reads either the versioned appearance payload or the legacy raw theme value. */
|
|
42
|
+
export function readAppearanceCookie(
|
|
43
|
+
cookieString?: string,
|
|
44
|
+
): NtAppearancePreference | null {
|
|
21
45
|
const source = cookieString ?? readDocumentCookieString();
|
|
22
46
|
|
|
23
47
|
if (!source) {
|
|
@@ -35,18 +59,110 @@ export function readThemeCookie(cookieString?: string): ThemePreference | null {
|
|
|
35
59
|
continue;
|
|
36
60
|
}
|
|
37
61
|
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
const value = decodeCookieValue(pair.slice(separatorIndex + 1).trim());
|
|
63
|
+
const legacyTheme = normalizeThemePreference(value);
|
|
64
|
+
|
|
65
|
+
if (legacyTheme !== null) {
|
|
66
|
+
return appearanceFromTheme(legacyTheme);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const parsed = parseVersionedAppearance(value);
|
|
41
70
|
|
|
42
|
-
if (
|
|
43
|
-
return
|
|
71
|
+
if (parsed !== null) {
|
|
72
|
+
return parsed;
|
|
44
73
|
}
|
|
45
74
|
}
|
|
46
75
|
|
|
47
76
|
return null;
|
|
48
77
|
}
|
|
49
78
|
|
|
79
|
+
function encodeSystemPreference(value: NtSystemPreference | undefined): string {
|
|
80
|
+
return value === true ? '1' : value === false ? '0' : 's';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function decodeSystemPreference(value: string): NtSystemPreference | null {
|
|
84
|
+
return value === '1' ? true : value === '0' ? false : value === 's' ? 'system' : null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function parseVersionedAppearance(value: string): NtAppearancePreference | null {
|
|
88
|
+
const parts = value.split('|');
|
|
89
|
+
|
|
90
|
+
if (parts.length !== 6 || parts[0] !== COOKIE_VERSION) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const [, theme, accent, density, motion, contrast] = parts as [
|
|
95
|
+
string,
|
|
96
|
+
string,
|
|
97
|
+
string,
|
|
98
|
+
string,
|
|
99
|
+
string,
|
|
100
|
+
string,
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
return normalizeAppearancePreference({
|
|
104
|
+
theme,
|
|
105
|
+
accent,
|
|
106
|
+
density,
|
|
107
|
+
reduceMotion: decodeSystemPreference(motion),
|
|
108
|
+
highContrast: decodeSystemPreference(contrast),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function serializeAppearanceCookieValue(
|
|
113
|
+
preference: NtAppearancePreference,
|
|
114
|
+
): string | null {
|
|
115
|
+
const normalized = normalizeAppearancePreference(preference);
|
|
116
|
+
|
|
117
|
+
if (normalized === null) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return [
|
|
122
|
+
COOKIE_VERSION,
|
|
123
|
+
normalized.theme,
|
|
124
|
+
normalized.accent,
|
|
125
|
+
normalized.density,
|
|
126
|
+
encodeSystemPreference(normalized.reduceMotion),
|
|
127
|
+
encodeSystemPreference(normalized.highContrast),
|
|
128
|
+
].join('|');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Produces a browser cookie assignment / Set-Cookie value. Domain is optional
|
|
133
|
+
* so local development works; production may pass `.neetechs.com`.
|
|
134
|
+
*/
|
|
135
|
+
export function createAppearanceCookie(
|
|
136
|
+
preference: NtAppearancePreference,
|
|
137
|
+
options: NtAppearanceCookieOptions = {},
|
|
138
|
+
): string | null {
|
|
139
|
+
const value = serializeAppearanceCookieValue(preference);
|
|
140
|
+
|
|
141
|
+
if (value === null) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const parts = [
|
|
146
|
+
`${NT_THEME_COOKIE_NAME}=${encodeURIComponent(value)}`,
|
|
147
|
+
`Path=${options.path ?? '/'}`,
|
|
148
|
+
`SameSite=${options.sameSite ?? 'Lax'}`,
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
if (options.domain) {
|
|
152
|
+
parts.push(`Domain=${options.domain}`);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (options.secure) {
|
|
156
|
+
parts.push('Secure');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (Number.isFinite(options.maxAge)) {
|
|
160
|
+
parts.push(`Max-Age=${Math.max(0, Math.trunc(options.maxAge ?? 0))}`);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return parts.join('; ');
|
|
164
|
+
}
|
|
165
|
+
|
|
50
166
|
function decodeCookieValue(value: string): string {
|
|
51
167
|
try {
|
|
52
168
|
return decodeURIComponent(value);
|
package/src/appearance/index.ts
CHANGED
|
@@ -1,34 +1,76 @@
|
|
|
1
1
|
export type {
|
|
2
|
+
NtAccentPreference,
|
|
3
|
+
NtAppearancePreference,
|
|
4
|
+
NtContrastMode,
|
|
5
|
+
NtDensityPreference,
|
|
6
|
+
NtMotionMode,
|
|
7
|
+
NtResolvedAppearance,
|
|
8
|
+
NtResolvedAppearanceState,
|
|
9
|
+
NtResolvedTheme,
|
|
10
|
+
NtSystemPreference,
|
|
11
|
+
NtThemePreference,
|
|
2
12
|
ResolvedTheme,
|
|
3
13
|
ResolvedThemeState,
|
|
4
14
|
ThemePreference,
|
|
5
15
|
ThemeSource,
|
|
6
16
|
} from './types.js';
|
|
7
17
|
|
|
8
|
-
export {
|
|
18
|
+
export {
|
|
19
|
+
NT_DEFAULT_APPEARANCE_PREFERENCE,
|
|
20
|
+
appearanceFromTheme,
|
|
21
|
+
normalizeAccentPreference,
|
|
22
|
+
normalizeAppearancePreference,
|
|
23
|
+
normalizeDensityPreference,
|
|
24
|
+
normalizeSystemPreference,
|
|
25
|
+
normalizeThemePreference,
|
|
26
|
+
resolveTheme,
|
|
27
|
+
} from './preference.js';
|
|
9
28
|
|
|
10
|
-
export {
|
|
29
|
+
export {
|
|
30
|
+
NT_THEME_COOKIE_NAME,
|
|
31
|
+
createAppearanceCookie,
|
|
32
|
+
readAppearanceCookie,
|
|
33
|
+
readThemeCookie,
|
|
34
|
+
serializeAppearanceCookieValue,
|
|
35
|
+
} from './cookie.js';
|
|
36
|
+
export type { NtAppearanceCookieOptions } from './cookie.js';
|
|
11
37
|
|
|
12
38
|
export {
|
|
39
|
+
NT_APPEARANCE_CACHE_KEY,
|
|
13
40
|
NT_LEGACY_THEME_CACHE_KEYS,
|
|
14
41
|
NT_THEME_CACHE_KEY,
|
|
42
|
+
clearAppearanceCache,
|
|
15
43
|
clearThemeCache,
|
|
16
44
|
getDefaultThemeStorage,
|
|
17
45
|
migrateLegacyThemeCache,
|
|
46
|
+
readAppearanceCache,
|
|
18
47
|
readThemeCache,
|
|
48
|
+
writeAppearanceCache,
|
|
19
49
|
writeThemeCache,
|
|
20
50
|
} from './cache.js';
|
|
21
51
|
export type { MigrateLegacyThemeCacheOptions, ThemeStorage } from './cache.js';
|
|
22
52
|
|
|
23
53
|
export {
|
|
54
|
+
NT_ACCENT_ATTRIBUTE,
|
|
55
|
+
NT_APPEARANCE_MEDIA_QUERIES,
|
|
56
|
+
NT_CONTRAST_ATTRIBUTE,
|
|
57
|
+
NT_DENSITY_ATTRIBUTE,
|
|
58
|
+
NT_MOTION_ATTRIBUTE,
|
|
24
59
|
NT_THEME_ATTRIBUTE,
|
|
25
60
|
NT_THEME_DEFAULT_RESOLVED,
|
|
26
61
|
NT_THEME_PREFERENCE_ATTRIBUTE,
|
|
62
|
+
applyAppearanceToDocument,
|
|
27
63
|
applyThemeToDocument,
|
|
64
|
+
bootstrapNeetechsAppearance,
|
|
28
65
|
bootstrapNeetechsTheme,
|
|
66
|
+
createAppearanceController,
|
|
29
67
|
createThemeController,
|
|
30
68
|
} from './theme-controller.js';
|
|
31
69
|
export type {
|
|
70
|
+
AppearanceChangeListener,
|
|
71
|
+
AppearanceController,
|
|
72
|
+
AppearanceControllerOptions,
|
|
73
|
+
BootstrapAppearanceOptions,
|
|
32
74
|
BootstrapThemeOptions,
|
|
33
75
|
MatchMediaRef,
|
|
34
76
|
SetPreferenceOptions,
|