@vio-live/web-sdk 0.2.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/README.md +29 -2
- package/dist/chunk-NP2KCM7X.js +3859 -0
- package/dist/chunk-NP2KCM7X.js.map +1 -0
- package/dist/chunk-PBQSHIID.js +3 -0
- package/dist/{chunk-GGM2AIK5.js.map → chunk-PBQSHIID.js.map} +1 -1
- package/dist/{chunk-7JSSYPRN.js → chunk-V5ZQG2H5.js} +1419 -169
- package/dist/chunk-V5ZQG2H5.js.map +1 -0
- package/dist/core/index.d.ts +314 -12
- package/dist/core/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +3 -2
- package/dist/react/index.js.map +1 -1
- package/dist/tokens-CvqQYURw.d.ts +555 -0
- package/dist/ui/index.d.ts +3 -83
- package/dist/ui/index.js +5 -132
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-7JSSYPRN.js.map +0 -1
- package/dist/chunk-GGM2AIK5.js +0 -3
- package/dist/chunk-SOO2G6CF.js +0 -1618
- package/dist/chunk-SOO2G6CF.js.map +0 -1
- package/dist/vio-checkout-CrC5tvmh.d.ts +0 -300
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { V as VioCart, a as VioCheckout, b as VioProduct, c as VioProductCarousel, d as VioProductDetail } from '../
|
|
1
|
+
export { V as VioCart, a as VioCheckout, b as VioProduct, c as VioProductCarousel, d as VioProductDetail, e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-CvqQYURw.js';
|
|
2
2
|
import 'lit-html';
|
|
3
3
|
import 'lit';
|
|
4
4
|
|
|
@@ -24,86 +24,6 @@ import 'lit';
|
|
|
24
24
|
*/
|
|
25
25
|
declare function registerVioElements(): void;
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Vio Design Tokens — editorial commerce aesthetic.
|
|
29
|
-
*
|
|
30
|
-
* Extracted from the Allermedia "Mote & Livsstil" reference (the target
|
|
31
|
-
* pilot site). Mood: Vogue-like fashion magazine — serif headlines,
|
|
32
|
-
* sans-serif body, near-monochrome palette, terracotta accent for
|
|
33
|
-
* editorial labels ("REDAKSJONENS FAVORITTER").
|
|
34
|
-
*
|
|
35
|
-
* Tokens are exposed both as a typed TS object (`VioTokens`) and as
|
|
36
|
-
* CSS custom properties on `:root` (auto-injected when this module is
|
|
37
|
-
* imported in a browser). Consumers can override individual variables
|
|
38
|
-
* to re-skin without touching SDK source.
|
|
39
|
-
*/
|
|
40
|
-
declare const VioTokens: {
|
|
41
|
-
readonly color: {
|
|
42
|
-
readonly text: {
|
|
43
|
-
readonly primary: "#0a0a0a";
|
|
44
|
-
readonly secondary: "#666666";
|
|
45
|
-
readonly tertiary: "#999999";
|
|
46
|
-
readonly onPrimary: "#ffffff";
|
|
47
|
-
};
|
|
48
|
-
readonly accent: {
|
|
49
|
-
readonly editorial: "#c14a3b";
|
|
50
|
-
};
|
|
51
|
-
readonly surface: {
|
|
52
|
-
readonly base: "#ffffff";
|
|
53
|
-
readonly muted: "#f2f2f2";
|
|
54
|
-
readonly hover: "#fafafa";
|
|
55
|
-
};
|
|
56
|
-
readonly border: {
|
|
57
|
-
readonly subtle: "#e5e5e5";
|
|
58
|
-
readonly default: "#cccccc";
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
readonly font: {
|
|
62
|
-
readonly serif: "\"Tinos\", \"Playfair Display\", Georgia, serif";
|
|
63
|
-
readonly sans: "\"Inter\", -apple-system, \"Helvetica Neue\", Arial, sans-serif";
|
|
64
|
-
};
|
|
65
|
-
readonly size: {
|
|
66
|
-
readonly xs: "12px";
|
|
67
|
-
readonly sm: "14px";
|
|
68
|
-
readonly md: "16px";
|
|
69
|
-
readonly lg: "20px";
|
|
70
|
-
readonly xl: "24px";
|
|
71
|
-
readonly '2xl': "32px";
|
|
72
|
-
readonly '3xl': "40px";
|
|
73
|
-
};
|
|
74
|
-
readonly weight: {
|
|
75
|
-
readonly regular: 400;
|
|
76
|
-
readonly medium: 500;
|
|
77
|
-
readonly semibold: 600;
|
|
78
|
-
readonly bold: 700;
|
|
79
|
-
};
|
|
80
|
-
readonly tracking: {
|
|
81
|
-
readonly label: "0.1em";
|
|
82
|
-
readonly title: "0";
|
|
83
|
-
};
|
|
84
|
-
readonly lineHeight: {
|
|
85
|
-
readonly tight: 1.1;
|
|
86
|
-
readonly snug: 1.3;
|
|
87
|
-
readonly normal: 1.5;
|
|
88
|
-
};
|
|
89
|
-
readonly space: {
|
|
90
|
-
readonly xs: "4px";
|
|
91
|
-
readonly sm: "8px";
|
|
92
|
-
readonly md: "16px";
|
|
93
|
-
readonly lg: "24px";
|
|
94
|
-
readonly xl: "32px";
|
|
95
|
-
readonly '2xl': "48px";
|
|
96
|
-
readonly '3xl': "64px";
|
|
97
|
-
};
|
|
98
|
-
readonly radius: {
|
|
99
|
-
readonly none: "0";
|
|
100
|
-
readonly sm: "2px";
|
|
101
|
-
readonly md: "4px";
|
|
102
|
-
readonly lg: "8px";
|
|
103
|
-
readonly full: "9999px";
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
|
|
107
27
|
/**
|
|
108
28
|
* Vio UI — Web Components + design tokens.
|
|
109
29
|
*
|
|
@@ -118,6 +38,6 @@ declare const VioTokens: {
|
|
|
118
38
|
* SSR-safe: every side-effect guards on `typeof document !== 'undefined'`.
|
|
119
39
|
*/
|
|
120
40
|
|
|
121
|
-
declare const VIO_UI_VERSION = "0.
|
|
41
|
+
declare const VIO_UI_VERSION = "0.3.0";
|
|
122
42
|
|
|
123
|
-
export { VIO_UI_VERSION,
|
|
43
|
+
export { VIO_UI_VERSION, registerVioElements };
|
package/dist/ui/index.js
CHANGED
|
@@ -1,138 +1,11 @@
|
|
|
1
|
-
import { registerVioElements } from '../chunk-
|
|
2
|
-
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, registerVioElements } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
|
|
5
|
-
// src/ui/tokens.ts
|
|
6
|
-
var VioTokens = {
|
|
7
|
-
color: {
|
|
8
|
-
text: {
|
|
9
|
-
primary: "#0a0a0a",
|
|
10
|
-
secondary: "#666666",
|
|
11
|
-
tertiary: "#999999",
|
|
12
|
-
onPrimary: "#ffffff"
|
|
13
|
-
},
|
|
14
|
-
accent: {
|
|
15
|
-
editorial: "#c14a3b"
|
|
16
|
-
// "REDAKSJONENS FAVORITTER" red
|
|
17
|
-
},
|
|
18
|
-
surface: {
|
|
19
|
-
base: "#ffffff",
|
|
20
|
-
muted: "#f2f2f2",
|
|
21
|
-
// product image background
|
|
22
|
-
hover: "#fafafa"
|
|
23
|
-
},
|
|
24
|
-
border: {
|
|
25
|
-
subtle: "#e5e5e5",
|
|
26
|
-
default: "#cccccc"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
font: {
|
|
30
|
-
serif: '"Tinos", "Playfair Display", Georgia, serif',
|
|
31
|
-
sans: '"Inter", -apple-system, "Helvetica Neue", Arial, sans-serif'
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
xs: "12px",
|
|
35
|
-
sm: "14px",
|
|
36
|
-
md: "16px",
|
|
37
|
-
lg: "20px",
|
|
38
|
-
xl: "24px",
|
|
39
|
-
"2xl": "32px",
|
|
40
|
-
"3xl": "40px"
|
|
41
|
-
},
|
|
42
|
-
weight: {
|
|
43
|
-
regular: 400,
|
|
44
|
-
medium: 500,
|
|
45
|
-
semibold: 600,
|
|
46
|
-
bold: 700
|
|
47
|
-
},
|
|
48
|
-
tracking: {
|
|
49
|
-
label: "0.1em",
|
|
50
|
-
// uppercase labels (BRAND, RETAILER, REDAKSJONENS FAVORITTER)
|
|
51
|
-
title: "0"
|
|
52
|
-
},
|
|
53
|
-
lineHeight: {
|
|
54
|
-
tight: 1.1,
|
|
55
|
-
snug: 1.3,
|
|
56
|
-
normal: 1.5
|
|
57
|
-
},
|
|
58
|
-
space: {
|
|
59
|
-
xs: "4px",
|
|
60
|
-
sm: "8px",
|
|
61
|
-
md: "16px",
|
|
62
|
-
lg: "24px",
|
|
63
|
-
xl: "32px",
|
|
64
|
-
"2xl": "48px",
|
|
65
|
-
"3xl": "64px"
|
|
66
|
-
},
|
|
67
|
-
radius: {
|
|
68
|
-
none: "0",
|
|
69
|
-
sm: "2px",
|
|
70
|
-
md: "4px",
|
|
71
|
-
lg: "8px",
|
|
72
|
-
full: "9999px"
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
var VIO_TOKENS_CSS = `
|
|
76
|
-
:root {
|
|
77
|
-
/* color \u2014 text */
|
|
78
|
-
--vio-color-text: ${VioTokens.color.text.primary};
|
|
79
|
-
--vio-color-text-secondary: ${VioTokens.color.text.secondary};
|
|
80
|
-
--vio-color-text-tertiary: ${VioTokens.color.text.tertiary};
|
|
81
|
-
--vio-color-text-on-primary:${VioTokens.color.text.onPrimary};
|
|
82
|
-
|
|
83
|
-
/* color \u2014 accent */
|
|
84
|
-
--vio-color-accent: ${VioTokens.color.accent.editorial};
|
|
85
|
-
|
|
86
|
-
/* color \u2014 surface */
|
|
87
|
-
--vio-color-surface: ${VioTokens.color.surface.base};
|
|
88
|
-
--vio-color-surface-muted: ${VioTokens.color.surface.muted};
|
|
89
|
-
--vio-color-surface-hover: ${VioTokens.color.surface.hover};
|
|
90
|
-
|
|
91
|
-
/* color \u2014 border */
|
|
92
|
-
--vio-color-border: ${VioTokens.color.border.subtle};
|
|
93
|
-
--vio-color-border-default: ${VioTokens.color.border.default};
|
|
94
|
-
|
|
95
|
-
/* font */
|
|
96
|
-
--vio-font-serif: ${VioTokens.font.serif};
|
|
97
|
-
--vio-font-sans: ${VioTokens.font.sans};
|
|
98
|
-
|
|
99
|
-
/* size */
|
|
100
|
-
--vio-size-xs: ${VioTokens.size.xs};
|
|
101
|
-
--vio-size-sm: ${VioTokens.size.sm};
|
|
102
|
-
--vio-size-md: ${VioTokens.size.md};
|
|
103
|
-
--vio-size-lg: ${VioTokens.size.lg};
|
|
104
|
-
--vio-size-xl: ${VioTokens.size.xl};
|
|
105
|
-
|
|
106
|
-
/* tracking (uppercase letterspacing) */
|
|
107
|
-
--vio-tracking-label: ${VioTokens.tracking.label};
|
|
108
|
-
|
|
109
|
-
/* space */
|
|
110
|
-
--vio-space-xs: ${VioTokens.space.xs};
|
|
111
|
-
--vio-space-sm: ${VioTokens.space.sm};
|
|
112
|
-
--vio-space-md: ${VioTokens.space.md};
|
|
113
|
-
--vio-space-lg: ${VioTokens.space.lg};
|
|
114
|
-
--vio-space-xl: ${VioTokens.space.xl};
|
|
115
|
-
|
|
116
|
-
/* radius */
|
|
117
|
-
--vio-radius-sm: ${VioTokens.radius.sm};
|
|
118
|
-
--vio-radius-md: ${VioTokens.radius.md};
|
|
119
|
-
--vio-radius-lg: ${VioTokens.radius.lg};
|
|
120
|
-
}
|
|
121
|
-
`;
|
|
122
|
-
function injectTokens() {
|
|
123
|
-
if (typeof document === "undefined") return;
|
|
124
|
-
if (document.querySelector('style[data-vio="tokens"]') !== null) return;
|
|
125
|
-
const style = document.createElement("style");
|
|
126
|
-
style.setAttribute("data-vio", "tokens");
|
|
127
|
-
style.textContent = VIO_TOKENS_CSS;
|
|
128
|
-
document.head.appendChild(style);
|
|
129
|
-
}
|
|
130
|
-
injectTokens();
|
|
1
|
+
import { registerVioElements } from '../chunk-V5ZQG2H5.js';
|
|
2
|
+
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-V5ZQG2H5.js';
|
|
3
|
+
import '../chunk-NP2KCM7X.js';
|
|
131
4
|
|
|
132
5
|
// src/ui/index.ts
|
|
133
6
|
registerVioElements();
|
|
134
|
-
var VIO_UI_VERSION = "0.
|
|
7
|
+
var VIO_UI_VERSION = "0.3.0";
|
|
135
8
|
|
|
136
|
-
export { VIO_UI_VERSION
|
|
9
|
+
export { VIO_UI_VERSION };
|
|
137
10
|
//# sourceMappingURL=index.js.map
|
|
138
11
|
//# sourceMappingURL=index.js.map
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/
|
|
1
|
+
{"version":3,"sources":["../../src/ui/index.ts"],"names":[],"mappings":";;;;;AAmBA,mBAAA,EAAoB;AAYb,IAAM,cAAA,GAAiB","file":"index.js","sourcesContent":["/**\n * Vio UI — Web Components + design tokens.\n *\n * Importing this file (directly or via the main `vio` entry) has two\n * side-effects:\n * 1. Injects design tokens as CSS custom properties on `:root`\n * 2. Registers all `<vio-*>` custom elements (via `registerVioElements()`)\n *\n * Registration goes through an explicit function call (see ./elements) so it\n * survives tree-shaking while keeping `./core` tree-shakeable.\n *\n * SSR-safe: every side-effect guards on `typeof document !== 'undefined'`.\n */\n\nimport './tokens.js'\nimport { registerVioElements } from './elements.js'\n\n// Auto-register on import, so the conventional `import '@vio-live/web-sdk/ui'`\n// keeps working. This call is what pins the registration into this entry.\nregisterVioElements()\n\nexport { VioTokens, applyVioTheme, type VioThemeOverrides } from './tokens.js'\nexport {\n registerVioElements,\n VioProduct,\n VioProductCarousel,\n VioProductDetail,\n VioCart,\n VioCheckout,\n} from './elements.js'\n\nexport const VIO_UI_VERSION = '0.3.0'\n"]}
|