@xtyle/core 0.6.0 → 0.7.1
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 +43 -10
- package/dist/algorithms/factory.d.ts +37 -1
- package/dist/algorithms/factory.d.ts.map +1 -1
- package/dist/algorithms/factory.js +407 -60
- package/dist/algorithms/factory.js.map +1 -1
- package/dist/audit.d.ts +36 -0
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js +22 -0
- package/dist/audit.js.map +1 -1
- package/dist/authoring.d.ts +10 -1
- package/dist/authoring.d.ts.map +1 -1
- package/dist/authoring.js +6 -1
- package/dist/authoring.js.map +1 -1
- package/dist/baked.d.ts +14 -1
- package/dist/baked.d.ts.map +1 -1
- package/dist/baked.js +17 -0
- package/dist/baked.js.map +1 -1
- package/dist/batteries.js +11 -2
- package/dist/cli.js +58 -19
- package/dist/cli.js.map +1 -1
- package/dist/color.d.ts +6 -0
- package/dist/color.d.ts.map +1 -1
- package/dist/color.js +20 -0
- package/dist/color.js.map +1 -1
- package/dist/css/components/app-shell.d.ts.map +1 -1
- package/dist/css/components/app-shell.js +10 -0
- package/dist/css/components/app-shell.js.map +1 -1
- package/dist/css/components/avatar.d.ts.map +1 -1
- package/dist/css/components/avatar.js +8 -19
- package/dist/css/components/avatar.js.map +1 -1
- package/dist/css/components/badge.d.ts.map +1 -1
- package/dist/css/components/badge.js +3 -87
- package/dist/css/components/badge.js.map +1 -1
- package/dist/css/components/bottom-nav.d.ts +2 -0
- package/dist/css/components/bottom-nav.d.ts.map +1 -0
- package/dist/css/components/bottom-nav.js +72 -0
- package/dist/css/components/bottom-nav.js.map +1 -0
- package/dist/css/components/carousel.d.ts.map +1 -1
- package/dist/css/components/carousel.js +144 -1
- package/dist/css/components/carousel.js.map +1 -1
- package/dist/css/components/dialog.d.ts.map +1 -1
- package/dist/css/components/dialog.js +10 -4
- package/dist/css/components/dialog.js.map +1 -1
- package/dist/css/components/dot.d.ts +2 -0
- package/dist/css/components/dot.d.ts.map +1 -0
- package/dist/css/components/dot.js +72 -0
- package/dist/css/components/dot.js.map +1 -0
- package/dist/css/components/heatmap.d.ts.map +1 -1
- package/dist/css/components/heatmap.js +23 -0
- package/dist/css/components/heatmap.js.map +1 -1
- package/dist/css/components/image.d.ts.map +1 -1
- package/dist/css/components/image.js +41 -0
- package/dist/css/components/image.js.map +1 -1
- package/dist/css/components/mobile-shell.d.ts +2 -0
- package/dist/css/components/mobile-shell.d.ts.map +1 -0
- package/dist/css/components/mobile-shell.js +63 -0
- package/dist/css/components/mobile-shell.js.map +1 -0
- package/dist/css/components/panel.js +1 -1
- package/dist/css/components/qr.d.ts +2 -0
- package/dist/css/components/qr.d.ts.map +1 -0
- package/dist/css/components/qr.js +134 -0
- package/dist/css/components/qr.js.map +1 -0
- package/dist/css/components/radio.d.ts.map +1 -1
- package/dist/css/components/radio.js +49 -0
- package/dist/css/components/radio.js.map +1 -1
- package/dist/css/components/ribbon.d.ts +2 -0
- package/dist/css/components/ribbon.d.ts.map +1 -0
- package/dist/css/components/ribbon.js +65 -0
- package/dist/css/components/ribbon.js.map +1 -0
- package/dist/css/components/tree.d.ts.map +1 -1
- package/dist/css/components/tree.js +4 -1
- package/dist/css/components/tree.js.map +1 -1
- package/dist/css/components.d.ts.map +1 -1
- package/dist/css/components.js +14 -1
- package/dist/css/components.js.map +1 -1
- package/dist/css/index.d.ts +2 -0
- package/dist/css/index.d.ts.map +1 -1
- package/dist/css/index.js +2 -0
- package/dist/css/index.js.map +1 -1
- package/dist/elements/avatar.d.ts +18 -3
- package/dist/elements/avatar.d.ts.map +1 -1
- package/dist/elements/avatar.js +35 -6
- package/dist/elements/avatar.js.map +1 -1
- package/dist/elements/bottom-nav.d.ts +30 -0
- package/dist/elements/bottom-nav.d.ts.map +1 -0
- package/dist/elements/bottom-nav.js +114 -0
- package/dist/elements/bottom-nav.js.map +1 -0
- package/dist/elements/carousel.d.ts +61 -0
- package/dist/elements/carousel.d.ts.map +1 -1
- package/dist/elements/carousel.js +282 -22
- package/dist/elements/carousel.js.map +1 -1
- package/dist/elements/dialog.d.ts +3 -3
- package/dist/elements/dialog.d.ts.map +1 -1
- package/dist/elements/dialog.js.map +1 -1
- package/dist/elements/dot.d.ts +37 -0
- package/dist/elements/dot.d.ts.map +1 -0
- package/dist/elements/dot.js +104 -0
- package/dist/elements/dot.js.map +1 -0
- package/dist/elements/fragment-ssr.d.ts.map +1 -1
- package/dist/elements/fragment-ssr.js +10 -0
- package/dist/elements/fragment-ssr.js.map +1 -1
- package/dist/elements/fragments/avatar/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/avatar/source.generated.js +1 -1
- package/dist/elements/fragments/avatar/source.generated.js.map +1 -1
- package/dist/elements/fragments/badge/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/badge/source.generated.js +1 -1
- package/dist/elements/fragments/badge/source.generated.js.map +1 -1
- package/dist/elements/fragments/bottom-nav/source.generated.d.ts +25 -0
- package/dist/elements/fragments/bottom-nav/source.generated.d.ts.map +1 -0
- package/dist/elements/fragments/bottom-nav/source.generated.js +4 -0
- package/dist/elements/fragments/bottom-nav/source.generated.js.map +1 -0
- package/dist/elements/fragments/component-host.json +147 -77
- package/dist/elements/fragments/dot/source.generated.d.ts +25 -0
- package/dist/elements/fragments/dot/source.generated.d.ts.map +1 -0
- package/dist/elements/fragments/dot/source.generated.js +4 -0
- package/dist/elements/fragments/dot/source.generated.js.map +1 -0
- package/dist/elements/fragments/heatmap/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/heatmap/source.generated.js +1 -1
- package/dist/elements/fragments/heatmap/source.generated.js.map +1 -1
- package/dist/elements/fragments/icon/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/icon/source.generated.js +1 -1
- package/dist/elements/fragments/icon/source.generated.js.map +1 -1
- package/dist/elements/fragments/image/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/image/source.generated.js +1 -1
- package/dist/elements/fragments/image/source.generated.js.map +1 -1
- package/dist/elements/fragments/mobile-shell/source.generated.d.ts +25 -0
- package/dist/elements/fragments/mobile-shell/source.generated.d.ts.map +1 -0
- package/dist/elements/fragments/mobile-shell/source.generated.js +4 -0
- package/dist/elements/fragments/mobile-shell/source.generated.js.map +1 -0
- package/dist/elements/fragments/qr/source.generated.d.ts +25 -0
- package/dist/elements/fragments/qr/source.generated.d.ts.map +1 -0
- package/dist/elements/fragments/qr/source.generated.js +4 -0
- package/dist/elements/fragments/qr/source.generated.js.map +1 -0
- package/dist/elements/fragments/radio/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/radio/source.generated.js +1 -1
- package/dist/elements/fragments/radio/source.generated.js.map +1 -1
- package/dist/elements/fragments/ribbon/source.generated.d.ts +25 -0
- package/dist/elements/fragments/ribbon/source.generated.d.ts.map +1 -0
- package/dist/elements/fragments/ribbon/source.generated.js +4 -0
- package/dist/elements/fragments/ribbon/source.generated.js.map +1 -0
- package/dist/elements/fragments/segmented/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/segmented/source.generated.js +1 -1
- package/dist/elements/fragments/segmented/source.generated.js.map +1 -1
- package/dist/elements/fragments/slider/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/slider/source.generated.js +1 -1
- package/dist/elements/fragments/slider/source.generated.js.map +1 -1
- package/dist/elements/fragments/tree/source.generated.d.ts.map +1 -1
- package/dist/elements/fragments/tree/source.generated.js +1 -1
- package/dist/elements/fragments/tree/source.generated.js.map +1 -1
- package/dist/elements/heatmap.d.ts +14 -3
- package/dist/elements/heatmap.d.ts.map +1 -1
- package/dist/elements/heatmap.js +49 -18
- package/dist/elements/heatmap.js.map +1 -1
- package/dist/elements/image.d.ts +20 -1
- package/dist/elements/image.d.ts.map +1 -1
- package/dist/elements/image.js +171 -1
- package/dist/elements/image.js.map +1 -1
- package/dist/elements/index.d.ts +10 -0
- package/dist/elements/index.d.ts.map +1 -1
- package/dist/elements/index.js +10 -0
- package/dist/elements/index.js.map +1 -1
- package/dist/elements/mobile-shell.d.ts +24 -0
- package/dist/elements/mobile-shell.d.ts.map +1 -0
- package/dist/elements/mobile-shell.js +53 -0
- package/dist/elements/mobile-shell.js.map +1 -0
- package/dist/elements/qr.d.ts +65 -0
- package/dist/elements/qr.d.ts.map +1 -0
- package/dist/elements/qr.js +244 -0
- package/dist/elements/qr.js.map +1 -0
- package/dist/elements/radio.d.ts +1 -0
- package/dist/elements/radio.d.ts.map +1 -1
- package/dist/elements/radio.js +7 -1
- package/dist/elements/radio.js.map +1 -1
- package/dist/elements/ribbon.d.ts +36 -0
- package/dist/elements/ribbon.d.ts.map +1 -0
- package/dist/elements/ribbon.js +91 -0
- package/dist/elements/ribbon.js.map +1 -0
- package/dist/elements/segmented.d.ts.map +1 -1
- package/dist/elements/segmented.js +3 -0
- package/dist/elements/segmented.js.map +1 -1
- package/dist/elements/slider.d.ts +25 -1
- package/dist/elements/slider.d.ts.map +1 -1
- package/dist/elements/slider.js +122 -16
- package/dist/elements/slider.js.map +1 -1
- package/dist/elements/sparkline.d.ts +3 -1
- package/dist/elements/sparkline.d.ts.map +1 -1
- package/dist/elements/sparkline.js +13 -3
- package/dist/elements/sparkline.js.map +1 -1
- package/dist/emit/css.d.ts.map +1 -1
- package/dist/emit/css.js +5 -1
- package/dist/emit/css.js.map +1 -1
- package/dist/emit/index.d.ts +2 -1
- package/dist/emit/index.d.ts.map +1 -1
- package/dist/emit/index.js +3 -1
- package/dist/emit/index.js.map +1 -1
- package/dist/emit/monaco.d.ts.map +1 -1
- package/dist/emit/monaco.js +2 -18
- package/dist/emit/monaco.js.map +1 -1
- package/dist/emit/terminal.d.ts +9 -0
- package/dist/emit/terminal.d.ts.map +1 -0
- package/dist/emit/terminal.js +32 -0
- package/dist/emit/terminal.js.map +1 -0
- package/dist/gauntlet.d.ts.map +1 -1
- package/dist/gauntlet.js +26 -0
- package/dist/gauntlet.js.map +1 -1
- package/dist/host/algorithms-bundle.generated.d.ts.map +1 -1
- package/dist/host/algorithms-bundle.generated.js +1 -1
- package/dist/host/algorithms-bundle.generated.js.map +1 -1
- package/dist/host/authoring-prelude.generated.d.ts +1 -1
- package/dist/host/authoring-prelude.generated.d.ts.map +1 -1
- package/dist/host/authoring-prelude.generated.js +1 -1
- package/dist/host/authoring-prelude.generated.js.map +1 -1
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +12 -0
- package/dist/host/index.js.map +1 -1
- package/dist/host/registry.d.ts +34 -7
- package/dist/host/registry.d.ts.map +1 -1
- package/dist/host/registry.js +45 -11
- package/dist/host/registry.js.map +1 -1
- package/dist/icon-builder.d.ts +41 -0
- package/dist/icon-builder.d.ts.map +1 -1
- package/dist/icon-builder.js +129 -8
- package/dist/icon-builder.js.map +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +2 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/knobs.d.ts +22 -0
- package/dist/knobs.d.ts.map +1 -0
- package/dist/knobs.js +63 -0
- package/dist/knobs.js.map +1 -0
- package/dist/manifest/avatar.manifest.d.ts.map +1 -1
- package/dist/manifest/avatar.manifest.js +37 -17
- package/dist/manifest/avatar.manifest.js.map +1 -1
- package/dist/manifest/badge.manifest.js +1 -1
- package/dist/manifest/badge.manifest.js.map +1 -1
- package/dist/manifest/bottom-nav.manifest.d.ts +3 -0
- package/dist/manifest/bottom-nav.manifest.d.ts.map +1 -0
- package/dist/manifest/bottom-nav.manifest.js +149 -0
- package/dist/manifest/bottom-nav.manifest.js.map +1 -0
- package/dist/manifest/carousel.manifest.d.ts.map +1 -1
- package/dist/manifest/carousel.manifest.js +58 -4
- package/dist/manifest/carousel.manifest.js.map +1 -1
- package/dist/manifest/dialog.manifest.d.ts.map +1 -1
- package/dist/manifest/dialog.manifest.js +7 -4
- package/dist/manifest/dialog.manifest.js.map +1 -1
- package/dist/manifest/dot.manifest.d.ts +3 -0
- package/dist/manifest/dot.manifest.d.ts.map +1 -0
- package/dist/manifest/dot.manifest.js +172 -0
- package/dist/manifest/dot.manifest.js.map +1 -0
- package/dist/manifest/heatmap.manifest.d.ts.map +1 -1
- package/dist/manifest/heatmap.manifest.js +60 -2
- package/dist/manifest/heatmap.manifest.js.map +1 -1
- package/dist/manifest/icon.manifest.d.ts.map +1 -1
- package/dist/manifest/icon.manifest.js +28 -1
- package/dist/manifest/icon.manifest.js.map +1 -1
- package/dist/manifest/image.manifest.d.ts.map +1 -1
- package/dist/manifest/image.manifest.js +100 -1
- package/dist/manifest/image.manifest.js.map +1 -1
- package/dist/manifest/mobile-shell.manifest.d.ts +3 -0
- package/dist/manifest/mobile-shell.manifest.d.ts.map +1 -0
- package/dist/manifest/mobile-shell.manifest.js +177 -0
- package/dist/manifest/mobile-shell.manifest.js.map +1 -0
- package/dist/manifest/panel.manifest.d.ts.map +1 -1
- package/dist/manifest/panel.manifest.js +2 -1
- package/dist/manifest/panel.manifest.js.map +1 -1
- package/dist/manifest/qr.manifest.d.ts +3 -0
- package/dist/manifest/qr.manifest.d.ts.map +1 -0
- package/dist/manifest/qr.manifest.js +314 -0
- package/dist/manifest/qr.manifest.js.map +1 -0
- package/dist/manifest/radio.manifest.d.ts.map +1 -1
- package/dist/manifest/radio.manifest.js +54 -1
- package/dist/manifest/radio.manifest.js.map +1 -1
- package/dist/manifest/registry.d.ts.map +1 -1
- package/dist/manifest/registry.js +10 -0
- package/dist/manifest/registry.js.map +1 -1
- package/dist/manifest/ribbon.manifest.d.ts +3 -0
- package/dist/manifest/ribbon.manifest.d.ts.map +1 -0
- package/dist/manifest/ribbon.manifest.js +173 -0
- package/dist/manifest/ribbon.manifest.js.map +1 -0
- package/dist/manifest/segmented.manifest.js +5 -5
- package/dist/manifest/segmented.manifest.js.map +1 -1
- package/dist/manifest/slider.manifest.d.ts.map +1 -1
- package/dist/manifest/slider.manifest.js +62 -4
- package/dist/manifest/slider.manifest.js.map +1 -1
- package/dist/manifest/sparkline.manifest.d.ts.map +1 -1
- package/dist/manifest/sparkline.manifest.js +27 -1
- package/dist/manifest/sparkline.manifest.js.map +1 -1
- package/dist/manifest/tree.manifest.d.ts.map +1 -1
- package/dist/manifest/tree.manifest.js +24 -10
- package/dist/manifest/tree.manifest.js.map +1 -1
- package/dist/markup/avatar.d.ts +33 -0
- package/dist/markup/avatar.d.ts.map +1 -1
- package/dist/markup/avatar.js +55 -5
- package/dist/markup/avatar.js.map +1 -1
- package/dist/markup/bottom-nav.d.ts +11 -0
- package/dist/markup/bottom-nav.d.ts.map +1 -0
- package/dist/markup/bottom-nav.js +3 -0
- package/dist/markup/bottom-nav.js.map +1 -0
- package/dist/markup/dialog.d.ts +3 -0
- package/dist/markup/dialog.d.ts.map +1 -1
- package/dist/markup/dialog.js.map +1 -1
- package/dist/markup/dot.d.ts +27 -0
- package/dist/markup/dot.d.ts.map +1 -0
- package/dist/markup/dot.js +27 -0
- package/dist/markup/dot.js.map +1 -0
- package/dist/markup/heatmap.d.ts +2 -2
- package/dist/markup/heatmap.d.ts.map +1 -1
- package/dist/markup/heatmap.js.map +1 -1
- package/dist/markup/image.d.ts +9 -0
- package/dist/markup/image.d.ts.map +1 -1
- package/dist/markup/image.js +24 -0
- package/dist/markup/image.js.map +1 -1
- package/dist/markup/index.d.ts +17 -7
- package/dist/markup/index.d.ts.map +1 -1
- package/dist/markup/index.js +9 -4
- package/dist/markup/index.js.map +1 -1
- package/dist/markup/mobile-shell.d.ts +3 -0
- package/dist/markup/mobile-shell.d.ts.map +1 -0
- package/dist/markup/mobile-shell.js +3 -0
- package/dist/markup/mobile-shell.js.map +1 -0
- package/dist/markup/qr.d.ts +77 -0
- package/dist/markup/qr.d.ts.map +1 -0
- package/dist/markup/qr.js +37 -0
- package/dist/markup/qr.js.map +1 -0
- package/dist/markup/radio.d.ts +1 -1
- package/dist/markup/radio.d.ts.map +1 -1
- package/dist/markup/radio.js +1 -1
- package/dist/markup/radio.js.map +1 -1
- package/dist/markup/ribbon.d.ts +23 -0
- package/dist/markup/ribbon.d.ts.map +1 -0
- package/dist/markup/ribbon.js +23 -0
- package/dist/markup/ribbon.js.map +1 -0
- package/dist/markup/segmented.d.ts +2 -0
- package/dist/markup/segmented.d.ts.map +1 -1
- package/dist/markup/segmented.js +2 -0
- package/dist/markup/segmented.js.map +1 -1
- package/dist/markup/sparkline.d.ts +8 -0
- package/dist/markup/sparkline.d.ts.map +1 -1
- package/dist/markup/sparkline.js +37 -0
- package/dist/markup/sparkline.js.map +1 -1
- package/dist/markup/tree.d.ts +15 -4
- package/dist/markup/tree.d.ts.map +1 -1
- package/dist/markup/tree.js +16 -4
- package/dist/markup/tree.js.map +1 -1
- package/dist/mcp/tools.d.ts +7 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +65 -29
- package/dist/mcp/tools.js.map +1 -1
- package/dist/qr.d.ts +84 -0
- package/dist/qr.d.ts.map +1 -0
- package/dist/qr.js +596 -0
- package/dist/qr.js.map +1 -0
- package/dist/series.d.ts +29 -0
- package/dist/series.d.ts.map +1 -1
- package/dist/series.js +36 -0
- package/dist/series.js.map +1 -1
- package/dist/theme-file.d.ts +21 -0
- package/dist/theme-file.d.ts.map +1 -1
- package/dist/theme-file.js +42 -0
- package/dist/theme-file.js.map +1 -1
- package/dist/token-meta.d.ts.map +1 -1
- package/dist/token-meta.js +6 -0
- package/dist/token-meta.js.map +1 -1
- package/dist/types.d.ts +99 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/vocab.d.ts +5 -0
- package/dist/vocab.d.ts.map +1 -1
- package/dist/vocab.js.map +1 -1
- package/manifest.json +25 -2
- package/package.json +1 -1
package/dist/markup/avatar.d.ts
CHANGED
|
@@ -4,6 +4,22 @@ export type AvatarShape = "circle" | "square";
|
|
|
4
4
|
export interface AvatarMarkupProps {
|
|
5
5
|
src?: string | null;
|
|
6
6
|
alt?: string | null;
|
|
7
|
+
/** The person the avatar stands for. Supplies the initials shown when there is no image and
|
|
8
|
+
* nothing slotted, and names the avatar when no `alt` is given. Not `name`: that is a
|
|
9
|
+
* form-participation attribute on an element, and this one has nothing to do with forms. */
|
|
10
|
+
userName?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* The initials to paint, pre-resolved. Defaults to `avatarInitials(userName)`; pass `""` to
|
|
13
|
+
* suppress them because the consumer filled the default slot.
|
|
14
|
+
*
|
|
15
|
+
* They are rendered as *real content* rather than as the default slot's fallback, which is the
|
|
16
|
+
* only thing that actually works: every framework binding emits a whitespace text node between
|
|
17
|
+
* the element's tags, shadow DOM assigns that node to the default slot, and an assigned node —
|
|
18
|
+
* even one made of nothing but a space — suppresses the slot's fallback. So the decision of
|
|
19
|
+
* whether the consumer supplied content has to be made by whoever can see the light DOM, not
|
|
20
|
+
* deferred to the slot.
|
|
21
|
+
*/
|
|
22
|
+
initials?: string;
|
|
7
23
|
tone?: BadgeTone;
|
|
8
24
|
size?: AvatarSize;
|
|
9
25
|
shape?: AvatarShape;
|
|
@@ -11,11 +27,28 @@ export interface AvatarMarkupProps {
|
|
|
11
27
|
statusLabel?: string | null;
|
|
12
28
|
pulse?: boolean | "slow" | "fast" | null;
|
|
13
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Up to two initials for a person's name: first + last for a full name, one letter for a single
|
|
32
|
+
* word. Split on code points, not char codes, so a name that opens on an emoji or an astral glyph
|
|
33
|
+
* yields that whole character instead of half a surrogate pair.
|
|
34
|
+
*/
|
|
35
|
+
export declare function avatarInitials(userName: string | null | undefined): string;
|
|
36
|
+
/** The avatar's accessible name: `alt` if given, else the person's name, with the status read after
|
|
37
|
+
* it. Either half may be absent, and an absent one leaves no dangling separator behind. */
|
|
38
|
+
export declare function avatarLabel(props: AvatarMarkupProps): string;
|
|
14
39
|
/** The host-layout rule for an avatar — the one `:host` rule, shared by the element's `styles()` and the SSR declarative shadow root. */
|
|
15
40
|
export declare const avatarHostCss = ":host { display: inline-flex; }";
|
|
16
41
|
/** The pulse class for a live status dot: a bare / truthy `pulse` breathes at the slow cadence,
|
|
17
42
|
* `"fast"` at the quick one. A no-op without a `status` dot to animate. */
|
|
18
43
|
export declare function avatarPulseClass(pulse: AvatarMarkupProps["pulse"], hasStatus: boolean): string | false;
|
|
44
|
+
/**
|
|
45
|
+
* The presence dot's class list, built by the `Dot` primitive's own `dotClass` — so the shape, the
|
|
46
|
+
* size ramp, the pulse, and its reduced-motion hold-still all come from one typed contract rather
|
|
47
|
+
* than from class-name literals re-assembled per component. The avatar adds only its own geometry
|
|
48
|
+
* (`__status-dot`: scales with the chip, wears a ring). Its tone rides as `--dot-color`, set by the
|
|
49
|
+
* `.xtyle-avatar--status-*` rules, so the dot carries no tone class of its own.
|
|
50
|
+
*/
|
|
51
|
+
export declare function avatarStatusDotClass(props: AvatarMarkupProps): string;
|
|
19
52
|
export declare function avatarClass(props: AvatarMarkupProps): string;
|
|
20
53
|
/**
|
|
21
54
|
* The single source of an avatar's shadow markup. The custom element renders it into
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/markup/avatar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/markup/avatar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IACjC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;gGAE4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAO1E;AAED;2FAC2F;AAC3F,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAK5D;AAED,yIAAyI;AACzI,eAAO,MAAM,aAAa,oCAAoC,CAAC;AAE/D;2EAC2E;AAC3E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAGtG;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CASrE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAc5D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAsB7D"}
|
package/dist/markup/avatar.js
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
import { dotClass } from "./dot.js";
|
|
2
|
+
import { escapeAttr, escapeHtml } from "./escape.js";
|
|
3
|
+
/**
|
|
4
|
+
* Up to two initials for a person's name: first + last for a full name, one letter for a single
|
|
5
|
+
* word. Split on code points, not char codes, so a name that opens on an emoji or an astral glyph
|
|
6
|
+
* yields that whole character instead of half a surrogate pair.
|
|
7
|
+
*/
|
|
8
|
+
export function avatarInitials(userName) {
|
|
9
|
+
const words = (userName ?? "").trim().split(/\s+/).filter(Boolean);
|
|
10
|
+
if (!words.length)
|
|
11
|
+
return "";
|
|
12
|
+
const firstOf = (word) => [...word][0] ?? "";
|
|
13
|
+
const lead = firstOf(words[0]);
|
|
14
|
+
const tail = words.length > 1 ? firstOf(words[words.length - 1]) : "";
|
|
15
|
+
return (lead + tail).toUpperCase();
|
|
16
|
+
}
|
|
17
|
+
/** The avatar's accessible name: `alt` if given, else the person's name, with the status read after
|
|
18
|
+
* it. Either half may be absent, and an absent one leaves no dangling separator behind. */
|
|
19
|
+
export function avatarLabel(props) {
|
|
20
|
+
const name = props.alt || props.userName || "";
|
|
21
|
+
const status = props.statusLabel ?? "";
|
|
22
|
+
if (name && status)
|
|
23
|
+
return `${name} — ${status}`;
|
|
24
|
+
return name || status;
|
|
25
|
+
}
|
|
1
26
|
/** The host-layout rule for an avatar — the one `:host` rule, shared by the element's `styles()` and the SSR declarative shadow root. */
|
|
2
27
|
export const avatarHostCss = ":host { display: inline-flex; }";
|
|
3
28
|
/** The pulse class for a live status dot: a bare / truthy `pulse` breathes at the slow cadence,
|
|
@@ -7,6 +32,23 @@ export function avatarPulseClass(pulse, hasStatus) {
|
|
|
7
32
|
return false;
|
|
8
33
|
return pulse === "fast" ? "xtyle-avatar--pulse-fast" : "xtyle-avatar--pulse-slow";
|
|
9
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The presence dot's class list, built by the `Dot` primitive's own `dotClass` — so the shape, the
|
|
37
|
+
* size ramp, the pulse, and its reduced-motion hold-still all come from one typed contract rather
|
|
38
|
+
* than from class-name literals re-assembled per component. The avatar adds only its own geometry
|
|
39
|
+
* (`__status-dot`: scales with the chip, wears a ring). Its tone rides as `--dot-color`, set by the
|
|
40
|
+
* `.xtyle-avatar--status-*` rules, so the dot carries no tone class of its own.
|
|
41
|
+
*/
|
|
42
|
+
export function avatarStatusDotClass(props) {
|
|
43
|
+
const pulse = props.status
|
|
44
|
+
? props.pulse === "fast"
|
|
45
|
+
? "fast"
|
|
46
|
+
: props.pulse
|
|
47
|
+
? "slow"
|
|
48
|
+
: undefined
|
|
49
|
+
: undefined;
|
|
50
|
+
return `${dotClass({ pulse })} xtyle-avatar__status-dot`;
|
|
51
|
+
}
|
|
10
52
|
export function avatarClass(props) {
|
|
11
53
|
const tone = props.tone ?? "neutral";
|
|
12
54
|
const size = props.size ?? "md";
|
|
@@ -32,15 +74,23 @@ export function avatarClass(props) {
|
|
|
32
74
|
export function avatarMarkup(props) {
|
|
33
75
|
const src = props.src ?? null;
|
|
34
76
|
const alt = props.alt ?? "";
|
|
35
|
-
const label = props
|
|
77
|
+
const label = avatarLabel(props);
|
|
36
78
|
const image = src !== null
|
|
37
|
-
? `<img class="xtyle-avatar__image" part="image" src="${src}" alt="${alt}" onerror="this.remove()" />`
|
|
79
|
+
? `<img class="xtyle-avatar__image" part="image" src="${escapeAttr(src)}" alt="${escapeAttr(alt)}" onerror="this.remove()" />`
|
|
80
|
+
: "";
|
|
81
|
+
const initials = escapeHtml(props.initials ?? avatarInitials(props.userName));
|
|
82
|
+
const initialsSpan = initials
|
|
83
|
+
? `<span class="xtyle-avatar__initials" part="initials">${initials}</span>`
|
|
38
84
|
: "";
|
|
39
|
-
const fallback = `<span class="xtyle-avatar__fallback" part="fallback"><slot name="icon"></slot><slot></slot></span>`;
|
|
85
|
+
const fallback = `<span class="xtyle-avatar__fallback" part="fallback"><span class="xtyle-slot"><slot name="icon"></slot></span>${initialsSpan}<span class="xtyle-slot"><slot></slot></span></span>`;
|
|
40
86
|
const content = `${image}${fallback}`;
|
|
41
87
|
const statusDot = props.status
|
|
42
|
-
? `<span class="
|
|
88
|
+
? `<span class="${avatarStatusDotClass(props)}" part="status-dot" aria-hidden="true"></span>`
|
|
43
89
|
: "";
|
|
44
|
-
|
|
90
|
+
// Only name the avatar when there is a name to give it. An unnamed `role="img"` is a WCAG failure
|
|
91
|
+
// on its own, and worse: `role="img"` makes the subtree presentational, so an avatar carrying only
|
|
92
|
+
// a slotted icon would announce as a nameless image instead of exposing what it holds.
|
|
93
|
+
const naming = label ? ` role="img" aria-label="${escapeAttr(label)}"` : "";
|
|
94
|
+
return `<span part="avatar" class="${avatarClass(props)}"${naming}>${content}${statusDot}</span>`;
|
|
45
95
|
}
|
|
46
96
|
//# sourceMappingURL=avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/markup/avatar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/markup/avatar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAgCrD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,QAAmC;IACjE,MAAM,KAAK,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACnE,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChF,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE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,CAAC,EAAE,CAAC;IACN,kGAAkG;IAClG,mGAAmG;IACnG,uFAAuF;IACvF,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,2BAA2B,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5E,OAAO,8BAA8B,WAAW,CAAC,KAAK,CAAC,IAAI,MAAM,IAAI,OAAO,GAAG,SAAS,SAAS,CAAC;AACnG,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BottomNavTab {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
/** A functional icon name, drawn above the label. */
|
|
5
|
+
icon?: string;
|
|
6
|
+
/** An optional count, e.g. unread. */
|
|
7
|
+
badge?: string | number | null;
|
|
8
|
+
}
|
|
9
|
+
/** The host-layout rule for the bottom nav: the one `:host` rule, shared by the element's scaffold and the SSR declarative shadow root. */
|
|
10
|
+
export declare const bottomNavHostCss = ":host { display: block; }";
|
|
11
|
+
//# sourceMappingURL=bottom-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-nav.d.ts","sourceRoot":"","sources":["../../src/markup/bottom-nav.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,2IAA2I;AAC3I,eAAO,MAAM,gBAAgB,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-nav.js","sourceRoot":"","sources":["../../src/markup/bottom-nav.ts"],"names":[],"mappings":"AASA,2IAA2I;AAC3I,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC"}
|
package/dist/markup/dialog.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** Dialog width steps. Beyond the three base sizes, `xl` (64rem) and `full` (viewport-minus-margin)
|
|
2
|
+
* cover editor-class content; the `--dialog-width` / `--dialog-max-width` custom properties override any of them. */
|
|
3
|
+
export type DialogSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
1
4
|
/** The host-layout rule for a dialog — the `:host` rule plus the scaffold wrapper, shared by the element's fragment scaffold and the SSR declarative shadow root. */
|
|
2
5
|
export declare const dialogHostCss = ":host { display: contents; } .xtyle-dialog-host { display: contents; }";
|
|
3
6
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/markup/dialog.ts"],"names":[],"mappings":"AAAA,qKAAqK;AACrK,eAAO,MAAM,aAAa,2EAA2E,CAAC"}
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/markup/dialog.ts"],"names":[],"mappings":"AAAA;qHACqH;AACrH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE5D,qKAAqK;AACrK,eAAO,MAAM,aAAa,2EAA2E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/markup/dialog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/markup/dialog.ts"],"names":[],"mappings":"AAIA,qKAAqK;AACrK,MAAM,CAAC,MAAM,aAAa,GAAG,wEAAwE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { FullTone } from "../index.js";
|
|
2
|
+
export type DotSize = "sm" | "md" | "lg";
|
|
3
|
+
export type DotPulse = "slow" | "fast";
|
|
4
|
+
export interface DotMarkupProps {
|
|
5
|
+
tone?: FullTone;
|
|
6
|
+
size?: DotSize;
|
|
7
|
+
pulse?: DotPulse;
|
|
8
|
+
ping?: boolean;
|
|
9
|
+
glow?: boolean;
|
|
10
|
+
color?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
}
|
|
13
|
+
/** The host-layout rule for a dot — shared by the element's scaffold and the SSR declarative shadow root. */
|
|
14
|
+
/**
|
|
15
|
+
* The host must collapse to exactly the dot and centre it. Two things conspire against that: the
|
|
16
|
+
* host inherits the surrounding `line-height`, so any stray whitespace inside it raises a text strut
|
|
17
|
+
* and inflates the box to a full line (a 12px dot in a 24px host, sitting off-centre); and a bare
|
|
18
|
+
* `vertical-align` is no help at all when the consumer's row is a flex container, which it usually
|
|
19
|
+
* is, because flex items ignore it. `line-height: 0` kills the strut so the box *is* the dot,
|
|
20
|
+
* `align-items: center` centres it if anything ever does stretch the host, and `vertical-align:
|
|
21
|
+
* middle` covers the case where the dot sits in a plain inline run of text.
|
|
22
|
+
*/
|
|
23
|
+
export declare const dotHostCss = ":host { display: inline-flex; align-items: center; justify-content: center; line-height: 0; vertical-align: middle; }";
|
|
24
|
+
/** The class list for the visual dot span. A `color` escape hatch (inline `--dot-color`) wins over
|
|
25
|
+
* the tone class, so the tone is dropped when a raw color is supplied. */
|
|
26
|
+
export declare function dotClass(props: DotMarkupProps): string;
|
|
27
|
+
//# sourceMappingURL=dot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot.d.ts","sourceRoot":"","sources":["../../src/markup/dot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACzC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,6GAA6G;AAC7G;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,0HACiG,CAAC;AAEzH;0EAC0E;AAC1E,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAYtD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** The host-layout rule for a dot — shared by the element's scaffold and the SSR declarative shadow root. */
|
|
2
|
+
/**
|
|
3
|
+
* The host must collapse to exactly the dot and centre it. Two things conspire against that: the
|
|
4
|
+
* host inherits the surrounding `line-height`, so any stray whitespace inside it raises a text strut
|
|
5
|
+
* and inflates the box to a full line (a 12px dot in a 24px host, sitting off-centre); and a bare
|
|
6
|
+
* `vertical-align` is no help at all when the consumer's row is a flex container, which it usually
|
|
7
|
+
* is, because flex items ignore it. `line-height: 0` kills the strut so the box *is* the dot,
|
|
8
|
+
* `align-items: center` centres it if anything ever does stretch the host, and `vertical-align:
|
|
9
|
+
* middle` covers the case where the dot sits in a plain inline run of text.
|
|
10
|
+
*/
|
|
11
|
+
export const dotHostCss = ":host { display: inline-flex; align-items: center; justify-content: center; line-height: 0; vertical-align: middle; }";
|
|
12
|
+
/** The class list for the visual dot span. A `color` escape hatch (inline `--dot-color`) wins over
|
|
13
|
+
* the tone class, so the tone is dropped when a raw color is supplied. */
|
|
14
|
+
export function dotClass(props) {
|
|
15
|
+
const size = props.size ?? "md";
|
|
16
|
+
return [
|
|
17
|
+
"xtyle-dot",
|
|
18
|
+
size !== "md" && `xtyle-dot--${size}`,
|
|
19
|
+
!props.color && props.tone && `xtyle-dot--${props.tone}`,
|
|
20
|
+
props.pulse && `xtyle-dot--pulse-${props.pulse}`,
|
|
21
|
+
props.ping && "xtyle-dot--ping",
|
|
22
|
+
props.glow && "xtyle-dot--glow",
|
|
23
|
+
]
|
|
24
|
+
.filter(Boolean)
|
|
25
|
+
.join(" ");
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=dot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot.js","sourceRoot":"","sources":["../../src/markup/dot.ts"],"names":[],"mappings":"AAeA,6GAA6G;AAC7G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GACtB,uHAAuH,CAAC;AAEzH;0EAC0E;AAC1E,MAAM,UAAU,QAAQ,CAAC,KAAqB;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC;IAChC,OAAO;QACN,WAAW;QACX,IAAI,KAAK,IAAI,IAAI,cAAc,IAAI,EAAE;QACrC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,cAAc,KAAK,CAAC,IAAI,EAAE;QACxD,KAAK,CAAC,KAAK,IAAI,oBAAoB,KAAK,CAAC,KAAK,EAAE;QAChD,KAAK,CAAC,IAAI,IAAI,iBAAiB;QAC/B,KAAK,CAAC,IAAI,IAAI,iBAAiB;KAC/B;SACC,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,CAAC"}
|
package/dist/markup/heatmap.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RampScheme } from "../series.js";
|
|
2
|
-
export type HeatmapScheme = RampScheme | string[];
|
|
1
|
+
import type { RampScheme, SeriesScheme } from "../series.js";
|
|
2
|
+
export type HeatmapScheme = RampScheme | SeriesScheme | string[];
|
|
3
3
|
/** Shared by the element's scaffold and the SSR shadow root. */
|
|
4
4
|
export declare const heatmapHostCss = ":host { display: block; }";
|
|
5
5
|
//# sourceMappingURL=heatmap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heatmap.d.ts","sourceRoot":"","sources":["../../src/markup/heatmap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"heatmap.d.ts","sourceRoot":"","sources":["../../src/markup/heatmap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,EAAE,CAAC;AAEjE,gEAAgE;AAChE,eAAO,MAAM,cAAc,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heatmap.js","sourceRoot":"","sources":["../../src/markup/heatmap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"heatmap.js","sourceRoot":"","sources":["../../src/markup/heatmap.ts"],"names":[],"mappings":"AAOA,gEAAgE;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG,2BAA2B,CAAC"}
|
package/dist/markup/image.d.ts
CHANGED
|
@@ -2,6 +2,15 @@ export type ImageFit = "cover" | "contain";
|
|
|
2
2
|
export type ImageRadius = "none" | "sm" | "md" | "lg";
|
|
3
3
|
export type ImageLoading = "lazy" | "eager";
|
|
4
4
|
export type ImageTrigger = "frame" | "button";
|
|
5
|
+
/** Whether a hover preview may play sound, and its initial state. Absent = silent (no toggle). */
|
|
6
|
+
export type ImageHoverAudio = "on" | "off";
|
|
5
7
|
/** The host-layout rule for an image: the one `:host` rule, shared by the element's scaffold and the SSR declarative shadow root. */
|
|
6
8
|
export declare const imageHostCss = ":host { display: block; }";
|
|
9
|
+
/**
|
|
10
|
+
* The hover-preview media generated from a `hover-src`: a muted, looping `<video>` for a video URL
|
|
11
|
+
* (the element plays it on hover) or an `<img>` for a gif / animated source. Shared by the element
|
|
12
|
+
* (client) and the Astro binding (SSR) so both emit identical hover-slot content. The caller adds
|
|
13
|
+
* `slot="hover"` when the node is a light-DOM child to project; the SSR path inlines it in place.
|
|
14
|
+
*/
|
|
15
|
+
export declare function hoverMediaHtml(src: string, poster?: string): string;
|
|
7
16
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/markup/image.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/markup/image.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC9C,kGAAkG;AAClG,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,KAAK,CAAC;AAE3C,qIAAqI;AACrI,eAAO,MAAM,YAAY,8BAA8B,CAAC;AAYxD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAQnE"}
|
package/dist/markup/image.js
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
1
|
/** The host-layout rule for an image: the one `:host` rule, shared by the element's scaffold and the SSR declarative shadow root. */
|
|
2
2
|
export const imageHostCss = ":host { display: block; }";
|
|
3
|
+
const VIDEO_EXT = /\.(mp4|webm|ogv|mov|m4v)(\?|#|$)/i;
|
|
4
|
+
function escAttr(value) {
|
|
5
|
+
return value
|
|
6
|
+
.replace(/&/g, "&")
|
|
7
|
+
.replace(/</g, "<")
|
|
8
|
+
.replace(/>/g, ">")
|
|
9
|
+
.replace(/"/g, """);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The hover-preview media generated from a `hover-src`: a muted, looping `<video>` for a video URL
|
|
13
|
+
* (the element plays it on hover) or an `<img>` for a gif / animated source. Shared by the element
|
|
14
|
+
* (client) and the Astro binding (SSR) so both emit identical hover-slot content. The caller adds
|
|
15
|
+
* `slot="hover"` when the node is a light-DOM child to project; the SSR path inlines it in place.
|
|
16
|
+
*/
|
|
17
|
+
export function hoverMediaHtml(src, poster) {
|
|
18
|
+
if (!src)
|
|
19
|
+
return "";
|
|
20
|
+
const s = escAttr(src);
|
|
21
|
+
const posterAttr = poster ? ` poster="${escAttr(poster)}"` : "";
|
|
22
|
+
if (VIDEO_EXT.test(src)) {
|
|
23
|
+
return `<video class="xtyle-image__hover-media" part="hover-media" muted loop playsinline preload="none"${posterAttr}><source src="${s}" /></video>`;
|
|
24
|
+
}
|
|
25
|
+
return `<img class="xtyle-image__hover-media" part="hover-media" src="${s}" alt="" loading="lazy" decoding="async" />`;
|
|
26
|
+
}
|
|
3
27
|
//# sourceMappingURL=image.js.map
|
package/dist/markup/image.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../src/markup/image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../src/markup/image.ts"],"names":[],"mappings":"AAOA,qIAAqI;AACrI,MAAM,CAAC,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAExD,MAAM,SAAS,GAAG,mCAAmC,CAAC;AAEtD,SAAS,OAAO,CAAC,KAAa;IAC7B,OAAO,KAAK;SACV,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,MAAe;IAC1D,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACvB,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,mGAAmG,UAAU,iBAAiB,CAAC,cAAc,CAAC;IACtJ,CAAC;IACD,OAAO,iEAAiE,CAAC,6CAA6C,CAAC;AACxH,CAAC"}
|
package/dist/markup/index.d.ts
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
export { escapeHtml, escapeAttr } from "./escape.js";
|
|
2
2
|
export { cardHostCss } from "./card.js";
|
|
3
3
|
export { badgeHostCss } from "./badge.js";
|
|
4
|
+
export { dotHostCss, dotClass } from "./dot.js";
|
|
5
|
+
export type { DotMarkupProps, DotSize, DotPulse } from "./dot.js";
|
|
6
|
+
export { ribbonHostCss, ribbonClass } from "./ribbon.js";
|
|
7
|
+
export type { RibbonMarkupProps, RibbonCorner, RibbonSize, RibbonVariant } from "./ribbon.js";
|
|
4
8
|
export { eyebrowMarkup, eyebrowClass, eyebrowHostCss } from "./eyebrow.js";
|
|
5
9
|
export type { EyebrowMarkupProps } from "./eyebrow.js";
|
|
6
10
|
export { kbdHostCss } from "./kbd.js";
|
|
7
11
|
export type { KbdSize, KbdTone } from "./kbd.js";
|
|
8
12
|
export { iconHostCss } from "./icon.js";
|
|
9
13
|
export type { IconName, IconSize } from "./icon.js";
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
14
|
+
export { mobileShellHostCss } from "./mobile-shell.js";
|
|
15
|
+
export { bottomNavHostCss } from "./bottom-nav.js";
|
|
16
|
+
export type { BottomNavTab } from "./bottom-nav.js";
|
|
17
|
+
export { imageHostCss, hoverMediaHtml } from "./image.js";
|
|
18
|
+
export type { ImageFit, ImageRadius, ImageLoading, ImageTrigger, ImageHoverAudio } from "./image.js";
|
|
12
19
|
export { barHostCss } from "./bar.js";
|
|
13
20
|
export type { BarSeries, BarScheme } from "./bar.js";
|
|
14
|
-
export { sparklineHostCss, resolveSparklineBounds } from "./sparkline.js";
|
|
15
|
-
export type { SparklineVariant, SparklineTone, SparklineBounds } from "./sparkline.js";
|
|
21
|
+
export { sparklineHostCss, resolveSparklineBounds, formatSparklineValue } from "./sparkline.js";
|
|
22
|
+
export type { SparklineVariant, SparklineTone, SparklineBounds, SparklineFormat } from "./sparkline.js";
|
|
16
23
|
export { heatmapHostCss } from "./heatmap.js";
|
|
17
24
|
export type { HeatmapScheme } from "./heatmap.js";
|
|
18
25
|
export { pieHostCss } from "./pie.js";
|
|
19
26
|
export type { PieDatum, PieScheme, PieVariant } from "./pie.js";
|
|
27
|
+
export { qrHostCss, qrLogoModules, qrLinkHref, QR_LOGO_SCALE, QR_ICON_SCALES, QR_ICON_SIZES, QR_MODES, QR_MODULE_SHAPES } from "./qr.js";
|
|
28
|
+
export type { QrMode, QrIconSize, QrBindings } from "./qr.js";
|
|
20
29
|
export { tableParts } from "./table.js";
|
|
21
30
|
export type { TablePart } from "./table.js";
|
|
22
31
|
export { statHostCss } from "./stat.js";
|
|
@@ -30,7 +39,7 @@ export { spinnerClass, spinnerHostCss } from "./spinner.js";
|
|
|
30
39
|
export type { SpinnerMarkupProps } from "./spinner.js";
|
|
31
40
|
export { skeletonHostCss } from "./skeleton.js";
|
|
32
41
|
export type { SkeletonShape } from "./skeleton.js";
|
|
33
|
-
export { avatarMarkup, avatarClass, avatarHostCss } from "./avatar.js";
|
|
42
|
+
export { avatarMarkup, avatarClass, avatarHostCss, avatarInitials, avatarLabel } from "./avatar.js";
|
|
34
43
|
export type { AvatarMarkupProps } from "./avatar.js";
|
|
35
44
|
export { avatarGroupHostCss } from "./avatar-group.js";
|
|
36
45
|
export type { AvatarGroupSize, AvatarGroupSpacing } from "./avatar-group.js";
|
|
@@ -81,6 +90,7 @@ export type { BreadcrumbMarkupProps, BreadcrumbItem } from "./breadcrumb.js";
|
|
|
81
90
|
export { colorPickerMarkup, colorPickerHostCss, channelSliders, clamp01, formatChannelValue, namedSnapLabel, PLANE_MAX_C, PLANE_W, PLANE_H, OUT_OF_GAMUT_DESAT, PLANE_EDGE_SHADE } from "./color-picker.js";
|
|
82
91
|
export type { ColorPickerMarkupProps, Hsv } from "./color-picker.js";
|
|
83
92
|
export { dialogHostCss } from "./dialog.js";
|
|
93
|
+
export type { DialogSize } from "./dialog.js";
|
|
84
94
|
export { menuHostCss } from "./menu.js";
|
|
85
95
|
export type { MenuItem, MenuAction } from "./menu.js";
|
|
86
96
|
export { numberInputHostCss, clampNumber, type ClampSpec } from "./number-input.js";
|
|
@@ -90,8 +100,8 @@ export { sliderHostCss } from "./slider.js";
|
|
|
90
100
|
export { statusbarHostCss } from "./statusbar.js";
|
|
91
101
|
export { tocHostCss } from "./toc.js";
|
|
92
102
|
export type { TocItem } from "./toc.js";
|
|
93
|
-
export { treeMarkup, treeClass, treeHostCss, firstSelectedValue } from "./tree.js";
|
|
94
|
-
export type { TreeMarkupProps, TreeNode } from "./tree.js";
|
|
103
|
+
export { treeMarkup, treeClass, treeHostCss, firstSelectedValue, treeBadges } from "./tree.js";
|
|
104
|
+
export type { TreeMarkupProps, TreeNode, TreeAction, TreeBadge } from "./tree.js";
|
|
95
105
|
export { splitterHostCss } from "./splitter.js";
|
|
96
106
|
export { codeMarkup, codeClass, codeHostCss, plainCodeHtml, splitCodeLines, codeGutterWidth, parseLineSpec } from "./code.js";
|
|
97
107
|
export type { CodeMarkupProps } from "./code.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3E,YAAY,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAA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M,WAAW,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxH,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/markup/index.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
export { escapeHtml, escapeAttr } from "./escape.js";
|
|
2
2
|
export { cardHostCss } from "./card.js";
|
|
3
3
|
export { badgeHostCss } from "./badge.js";
|
|
4
|
+
export { dotHostCss, dotClass } from "./dot.js";
|
|
5
|
+
export { ribbonHostCss, ribbonClass } from "./ribbon.js";
|
|
4
6
|
export { eyebrowMarkup, eyebrowClass, eyebrowHostCss } from "./eyebrow.js";
|
|
5
7
|
export { kbdHostCss } from "./kbd.js";
|
|
6
8
|
export { iconHostCss } from "./icon.js";
|
|
7
|
-
export {
|
|
9
|
+
export { mobileShellHostCss } from "./mobile-shell.js";
|
|
10
|
+
export { bottomNavHostCss } from "./bottom-nav.js";
|
|
11
|
+
export { imageHostCss, hoverMediaHtml } from "./image.js";
|
|
8
12
|
export { barHostCss } from "./bar.js";
|
|
9
|
-
export { sparklineHostCss, resolveSparklineBounds } from "./sparkline.js";
|
|
13
|
+
export { sparklineHostCss, resolveSparklineBounds, formatSparklineValue } from "./sparkline.js";
|
|
10
14
|
export { heatmapHostCss } from "./heatmap.js";
|
|
11
15
|
export { pieHostCss } from "./pie.js";
|
|
16
|
+
export { qrHostCss, qrLogoModules, qrLinkHref, QR_LOGO_SCALE, QR_ICON_SCALES, QR_ICON_SIZES, QR_MODES, QR_MODULE_SHAPES } from "./qr.js";
|
|
12
17
|
export { tableParts } from "./table.js";
|
|
13
18
|
export { statHostCss } from "./stat.js";
|
|
14
19
|
export { textHostCss } from "./text.js";
|
|
@@ -17,7 +22,7 @@ export { linkMarkup, linkClass, linkHostCss } from "./link.js";
|
|
|
17
22
|
export { separatorHostCss } from "./separator.js";
|
|
18
23
|
export { spinnerClass, spinnerHostCss } from "./spinner.js";
|
|
19
24
|
export { skeletonHostCss } from "./skeleton.js";
|
|
20
|
-
export { avatarMarkup, avatarClass, avatarHostCss } from "./avatar.js";
|
|
25
|
+
export { avatarMarkup, avatarClass, avatarHostCss, avatarInitials, avatarLabel } from "./avatar.js";
|
|
21
26
|
export { avatarGroupHostCss } from "./avatar-group.js";
|
|
22
27
|
export { panelMarkup, panelClass, panelHostCss } from "./panel.js";
|
|
23
28
|
export { stackHostCss } from "./stack.js";
|
|
@@ -52,7 +57,7 @@ export { segmentedHostCss, parseSegments, normalizeSegments, selectedValue } fro
|
|
|
52
57
|
export { sliderHostCss } from "./slider.js";
|
|
53
58
|
export { statusbarHostCss } from "./statusbar.js";
|
|
54
59
|
export { tocHostCss } from "./toc.js";
|
|
55
|
-
export { treeMarkup, treeClass, treeHostCss, firstSelectedValue } from "./tree.js";
|
|
60
|
+
export { treeMarkup, treeClass, treeHostCss, firstSelectedValue, treeBadges } from "./tree.js";
|
|
56
61
|
export { splitterHostCss } from "./splitter.js";
|
|
57
62
|
export { codeMarkup, codeClass, codeHostCss, plainCodeHtml, splitCodeLines, codeGutterWidth, parseLineSpec } from "./code.js";
|
|
58
63
|
export { paginationMarkup, paginationClass, paginationHostCss, paginationRange, paginationHref } from "./pagination.js";
|
package/dist/markup/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/markup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE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E,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEnG,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/F,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE9H,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-shell.d.ts","sourceRoot":"","sources":["../../src/markup/mobile-shell.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAC7I,eAAO,MAAM,kBAAkB,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-shell.js","sourceRoot":"","sources":["../../src/markup/mobile-shell.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAC7I,MAAM,CAAC,MAAM,kBAAkB,GAAG,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { QrEcLevel, QrModuleShape } from "../qr.js";
|
|
2
|
+
export type { QrEcLevel, QrModuleShape };
|
|
3
|
+
/** How a QR symbol chooses its two colors. `theme` inks it from the live tokens (`--fg-0` on
|
|
4
|
+
* `--bg-0`); `bitonal` forces guaranteed-scannable black-on-white regardless of theme; `auto` uses
|
|
5
|
+
* the theme colors when they clear the scannability floor and silently falls back to bitonal when
|
|
6
|
+
* they don't. */
|
|
7
|
+
export type QrMode = "theme" | "bitonal" | "auto";
|
|
8
|
+
export declare const QR_MODES: readonly QrMode[];
|
|
9
|
+
export declare const QR_MODULE_SHAPES: readonly QrModuleShape[];
|
|
10
|
+
/** The host-layout rule, shared by the element scaffold and the SSR shadow root. */
|
|
11
|
+
export declare const qrHostCss = ":host { display: inline-block; }";
|
|
12
|
+
/** Named logo sizes, as fractions of the symbol width. The default `md` is the conventional QR logo
|
|
13
|
+
* size; `xl` is the largest still comfortably inside the ~30% occlusion budget of EC level H, which
|
|
14
|
+
* the element forces whenever a logo is present. */
|
|
15
|
+
export type QrIconSize = "sm" | "md" | "lg" | "xl";
|
|
16
|
+
export declare const QR_ICON_SCALES: Record<QrIconSize, number>;
|
|
17
|
+
export declare const QR_ICON_SIZES: readonly QrIconSize[];
|
|
18
|
+
/** The default fraction of the symbol width an injected logo occupies (the `md` preset). */
|
|
19
|
+
export declare const QR_LOGO_SCALE: number;
|
|
20
|
+
/** Side of the centered logo patch (in modules) for the given scale — the count of modules cleared
|
|
21
|
+
* (or covered) for the mark, sized to wrap it tightly so the glyph fills the patch rather than
|
|
22
|
+
* floating in whitespace. Clamped to a scannable range. */
|
|
23
|
+
export declare function qrLogoModules(matrixSize: number, scale?: number): number;
|
|
24
|
+
/** A safe `href` for the payload when it is a link, or `null` when it is not — so the framed caption
|
|
25
|
+
* can render as a real link a reader can follow. Only `http(s)` / `mailto:` / `tel:` schemes and bare
|
|
26
|
+
* hostnames (promoted to `https://`) are linkified; anything else (a `WIFI:` string, plain text, a
|
|
27
|
+
* `javascript:` URL) stays inert text. */
|
|
28
|
+
export declare function qrLinkHref(data: string): string | null;
|
|
29
|
+
/** Everything the fragment needs to draw one symbol. The element and the Astro binding both build
|
|
30
|
+
* this (encode → path → color decision); the fragment stays a pure renderer. */
|
|
31
|
+
export interface QrBindings {
|
|
32
|
+
/** The SVG `d` for every dark module. */
|
|
33
|
+
path: string;
|
|
34
|
+
/** The symbol's viewBox (symbol size + two quiet zones, in module units). */
|
|
35
|
+
viewBox: string;
|
|
36
|
+
/** The viewBox side length in module units (used to place the logo as a percentage). */
|
|
37
|
+
extent: number;
|
|
38
|
+
/** Explicit module color when the mode pins one (bitonal, or auto falling back); omit to ink from
|
|
39
|
+
* the `--qr-module` token. */
|
|
40
|
+
moduleColor?: string | null;
|
|
41
|
+
/** Explicit background color, paired with `moduleColor`; omit to ink from `--qr-bg`. */
|
|
42
|
+
bgColor?: string | null;
|
|
43
|
+
shape: QrModuleShape;
|
|
44
|
+
/** Rendered pixel size of the symbol. */
|
|
45
|
+
size: number;
|
|
46
|
+
/** The centered box (viewBox units) an injected logo occupies, present only when one is set. */
|
|
47
|
+
logoBox?: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
size: number;
|
|
51
|
+
} | null;
|
|
52
|
+
/** An xtyle icon name to drop in the center. */
|
|
53
|
+
iconName?: string | null;
|
|
54
|
+
/** An image URL to drop in the center (an alternative to `iconName`). */
|
|
55
|
+
logoSrc?: string | null;
|
|
56
|
+
/** Lay the logo over the modules (leaning on error correction) instead of knocking a hole in them. */
|
|
57
|
+
iconOverlay?: boolean;
|
|
58
|
+
/** Give the logo a contrasting halo so it stays distinct against the modules. */
|
|
59
|
+
iconOutline?: boolean;
|
|
60
|
+
/** Wrap the symbol in a frame that prints the payload beneath it. */
|
|
61
|
+
frame: boolean;
|
|
62
|
+
/** The frame's caption text (defaults to the payload). */
|
|
63
|
+
caption?: string | null;
|
|
64
|
+
/** A safe `href` for the caption when the payload is a link; renders it as a real link instead of text. */
|
|
65
|
+
linkHref?: string | null;
|
|
66
|
+
/** Show a small button on the frame that swaps between the themed and bitonal renderings live. */
|
|
67
|
+
modeToggle?: boolean;
|
|
68
|
+
/** Whether the symbol is currently rendering bitonal (drives the toggle's pressed state). */
|
|
69
|
+
isBitonal?: boolean;
|
|
70
|
+
/** The accessible name announced for the symbol. */
|
|
71
|
+
label: string;
|
|
72
|
+
/** True when the theme colors fell below the scannability floor — surfaced as `data-contrast`. */
|
|
73
|
+
lowContrast?: boolean;
|
|
74
|
+
version: number;
|
|
75
|
+
ecLevel: QrEcLevel;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=qr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qr.d.ts","sourceRoot":"","sources":["../../src/markup/qr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AAEzC;;;iBAGiB;AACjB,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAElD,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAAiC,CAAC;AACxE,eAAO,MAAM,gBAAgB,EAAE,SAAS,aAAa,EAAiC,CAAC;AAEvF,oFAAoF;AACpF,eAAO,MAAM,SAAS,qCAAqC,CAAC;AAE5D;;oDAEoD;AACpD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKrD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EAA6B,CAAC;AAE7E,4FAA4F;AAC5F,eAAO,MAAM,aAAa,QAAoB,CAAC;AAE/C;;2DAE2D;AAC3D,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,SAAgB,GAAG,MAAM,CAG/E;AAKD;;;0CAG0C;AAC1C,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMtD;AAED;gFACgF;AAChF,MAAM,WAAW,UAAU;IAC1B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,MAAM,EAA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