@pagehub/sdk 0.1.6 → 0.1.7

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.
Files changed (2) hide show
  1. package/dist/theme.css +168 -0
  2. package/package.json +5 -3
package/dist/theme.css ADDED
@@ -0,0 +1,168 @@
1
+ /* ═══ @pagehub/sdk Default Theme (DaisyUI 5) ═════════════════════════════════
2
+ Canonical design tokens: palette, aliases, style, shadows, fonts.
3
+ Import this in any Tailwind 4 entry point to get the full DaisyUI 5 theme.
4
+
5
+ ⚠️ GENERATED FILE — do not edit. Source: packages/sdk/src/utils/design/tokenSource.ts
6
+ Run `pnpm exec tsx scripts/generate-theme-css.mjs` (also runs in prebuild).
7
+ ═════════════════════════════════════════════════════════════════════════════ */
8
+
9
+ @custom-variant dark (&:is(.dark *):not(#viewport:not(.dark) *));
10
+
11
+ /* ─── Light palette ────────────────────────────────────────────────────────── */
12
+
13
+ :root {
14
+ /* DaisyUI 5 canonical tokens (oklch) */
15
+ --primary: oklch(14% 0 0);
16
+ --primary-content: oklch(100% 0 0);
17
+ --secondary: oklch(96.5% 0 0);
18
+ --secondary-content: oklch(14% 0 0);
19
+ --accent: oklch(96.5% 0 0);
20
+ --accent-content: oklch(14% 0 0);
21
+ --neutral: oklch(96.5% 0 0);
22
+ --neutral-content: oklch(55% 0 0);
23
+ --base-100: oklch(100% 0 0);
24
+ --base-200: oklch(100% 0 0);
25
+ --base-300: oklch(92% 0 0);
26
+ --base-content: oklch(0% 0 0);
27
+ --error: oklch(63.7% 0.208 26.3);
28
+ --error-content: oklch(98% 0 0);
29
+ --info: oklch(62% 0.214 259);
30
+ --info-content: oklch(100% 0 0);
31
+ --success: oklch(62% 0.178 155);
32
+ --success-content: oklch(100% 0 0);
33
+ --warning: oklch(75% 0.183 70);
34
+ --warning-content: oklch(0% 0 0);
35
+ --ring: oklch(14% 0 0);
36
+ /* --border is a WIDTH in DaisyUI 5, not a color. Border color uses --base-300 */
37
+ --border: 1px;
38
+
39
+ /* DaisyUI 5 style tokens */
40
+ --radius-box: 0.5rem;
41
+ --radius-field: 0.25rem;
42
+ --radius-selector: 0.5rem;
43
+ --size-field: 0.25rem;
44
+ --size-selector: 0.25rem;
45
+ --depth: 1;
46
+ --noise: 0;
47
+ /* Radius aliases */
48
+ --radius: var(--radius-box);
49
+ --card-radius: var(--radius-box);
50
+ --input-border-radius: var(--radius-field);
51
+
52
+ /* Sidebar chrome (editor only — kept here so --color-sidebar-* aliases resolve) */
53
+ --sidebar-foreground: var(--base-content);
54
+ --sidebar-border: var(--base-300);
55
+
56
+ /* Font stacks */
57
+ --font-sans:
58
+ ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
59
+ "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
60
+ "Segoe UI Symbol", "Noto Color Emoji";
61
+ --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
62
+ --font-mono:
63
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
64
+ monospace;
65
+
66
+ /* Shadow primitives */
67
+ --shadow-x: 1px;
68
+ --shadow-y: 2px;
69
+ --shadow-blur: 4.5px;
70
+ --shadow-spread: 0px;
71
+ --shadow-opacity: 0.14;
72
+ --shadow-color: #000000;
73
+ /* Shadow composites */
74
+ --shadow-2xs: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.07);
75
+ --shadow-xs: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.07);
76
+ --shadow-sm: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.14), 1px 1px 2px -1px hsl(0 0% 0% / 0.14);
77
+ --shadow: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.14), 1px 1px 2px -1px hsl(0 0% 0% / 0.14);
78
+ --shadow-md: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.14), 1px 2px 4px -1px hsl(0 0% 0% / 0.14);
79
+ --shadow-lg: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.14), 1px 4px 6px -1px hsl(0 0% 0% / 0.14);
80
+ --shadow-xl: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.14), 1px 8px 10px -1px hsl(0 0% 0% / 0.14);
81
+ --shadow-2xl: 1px 2px 4.5px 0px hsl(0 0% 0% / 0.35);
82
+
83
+ --tracking-normal: 0em;
84
+ --spacing: 0.25rem;
85
+ }
86
+
87
+ /* ─── Dark palette ─────────────────────────────────────────────────────────── */
88
+
89
+ .dark {
90
+ --primary: oklch(98% 0 0);
91
+ --primary-content: oklch(14% 0 0);
92
+ --secondary: oklch(24% 0 0);
93
+ --secondary-content: oklch(98% 0 0);
94
+ --accent: oklch(32% 0 0);
95
+ --accent-content: oklch(98% 0 0);
96
+ --neutral: oklch(20% 0 0);
97
+ --neutral-content: oklch(78% 0 0);
98
+ --base-100: oklch(12% 0 0);
99
+ --base-200: oklch(18% 0 0);
100
+ --base-300: oklch(32% 0 0);
101
+ --base-content: oklch(98% 0 0);
102
+ --error: oklch(55% 0.15 26);
103
+ --error-content: oklch(98% 0 0);
104
+ --info: oklch(62% 0.214 259);
105
+ --info-content: oklch(14% 0 0);
106
+ --success: oklch(62% 0.178 155);
107
+ --success-content: oklch(14% 0 0);
108
+ --warning: oklch(75% 0.183 70);
109
+ --warning-content: oklch(14% 0 0);
110
+ --ring: oklch(85% 0 0);
111
+ }
112
+
113
+ /* ─── Tailwind Theme Mapping ───────────────────────────────────────────────── */
114
+
115
+ @theme inline {
116
+ /* DaisyUI 5 canonical color tokens */
117
+ --color-primary: var(--primary);
118
+ --color-primary-content: var(--primary-content);
119
+ --color-secondary: var(--secondary);
120
+ --color-secondary-content: var(--secondary-content);
121
+ --color-accent: var(--accent);
122
+ --color-accent-content: var(--accent-content);
123
+ --color-neutral: var(--neutral);
124
+ --color-neutral-content: var(--neutral-content);
125
+ --color-base-100: var(--base-100);
126
+ --color-base-200: var(--base-200);
127
+ --color-base-300: var(--base-300);
128
+ --color-base-content: var(--base-content);
129
+ --color-error: var(--error);
130
+ --color-error-content: var(--error-content);
131
+ --color-info: var(--info);
132
+ --color-info-content: var(--info-content);
133
+ --color-success: var(--success);
134
+ --color-success-content: var(--success-content);
135
+ --color-warning: var(--warning);
136
+ --color-warning-content: var(--warning-content);
137
+ --color-border: var(--base-300);
138
+ --color-input: var(--base-300);
139
+ --color-ring: var(--ring);
140
+
141
+ /* Fonts */
142
+ --font-sans: var(--sans-font-family, var(--font-sans));
143
+ --font-mono: var(--mono-font-family, var(--font-mono));
144
+ --font-serif: var(--serif-font-family, var(--font-serif));
145
+ --font-heading: var(--heading-font-family), sans-serif;
146
+ --font-body: var(--body-font-family), sans-serif;
147
+ --font-accent: var(--accent-font-family), sans-serif;
148
+
149
+ /* Border Radius */
150
+ --radius-box: var(--radius-box);
151
+ --radius-field: var(--radius-field);
152
+ --radius-selector: var(--radius-selector);
153
+ --radius-full: var(--radius-full, 9999px);
154
+ --radius-sm: calc(var(--radius) - 4px);
155
+ --radius-md: calc(var(--radius) - 2px);
156
+ --radius-lg: var(--radius);
157
+ --radius-xl: calc(var(--radius) + 4px);
158
+
159
+ /* Shadows */
160
+ --shadow-2xs: var(--shadow-2xs);
161
+ --shadow-xs: var(--shadow-xs);
162
+ --shadow-sm: var(--shadow-sm);
163
+ --shadow: var(--shadow);
164
+ --shadow-md: var(--shadow-md);
165
+ --shadow-lg: var(--shadow-lg);
166
+ --shadow-xl: var(--shadow-xl);
167
+ --shadow-2xl: var(--shadow-2xl);
168
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagehub/sdk",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Embeddable visual page builder SDK — drop a full drag-and-drop page editor into any web app, or render published sites anywhere JS runs.",
5
5
  "type": "module",
6
6
  "main": "./dist/pagehub.js",
@@ -41,7 +41,8 @@
41
41
  "import": "./dist/render/static/index.js",
42
42
  "default": "./dist/render/static/index.js"
43
43
  },
44
- "./editor.css": "./dist/editor.css"
44
+ "./editor.css": "./dist/editor.css",
45
+ "./theme.css": "./dist/theme.css"
45
46
  },
46
47
  "files": [
47
48
  "dist"
@@ -324,10 +325,11 @@
324
325
  },
325
326
  "scripts": {
326
327
  "dev": "vite build --watch",
327
- "build": "vite build && vite build --config vite.editor-css.config.ts && pnpm run build:viewer && pnpm run build:static",
328
+ "build": "vite build && vite build --config vite.editor-css.config.ts && pnpm run build:viewer && pnpm run build:static && pnpm run build:theme-css",
328
329
  "build:editor-css": "vite build --config vite.editor-css.config.ts",
329
330
  "build:viewer": "vite build --mode viewer",
330
331
  "build:static": "vite build --mode static",
332
+ "build:theme-css": "cp src/css/theme.css dist/theme.css",
331
333
  "preview": "vite preview",
332
334
  "typecheck": "tsc --noEmit"
333
335
  }