@monospaced/set-core 0.3.0 → 0.4.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/dist/components/alert/alert.d.ts +3 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/badge/badge.d.ts +2 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/banner/banner.d.ts +2 -2
- package/dist/components/banner/banner.d.ts.map +1 -1
- package/dist/components/icon/icons-tdesign.d.ts +1 -1
- package/dist/components/icon/icons-tdesign.d.ts.map +1 -1
- package/dist/components/icon/icons.generated.d.ts.map +1 -1
- package/dist/components/image/image.d.ts +11 -11
- package/dist/components/image/image.d.ts.map +1 -1
- package/dist/components/lightswitch/lightswitch.d.ts +59 -0
- package/dist/components/lightswitch/lightswitch.d.ts.map +1 -0
- package/dist/components/poster/poster.d.ts +1 -1
- package/dist/components/video/video.d.ts +62 -0
- package/dist/components/video/video.d.ts.map +1 -0
- package/dist/core.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1152 -650
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type SetNode } from "../../helpers/node";
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
|
-
import type { SetInlineSize
|
|
3
|
+
import type { SetInlineSize } from "../../types";
|
|
4
4
|
export declare const SET_ALERT_TAG_NAME = "set-alert";
|
|
5
5
|
export declare const SET_ALERT_EVENT_BEFORE_DISMISS = "set-alert-before-dismiss";
|
|
6
6
|
export declare const SET_ALERT_EVENT_DISMISS = "set-alert-dismiss";
|
|
7
7
|
export type SetAlertSize = "sm" | "md";
|
|
8
|
+
export type SetAlertTone = "info" | "success" | "warning" | "error";
|
|
8
9
|
export interface SetAlertProps {
|
|
9
10
|
/** Whether the runtime custom element should inject a dismiss control. @default false */
|
|
10
11
|
dismissible?: boolean;
|
|
@@ -19,7 +20,7 @@ export interface SetAlertProps {
|
|
|
19
20
|
/** Size variant. @default "md" */
|
|
20
21
|
size?: SetAlertSize;
|
|
21
22
|
/** Semantic message intent. */
|
|
22
|
-
tone?:
|
|
23
|
+
tone?: SetAlertTone;
|
|
23
24
|
/** Optional short heading/title text (escaped before render). */
|
|
24
25
|
title?: string;
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,8BAA8B,6BAA6B,CAAC;AACzE,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAI3D,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,yFAAyF;IACzF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+GAA+G;IAC/G,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAsCD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,gBAA0C,EAC1C,EAAE,EACF,UAAmB,EACnB,OAAO,EACP,IAAW,EACX,IAAI,EACJ,KAAK,GACN,EAAE,aAAa,GAAG,OAAO,CAyDzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAuDrC;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,gBAsJ5B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SetNode } from "../../helpers/node";
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
|
-
import type { SetStatusTone } from "../../types";
|
|
4
3
|
export type SetBadgeSize = "sm" | "md";
|
|
4
|
+
export type SetBadgeTone = "notification" | "live" | "pending" | "success" | "warning" | "error";
|
|
5
5
|
export interface SetBadgeProps {
|
|
6
6
|
/** Positions the badge as a floating overlay. */
|
|
7
7
|
floating?: boolean;
|
|
@@ -12,7 +12,7 @@ export interface SetBadgeProps {
|
|
|
12
12
|
/** Badge size. @default "md" */
|
|
13
13
|
size?: SetBadgeSize;
|
|
14
14
|
/** Semantic tone variant. */
|
|
15
|
-
tone?:
|
|
15
|
+
tone?: SetBadgeTone;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Builds the IR tree for the Set badge component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAC;AACvC,MAAM,MAAM,YAAY,GACpB,cAAc,GACd,MAAM,GACN,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,EAAE,EACF,KAAK,EACL,IAAW,EACX,IAAI,GACL,EAAE,aAAa,GAAG,OAAO,CAezB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,gBAoE5B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SetNode } from "../../helpers/node";
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
|
-
import type { SetStatusTone } from "../../types";
|
|
4
3
|
export declare const SET_BANNER_TAG_NAME = "set-banner";
|
|
4
|
+
export type SetBannerTone = "info" | "warning" | "error";
|
|
5
5
|
export declare const SET_BANNER_EVENT_BEFORE_DISMISS = "set-banner-before-dismiss";
|
|
6
6
|
export declare const SET_BANNER_EVENT_DISMISS = "set-banner-dismiss";
|
|
7
7
|
export interface SetBannerProps {
|
|
@@ -21,7 +21,7 @@ export interface SetBannerProps {
|
|
|
21
21
|
/** Banner body text (escaped before render). */
|
|
22
22
|
message: string;
|
|
23
23
|
/** Semantic message intent. */
|
|
24
|
-
tone?:
|
|
24
|
+
tone?: SetBannerTone;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Builds the IR tree for the Set banner component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/banner/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/banner/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAInD,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AACzD,eAAO,MAAM,+BAA+B,8BAA8B,CAAC;AAC3E,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAI7D,MAAM,WAAW,cAAc;IAC7B;uDACmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;sDACkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;mCAC+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAmBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,WAAW,EACX,WAAkB,EAClB,gBAA0C,EAC1C,EAAE,EACF,OAAO,EACP,IAAI,GACL,EAAE,cAAc,GAAG,OAAO,CA6C1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAE7D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAuDtC;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,gBA4F7B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const TDESIGN_ICON_NAMES: readonly ["adjustment", "arrow-down", "arrow-left-right-1", "arrow-left", "arrow-right", "arrow-up-down-1", "arrow-up", "check-circle", "chevron-down", "chevron-right", "circle", "city-6", "close", "copy", "download", "enter", "error-circle", "error-triangle", "horizontal", "image", "info-circle", "jump", "layers", "link", "member", "pantone", "play", "rectangle", "refresh", "robot-1", "search", "setting-1", "swap", "user-1", "view-list"];
|
|
1
|
+
export declare const TDESIGN_ICON_NAMES: readonly ["adjustment", "arrow-down", "arrow-left-right-1", "arrow-left", "arrow-right", "arrow-up-down-1", "arrow-up", "check-circle", "chevron-down", "chevron-right", "circle", "city-6", "close", "copy", "download", "enter", "error-circle", "error-triangle", "horizontal", "image", "info-circle", "jump", "layers", "link", "member", "moon", "pantone", "play", "rectangle", "refresh", "robot-1", "search", "setting-1", "sticky-note", "sunny", "swap", "user-1", "view-list"];
|
|
2
2
|
//# sourceMappingURL=icons-tdesign.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons-tdesign.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons-tdesign.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"icons-tdesign.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons-tdesign.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,4dAuCrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.generated.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons.generated.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"icons.generated.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons.generated.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CA4sBjD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type SetNode } from "../../helpers/node";
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
3
|
export type SetImageAspectRatio = "1:1" | "4:5" | "3:2" | "16:9" | "21:9";
|
|
4
|
+
export type SetImageFit = "intrinsic" | "fluid" | "cover";
|
|
4
5
|
export type SetImageGravity = "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW" | "C";
|
|
5
|
-
export type SetImageRadius = "xs" | "ratio";
|
|
6
6
|
export interface SetImageSource {
|
|
7
7
|
/**
|
|
8
8
|
* The intrinsic height of the source, in pixels.
|
|
@@ -34,13 +34,13 @@ export interface SetImageSource {
|
|
|
34
34
|
export interface SetImageProps {
|
|
35
35
|
/** Alternative text. Empty string is valid and used by default. @default "" */
|
|
36
36
|
alt?: string;
|
|
37
|
-
/** Aspect ratio applied to the wrapper.
|
|
37
|
+
/** Aspect ratio applied to the wrapper. */
|
|
38
38
|
aspectRatio?: SetImageAspectRatio;
|
|
39
|
-
/**
|
|
40
|
-
|
|
39
|
+
/** Layout mode. @default "intrinsic" */
|
|
40
|
+
fit?: SetImageFit;
|
|
41
41
|
/** Enables default image shadow treatment. @default false */
|
|
42
42
|
shadow?: boolean;
|
|
43
|
-
/** Height in pixels.
|
|
43
|
+
/** Height in pixels. */
|
|
44
44
|
height?: number;
|
|
45
45
|
/** DOM id. */
|
|
46
46
|
id?: string;
|
|
@@ -48,11 +48,11 @@ export interface SetImageProps {
|
|
|
48
48
|
lazy?: boolean;
|
|
49
49
|
/** Emit `fetchpriority="high"` and suppress `loading="lazy"`. @default false */
|
|
50
50
|
priority?: boolean;
|
|
51
|
-
/** Focal gravity for cover
|
|
51
|
+
/** Focal gravity for the cover crop. @default "C" */
|
|
52
52
|
gravity?: SetImageGravity;
|
|
53
|
-
/**
|
|
54
|
-
radius?:
|
|
55
|
-
/** HTML `sizes` attribute.
|
|
53
|
+
/** Applies the default corner radius. @default false */
|
|
54
|
+
radius?: boolean;
|
|
55
|
+
/** HTML `sizes` attribute. */
|
|
56
56
|
sizes?: string;
|
|
57
57
|
/** Responsive source-set definitions for `<picture>`. */
|
|
58
58
|
sources?: SetImageSource[];
|
|
@@ -60,7 +60,7 @@ export interface SetImageProps {
|
|
|
60
60
|
srcSet?: string;
|
|
61
61
|
/** Image source URL. */
|
|
62
62
|
src: string;
|
|
63
|
-
/** Width in pixels.
|
|
63
|
+
/** Width in pixels. */
|
|
64
64
|
width?: number;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
@@ -69,7 +69,7 @@ export interface SetImageProps {
|
|
|
69
69
|
* @param props - Image component props.
|
|
70
70
|
* @returns IR node for image/picture markup.
|
|
71
71
|
*/
|
|
72
|
-
export declare function buildSetImage({ alt, aspectRatio,
|
|
72
|
+
export declare function buildSetImage({ alt, aspectRatio, fit, gravity, height, id, lazy, priority, radius, shadow, sizes, sources, src, srcSet, width, }: SetImageProps): SetNode;
|
|
73
73
|
/**
|
|
74
74
|
* SSR renderer for the Set image component.
|
|
75
75
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/image/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAC1E,MAAM,MAAM,eAAe,GACvB,GAAG,GACH,IAAI,GACJ,GAAG,GACH,IAAI,GACJ,GAAG,GACH,IAAI,GACJ,GAAG,GACH,IAAI,GACJ,GAAG,CAAC;AACR,MAAM,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/image/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAC1E,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,eAAe,GACvB,GAAG,GACH,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AAC,EAC5B,GAAQ,EACR,WAAW,EACX,GAAiB,EACjB,OAAa,EACb,MAAM,EACN,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,GAAG,EACH,MAAM,EACN,KAAK,GACN,EAAE,aAAa,GAAG,OAAO,CA8FzB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,gBA+L5B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export declare const SET_LIGHTSWITCH_TAG_NAME = "set-lightswitch";
|
|
4
|
+
export declare const SET_LIGHTSWITCH_EVENT_CHANGE = "set-lightswitch-change";
|
|
5
|
+
export declare const SET_LIGHTSWITCH_STORAGE_KEY = "set-theme";
|
|
6
|
+
export type SetLightswitchAppearance = "outline" | "solid" | "text";
|
|
7
|
+
export type SetLightswitchSize = "sm" | "md" | "lg";
|
|
8
|
+
export interface SetLightswitchProps {
|
|
9
|
+
/** Structural style of the toggle button. @default "text" */
|
|
10
|
+
appearance?: SetLightswitchAppearance;
|
|
11
|
+
/** DOM id. */
|
|
12
|
+
id?: string;
|
|
13
|
+
/** Accessible label of the switch-to-dark action. @default "Switch to dark theme" */
|
|
14
|
+
labelDark?: string;
|
|
15
|
+
/** Accessible label of the switch-to-light action. @default "Switch to light theme" */
|
|
16
|
+
labelLight?: string;
|
|
17
|
+
/** Size variant. @default "md" */
|
|
18
|
+
size?: SetLightswitchSize;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Builds the IR tree for the Set lightswitch component.
|
|
22
|
+
*
|
|
23
|
+
* @param props - Lightswitch component props.
|
|
24
|
+
* @returns IR node for a `set-lightswitch` host.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildSetLightswitch({ appearance, id, labelDark, labelLight, size, }: SetLightswitchProps): SetNode;
|
|
27
|
+
/**
|
|
28
|
+
* SSR renderer for the Set lightswitch component.
|
|
29
|
+
*
|
|
30
|
+
* Emits an icon-only theme toggle button inside a `set-lightswitch` host. Both
|
|
31
|
+
* actions (switch to dark, switch to light) are rendered; CSS shows the one
|
|
32
|
+
* opposing the resolved theme, driven by `data-set-theme` on the Set root and
|
|
33
|
+
* falling back to `prefers-color-scheme`, so the control is correct before —
|
|
34
|
+
* and without — the runtime.
|
|
35
|
+
*
|
|
36
|
+
* @param props - Lightswitch component props.
|
|
37
|
+
* @returns HTML string for a `set-lightswitch` host.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderSetLightswitch(props: SetLightswitchProps): string;
|
|
40
|
+
/**
|
|
41
|
+
* Defines the `set-lightswitch` custom element runtime.
|
|
42
|
+
*
|
|
43
|
+
* Safe to call multiple times. Existing SSR-rendered `set-lightswitch` hosts will
|
|
44
|
+
* upgrade in place.
|
|
45
|
+
*
|
|
46
|
+
* The toggle shows two states but persists three: no stored value follows the
|
|
47
|
+
* system preference, a stored `"light"`/`"dark"` (localStorage
|
|
48
|
+
* `SET_LIGHTSWITCH_STORAGE_KEY`) overrides it. Activation targets the opposite of
|
|
49
|
+
* the current resolved theme; when the target equals the system preference
|
|
50
|
+
* the override is cleared instead of stored, so a value matching the system
|
|
51
|
+
* is never pinned. Storage is only evaluated on user interaction — a system
|
|
52
|
+
* preference change never rewrites the stored value. The theme is applied by
|
|
53
|
+
* setting or removing `data-set-theme` on the closest Set root; the control's
|
|
54
|
+
* face follows via CSS.
|
|
55
|
+
*/
|
|
56
|
+
export declare function defineSetLightswitch(): void;
|
|
57
|
+
/** Declarative lightswitch contract mirror for tooling, docs, and adapters. */
|
|
58
|
+
export declare const SET_LIGHTSWITCH_SPEC: SetComponentSpec;
|
|
59
|
+
//# sourceMappingURL=lightswitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightswitch.d.ts","sourceRoot":"","sources":["../../../src/components/lightswitch/lightswitch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAInD,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAC1D,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AACrE,eAAO,MAAM,2BAA2B,cAAc,CAAC;AAKvD,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAUpD,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AA8BD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAmB,EACnB,EAAE,EACF,SAA4B,EAC5B,UAA8B,EAC9B,IAAW,GACZ,EAAE,mBAAmB,GAAG,OAAO,CA+B/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAEvE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CA+G3C;AAED,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,EAAE,gBAyElC,CAAC"}
|
|
@@ -24,7 +24,7 @@ export interface SetPosterImageProps {
|
|
|
24
24
|
srcSet?: string;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Renders the image media for a Poster. `
|
|
27
|
+
* Renders the image media for a Poster. `fit` and `priority` are locked
|
|
28
28
|
* to the values Poster's layout needs; `alt` is empty because Poster's
|
|
29
29
|
* image is decorative (content-over-background).
|
|
30
30
|
*
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export declare const SET_VIDEO_TAG_NAME = "set-video";
|
|
4
|
+
export type SetVideoFit = "intrinsic" | "fluid";
|
|
5
|
+
export type SetVideoPreload = "auto" | "metadata" | "none";
|
|
6
|
+
export interface SetVideoProps {
|
|
7
|
+
/** Starts playback automatically. @default false */
|
|
8
|
+
autoPlay?: boolean;
|
|
9
|
+
/** Shows native playback controls. @default false */
|
|
10
|
+
controls?: boolean;
|
|
11
|
+
/** Layout mode. @default "intrinsic" */
|
|
12
|
+
fit?: SetVideoFit;
|
|
13
|
+
/** Intrinsic height in pixels. */
|
|
14
|
+
height?: number;
|
|
15
|
+
/** DOM id. */
|
|
16
|
+
id?: string;
|
|
17
|
+
/** Restarts playback when the video ends. @default false */
|
|
18
|
+
loop?: boolean;
|
|
19
|
+
/** Starts playback silent. @default false */
|
|
20
|
+
muted?: boolean;
|
|
21
|
+
/** Plays inline instead of fullscreen on iOS. @default false */
|
|
22
|
+
playsInline?: boolean;
|
|
23
|
+
/** Image URL shown before playback begins. */
|
|
24
|
+
poster?: string;
|
|
25
|
+
/** Preload hint (HTML `video[preload]`). */
|
|
26
|
+
preload?: SetVideoPreload;
|
|
27
|
+
/** Video source URL. */
|
|
28
|
+
src: string;
|
|
29
|
+
/** Intrinsic width in pixels. */
|
|
30
|
+
width?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Builds the IR tree for the Set video component.
|
|
34
|
+
*
|
|
35
|
+
* @param props - Video component props.
|
|
36
|
+
* @returns IR node for video markup.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildSetVideo({ autoPlay, controls, fit, height, id, loop, muted, playsInline, poster, preload, src, width, }: SetVideoProps): SetNode;
|
|
39
|
+
/**
|
|
40
|
+
* SSR renderer for the Set video component.
|
|
41
|
+
*
|
|
42
|
+
* Emits meaningful light-DOM HTML inside a `set-video` host. When `autoPlay`
|
|
43
|
+
* is set, runtime hydration pauses playback while the user prefers reduced
|
|
44
|
+
* motion and resumes it if the preference relaxes.
|
|
45
|
+
*
|
|
46
|
+
* @param props - Video component props.
|
|
47
|
+
* @returns HTML string for video markup.
|
|
48
|
+
*/
|
|
49
|
+
export declare function renderSetVideo(props: SetVideoProps): string;
|
|
50
|
+
/**
|
|
51
|
+
* Defines the `set-video` custom element runtime.
|
|
52
|
+
*
|
|
53
|
+
* Safe to call multiple times. Existing SSR-rendered `set-video` hosts will
|
|
54
|
+
* upgrade in place. Hosts whose video declares `autoplay` are paused while
|
|
55
|
+
* `(prefers-reduced-motion: reduce)` matches — the `autoplay` attribute is
|
|
56
|
+
* withdrawn so pending playback cannot start — and resume when it stops
|
|
57
|
+
* matching.
|
|
58
|
+
*/
|
|
59
|
+
export declare function defineSetVideo(): void;
|
|
60
|
+
/** Declarative video contract mirror for tooling, docs, and adapters. */
|
|
61
|
+
export declare const SET_VIDEO_SPEC: SetComponentSpec;
|
|
62
|
+
//# sourceMappingURL=video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../src/components/video/video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5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