@duongthiu/onex-core 0.1.0 → 0.1.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 +44 -65
- package/THEME_API.md +36 -33
- package/dist/api.js +14 -0
- package/dist/api.js.map +1 -0
- package/dist/api.mjs +5 -0
- package/dist/api.mjs.map +1 -0
- package/dist/auth.js +23 -0
- package/dist/auth.js.map +1 -0
- package/dist/auth.mjs +6 -0
- package/dist/auth.mjs.map +1 -0
- package/dist/blog.js +22 -0
- package/dist/blog.js.map +1 -0
- package/dist/blog.mjs +5 -0
- package/dist/blog.mjs.map +1 -0
- package/dist/cart.js +27 -0
- package/dist/cart.js.map +1 -0
- package/dist/cart.mjs +6 -0
- package/dist/cart.mjs.map +1 -0
- package/dist/chunk-2CSWHI3L.js +210 -0
- package/dist/chunk-2CSWHI3L.js.map +1 -0
- package/dist/chunk-2FGHIDUV.js +99 -0
- package/dist/chunk-2FGHIDUV.js.map +1 -0
- package/dist/chunk-2NMEKWO5.js +40 -0
- package/dist/chunk-2NMEKWO5.js.map +1 -0
- package/dist/chunk-43BVHGDT.mjs +131 -0
- package/dist/chunk-43BVHGDT.mjs.map +1 -0
- package/dist/chunk-4JVQJI3I.mjs +290 -0
- package/dist/chunk-4JVQJI3I.mjs.map +1 -0
- package/dist/chunk-5N2EKK5O.js +9550 -0
- package/dist/chunk-5N2EKK5O.js.map +1 -0
- package/dist/chunk-5T6NDVSN.js +76 -0
- package/dist/chunk-5T6NDVSN.js.map +1 -0
- package/dist/chunk-73AINNCI.mjs +201 -0
- package/dist/chunk-73AINNCI.mjs.map +1 -0
- package/dist/chunk-AIXBDAVP.mjs +61 -0
- package/dist/chunk-AIXBDAVP.mjs.map +1 -0
- package/dist/chunk-ALYN5HAC.js +210 -0
- package/dist/chunk-ALYN5HAC.js.map +1 -0
- package/dist/chunk-AREMJR3Q.js +36 -0
- package/dist/chunk-AREMJR3Q.js.map +1 -0
- package/dist/chunk-DXAI6XOI.mjs +33 -0
- package/dist/chunk-DXAI6XOI.mjs.map +1 -0
- package/dist/chunk-F5TFNWFJ.mjs +257 -0
- package/dist/chunk-F5TFNWFJ.mjs.map +1 -0
- package/dist/chunk-FQ7FWUZN.js +265 -0
- package/dist/chunk-FQ7FWUZN.js.map +1 -0
- package/dist/{chunk-3SZX6LHT.js → chunk-J27VGXJH.js} +2 -24
- package/dist/chunk-J27VGXJH.js.map +1 -0
- package/dist/chunk-JZ46LLTZ.js +121 -0
- package/dist/chunk-JZ46LLTZ.js.map +1 -0
- package/dist/chunk-K24UHN6G.mjs +76 -0
- package/dist/chunk-K24UHN6G.mjs.map +1 -0
- package/dist/chunk-KCQGGU5R.mjs +344 -0
- package/dist/chunk-KCQGGU5R.mjs.map +1 -0
- package/dist/chunk-MT22NYKT.mjs +117 -0
- package/dist/chunk-MT22NYKT.mjs.map +1 -0
- package/dist/chunk-NDD472IZ.js +85 -0
- package/dist/chunk-NDD472IZ.js.map +1 -0
- package/dist/chunk-NHOIGGYU.mjs +833 -0
- package/dist/chunk-NHOIGGYU.mjs.map +1 -0
- package/dist/chunk-O3XR7TW3.mjs +12 -0
- package/dist/chunk-O3XR7TW3.mjs.map +1 -0
- package/dist/chunk-OAPYSC2X.mjs +206 -0
- package/dist/chunk-OAPYSC2X.mjs.map +1 -0
- package/dist/{chunk-XE4EOKS4.mjs → chunk-ONJREDYY.mjs} +3 -23
- package/dist/chunk-ONJREDYY.mjs.map +1 -0
- package/dist/chunk-OVT2LUAM.js +197 -0
- package/dist/chunk-OVT2LUAM.js.map +1 -0
- package/dist/chunk-OWNGNGKL.js +331 -0
- package/dist/chunk-OWNGNGKL.js.map +1 -0
- package/dist/chunk-P7SXNZSV.js +298 -0
- package/dist/chunk-P7SXNZSV.js.map +1 -0
- package/dist/chunk-PFJOL3HI.mjs +71 -0
- package/dist/chunk-PFJOL3HI.mjs.map +1 -0
- package/dist/chunk-PPULMWJ6.js +295 -0
- package/dist/chunk-PPULMWJ6.js.map +1 -0
- package/dist/chunk-RGIVKACG.js +359 -0
- package/dist/chunk-RGIVKACG.js.map +1 -0
- package/dist/chunk-RPP5K2LP.js +870 -0
- package/dist/chunk-RPP5K2LP.js.map +1 -0
- package/dist/{chunk-7EON6Q4L.mjs → chunk-RUCHWUD7.mjs} +7651 -6370
- package/dist/chunk-RUCHWUD7.mjs.map +1 -0
- package/dist/chunk-SEVUIX4H.js +137 -0
- package/dist/chunk-SEVUIX4H.js.map +1 -0
- package/dist/chunk-SK2FSHFM.mjs +208 -0
- package/dist/chunk-SK2FSHFM.mjs.map +1 -0
- package/dist/chunk-T6EJ2GAV.mjs +294 -0
- package/dist/chunk-T6EJ2GAV.mjs.map +1 -0
- package/dist/chunk-ULBDOFZI.mjs +302 -0
- package/dist/chunk-ULBDOFZI.mjs.map +1 -0
- package/dist/chunk-V3JIELNV.js +241 -0
- package/dist/chunk-V3JIELNV.js.map +1 -0
- package/dist/chunk-V5E2KWMA.mjs +238 -0
- package/dist/chunk-V5E2KWMA.mjs.map +1 -0
- package/dist/chunk-VJA3ER6A.js +14 -0
- package/dist/chunk-VJA3ER6A.js.map +1 -0
- package/dist/chunk-VLI7ULX5.js +66 -0
- package/dist/chunk-VLI7ULX5.js.map +1 -0
- package/dist/chunk-WFGS5OFH.mjs +189 -0
- package/dist/chunk-WFGS5OFH.mjs.map +1 -0
- package/dist/chunk-WVC5GP24.mjs +96 -0
- package/dist/chunk-WVC5GP24.mjs.map +1 -0
- package/dist/chunk-YOSPWY5K.mjs +36 -0
- package/dist/chunk-YOSPWY5K.mjs.map +1 -0
- package/dist/chunk-ZFFXXLX7.js +205 -0
- package/dist/chunk-ZFFXXLX7.js.map +1 -0
- package/dist/client.js +512 -249
- package/dist/client.mjs +21 -2
- package/dist/components.js +393 -0
- package/dist/components.js.map +1 -0
- package/dist/components.mjs +8 -0
- package/dist/components.mjs.map +1 -0
- package/dist/config.js +17 -0
- package/dist/config.js.map +1 -0
- package/dist/config.mjs +4 -0
- package/dist/config.mjs.map +1 -0
- package/dist/contact.js +22 -0
- package/dist/contact.js.map +1 -0
- package/dist/contact.mjs +5 -0
- package/dist/contact.mjs.map +1 -0
- package/dist/contexts.js +51 -0
- package/dist/contexts.js.map +1 -0
- package/dist/contexts.mjs +6 -0
- package/dist/contexts.mjs.map +1 -0
- package/dist/finance.js +26 -0
- package/dist/finance.js.map +1 -0
- package/dist/finance.mjs +5 -0
- package/dist/finance.mjs.map +1 -0
- package/dist/icons.js +15 -0
- package/dist/icons.js.map +1 -0
- package/dist/icons.mjs +4 -0
- package/dist/icons.mjs.map +1 -0
- package/dist/index.js +512 -249
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal.js +1437 -0
- package/dist/internal.js.map +1 -0
- package/dist/internal.mjs +1404 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/motion.js +51 -0
- package/dist/motion.js.map +1 -0
- package/dist/motion.mjs +38 -0
- package/dist/motion.mjs.map +1 -0
- package/dist/orders.js +22 -0
- package/dist/orders.js.map +1 -0
- package/dist/orders.mjs +5 -0
- package/dist/orders.mjs.map +1 -0
- package/dist/products.js +27 -0
- package/dist/products.js.map +1 -0
- package/dist/products.mjs +6 -0
- package/dist/products.mjs.map +1 -0
- package/dist/registry.js +44 -0
- package/dist/registry.js.map +1 -0
- package/dist/registry.mjs +7 -0
- package/dist/registry.mjs.map +1 -0
- package/dist/renderers.js +51 -0
- package/dist/renderers.js.map +1 -0
- package/dist/renderers.mjs +6 -0
- package/dist/renderers.mjs.map +1 -0
- package/dist/server.js +11 -189
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +3 -186
- package/dist/server.mjs.map +1 -1
- package/dist/types.js +37 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +4 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils.js +160 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +7 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/wrappers.js +104 -0
- package/dist/wrappers.js.map +1 -0
- package/dist/wrappers.mjs +96 -0
- package/dist/wrappers.mjs.map +1 -0
- package/package.json +112 -9
- package/dist/api-vuL1Eg5L.d.mts +0 -2961
- package/dist/api-vuL1Eg5L.d.ts +0 -2961
- package/dist/chunk-3SZX6LHT.js.map +0 -1
- package/dist/chunk-7EON6Q4L.mjs.map +0 -1
- package/dist/chunk-WDY773GJ.js +0 -8308
- package/dist/chunk-WDY773GJ.js.map +0 -1
- package/dist/chunk-XE4EOKS4.mjs.map +0 -1
- package/dist/client.d.mts +0 -1461
- package/dist/client.d.ts +0 -1461
- package/dist/index.d.mts +0 -125
- package/dist/index.d.ts +0 -125
- package/dist/server.d.mts +0 -70
- package/dist/server.d.ts +0 -70
package/README.md
CHANGED
|
@@ -74,22 +74,17 @@ Use esbuild with externalized dependencies:
|
|
|
74
74
|
|
|
75
75
|
```javascript
|
|
76
76
|
// esbuild.config.js
|
|
77
|
-
const esbuild = require("esbuild")
|
|
77
|
+
const esbuild = require("esbuild");
|
|
78
78
|
|
|
79
79
|
esbuild.build({
|
|
80
80
|
entryPoints: ["src/index.ts"],
|
|
81
81
|
bundle: true,
|
|
82
82
|
format: "esm",
|
|
83
83
|
outfile: "dist/index.mjs",
|
|
84
|
-
external: [
|
|
85
|
-
"@onex/core",
|
|
86
|
-
"@onex/core/client",
|
|
87
|
-
"react",
|
|
88
|
-
"react-dom"
|
|
89
|
-
],
|
|
84
|
+
external: ["@onex/core", "@onex/core/client", "react", "react-dom"],
|
|
90
85
|
minify: true,
|
|
91
|
-
sourcemap: true
|
|
92
|
-
})
|
|
86
|
+
sourcemap: true,
|
|
87
|
+
});
|
|
93
88
|
```
|
|
94
89
|
|
|
95
90
|
## Package Exports
|
|
@@ -109,6 +104,7 @@ import { ... } from "@onex/core/client"
|
|
|
109
104
|
```
|
|
110
105
|
|
|
111
106
|
Browser-safe exports with `"use client"` directive:
|
|
107
|
+
|
|
112
108
|
- ✅ All type definitions
|
|
113
109
|
- ✅ UI components (Button, Heading, Card, etc.)
|
|
114
110
|
- ✅ Rendering engine (SectionRenderer, BlockRenderer, ComponentRenderer)
|
|
@@ -123,6 +119,7 @@ import { ... } from "@onex/core/server"
|
|
|
123
119
|
```
|
|
124
120
|
|
|
125
121
|
Server-only exports:
|
|
122
|
+
|
|
126
123
|
- ✅ ThemeRegistryManager (uses Node.js fs APIs)
|
|
127
124
|
- ✅ All types (re-exported for convenience)
|
|
128
125
|
|
|
@@ -132,51 +129,51 @@ Server-only exports:
|
|
|
132
129
|
|
|
133
130
|
```typescript
|
|
134
131
|
import type {
|
|
135
|
-
ThemeManifest,
|
|
136
|
-
ThemeModule,
|
|
137
|
-
ThemeConfig,
|
|
138
|
-
ThemeUpload,
|
|
139
|
-
} from "@onex/core"
|
|
132
|
+
ThemeManifest, // Theme metadata
|
|
133
|
+
ThemeModule, // What themes export
|
|
134
|
+
ThemeConfig, // Design tokens
|
|
135
|
+
ThemeUpload, // Upload metadata
|
|
136
|
+
} from "@onex/core";
|
|
140
137
|
```
|
|
141
138
|
|
|
142
139
|
### Section Types
|
|
143
140
|
|
|
144
141
|
```typescript
|
|
145
142
|
import type {
|
|
146
|
-
SectionComponentProps,
|
|
147
|
-
SectionInstance,
|
|
148
|
-
SectionSchema,
|
|
149
|
-
TemplateDefinition,
|
|
150
|
-
} from "@onex/core"
|
|
143
|
+
SectionComponentProps, // Props for section components
|
|
144
|
+
SectionInstance, // Section data
|
|
145
|
+
SectionSchema, // Section blueprint
|
|
146
|
+
TemplateDefinition, // Template variant
|
|
147
|
+
} from "@onex/core";
|
|
151
148
|
```
|
|
152
149
|
|
|
153
150
|
### Component Types
|
|
154
151
|
|
|
155
152
|
```typescript
|
|
156
153
|
import type {
|
|
157
|
-
ComponentInstance,
|
|
158
|
-
ComponentDefinition,
|
|
159
|
-
StyleSettings,
|
|
160
|
-
} from "@onex/core"
|
|
154
|
+
ComponentInstance, // Component data
|
|
155
|
+
ComponentDefinition, // Component blueprint
|
|
156
|
+
StyleSettings, // Component styles
|
|
157
|
+
} from "@onex/core";
|
|
161
158
|
```
|
|
162
159
|
|
|
163
160
|
### Block Types
|
|
164
161
|
|
|
165
162
|
```typescript
|
|
166
163
|
import type {
|
|
167
|
-
BlockInstance,
|
|
168
|
-
BlockDefinition,
|
|
169
|
-
} from "@onex/core"
|
|
164
|
+
BlockInstance, // Block data (supports nesting)
|
|
165
|
+
BlockDefinition, // Block blueprint
|
|
166
|
+
} from "@onex/core";
|
|
170
167
|
```
|
|
171
168
|
|
|
172
169
|
### Validation Types
|
|
173
170
|
|
|
174
171
|
```typescript
|
|
175
172
|
import type {
|
|
176
|
-
ValidationResult,
|
|
177
|
-
ValidationError,
|
|
178
|
-
ValidationWarning,
|
|
179
|
-
} from "@onex/core"
|
|
173
|
+
ValidationResult, // Validation result
|
|
174
|
+
ValidationError, // Validation error
|
|
175
|
+
ValidationWarning, // Validation warning
|
|
176
|
+
} from "@onex/core";
|
|
180
177
|
```
|
|
181
178
|
|
|
182
179
|
## Available Components
|
|
@@ -191,53 +188,32 @@ import {
|
|
|
191
188
|
FullWidthSection,
|
|
192
189
|
Container,
|
|
193
190
|
Grid,
|
|
194
|
-
Columns
|
|
195
|
-
} from "@onex/core/client"
|
|
191
|
+
Columns,
|
|
192
|
+
} from "@onex/core/client";
|
|
196
193
|
```
|
|
197
194
|
|
|
198
195
|
### Text Components
|
|
199
196
|
|
|
200
197
|
```typescript
|
|
201
|
-
import {
|
|
202
|
-
Heading,
|
|
203
|
-
Paragraph,
|
|
204
|
-
Quote,
|
|
205
|
-
Badge
|
|
206
|
-
} from "@onex/core/client"
|
|
198
|
+
import { Heading, Paragraph, Quote, Badge } from "@onex/core/client";
|
|
207
199
|
```
|
|
208
200
|
|
|
209
201
|
### Interactive Components
|
|
210
202
|
|
|
211
203
|
```typescript
|
|
212
|
-
import {
|
|
213
|
-
ButtonComponent,
|
|
214
|
-
Link,
|
|
215
|
-
Divider,
|
|
216
|
-
Spacer
|
|
217
|
-
} from "@onex/core/client"
|
|
204
|
+
import { ButtonComponent, Link, Divider, Spacer } from "@onex/core/client";
|
|
218
205
|
```
|
|
219
206
|
|
|
220
207
|
### Media Components
|
|
221
208
|
|
|
222
209
|
```typescript
|
|
223
|
-
import {
|
|
224
|
-
Image,
|
|
225
|
-
Icon,
|
|
226
|
-
Video,
|
|
227
|
-
Gallery,
|
|
228
|
-
Map
|
|
229
|
-
} from "@onex/core/client"
|
|
210
|
+
import { Image, Icon, Video, Gallery, Map } from "@onex/core/client";
|
|
230
211
|
```
|
|
231
212
|
|
|
232
213
|
### Form Components
|
|
233
214
|
|
|
234
215
|
```typescript
|
|
235
|
-
import {
|
|
236
|
-
Input,
|
|
237
|
-
Textarea,
|
|
238
|
-
Checkbox,
|
|
239
|
-
Select
|
|
240
|
-
} from "@onex/core/client"
|
|
216
|
+
import { Input, Textarea, Checkbox, Select } from "@onex/core/client";
|
|
241
217
|
```
|
|
242
218
|
|
|
243
219
|
### Advanced Components
|
|
@@ -252,8 +228,8 @@ import {
|
|
|
252
228
|
Progress,
|
|
253
229
|
Timer,
|
|
254
230
|
Table,
|
|
255
|
-
Code
|
|
256
|
-
} from "@onex/core/client"
|
|
231
|
+
Code,
|
|
232
|
+
} from "@onex/core/client";
|
|
257
233
|
```
|
|
258
234
|
|
|
259
235
|
## Utilities
|
|
@@ -263,22 +239,22 @@ import {
|
|
|
263
239
|
Combines Tailwind CSS classes with proper precedence:
|
|
264
240
|
|
|
265
241
|
```typescript
|
|
266
|
-
import { cn } from "@onex/core/client"
|
|
242
|
+
import { cn } from "@onex/core/client";
|
|
267
243
|
|
|
268
244
|
const className = cn(
|
|
269
245
|
"text-base",
|
|
270
|
-
"text-lg",
|
|
246
|
+
"text-lg", // This wins (last one)
|
|
271
247
|
condition && "font-bold",
|
|
272
248
|
section.settings.customClass
|
|
273
|
-
)
|
|
249
|
+
);
|
|
274
250
|
```
|
|
275
251
|
|
|
276
252
|
### generateId() - UUID Generator
|
|
277
253
|
|
|
278
254
|
```typescript
|
|
279
|
-
import { generateId } from "@onex/core/client"
|
|
255
|
+
import { generateId } from "@onex/core/client";
|
|
280
256
|
|
|
281
|
-
const id = generateId() // "abc123-def456-..."
|
|
257
|
+
const id = generateId(); // "abc123-def456-..."
|
|
282
258
|
```
|
|
283
259
|
|
|
284
260
|
### Block Finder
|
|
@@ -347,18 +323,21 @@ function ResponsiveComponent() {
|
|
|
347
323
|
### v1.0.0 - Static + Runtime Constraints
|
|
348
324
|
|
|
349
325
|
**Allowed**:
|
|
326
|
+
|
|
350
327
|
- ✅ Import from `@onex/core`, `react`, `react-dom`
|
|
351
328
|
- ✅ Standard JavaScript/TypeScript
|
|
352
329
|
- ✅ Tailwind CSS classes
|
|
353
330
|
- ✅ Fetch API for CDN resources
|
|
354
331
|
|
|
355
332
|
**Blocked** (detected via AST validation):
|
|
333
|
+
|
|
356
334
|
- ❌ `eval()` or `new Function()`
|
|
357
335
|
- ❌ Node.js APIs (`fs`, `path`, `child_process`, etc.)
|
|
358
336
|
- ❌ Dynamic imports except from CDN
|
|
359
337
|
- ❌ Bundle size > 1MB
|
|
360
338
|
|
|
361
339
|
**Runtime Protection**:
|
|
340
|
+
|
|
362
341
|
- Error boundaries catch render crashes
|
|
363
342
|
- Engine version enforcement
|
|
364
343
|
- Limited API surface
|
|
@@ -379,7 +358,7 @@ The platform enforces compatibility at runtime:
|
|
|
379
358
|
|
|
380
359
|
```typescript
|
|
381
360
|
if (!semver.satisfies(platformVersion, theme.engine)) {
|
|
382
|
-
throw new Error("Incompatible theme version")
|
|
361
|
+
throw new Error("Incompatible theme version");
|
|
383
362
|
}
|
|
384
363
|
```
|
|
385
364
|
|
package/THEME_API.md
CHANGED
|
@@ -52,7 +52,7 @@ import type {
|
|
|
52
52
|
ValidationResult,
|
|
53
53
|
ValidationError,
|
|
54
54
|
ValidationWarning,
|
|
55
|
-
} from "@onex/core"
|
|
55
|
+
} from "@onex/core";
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
---
|
|
@@ -137,23 +137,23 @@ export const manifest: ThemeManifest = {
|
|
|
137
137
|
author: {
|
|
138
138
|
name: "Your Name",
|
|
139
139
|
email: "you@example.com",
|
|
140
|
-
url: "https://yoursite.com"
|
|
140
|
+
url: "https://yoursite.com",
|
|
141
141
|
},
|
|
142
142
|
engine: "^1.0.0",
|
|
143
143
|
peerDependencies: {
|
|
144
144
|
react: "^19.0.0",
|
|
145
145
|
"react-dom": "^19.0.0",
|
|
146
|
-
"@onex/core": "^1.0.0"
|
|
146
|
+
"@onex/core": "^1.0.0",
|
|
147
147
|
},
|
|
148
148
|
sections: ["hero-default", "hero-minimal", "footer-default"],
|
|
149
149
|
config: themeConfig,
|
|
150
150
|
exports: {
|
|
151
151
|
main: "./dist/index.mjs",
|
|
152
|
-
types: "./dist/index.d.ts"
|
|
152
|
+
types: "./dist/index.d.ts",
|
|
153
153
|
},
|
|
154
154
|
tags: ["e-commerce", "minimal", "modern"],
|
|
155
|
-
license: "MIT"
|
|
156
|
-
}
|
|
155
|
+
license: "MIT",
|
|
156
|
+
};
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
### Validation Rules
|
|
@@ -192,9 +192,9 @@ interface ThemeModule {
|
|
|
192
192
|
### Example
|
|
193
193
|
|
|
194
194
|
```typescript
|
|
195
|
-
import type { ThemeModule } from "@onex/core"
|
|
196
|
-
import { HeroDefault, HeroMinimal } from "./sections/hero"
|
|
197
|
-
import { FooterDefault } from "./sections/footer"
|
|
195
|
+
import type { ThemeModule } from "@onex/core";
|
|
196
|
+
import { HeroDefault, HeroMinimal } from "./sections/hero";
|
|
197
|
+
import { FooterDefault } from "./sections/footer";
|
|
198
198
|
|
|
199
199
|
export const theme: ThemeModule = {
|
|
200
200
|
manifest,
|
|
@@ -205,11 +205,11 @@ export const theme: ThemeModule = {
|
|
|
205
205
|
"footer-default": FooterDefault,
|
|
206
206
|
},
|
|
207
207
|
init: async () => {
|
|
208
|
-
console.log("Theme initialized")
|
|
209
|
-
}
|
|
210
|
-
}
|
|
208
|
+
console.log("Theme initialized");
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
211
|
|
|
212
|
-
export default theme
|
|
212
|
+
export default theme;
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
---
|
|
@@ -245,7 +245,10 @@ interface SectionComponentProps {
|
|
|
245
245
|
|
|
246
246
|
/** Component management callbacks */
|
|
247
247
|
onComponentAdd?: (componentType: string) => void;
|
|
248
|
-
onComponentUpdate?: (
|
|
248
|
+
onComponentUpdate?: (
|
|
249
|
+
componentId: string,
|
|
250
|
+
updates: Partial<ComponentInstance>
|
|
251
|
+
) => void;
|
|
249
252
|
onComponentRemove?: (componentId: string) => void;
|
|
250
253
|
onComponentReorder?: (componentIds: string[]) => void;
|
|
251
254
|
}
|
|
@@ -316,13 +319,13 @@ export const config: ThemeConfig = {
|
|
|
316
319
|
background: "#ffffff",
|
|
317
320
|
foreground: "#000000",
|
|
318
321
|
// ... other colors
|
|
319
|
-
}
|
|
322
|
+
},
|
|
320
323
|
},
|
|
321
324
|
typography: {
|
|
322
325
|
fontFamily: {
|
|
323
326
|
heading: "Inter, sans-serif",
|
|
324
327
|
body: "Inter, sans-serif",
|
|
325
|
-
mono: "Fira Code, monospace"
|
|
328
|
+
mono: "Fira Code, monospace",
|
|
326
329
|
},
|
|
327
330
|
fontSize: {
|
|
328
331
|
xs: "0.75rem",
|
|
@@ -333,7 +336,7 @@ export const config: ThemeConfig = {
|
|
|
333
336
|
"2xl": "1.5rem",
|
|
334
337
|
"3xl": "1.875rem",
|
|
335
338
|
"4xl": "2.25rem",
|
|
336
|
-
"5xl": "3rem"
|
|
339
|
+
"5xl": "3rem",
|
|
337
340
|
},
|
|
338
341
|
// ... other typography settings
|
|
339
342
|
},
|
|
@@ -345,7 +348,7 @@ export const config: ThemeConfig = {
|
|
|
345
348
|
xl: "2rem",
|
|
346
349
|
"2xl": "3rem",
|
|
347
350
|
"3xl": "4rem",
|
|
348
|
-
"4xl": "6rem"
|
|
351
|
+
"4xl": "6rem",
|
|
349
352
|
},
|
|
350
353
|
borderRadius: {
|
|
351
354
|
none: "0",
|
|
@@ -354,16 +357,16 @@ export const config: ThemeConfig = {
|
|
|
354
357
|
lg: "0.5rem",
|
|
355
358
|
xl: "0.75rem",
|
|
356
359
|
"2xl": "1rem",
|
|
357
|
-
full: "9999px"
|
|
360
|
+
full: "9999px",
|
|
358
361
|
},
|
|
359
362
|
breakpoints: {
|
|
360
363
|
sm: "640px",
|
|
361
364
|
md: "768px",
|
|
362
365
|
lg: "1024px",
|
|
363
366
|
xl: "1280px",
|
|
364
|
-
"2xl": "1536px"
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
+
"2xl": "1536px",
|
|
368
|
+
},
|
|
369
|
+
};
|
|
367
370
|
```
|
|
368
371
|
|
|
369
372
|
---
|
|
@@ -420,8 +423,8 @@ import {
|
|
|
420
423
|
Progress,
|
|
421
424
|
Timer,
|
|
422
425
|
Table,
|
|
423
|
-
Code
|
|
424
|
-
} from "@onex/core/client"
|
|
426
|
+
Code,
|
|
427
|
+
} from "@onex/core/client";
|
|
425
428
|
```
|
|
426
429
|
|
|
427
430
|
### Example Usage
|
|
@@ -453,21 +456,21 @@ Utility functions for common tasks.
|
|
|
453
456
|
Combines Tailwind classes with proper precedence.
|
|
454
457
|
|
|
455
458
|
```typescript
|
|
456
|
-
import { cn } from "@onex/core/client"
|
|
459
|
+
import { cn } from "@onex/core/client";
|
|
457
460
|
|
|
458
461
|
const className = cn(
|
|
459
462
|
"text-base",
|
|
460
463
|
"text-lg", // This wins (last one)
|
|
461
464
|
section.settings.customClass
|
|
462
|
-
)
|
|
465
|
+
);
|
|
463
466
|
```
|
|
464
467
|
|
|
465
468
|
### generateId() - UUID Generator
|
|
466
469
|
|
|
467
470
|
```typescript
|
|
468
|
-
import { generateId } from "@onex/core/client"
|
|
471
|
+
import { generateId } from "@onex/core/client";
|
|
469
472
|
|
|
470
|
-
const id = generateId() // "abc123-def456-..."
|
|
473
|
+
const id = generateId(); // "abc123-def456-..."
|
|
471
474
|
```
|
|
472
475
|
|
|
473
476
|
---
|
|
@@ -567,7 +570,7 @@ The platform will check compatibility before loading your theme:
|
|
|
567
570
|
|
|
568
571
|
```typescript
|
|
569
572
|
if (!semver.satisfies(platformVersion, theme.manifest.engine)) {
|
|
570
|
-
throw new Error("Incompatible theme version")
|
|
573
|
+
throw new Error("Incompatible theme version");
|
|
571
574
|
}
|
|
572
575
|
```
|
|
573
576
|
|
|
@@ -647,8 +650,8 @@ export function MySection({ section }: SectionComponentProps) {
|
|
|
647
650
|
module.exports = {
|
|
648
651
|
external: ["@onex/core", "@onex/core/client", "react", "react-dom"],
|
|
649
652
|
minify: true,
|
|
650
|
-
treeShaking: true
|
|
651
|
-
}
|
|
653
|
+
treeShaking: true,
|
|
654
|
+
};
|
|
652
655
|
```
|
|
653
656
|
|
|
654
657
|
---
|
|
@@ -677,5 +680,5 @@ If migrating an existing internal theme:
|
|
|
677
680
|
|
|
678
681
|
---
|
|
679
682
|
|
|
680
|
-
|
|
681
|
-
|
|
683
|
+
_Last Updated: 2026-01-23_
|
|
684
|
+
_API Version: 1.0.0_
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkSEVUIX4H_js = require('./chunk-SEVUIX4H.js');
|
|
5
|
+
require('./chunk-2NMEKWO5.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "ApiClient", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkSEVUIX4H_js.ApiClient; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=api.js.map
|
|
14
|
+
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"api.js"}
|
package/dist/api.mjs
ADDED
package/dist/api.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"api.mjs"}
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkALYN5HAC_js = require('./chunk-ALYN5HAC.js');
|
|
5
|
+
var chunkV3JIELNV_js = require('./chunk-V3JIELNV.js');
|
|
6
|
+
require('./chunk-2NMEKWO5.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "AuthService", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkALYN5HAC_js.AuthService; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "initializeAuthService", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkV3JIELNV_js.initializeAuthService; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useAuth", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkV3JIELNV_js.useAuth; }
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=auth.js.map
|
|
23
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"auth.js"}
|
package/dist/auth.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"auth.mjs"}
|
package/dist/blog.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunk2CSWHI3L_js = require('./chunk-2CSWHI3L.js');
|
|
5
|
+
require('./chunk-2NMEKWO5.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "BlogService", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk2CSWHI3L_js.BlogService; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "initializeBlogService", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk2CSWHI3L_js.initializeBlogService; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "useBlog", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk2CSWHI3L_js.useBlog; }
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=blog.js.map
|
|
22
|
+
//# sourceMappingURL=blog.js.map
|
package/dist/blog.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"blog.js"}
|
package/dist/blog.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"blog.mjs"}
|
package/dist/cart.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkZFFXXLX7_js = require('./chunk-ZFFXXLX7.js');
|
|
5
|
+
var chunk2FGHIDUV_js = require('./chunk-2FGHIDUV.js');
|
|
6
|
+
require('./chunk-2NMEKWO5.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "CartService", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkZFFXXLX7_js.CartService; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "initializeCartService", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkZFFXXLX7_js.initializeCartService; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useCart", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkZFFXXLX7_js.useCart; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "CartProvider", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunk2FGHIDUV_js.CartProvider; }
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=cart.js.map
|
|
27
|
+
//# sourceMappingURL=cart.js.map
|
package/dist/cart.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cart.js"}
|
package/dist/cart.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cart.mjs"}
|