@zazz-ui/core 0.4.0 → 0.5.0
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/AUTHORING.md +158 -0
- package/CHANGELOG.md +341 -0
- package/README.md +55 -23
- package/dist/scroll-state-C8mA5gq6.js +1 -0
- package/dist/sri.json +124 -72
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +116794 -0
- package/editor/zazz.html-data.json +1683 -0
- package/editor/zazz.language-data.json +5001 -0
- package/editor/zazz.lint-data.json +152 -0
- package/package.json +12 -5
- package/src/base/_breakpoints.css +12 -0
- package/src/base/_layers.css +8 -9
- package/src/base/_properties-2xl.css +171 -0
- package/src/base/_properties-active.css +107 -0
- package/src/base/_properties-checked.css +107 -0
- package/src/base/_properties-current.css +107 -0
- package/src/base/_properties-disabled.css +107 -0
- package/src/base/_properties-focus-visible.css +107 -0
- package/src/base/_properties-focus-within.css +107 -0
- package/src/base/_properties-hover.css +107 -0
- package/src/base/_properties-lg.css +171 -0
- package/src/base/_properties-md.css +171 -0
- package/src/base/_properties-open.css +107 -0
- package/src/base/_properties-sm.css +171 -0
- package/src/base/_properties-starting.css +55 -0
- package/src/base/_properties-stuck.css +55 -0
- package/src/base/_properties-xl.css +171 -0
- package/src/base/_properties.css +555 -0
- package/src/base/_reset.css +67 -75
- package/src/base/_switches.css +145 -0
- package/src/base/_typography.css +437 -370
- package/src/base/_utilities-box.css +142 -0
- package/src/base/_utilities-color.css +290 -0
- package/src/base/_utilities-effects.css +235 -0
- package/src/base/_utilities-flow.css +312 -0
- package/src/base/_utilities-grid.css +143 -0
- package/src/base/_utilities-margin.css +376 -0
- package/src/base/_utilities-pseudo.css +426 -0
- package/src/base/_utilities-sizing.css +259 -0
- package/src/base/_utilities-spacing.css +190 -0
- package/src/base/_utilities-tier-2xl.css +93 -0
- package/src/base/_utilities-tier-active.css +61 -0
- package/src/base/_utilities-tier-checked.css +61 -0
- package/src/base/_utilities-tier-current.css +61 -0
- package/src/base/_utilities-tier-disabled.css +61 -0
- package/src/base/_utilities-tier-focus-visible.css +61 -0
- package/src/base/_utilities-tier-focus-within.css +61 -0
- package/src/base/_utilities-tier-hover.css +63 -0
- package/src/base/_utilities-tier-lg.css +93 -0
- package/src/base/_utilities-tier-md.css +93 -0
- package/src/base/_utilities-tier-open.css +61 -0
- package/src/base/_utilities-tier-sm.css +93 -0
- package/src/base/_utilities-tier-starting.css +35 -0
- package/src/base/_utilities-tier-stuck.css +114 -0
- package/src/base/_utilities-tier-xl.css +93 -0
- package/src/base/_utilities-typography.css +141 -0
- package/src/base/_variables.css +323 -372
- package/src/base/_view-transitions.css +10 -12
- package/src/base/command-score.d.ts.map +1 -1
- package/src/base/command-score.js +1 -2
- package/src/base/command-score.ts +1 -2
- package/src/base/dialog-lifecycle.js +1 -1
- package/src/base/dialog-lifecycle.ts +1 -1
- package/src/base/embla.d.ts +6 -7
- package/src/base/embla.d.ts.map +1 -1
- package/src/base/embla.js +89 -55
- package/src/base/embla.ts +89 -55
- package/src/base/hotkeys.d.ts +0 -5
- package/src/base/hotkeys.d.ts.map +1 -1
- package/src/base/hotkeys.ts +0 -5
- package/src/base/navigation.d.ts +12 -1
- package/src/base/navigation.d.ts.map +1 -1
- package/src/base/navigation.js +229 -86
- package/src/base/navigation.ts +224 -92
- package/src/base/reveal.js +14 -14
- package/src/base/reveal.ts +14 -14
- package/src/base/scroll-state.d.ts +21 -0
- package/src/base/scroll-state.d.ts.map +1 -0
- package/src/base/scroll-state.js +177 -0
- package/src/base/scroll-state.ts +188 -0
- package/src/base/signals.d.ts +1 -2
- package/src/base/signals.d.ts.map +1 -1
- package/src/base/signals.js +4 -6
- package/src/base/signals.ts +4 -6
- package/src/base/style-format.d.ts +33 -0
- package/src/base/style-format.d.ts.map +1 -0
- package/src/base/style-format.js +160 -0
- package/src/base/style-format.ts +180 -0
- package/src/base/typeahead.d.ts +19 -4
- package/src/base/typeahead.d.ts.map +1 -1
- package/src/base/typeahead.js +68 -21
- package/src/base/typeahead.ts +73 -23
- package/src/base/utilities.d.ts +188 -0
- package/src/base/utilities.d.ts.map +1 -0
- package/src/base/utilities.js +750 -0
- package/src/base/utilities.ts +865 -0
- package/src/base/utils.d.ts +3 -7
- package/src/base/utils.d.ts.map +1 -1
- package/src/base/utils.js +4 -8
- package/src/base/utils.ts +4 -8
- package/src/base/zazz-element.d.ts +14 -8
- package/src/base/zazz-element.d.ts.map +1 -1
- package/src/base/zazz-element.js +14 -8
- package/src/base/zazz-element.ts +15 -8
- package/src/globals.d.ts +1 -1
- package/src/head.d.ts +50 -4
- package/src/head.d.ts.map +1 -1
- package/src/head.js +119 -38
- package/src/head.ts +172 -41
- package/src/index.css +57 -14
- package/src/index.js +5 -0
- package/src/index.ts +6 -0
- package/src/manifest.d.ts +36 -5
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +150 -6
- package/src/manifest.ts +167 -9
- package/src/primitives/accordion/accordion.css +18 -17
- package/src/primitives/accordion/accordion.html +42 -9
- package/src/primitives/alert-dialog/alert-dialog.css +13 -13
- package/src/primitives/alert-dialog/alert-dialog.html +26 -12
- package/src/primitives/autocomplete/autocomplete-groups.html +64 -33
- package/src/primitives/autocomplete/autocomplete.css +45 -43
- package/src/primitives/autocomplete/autocomplete.d.ts +6 -5
- package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -1
- package/src/primitives/autocomplete/autocomplete.html +38 -26
- package/src/primitives/autocomplete/autocomplete.js +6 -5
- package/src/primitives/autocomplete/autocomplete.ts +6 -5
- package/src/primitives/avatar/avatar.html +110 -15
- package/src/primitives/badge/badge-icon.html +22 -8
- package/src/primitives/badge/badge.css +401 -128
- package/src/primitives/badge/badge.html +12 -6
- package/src/primitives/breadcrumbs/breadcrumbs.html +25 -5
- package/src/primitives/button/button-icon-only.html +17 -11
- package/src/primitives/button/button-icon.html +9 -3
- package/src/primitives/button/button.css +408 -164
- package/src/primitives/button/button.html +14 -7
- package/src/primitives/button-group/button-group-vertical.html +5 -5
- package/src/primitives/button-group/button-group.css +53 -25
- package/src/primitives/button-group/button-group.html +18 -12
- package/src/primitives/callout/callout.css +114 -0
- package/src/primitives/callout/callout.html +188 -0
- package/src/primitives/card/card-subgrid.html +249 -34
- package/src/primitives/card/card.css +125 -0
- package/src/primitives/card/card.html +141 -20
- package/src/primitives/carousel/carousel.css +30 -20
- package/src/primitives/carousel/carousel.d.ts +7 -10
- package/src/primitives/carousel/carousel.d.ts.map +1 -1
- package/src/primitives/carousel/carousel.html +420 -84
- package/src/primitives/carousel/carousel.js +1 -1
- package/src/primitives/carousel/carousel.ts +8 -11
- package/src/primitives/checkbox/checkbox-tasklist.html +6 -6
- package/src/primitives/checkbox/checkbox.css +98 -40
- package/src/primitives/checkbox/checkbox.d.ts.map +1 -1
- package/src/primitives/checkbox/checkbox.html +13 -8
- package/src/primitives/checkbox/checkbox.js +7 -9
- package/src/primitives/checkbox/checkbox.ts +7 -15
- package/src/primitives/combobox/combobox-multiselect.html +53 -33
- package/src/primitives/combobox/combobox.css +147 -126
- package/src/primitives/combobox/combobox.d.ts +12 -11
- package/src/primitives/combobox/combobox.d.ts.map +1 -1
- package/src/primitives/combobox/combobox.html +48 -28
- package/src/primitives/combobox/combobox.js +46 -51
- package/src/primitives/combobox/combobox.ts +48 -55
- package/src/primitives/command/command-actions.d.ts +2 -3
- package/src/primitives/command/command-actions.d.ts.map +1 -1
- package/src/primitives/command/command-actions.html +48 -33
- package/src/primitives/command/command-actions.js +12 -10
- package/src/primitives/command/command-actions.ts +12 -13
- package/src/primitives/command/command-dialog.html +49 -25
- package/src/primitives/command/command.css +52 -42
- package/src/primitives/command/command.d.ts +10 -7
- package/src/primitives/command/command.d.ts.map +1 -1
- package/src/primitives/command/command.html +95 -46
- package/src/primitives/command/command.js +30 -13
- package/src/primitives/command/command.ts +30 -12
- package/src/primitives/debug/audit-core.d.ts +64 -0
- package/src/primitives/debug/audit-core.d.ts.map +1 -0
- package/src/primitives/debug/audit-core.js +356 -0
- package/src/primitives/debug/audit-core.ts +535 -0
- package/src/primitives/debug/debug.d.ts +50 -0
- package/src/primitives/debug/debug.d.ts.map +1 -0
- package/src/primitives/debug/debug.js +168 -0
- package/src/primitives/debug/debug.ts +211 -0
- package/src/primitives/dialog/dialog-with-form.html +67 -45
- package/src/primitives/dialog/dialog.css +87 -61
- package/src/primitives/dialog/dialog.html +25 -17
- package/src/primitives/fields/fields.css +108 -134
- package/src/primitives/fields/fields.html +39 -0
- package/src/primitives/input/input-icon-leading.html +3 -3
- package/src/primitives/input/input-icon-trailing.html +3 -3
- package/src/primitives/input/input.css +87 -49
- package/src/primitives/input/input.html +15 -15
- package/src/primitives/input-group/input-group-password-group.html +15 -15
- package/src/primitives/input-group/input-group.css +118 -75
- package/src/primitives/input-group/input-group.html +42 -30
- package/src/primitives/kbd/kbd-group.html +15 -2
- package/src/primitives/kbd/kbd.css +44 -31
- package/src/primitives/kbd/kbd.html +7 -1
- package/src/primitives/layout/layout.css +159 -0
- package/src/primitives/layout/layout.html +35 -0
- package/src/primitives/lightbox/lightbox.css +178 -105
- package/src/primitives/lightbox/lightbox.d.ts.map +1 -1
- package/src/primitives/lightbox/lightbox.html +138 -166
- package/src/primitives/lightbox/lightbox.js +10 -13
- package/src/primitives/lightbox/lightbox.ts +12 -13
- package/src/primitives/menu/menu-interest.html +60 -18
- package/src/primitives/menu/menu.css +22 -17
- package/src/primitives/menu/menu.d.ts +5 -5
- package/src/primitives/menu/menu.html +195 -40
- package/src/primitives/menu/menu.js +8 -8
- package/src/primitives/menu/menu.ts +8 -8
- package/src/primitives/menubar/menubar-help-search.html +78 -32
- package/src/primitives/menubar/menubar.html +166 -38
- package/src/primitives/meter/meter.css +41 -38
- package/src/primitives/meter/meter.html +44 -9
- package/src/primitives/mobile-menu/mobile-menu.css +47 -40
- package/src/primitives/mobile-menu/mobile-menu.html +1460 -179
- package/src/primitives/navigation-menu/navigation-menu-featured.html +155 -33
- package/src/primitives/navigation-menu/navigation-menu-icon-grid.html +222 -47
- package/src/primitives/navigation-menu/navigation-menu-interest.html +130 -38
- package/src/primitives/navigation-menu/navigation-menu-megamenu.html +402 -72
- package/src/primitives/navigation-menu/navigation-menu-simple.html +90 -40
- package/src/primitives/navigation-menu/navigation-menu.css +104 -106
- package/src/primitives/navigation-menu/navigation-menu.html +554 -158
- package/src/primitives/otp/otp.css +43 -44
- package/src/primitives/otp/otp.d.ts +4 -5
- package/src/primitives/otp/otp.d.ts.map +1 -1
- package/src/primitives/otp/otp.html +7 -6
- package/src/primitives/otp/otp.js +13 -18
- package/src/primitives/otp/otp.ts +12 -19
- package/src/primitives/password-group/password-group.css +132 -107
- package/src/primitives/password-group/password-group.d.ts.map +1 -1
- package/src/primitives/password-group/password-group.html +23 -16
- package/src/primitives/password-group/password-group.js +11 -12
- package/src/primitives/password-group/password-group.ts +11 -12
- package/src/primitives/popover/popover.css +89 -95
- package/src/primitives/popover/popover.html +18 -0
- package/src/primitives/progress/progress-indeterminate.html +1 -1
- package/src/primitives/progress/progress.css +34 -35
- package/src/primitives/progress/progress.html +18 -4
- package/src/primitives/prose/prose.html +19 -12
- package/src/primitives/radio/radio.css +83 -46
- package/src/primitives/radio/radio.html +16 -11
- package/src/primitives/reveal/reveal.css +37 -46
- package/src/primitives/reveal/reveal.html +15 -0
- package/src/primitives/scroll-fade/scroll-fade.css +115 -0
- package/src/primitives/scroll-fade/scroll-fade.html +69 -0
- package/src/primitives/select/multiselect.d.ts +8 -10
- package/src/primitives/select/multiselect.d.ts.map +1 -1
- package/src/primitives/select/multiselect.js +23 -27
- package/src/primitives/select/multiselect.ts +23 -29
- package/src/primitives/select/select-align.html +79 -16
- package/src/primitives/select/select-multiple.html +8 -4
- package/src/primitives/select/select-sides.html +104 -21
- package/src/primitives/select/select.css +299 -191
- package/src/primitives/select/select.html +24 -5
- package/src/primitives/separator/separator.css +15 -18
- package/src/primitives/separator/separator.html +37 -10
- package/src/primitives/slider/slider.css +48 -38
- package/src/primitives/slider/slider.html +9 -1
- package/src/primitives/style-guard/style-guard.d.ts +19 -0
- package/src/primitives/style-guard/style-guard.d.ts.map +1 -0
- package/src/primitives/style-guard/style-guard.js +125 -0
- package/src/primitives/style-guard/style-guard.ts +153 -0
- package/src/primitives/switch/switch.css +42 -33
- package/src/primitives/switch/switch.html +11 -6
- package/src/primitives/table/table-alternating.html +1 -1
- package/src/primitives/table/table-grid.html +5 -5
- package/src/primitives/table/table-size-sm.html +1 -1
- package/src/primitives/table/table.css +64 -61
- package/src/primitives/table/table.html +7 -7
- package/src/primitives/tabs/tabs.css +167 -166
- package/src/primitives/tabs/tabs.d.ts +10 -11
- package/src/primitives/tabs/tabs.d.ts.map +1 -1
- package/src/primitives/tabs/tabs.html +192 -36
- package/src/primitives/tabs/tabs.js +14 -15
- package/src/primitives/tabs/tabs.ts +14 -15
- package/src/primitives/textarea/textarea.css +69 -44
- package/src/primitives/textarea/textarea.html +3 -3
- package/src/primitives/toaster/toaster.css +90 -92
- package/src/primitives/toaster/toaster.d.ts +0 -6
- package/src/primitives/toaster/toaster.d.ts.map +1 -1
- package/src/primitives/toaster/toaster.html +22 -18
- package/src/primitives/toaster/toaster.js +64 -72
- package/src/primitives/toaster/toaster.ts +71 -87
- package/src/primitives/toggle/toggle.css +368 -153
- package/src/primitives/toggle/toggle.html +27 -9
- package/src/primitives/toggle-group/toggle-group-multiple.html +3 -3
- package/src/primitives/toggle-group/toggle-group-vertical.html +4 -4
- package/src/primitives/toggle-group/toggle-group.css +71 -23
- package/src/primitives/toggle-group/toggle-group.html +3 -3
- package/src/primitives/toolbar/toolbar.html +35 -13
- package/src/primitives/tooltip/tooltip-disabled.html +3 -3
- package/src/primitives/tooltip/tooltip-sides.html +36 -14
- package/src/primitives/tooltip/tooltip-with-kbd.html +5 -5
- package/src/primitives/tooltip/tooltip.css +111 -80
- package/src/primitives/tooltip/tooltip.html +3 -3
- package/src/primitives/utilities/aspect-ratio.html +51 -7
- package/src/primitives/utilities/basis.html +64 -11
- package/src/primitives/utilities/col-span.html +65 -9
- package/src/primitives/utilities/compose.html +48 -10
- package/src/primitives/utilities/flex-align.html +89 -19
- package/src/primitives/utilities/flex-direction.html +111 -13
- package/src/primitives/utilities/flex-grow.html +41 -7
- package/src/primitives/utilities/gap.html +158 -19
- package/src/primitives/utilities/grid-cols.html +75 -7
- package/src/primitives/utilities/grid-responsive.html +111 -12
- package/src/primitives/utilities/margin-auto.html +38 -7
- package/src/primitives/utilities/object-fit.html +75 -13
- package/src/primitives/utilities/order.html +40 -4
- package/src/primitives/utilities/overflow.html +74 -20
- package/src/primitives/utilities/padding-compose.html +67 -10
- package/src/primitives/utilities/padding.html +84 -13
- package/src/primitives/utilities/pile.html +29 -0
- package/src/primitives/utilities/position.html +65 -8
- package/src/primitives/utilities/responsive-flex.html +54 -7
- package/src/primitives/utilities/responsive-grid.html +115 -12
- package/src/primitives/utilities/size.html +120 -16
- package/src/primitives/utilities/width.html +123 -16
- package/examples/about.html +0 -583
- package/examples/components.html +0 -1028
- package/examples/forms.html +0 -504
- package/examples/index.html +0 -261
- package/examples/layout.html +0 -313
- package/examples/products.html +0 -839
- package/examples/responsive.html +0 -332
- package/src/base/_layout.css +0 -571
- package/src/base/_utilities.css +0 -6758
- package/src/primitives/utilities/grid-pile.html +0 -5
package/src/head.ts
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* @description The single owner of everything a Zazz page loads before its own
|
|
6
6
|
* content: meta tags, the Geist fonts block, the one `index.css` stylesheet
|
|
7
7
|
* link, the feature polyfill, the third-party **import map**, the `index.js`
|
|
8
|
-
* module tag, and the theme-persistence script. The docs preview iframe
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* copy to drift.
|
|
8
|
+
* module tag, and the theme-persistence script. The docs preview iframe and the
|
|
9
|
+
* docs page that teaches head structure both render from this module: there is
|
|
10
|
+
* no other copy to drift.
|
|
12
11
|
*
|
|
13
12
|
* This is a Node/server-side string builder (used at build/render time), not a
|
|
14
13
|
* browser runtime module; it attaches nothing to `window`.
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
* const head = buildHead({ base: "./zazz" });
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
|
-
import { PRIMITIVES, resolveClosure } from "./manifest.ts";
|
|
26
|
+
import { BASE_CSS_POST, BASE_CSS_PRE, PRIMITIVES, resolveClosure } from "./manifest.ts";
|
|
28
27
|
|
|
29
28
|
// --- Third-party dependency manifest ---
|
|
30
29
|
|
|
@@ -52,24 +51,16 @@ const PACKAGE_NAME = "@zazz-ui/core";
|
|
|
52
51
|
/**
|
|
53
52
|
* Exact-version pin required in every kit CDN URL. SRI hashes are per-byte,
|
|
54
53
|
* so floating specs (`latest`, `0.3`) would break integrity on each release —
|
|
55
|
-
* and unpinned URLs defeat jsDelivr's permanent caching
|
|
54
|
+
* and unpinned URLs defeat jsDelivr's permanent caching.
|
|
56
55
|
*/
|
|
57
56
|
const EXACT_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
58
57
|
|
|
59
58
|
/**
|
|
60
59
|
* Base stylesheets in the exact order `src/index.css` loads them around the
|
|
61
60
|
* primitive imports: `PRE` before (layer declaration first), `POST` after
|
|
62
|
-
* (
|
|
61
|
+
* (the generated utilities stay the final normal override layer). The granular
|
|
63
62
|
* CDN head mirrors this split; `head.test.ts` guards it against `index.css`.
|
|
64
63
|
*/
|
|
65
|
-
const BASE_CSS_PRE = [
|
|
66
|
-
"base/_layers.css",
|
|
67
|
-
"base/_variables.css",
|
|
68
|
-
"base/_reset.css",
|
|
69
|
-
"base/_typography.css",
|
|
70
|
-
"base/_view-transitions.css",
|
|
71
|
-
];
|
|
72
|
-
const BASE_CSS_POST = ["base/_utilities.css", "base/_layout.css"];
|
|
73
64
|
|
|
74
65
|
/**
|
|
75
66
|
* Core runtime modules reached by relative import from primitive scripts
|
|
@@ -82,6 +73,8 @@ const CORE_RUNTIME_JS = [
|
|
|
82
73
|
"base/utils.js",
|
|
83
74
|
"base/signals.js",
|
|
84
75
|
"base/zazz-element.js",
|
|
76
|
+
// dynamically imported by index.js where container scroll-state queries are unsupported
|
|
77
|
+
"base/scroll-state.js",
|
|
85
78
|
];
|
|
86
79
|
|
|
87
80
|
/**
|
|
@@ -139,10 +132,9 @@ const ESM_DEPENDENCIES: readonly CdnDependency[] = [
|
|
|
139
132
|
* **Interest Invokers** (`interestfor`), which drives tooltip triggers and the
|
|
140
133
|
* optional hover/focus open on menu, menubar, and navigation-menu. Chromium
|
|
141
134
|
* 142+ ships it; Firefox and Safari do not, so this is the kit's one API below
|
|
142
|
-
* the browser-support floor that a polyfill can cover
|
|
135
|
+
* the browser-support floor that a polyfill can cover.
|
|
143
136
|
*
|
|
144
|
-
*
|
|
145
|
-
* window): the **Popover API** (Chrome 114, Firefox 125, Safari 17, iOS 18.3)
|
|
137
|
+
* Not polyfilled (native across the support window): the **Popover API** (Chrome 114, Firefox 125, Safari 17, iOS 18.3)
|
|
146
138
|
* and **Invoker Commands** `command`/`commandfor` (Chrome 135, Firefox 144,
|
|
147
139
|
* Safari 26.2). CSS anchor positioning is below the floor but has no polyfill
|
|
148
140
|
* here — the components gate it behind `@supports` instead.
|
|
@@ -212,7 +204,7 @@ function polyfillsBlock(): string {
|
|
|
212
204
|
|
|
213
205
|
/**
|
|
214
206
|
* The theme-persistence script. Runs inline (no `defer`) while the parser is
|
|
215
|
-
* still in `<head>`, so
|
|
207
|
+
* still in `<head>`, so `data-ui-theme` lands on `<html>` before first paint. The
|
|
216
208
|
* try/catch covers contexts where storage access throws (sandboxed iframes,
|
|
217
209
|
* blocked site data).
|
|
218
210
|
*/
|
|
@@ -220,22 +212,21 @@ const THEME_SCRIPT = `<!-- Theme: apply the persisted (or preferred) scheme befo
|
|
|
220
212
|
<script>
|
|
221
213
|
(() => {
|
|
222
214
|
try {
|
|
215
|
+
// A stored choice pins the scheme with data-ui-theme; with no
|
|
216
|
+
// choice the attribute stays off and the page follows the system scheme.
|
|
223
217
|
const storedTheme = localStorage.getItem("theme");
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
218
|
+
if (storedTheme === "dark" || storedTheme === "light") {
|
|
219
|
+
document.documentElement.setAttribute("data-ui-theme", storedTheme);
|
|
220
|
+
}
|
|
227
221
|
} catch {
|
|
228
|
-
|
|
229
|
-
"dark",
|
|
230
|
-
matchMedia("(prefers-color-scheme: dark)").matches,
|
|
231
|
-
);
|
|
222
|
+
/* no storage access: follow the system scheme */
|
|
232
223
|
}
|
|
233
224
|
})();
|
|
234
225
|
</script>`;
|
|
235
226
|
|
|
236
227
|
// --- Public API ---
|
|
237
228
|
|
|
238
|
-
/** CDN mode for `buildHead` — kit files served from jsDelivr
|
|
229
|
+
/** CDN mode for `buildHead` — kit files served from jsDelivr. */
|
|
239
230
|
export interface CdnHeadOptions {
|
|
240
231
|
/** Exact published `@zazz-ui/core` version (`"0.1.0"`; never a dist-tag). */
|
|
241
232
|
version: string;
|
|
@@ -277,6 +268,13 @@ export interface HeadOptions {
|
|
|
277
268
|
fontDisplay?: "swap" | "optional" | false;
|
|
278
269
|
/** Include the inline theme-persistence script (last in head). Default `true`. */
|
|
279
270
|
theme?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Local granular grain: the primitives this page uses, loaded file by file
|
|
273
|
+
* from `base` (base layers, the closure's stylesheets in cascade order, one
|
|
274
|
+
* module tag per closure script) instead of `index.css` / `index.js`. For CDN
|
|
275
|
+
* mode, set `cdn.primitives`.
|
|
276
|
+
*/
|
|
277
|
+
primitives?: string[];
|
|
280
278
|
}
|
|
281
279
|
|
|
282
280
|
/**
|
|
@@ -306,6 +304,15 @@ export function buildHead(options: HeadOptions = {}): string {
|
|
|
306
304
|
|
|
307
305
|
if (cdn) {
|
|
308
306
|
parts.push(...cdnBlocks(cdn, scripts));
|
|
307
|
+
} else if (options.primitives) {
|
|
308
|
+
parts.push(
|
|
309
|
+
...granularBlocks(
|
|
310
|
+
options.primitives,
|
|
311
|
+
(path) => `${base}/${path}`,
|
|
312
|
+
() => "",
|
|
313
|
+
scripts,
|
|
314
|
+
),
|
|
315
|
+
);
|
|
309
316
|
} else {
|
|
310
317
|
parts.push(
|
|
311
318
|
`<!-- Zazz styles: one bundle (index.css @imports every layer in cascade order) -->`,
|
|
@@ -376,6 +383,44 @@ function cdnBlocks(cdn: CdnHeadOptions, scripts: boolean): string[] {
|
|
|
376
383
|
return parts;
|
|
377
384
|
}
|
|
378
385
|
|
|
386
|
+
// Transitively imported core modules never get a tag, so their integrity
|
|
387
|
+
// rides in the import map's integrity section instead.
|
|
388
|
+
const transitive: Record<string, string> = {};
|
|
389
|
+
if (sri) {
|
|
390
|
+
for (const path of CORE_RUNTIME_JS) {
|
|
391
|
+
const hash = sri[`src/${path}`];
|
|
392
|
+
if (hash) transitive[url(`src/${path}`)] = hash;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
return granularBlocks(
|
|
396
|
+
primitives,
|
|
397
|
+
(path) => url(`src/${path}`),
|
|
398
|
+
(path) => attrs(`src/${path}`),
|
|
399
|
+
scripts,
|
|
400
|
+
transitive,
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* @description The granular grain, local or CDN: base layers in cascade order,
|
|
406
|
+
* the dependency closure's stylesheets, and one module tag per closure script.
|
|
407
|
+
*
|
|
408
|
+
* @param primitives - The primitives the page uses (their closure loads).
|
|
409
|
+
* @param url - A `src/`-relative kit path → its URL.
|
|
410
|
+
* @param attrs - A `src/`-relative kit path → extra tag attributes (SRI).
|
|
411
|
+
* @param scripts - Whether behavior loads at all.
|
|
412
|
+
* @param transitive - Import-map integrity for modules that get no tag.
|
|
413
|
+
* @returns The head fragments between the fonts block and the theme script.
|
|
414
|
+
* @private
|
|
415
|
+
*/
|
|
416
|
+
function granularBlocks(
|
|
417
|
+
primitives: string[],
|
|
418
|
+
url: (path: string) => string,
|
|
419
|
+
attrs: (path: string) => string,
|
|
420
|
+
scripts: boolean,
|
|
421
|
+
transitive: Record<string, string> = {},
|
|
422
|
+
): string[] {
|
|
423
|
+
const parts: string[] = [];
|
|
379
424
|
const closure = resolveClosure(primitives);
|
|
380
425
|
|
|
381
426
|
const css = [
|
|
@@ -385,9 +430,7 @@ function cdnBlocks(cdn: CdnHeadOptions, scripts: boolean): string[] {
|
|
|
385
430
|
];
|
|
386
431
|
parts.push(
|
|
387
432
|
`<!-- Zazz styles: base layers, then ${closure.join(", ")} in cascade order -->`,
|
|
388
|
-
...css.map(
|
|
389
|
-
(path) => `<link rel="stylesheet" href="${url(`src/${path}`)}"${attrs(`src/${path}`)}>`,
|
|
390
|
-
),
|
|
433
|
+
...css.map((path) => `<link rel="stylesheet" href="${url(path)}"${attrs(path)}>`),
|
|
391
434
|
);
|
|
392
435
|
|
|
393
436
|
if (scripts) {
|
|
@@ -405,22 +448,12 @@ function cdnBlocks(cdn: CdnHeadOptions, scripts: boolean): string[] {
|
|
|
405
448
|
}),
|
|
406
449
|
]),
|
|
407
450
|
];
|
|
408
|
-
// Transitively imported core modules never get a tag, so their integrity
|
|
409
|
-
// rides in the import map's integrity section instead.
|
|
410
|
-
const transitive: Record<string, string> = {};
|
|
411
|
-
if (sri) {
|
|
412
|
-
for (const path of CORE_RUNTIME_JS) {
|
|
413
|
-
const hash = sri[`src/${path}`];
|
|
414
|
-
if (hash) transitive[url(`src/${path}`)] = hash;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
451
|
parts.push(
|
|
418
452
|
importMapBlock(transitive),
|
|
419
453
|
polyfillsBlock(),
|
|
420
454
|
`<!-- Zazz behavior: side-effect modules by tag; the rest via module imports -->`,
|
|
421
455
|
...scriptFiles.map(
|
|
422
|
-
(path) =>
|
|
423
|
-
`<script type="module" src="${url(`src/${path}`)}"${attrs(`src/${path}`)}></script>`,
|
|
456
|
+
(path) => `<script type="module" src="${url(path)}"${attrs(path)}></script>`,
|
|
424
457
|
),
|
|
425
458
|
);
|
|
426
459
|
}
|
|
@@ -430,3 +463,101 @@ function cdnBlocks(cdn: CdnHeadOptions, scripts: boolean): string[] {
|
|
|
430
463
|
|
|
431
464
|
export { ESM_DEPENDENCIES, POLYFILLS, cdnUrl };
|
|
432
465
|
export type { CdnDependency };
|
|
466
|
+
|
|
467
|
+
// --- Head blocks in pages ---
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* A page's generated head: the markup between `<!-- zazz:head … -->` and
|
|
471
|
+
* `<!-- /zazz:head -->`. The opening marker may carry the `buildHead` options
|
|
472
|
+
* as JSON (`<!-- zazz:head {"base":"./zazz","primitives":["dialog"]} -->`), so
|
|
473
|
+
* tools can re-render it with another primitive; a bare marker means the
|
|
474
|
+
* default head (the whole kit).
|
|
475
|
+
*/
|
|
476
|
+
export interface HeadBlock {
|
|
477
|
+
/** Offset of the opening marker. */
|
|
478
|
+
markerStart: number;
|
|
479
|
+
/** Offset just past the opening marker. */
|
|
480
|
+
start: number;
|
|
481
|
+
/** Offset of the closing marker. */
|
|
482
|
+
end: number;
|
|
483
|
+
options: HeadOptions;
|
|
484
|
+
/** The opening marker's indentation. */
|
|
485
|
+
indent: string;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const HEAD_START = /<!--\s*zazz:head(\s+\{[\s\S]*?\})?\s*-->/;
|
|
489
|
+
const HEAD_END = "<!-- /zazz:head -->";
|
|
490
|
+
|
|
491
|
+
/** The opening marker recording `options` (bare when there are none). */
|
|
492
|
+
export function headMarker(options: HeadOptions = {}): string {
|
|
493
|
+
return Object.keys(options).length
|
|
494
|
+
? `<!-- zazz:head ${JSON.stringify(options)} -->`
|
|
495
|
+
: "<!-- zazz:head -->";
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/** The page's head block, or `undefined` without both markers (or with unreadable options). */
|
|
499
|
+
export function findHeadBlock(html: string): HeadBlock | undefined {
|
|
500
|
+
const open = HEAD_START.exec(html);
|
|
501
|
+
if (!open) return undefined;
|
|
502
|
+
const start = open.index + open[0].length;
|
|
503
|
+
const end = html.indexOf(HEAD_END, start);
|
|
504
|
+
if (end === -1) return undefined;
|
|
505
|
+
let options: HeadOptions = {};
|
|
506
|
+
if (open[1]) {
|
|
507
|
+
try {
|
|
508
|
+
options = JSON.parse(open[1]) as HeadOptions;
|
|
509
|
+
} catch {
|
|
510
|
+
return undefined;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
const indent = /(?:^|\n)([ \t]*)$/.exec(html.slice(0, open.index))?.[1] ?? "";
|
|
514
|
+
return { markerStart: open.index, start, end, options, indent };
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Formatting-insensitive comparison: oxfmt rewraps attributes and self-closes
|
|
519
|
+
* void elements, and those differences don't make a head block out of date.
|
|
520
|
+
*/
|
|
521
|
+
function normalizeHead(html: string): string {
|
|
522
|
+
return html
|
|
523
|
+
.replace(/\s+/g, " ")
|
|
524
|
+
.replace(/\s*\/>/g, ">")
|
|
525
|
+
.replace(/\s+>/g, ">")
|
|
526
|
+
.trim();
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @description The edit that renders `head` between the page's markers,
|
|
531
|
+
* indented like the opening marker (and, with `options`, rewrites the marker to
|
|
532
|
+
* record them). `undefined` when the page has no head block or the block is
|
|
533
|
+
* already current, modulo formatting.
|
|
534
|
+
*
|
|
535
|
+
* @param html - The page.
|
|
536
|
+
* @param head - The head markup (`buildHead` output).
|
|
537
|
+
* @param options - Options to record in the opening marker (default: keep it).
|
|
538
|
+
* @returns The replaced range and its new text.
|
|
539
|
+
*/
|
|
540
|
+
export function headBlockEdit(
|
|
541
|
+
html: string,
|
|
542
|
+
head: string,
|
|
543
|
+
options?: HeadOptions,
|
|
544
|
+
): { start: number; end: number; text: string } | undefined {
|
|
545
|
+
const block = findHeadBlock(html);
|
|
546
|
+
if (!block) return undefined;
|
|
547
|
+
const marker = options ? headMarker(options) : html.slice(block.markerStart, block.start);
|
|
548
|
+
const sameMarker = marker === html.slice(block.markerStart, block.start);
|
|
549
|
+
if (sameMarker && normalizeHead(html.slice(block.start, block.end)) === normalizeHead(head)) {
|
|
550
|
+
return undefined;
|
|
551
|
+
}
|
|
552
|
+
const body = head
|
|
553
|
+
.split("\n")
|
|
554
|
+
.map((line) => (line ? block.indent + line : line))
|
|
555
|
+
.join("\n");
|
|
556
|
+
return { start: block.markerStart, end: block.end, text: `${marker}\n${body}\n${block.indent}` };
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/** `html` with its head block rendered from `head` (unchanged when current or absent). */
|
|
560
|
+
export function replaceHeadBlock(html: string, head: string, options?: HeadOptions): string {
|
|
561
|
+
const edit = headBlockEdit(html, head, options);
|
|
562
|
+
return edit ? html.slice(0, edit.start) + edit.text + html.slice(edit.end) : html;
|
|
563
|
+
}
|
package/src/index.css
CHANGED
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Bundles the base layers (layers → variables → reset) followed by every
|
|
5
5
|
* component, so a page only needs a single stylesheet link. Order matters:
|
|
6
|
-
*
|
|
6
|
+
* _layers.css declares the cascade layers and must load first.
|
|
7
7
|
*
|
|
8
8
|
* Legacy support: import your legacy stylesheets into the legacy layer at the slot
|
|
9
|
-
* below (between the reset baseline and the components).
|
|
10
|
-
*
|
|
11
|
-
* same order instead of using this bundle — see CONVENTIONS.md.
|
|
9
|
+
* below (between the reset baseline and the components). To compose the layers
|
|
10
|
+
* by hand, import the base files individually in the same order.
|
|
12
11
|
*
|
|
13
12
|
* @layer none
|
|
14
|
-
* @see CONVENTIONS.md — file anatomy & layer architecture
|
|
13
|
+
* @see CONVENTIONS.styles.md — file anatomy & layer architecture
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
|
-
/* base
|
|
16
|
+
/* base */
|
|
18
17
|
@import "./base/_layers.css";
|
|
19
18
|
@import "./base/_variables.css";
|
|
19
|
+
@import "./base/_breakpoints.css";
|
|
20
20
|
@import "./base/_reset.css";
|
|
21
21
|
@import "./base/_typography.css";
|
|
22
22
|
@import "./base/_view-transitions.css";
|
|
@@ -25,16 +25,19 @@
|
|
|
25
25
|
/* @import "./some-library.css" layer(vendors); */
|
|
26
26
|
|
|
27
27
|
/* Legacy layer — import whole legacy stylesheets into legacy.imports.
|
|
28
|
-
Never bare layer(legacy)
|
|
29
|
-
shims in legacy.migrations. */
|
|
28
|
+
Never bare layer(legacy); see _layers.css. */
|
|
30
29
|
/* @import "./your-legacy.css" layer(legacy.imports); */
|
|
31
30
|
|
|
32
|
-
/*
|
|
31
|
+
/* Primitives */
|
|
32
|
+
@import "./primitives/layout/layout.css";
|
|
33
|
+
@import "./primitives/scroll-fade/scroll-fade.css";
|
|
33
34
|
@import "./primitives/separator/separator.css";
|
|
34
35
|
/* fields.css owns the shared --ui-field-* family; it registers before its
|
|
35
36
|
consumers (badge, button, toggle, tabs, checkbox, radio, inputs, …) */
|
|
36
37
|
@import "./primitives/fields/fields.css";
|
|
37
38
|
@import "./primitives/badge/badge.css";
|
|
39
|
+
@import "./primitives/card/card.css";
|
|
40
|
+
@import "./primitives/callout/callout.css";
|
|
38
41
|
@import "./primitives/kbd/kbd.css";
|
|
39
42
|
@import "./primitives/button/button.css";
|
|
40
43
|
@import "./primitives/button-group/button-group.css";
|
|
@@ -70,10 +73,50 @@
|
|
|
70
73
|
@import "./primitives/toaster/toaster.css";
|
|
71
74
|
@import "./primitives/reveal/reveal.css";
|
|
72
75
|
|
|
73
|
-
/*
|
|
74
|
-
|
|
75
|
-
@import "./base/
|
|
76
|
+
/* Generated utilities (scripts/generate-utilities.ts) and switches: the last
|
|
77
|
+
normal Zazz layer. */
|
|
78
|
+
@import "./base/_properties.css";
|
|
79
|
+
@import "./base/_properties-sm.css";
|
|
80
|
+
@import "./base/_properties-md.css";
|
|
81
|
+
@import "./base/_properties-lg.css";
|
|
82
|
+
@import "./base/_properties-xl.css";
|
|
83
|
+
@import "./base/_properties-2xl.css";
|
|
84
|
+
@import "./base/_properties-disabled.css";
|
|
85
|
+
@import "./base/_properties-active.css";
|
|
86
|
+
@import "./base/_properties-focus-visible.css";
|
|
87
|
+
@import "./base/_properties-focus-within.css";
|
|
88
|
+
@import "./base/_properties-hover.css";
|
|
89
|
+
@import "./base/_properties-checked.css";
|
|
90
|
+
@import "./base/_properties-current.css";
|
|
91
|
+
@import "./base/_properties-open.css";
|
|
92
|
+
@import "./base/_properties-stuck.css";
|
|
93
|
+
@import "./base/_properties-starting.css";
|
|
94
|
+
@import "./base/_utilities-tier-sm.css";
|
|
95
|
+
@import "./base/_utilities-tier-md.css";
|
|
96
|
+
@import "./base/_utilities-tier-lg.css";
|
|
97
|
+
@import "./base/_utilities-tier-xl.css";
|
|
98
|
+
@import "./base/_utilities-tier-2xl.css";
|
|
99
|
+
@import "./base/_utilities-tier-disabled.css";
|
|
100
|
+
@import "./base/_utilities-tier-active.css";
|
|
101
|
+
@import "./base/_utilities-tier-focus-visible.css";
|
|
102
|
+
@import "./base/_utilities-tier-focus-within.css";
|
|
103
|
+
@import "./base/_utilities-tier-hover.css";
|
|
104
|
+
@import "./base/_utilities-tier-checked.css";
|
|
105
|
+
@import "./base/_utilities-tier-current.css";
|
|
106
|
+
@import "./base/_utilities-tier-open.css";
|
|
107
|
+
@import "./base/_utilities-tier-stuck.css";
|
|
108
|
+
@import "./base/_utilities-tier-starting.css";
|
|
109
|
+
@import "./base/_utilities-flow.css";
|
|
110
|
+
@import "./base/_utilities-grid.css";
|
|
111
|
+
@import "./base/_utilities-spacing.css";
|
|
112
|
+
@import "./base/_utilities-margin.css";
|
|
113
|
+
@import "./base/_utilities-sizing.css";
|
|
114
|
+
@import "./base/_utilities-typography.css";
|
|
115
|
+
@import "./base/_utilities-color.css";
|
|
116
|
+
@import "./base/_utilities-effects.css";
|
|
117
|
+
@import "./base/_utilities-box.css";
|
|
118
|
+
@import "./base/_utilities-pseudo.css";
|
|
119
|
+
@import "./base/_switches.css";
|
|
76
120
|
|
|
77
|
-
/* Migration shims
|
|
78
|
-
Beats all other legacy sublayers; Zazz still wins on migrated markup. */
|
|
121
|
+
/* Migration shims: beat all other legacy sublayers; Zazz still wins. */
|
|
79
122
|
/* @import "./migrations.css" layer(legacy.migrations); */
|
package/src/index.js
CHANGED
|
@@ -33,3 +33,8 @@ import "./primitives/select/multiselect.js";
|
|
|
33
33
|
import "./primitives/tabs/tabs.js";
|
|
34
34
|
import "./primitives/toaster/toaster.js";
|
|
35
35
|
import "./base/navigation.js";
|
|
36
|
+
// The experimental `stuck` utility state reads container scroll-state queries;
|
|
37
|
+
// where they are unsupported (Safari, Firefox), load the polyfill. Chromium never fetches it.
|
|
38
|
+
if (typeof CSS !== "undefined" && !CSS.supports("container-type", "scroll-state")) {
|
|
39
|
+
void import("./base/scroll-state.js");
|
|
40
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -34,3 +34,9 @@ import "./primitives/select/multiselect.ts";
|
|
|
34
34
|
import "./primitives/tabs/tabs.ts";
|
|
35
35
|
import "./primitives/toaster/toaster.ts";
|
|
36
36
|
import "./base/navigation.ts";
|
|
37
|
+
|
|
38
|
+
// The experimental `stuck` utility state reads container scroll-state queries;
|
|
39
|
+
// where they are unsupported (Safari, Firefox), load the polyfill. Chromium never fetches it.
|
|
40
|
+
if (typeof CSS !== "undefined" && !CSS.supports("container-type", "scroll-state")) {
|
|
41
|
+
void import("./base/scroll-state.ts");
|
|
42
|
+
}
|
package/src/manifest.d.ts
CHANGED
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
/**
|
|
20
20
|
* Compatibility version of this manifest's shape. Consumers (the CLI) declare
|
|
21
21
|
* the range they understand and fail gracefully on a newer value. Bumping it
|
|
22
|
-
* is by definition a breaking kit change
|
|
22
|
+
* is by definition a breaking kit change.
|
|
23
23
|
*/
|
|
24
|
-
export declare const MANIFEST_VERSION =
|
|
24
|
+
export declare const MANIFEST_VERSION = 2;
|
|
25
25
|
/** One primitive's distribution facts. All paths are `src/`-relative. */
|
|
26
26
|
export interface PrimitiveEntry {
|
|
27
27
|
/** Stylesheets owned by the primitive (usually one; empty = markup-only). */
|
|
@@ -30,9 +30,8 @@ export interface PrimitiveEntry {
|
|
|
30
30
|
js: string[];
|
|
31
31
|
/**
|
|
32
32
|
* Non-core `base/` scripts its behavior needs, in load order. The core
|
|
33
|
-
* runtime (`
|
|
34
|
-
*
|
|
35
|
-
* never listed here.
|
|
33
|
+
* runtime (`CORE_RUNTIME`) is assumed present (vendored by `init`, bundled
|
|
34
|
+
* in `dist/zazz.js`) and is never listed here.
|
|
36
35
|
*/
|
|
37
36
|
base: string[];
|
|
38
37
|
/** Other primitives whose css/markup contract this primitive requires. */
|
|
@@ -46,6 +45,8 @@ export interface PrimitiveEntry {
|
|
|
46
45
|
bare: string[];
|
|
47
46
|
/** Example fragments (`--examples`, docs previews). */
|
|
48
47
|
examples: string[];
|
|
48
|
+
/** Tag forms the primitive is styled or registered under (`ui-tabs`); absent = attribute form only. */
|
|
49
|
+
tags?: string[];
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
52
|
* Every primitive in the kit, keyed by directory name under `src/primitives/`.
|
|
@@ -61,6 +62,36 @@ export declare const PRIMITIVES: Record<string, PrimitiveEntry>;
|
|
|
61
62
|
* the kit was designed and tested. Markup-only primitives (no css) do not
|
|
62
63
|
* appear. `manifest.test.ts` asserts this list matches `index.css` exactly.
|
|
63
64
|
*/
|
|
65
|
+
/**
|
|
66
|
+
* Base stylesheets that load before the primitives, in `index.css` order.
|
|
67
|
+
* `_layers.css` declares the cascade layers and must stay first.
|
|
68
|
+
*/
|
|
69
|
+
export declare const BASE_CSS_PRE: string[];
|
|
70
|
+
/** Base stylesheets that load after the primitives: the final override layer. */
|
|
71
|
+
export declare const BASE_CSS_POST: string[];
|
|
72
|
+
/**
|
|
73
|
+
* Core runtime scripts, in load order: always present (the CLI's `init`
|
|
74
|
+
* vendors and imports them, `dist/zazz.js` bundles them), so no primitive
|
|
75
|
+
* lists them in `base`. `navigation` is inert until a page opts in with
|
|
76
|
+
* `<html data-ui-navigation="swap">` (ADR-0014), so it loads everywhere, as
|
|
77
|
+
* in `index.ts`.
|
|
78
|
+
*/
|
|
79
|
+
export declare const CORE_RUNTIME: string[];
|
|
80
|
+
/** A runtime polyfill, loaded only where a CSS feature is unsupported. */
|
|
81
|
+
export interface RuntimePolyfill {
|
|
82
|
+
/** The script, `src/`-relative. */
|
|
83
|
+
file: string;
|
|
84
|
+
/** The `CSS.supports(property, value)` test; the file loads when it is false. */
|
|
85
|
+
supports: [property: string, value: string];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Polyfills `index.ts` imports dynamically behind a `CSS.supports` test, so a
|
|
89
|
+
* browser with the feature never fetches them. Vendored with the core runtime;
|
|
90
|
+
* an entry script loads each one the way `index.ts` does.
|
|
91
|
+
*/
|
|
92
|
+
export declare const CORE_POLYFILLS: RuntimePolyfill[];
|
|
93
|
+
/** Every tag form in the kit; the generator excludes them from no-base emissions. */
|
|
94
|
+
export declare const TAG_FORMS: string[];
|
|
64
95
|
export declare const CSS_CASCADE_ORDER: string[];
|
|
65
96
|
/**
|
|
66
97
|
* @description Resolves a set of primitive names to its full dependency
|
package/src/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAIlC,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,qDAAqD;IACrD,EAAE,EAAE,MAAM,EAAE,CAAC;IACb
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAIlC,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,qDAAqD;IACrD,EAAE,EAAE,MAAM,EAAE,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0EAA0E;IAC1E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uGAAuG;IACvG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAgBD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA8erD,CAAC;AAIF;;;;;;GAMG;AACH;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,EAOhC,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,aAAa,EAAE,MAAM,EA2CjC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,EAMhC,CAAC;AAEF,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,EAE3C,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,SAAS,EAAE,MAAM,EAErB,CAAC;AAEV,eAAO,MAAM,iBAAiB,EAAE,MAAM,EA0CrC,CAAC;AAIF;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAoBxD;AAID,MAAM,MAAM,aAAa,GACrB,cAAc,GACd,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,aAAa,GACb,KAAK,GACL,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC,CAmC/E,CAAC"}
|