@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/dist/server.js
CHANGED
|
@@ -1,196 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('
|
|
5
|
-
|
|
6
|
-
var path = require('path');
|
|
3
|
+
var chunkOVT2LUAM_js = require('./chunk-OVT2LUAM.js');
|
|
4
|
+
require('./chunk-J27VGXJH.js');
|
|
5
|
+
require('./chunk-2NMEKWO5.js');
|
|
7
6
|
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
7
|
|
|
10
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
11
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Auto-discover sections from theme directory
|
|
24
|
-
* Reads filesystem to find all section directories
|
|
25
|
-
*/
|
|
26
|
-
async discoverThemeSections(themeId) {
|
|
27
|
-
const sectionsPath = path__default.default.join(
|
|
28
|
-
process.cwd(),
|
|
29
|
-
`src/themes/${themeId}/sections`
|
|
30
|
-
);
|
|
31
|
-
try {
|
|
32
|
-
const entries = await fs__default.default.readdir(sectionsPath, { withFileTypes: true });
|
|
33
|
-
const sectionNames = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
34
|
-
if (this.debug) {
|
|
35
|
-
}
|
|
36
|
-
return sectionNames;
|
|
37
|
-
} catch (error) {
|
|
38
|
-
if (this.debug) {
|
|
39
|
-
console.warn(
|
|
40
|
-
`[ThemeRegistry] No sections found for theme "${themeId}" at ${sectionsPath}`
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Initialize a theme's sections
|
|
48
|
-
* Auto-discovers and registers all sections for a theme
|
|
49
|
-
*/
|
|
50
|
-
async initializeTheme(themeId) {
|
|
51
|
-
var _a, _b;
|
|
52
|
-
if (this.initialized.has(themeId)) {
|
|
53
|
-
if (this.debug) ;
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const registry = this.getThemeRegistry(themeId);
|
|
57
|
-
const sectionNames = await this.discoverThemeSections(themeId);
|
|
58
|
-
if (sectionNames.length === 0) {
|
|
59
|
-
console.warn(`[ThemeRegistry] No sections found for theme "${themeId}"`);
|
|
60
|
-
this.initialized.add(themeId);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
let successCount = 0;
|
|
64
|
-
let failureCount = 0;
|
|
65
|
-
for (const sectionName of sectionNames) {
|
|
66
|
-
try {
|
|
67
|
-
const sectionModule = await import(`@/themes/${themeId}/sections/${sectionName}`);
|
|
68
|
-
const camelName = toCamelCase(sectionName);
|
|
69
|
-
const schema = sectionModule[`${camelName}Schema`] || ((_a = sectionModule.default) == null ? void 0 : _a.schema) || sectionModule.schema;
|
|
70
|
-
const components = sectionModule[`${camelName}Components`] || ((_b = sectionModule.default) == null ? void 0 : _b.components) || sectionModule.components;
|
|
71
|
-
if (!schema || !components) {
|
|
72
|
-
console.error(
|
|
73
|
-
`[ThemeRegistry] Section "${sectionName}" in theme "${themeId}" missing schema or components export.`,
|
|
74
|
-
`Expected: "${camelName}Schema" and "${camelName}Components"`
|
|
75
|
-
);
|
|
76
|
-
failureCount++;
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
const defaultComponent = components.default || Object.values(components)[0];
|
|
80
|
-
if (!defaultComponent) {
|
|
81
|
-
console.error(
|
|
82
|
-
`[ThemeRegistry] Section "${sectionName}" has no default component`
|
|
83
|
-
);
|
|
84
|
-
failureCount++;
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
const templates = Object.entries(components).map(
|
|
88
|
-
([templateId, component]) => ({
|
|
89
|
-
definition: schema.templates.find((t) => t.id === templateId) || {
|
|
90
|
-
id: templateId,
|
|
91
|
-
name: templateId,
|
|
92
|
-
description: `${templateId} template`,
|
|
93
|
-
isDefault: templateId === "default",
|
|
94
|
-
settings: schema.settings,
|
|
95
|
-
defaults: schema.defaults
|
|
96
|
-
},
|
|
97
|
-
component
|
|
98
|
-
})
|
|
99
|
-
);
|
|
100
|
-
registry.register(schema.type, schema, defaultComponent, {
|
|
101
|
-
templates,
|
|
102
|
-
category: schema.category,
|
|
103
|
-
tags: schema.tags
|
|
104
|
-
});
|
|
105
|
-
successCount++;
|
|
106
|
-
if (this.debug) {
|
|
107
|
-
}
|
|
108
|
-
} catch (error) {
|
|
109
|
-
console.error(
|
|
110
|
-
`[ThemeRegistry] Failed to load section "${themeId}/${sectionName}":`,
|
|
111
|
-
error
|
|
112
|
-
);
|
|
113
|
-
failureCount++;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
this.initialized.add(themeId);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Get or create theme-specific registry
|
|
120
|
-
*/
|
|
121
|
-
getThemeRegistry(themeId) {
|
|
122
|
-
if (!this.registries.has(themeId)) {
|
|
123
|
-
const registry = chunk3SZX6LHT_js.createSectionRegistry({
|
|
124
|
-
debug: this.debug,
|
|
125
|
-
allowOverride: this.debug
|
|
126
|
-
});
|
|
127
|
-
this.registries.set(themeId, registry);
|
|
128
|
-
if (this.debug) ;
|
|
129
|
-
}
|
|
130
|
-
return this.registries.get(themeId);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Check if theme has been initialized
|
|
134
|
-
*/
|
|
135
|
-
isThemeInitialized(themeId) {
|
|
136
|
-
return this.initialized.has(themeId);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Resolve a section component for a specific theme
|
|
140
|
-
* Returns null if not found (no fallback - strict validation)
|
|
141
|
-
*/
|
|
142
|
-
resolveSection(themeId, sectionType, templateId = "default") {
|
|
143
|
-
const registry = this.getThemeRegistry(themeId);
|
|
144
|
-
return registry.getTemplateComponent(sectionType, templateId) || null;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Get section schema for a specific theme
|
|
148
|
-
*/
|
|
149
|
-
getSectionSchema(themeId, sectionType) {
|
|
150
|
-
const registry = this.getThemeRegistry(themeId);
|
|
151
|
-
return registry.getSchema(sectionType) || null;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Get all available themes
|
|
155
|
-
*/
|
|
156
|
-
getAvailableThemes() {
|
|
157
|
-
return Array.from(this.registries.keys());
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Get all section types for a theme
|
|
161
|
-
*/
|
|
162
|
-
getThemeSections(themeId) {
|
|
163
|
-
const registry = this.registries.get(themeId);
|
|
164
|
-
if (!registry) {
|
|
165
|
-
return [];
|
|
166
|
-
}
|
|
167
|
-
const all = registry.getAll();
|
|
168
|
-
return Array.from(all.keys());
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Clear a specific theme's registry
|
|
172
|
-
*/
|
|
173
|
-
clearTheme(themeId) {
|
|
174
|
-
const registry = this.registries.get(themeId);
|
|
175
|
-
if (registry) {
|
|
176
|
-
registry.clear();
|
|
177
|
-
this.initialized.delete(themeId);
|
|
178
|
-
if (this.debug) ;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Clear all theme registries
|
|
183
|
-
*/
|
|
184
|
-
clearAll() {
|
|
185
|
-
this.registries.forEach((registry) => registry.clear());
|
|
186
|
-
this.registries.clear();
|
|
187
|
-
this.initialized.clear();
|
|
188
|
-
if (this.debug) ;
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
var themeRegistryManager = new ThemeRegistryManager();
|
|
192
|
-
|
|
193
|
-
exports.ThemeRegistryManager = ThemeRegistryManager;
|
|
194
|
-
exports.themeRegistryManager = themeRegistryManager;
|
|
9
|
+
Object.defineProperty(exports, "ThemeRegistryManager", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkOVT2LUAM_js.ThemeRegistryManager; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "themeRegistryManager", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkOVT2LUAM_js.themeRegistryManager; }
|
|
16
|
+
});
|
|
195
17
|
//# sourceMappingURL=server.js.map
|
|
196
18
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/registry/theme-registry-manager.ts"],"names":["path","fs","createSectionRegistry"],"mappings":";;;;;;;;;;;;AAiBA,SAAS,YAAY,GAAA,EAAqB;AACxC,EAAA,OAAO,GAAA,CAAI,QAAQ,WAAA,EAAa,CAAC,MAAM,CAAA,CAAE,CAAC,CAAA,CAAE,WAAA,EAAa,CAAA;AAC3D;AAMO,IAAM,uBAAN,MAA2B;AAAA,EAKhC,WAAA,CAAY,KAAA,GAAiB,OAAA,CAAQ,GAAA,CAAI,aAAa,aAAA,EAAe;AACnE,IAAA,IAAA,CAAK,UAAA,uBAAiB,GAAA,EAAI;AAC1B,IAAA,IAAA,CAAK,WAAA,uBAAkB,GAAA,EAAI;AAC3B,IAA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AA2B;AAC1C,IAAA,MAAM,QAAA,GAAW,IAAA,CAAK,UAAA,CAAW,GAAA,CAAI,OAAO,CAAA;AAC5C,IAAA,IAAI,CAAC,QAAA,EAAU;AACb,MAAA,OAAO,EAAC;AAAA,IACV;AAEA,IAAA,MAAM,GAAA,GAAM,SAAS,MAAA,EAAO;AAC5B,IAAA,OAAO,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,IAAA,EAAM,CAAA;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,OAAA,EAAuB;AAChC,IAAA,MAAM,QAAA,GAAW,IAAA,CAAK,UAAA,CAAW,GAAA,CAAI,OAAO,CAAA;AAC5C,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA,QAAA,CAAS,KAAA,EAAM;AACf,MAAA,IAAA,CAAK,WAAA,CAAY,OAAO,OAAO,CAAA;AAE/B,MAAA,IAAI,KAAK,KAAA,EAAO;AAChB,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,QAAA,GAAiB;AACf,IAAA,IAAA,CAAK,WAAW,OAAA,CAAQ,CAAC,QAAA,KAAa,QAAA,CAAS,OAAO,CAAA;AACtD,IAAA,IAAA,CAAK,WAAW,KAAA,EAAM;AACtB,IAAA,IAAA,CAAK,YAAY,KAAA,EAAM;AAEvB,IAAA,IAAI,KAAK,KAAA,EAAO;AAChB,EACF;AACF;AAKO,IAAM,oBAAA,GAAuB,IAAI,oBAAA","file":"server.js","sourcesContent":["/**\n * Theme Registry Manager\n * Manages theme-specific section registries with auto-discovery\n *\n * SERVER-ONLY: Uses filesystem operations, cannot run in browser\n */\n\nimport \"server-only\";\nimport fs from \"fs/promises\";\nimport path from \"path\";\nimport type { SectionRegistry } from \"../types/registry\";\nimport type { SectionSchema, SectionComponentProps } from \"../types/section\";\nimport { createSectionRegistry } from \"./section-registry\";\n\n/**\n * Convert kebab-case to camelCase\n */\nfunction toCamelCase(str: string): string {\n return str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n}\n\n/**\n * Theme Registry Manager\n * Auto-discovers and manages theme-specific section registries\n */\nexport class ThemeRegistryManager {\n private registries: Map<string, SectionRegistry>;\n private initialized: Set<string>;\n private debug: boolean;\n\n constructor(debug: boolean = process.env.NODE_ENV === \"development\") {\n this.registries = new Map();\n this.initialized = new Set();\n this.debug = debug;\n }\n\n /**\n * Auto-discover sections from theme directory\n * Reads filesystem to find all section directories\n */\n async discoverThemeSections(themeId: string): Promise<string[]> {\n const sectionsPath = path.join(\n process.cwd(),\n `src/themes/${themeId}/sections`\n );\n\n try {\n const entries = await fs.readdir(sectionsPath, { withFileTypes: true });\n\n // Return only directories (each directory = one section)\n const sectionNames = entries\n .filter((entry) => entry.isDirectory())\n .map((entry) => entry.name);\n\n if (this.debug) {\n }\n\n return sectionNames;\n } catch (error) {\n if (this.debug) {\n console.warn(\n `[ThemeRegistry] No sections found for theme \"${themeId}\" at ${sectionsPath}`\n );\n }\n return [];\n }\n }\n\n /**\n * Initialize a theme's sections\n * Auto-discovers and registers all sections for a theme\n */\n async initializeTheme(themeId: string): Promise<void> {\n // Check if already initialized\n if (this.initialized.has(themeId)) {\n if (this.debug) {\n }\n return;\n }\n\n // Get or create registry for this theme\n const registry = this.getThemeRegistry(themeId);\n\n // Discover sections\n const sectionNames = await this.discoverThemeSections(themeId);\n\n if (sectionNames.length === 0) {\n console.warn(`[ThemeRegistry] No sections found for theme \"${themeId}\"`);\n this.initialized.add(themeId);\n return;\n }\n\n // Import and register each section\n let successCount = 0;\n let failureCount = 0;\n\n for (const sectionName of sectionNames) {\n try {\n // Dynamic import of section module\n const sectionModule = await import(\n `@/themes/${themeId}/sections/${sectionName}`\n );\n\n // Extract schema and components from module\n // Try different naming conventions\n const camelName = toCamelCase(sectionName);\n const schema: SectionSchema =\n sectionModule[`${camelName}Schema`] ||\n sectionModule.default?.schema ||\n sectionModule.schema;\n\n const components: Record<\n string,\n React.ComponentType<SectionComponentProps>\n > = sectionModule[`${camelName}Components`] ||\n sectionModule.default?.components ||\n sectionModule.components;\n\n if (!schema || !components) {\n console.error(\n `[ThemeRegistry] Section \"${sectionName}\" in theme \"${themeId}\" missing schema or components export.`,\n `Expected: \"${camelName}Schema\" and \"${camelName}Components\"`\n );\n failureCount++;\n continue;\n }\n\n // Register section to theme-specific registry\n // Get the default component for backward compatibility\n const defaultComponent =\n components.default || Object.values(components)[0];\n\n if (!defaultComponent) {\n console.error(\n `[ThemeRegistry] Section \"${sectionName}\" has no default component`\n );\n failureCount++;\n continue;\n }\n\n // Register with templates\n const templates = Object.entries(components).map(\n ([templateId, component]) => ({\n definition: schema.templates.find((t) => t.id === templateId) || {\n id: templateId,\n name: templateId,\n description: `${templateId} template`,\n isDefault: templateId === \"default\",\n settings: schema.settings,\n defaults: schema.defaults,\n },\n component,\n })\n );\n\n registry.register(schema.type, schema, defaultComponent, {\n templates,\n category: schema.category,\n tags: schema.tags,\n });\n\n successCount++;\n\n if (this.debug) {\n }\n } catch (error) {\n console.error(\n `[ThemeRegistry] Failed to load section \"${themeId}/${sectionName}\":`,\n error\n );\n failureCount++;\n }\n }\n\n // Mark as initialized\n this.initialized.add(themeId);\n }\n\n /**\n * Get or create theme-specific registry\n */\n getThemeRegistry(themeId: string): SectionRegistry {\n if (!this.registries.has(themeId)) {\n // Create new registry for this theme\n const registry = createSectionRegistry({\n debug: this.debug,\n allowOverride: this.debug,\n });\n\n this.registries.set(themeId, registry);\n\n if (this.debug) {\n }\n }\n\n return this.registries.get(themeId)!;\n }\n\n /**\n * Check if theme has been initialized\n */\n isThemeInitialized(themeId: string): boolean {\n return this.initialized.has(themeId);\n }\n\n /**\n * Resolve a section component for a specific theme\n * Returns null if not found (no fallback - strict validation)\n */\n resolveSection(\n themeId: string,\n sectionType: string,\n templateId: string = \"default\"\n ): React.ComponentType<SectionComponentProps> | null {\n const registry = this.getThemeRegistry(themeId);\n return registry.getTemplateComponent(sectionType, templateId) || null;\n }\n\n /**\n * Get section schema for a specific theme\n */\n getSectionSchema(themeId: string, sectionType: string): SectionSchema | null {\n const registry = this.getThemeRegistry(themeId);\n return registry.getSchema(sectionType) || null;\n }\n\n /**\n * Get all available themes\n */\n getAvailableThemes(): string[] {\n return Array.from(this.registries.keys());\n }\n\n /**\n * Get all section types for a theme\n */\n getThemeSections(themeId: string): string[] {\n const registry = this.registries.get(themeId);\n if (!registry) {\n return [];\n }\n\n const all = registry.getAll();\n return Array.from(all.keys());\n }\n\n /**\n * Clear a specific theme's registry\n */\n clearTheme(themeId: string): void {\n const registry = this.registries.get(themeId);\n if (registry) {\n registry.clear();\n this.initialized.delete(themeId);\n\n if (this.debug) {\n }\n }\n }\n\n /**\n * Clear all theme registries\n */\n clearAll(): void {\n this.registries.forEach((registry) => registry.clear());\n this.registries.clear();\n this.initialized.clear();\n\n if (this.debug) {\n }\n }\n}\n\n/**\n * Global theme registry manager instance\n */\nexport const themeRegistryManager = new ThemeRegistryManager();\n"]}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server.js"}
|
package/dist/server.mjs
CHANGED
|
@@ -1,188 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import path from 'path';
|
|
5
|
-
|
|
6
|
-
function toCamelCase(str) {
|
|
7
|
-
return str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
|
|
8
|
-
}
|
|
9
|
-
var ThemeRegistryManager = class {
|
|
10
|
-
constructor(debug = process.env.NODE_ENV === "development") {
|
|
11
|
-
this.registries = /* @__PURE__ */ new Map();
|
|
12
|
-
this.initialized = /* @__PURE__ */ new Set();
|
|
13
|
-
this.debug = debug;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Auto-discover sections from theme directory
|
|
17
|
-
* Reads filesystem to find all section directories
|
|
18
|
-
*/
|
|
19
|
-
async discoverThemeSections(themeId) {
|
|
20
|
-
const sectionsPath = path.join(
|
|
21
|
-
process.cwd(),
|
|
22
|
-
`src/themes/${themeId}/sections`
|
|
23
|
-
);
|
|
24
|
-
try {
|
|
25
|
-
const entries = await fs.readdir(sectionsPath, { withFileTypes: true });
|
|
26
|
-
const sectionNames = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
27
|
-
if (this.debug) {
|
|
28
|
-
}
|
|
29
|
-
return sectionNames;
|
|
30
|
-
} catch (error) {
|
|
31
|
-
if (this.debug) {
|
|
32
|
-
console.warn(
|
|
33
|
-
`[ThemeRegistry] No sections found for theme "${themeId}" at ${sectionsPath}`
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Initialize a theme's sections
|
|
41
|
-
* Auto-discovers and registers all sections for a theme
|
|
42
|
-
*/
|
|
43
|
-
async initializeTheme(themeId) {
|
|
44
|
-
var _a, _b;
|
|
45
|
-
if (this.initialized.has(themeId)) {
|
|
46
|
-
if (this.debug) ;
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const registry = this.getThemeRegistry(themeId);
|
|
50
|
-
const sectionNames = await this.discoverThemeSections(themeId);
|
|
51
|
-
if (sectionNames.length === 0) {
|
|
52
|
-
console.warn(`[ThemeRegistry] No sections found for theme "${themeId}"`);
|
|
53
|
-
this.initialized.add(themeId);
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
let successCount = 0;
|
|
57
|
-
let failureCount = 0;
|
|
58
|
-
for (const sectionName of sectionNames) {
|
|
59
|
-
try {
|
|
60
|
-
const sectionModule = await import(`@/themes/${themeId}/sections/${sectionName}`);
|
|
61
|
-
const camelName = toCamelCase(sectionName);
|
|
62
|
-
const schema = sectionModule[`${camelName}Schema`] || ((_a = sectionModule.default) == null ? void 0 : _a.schema) || sectionModule.schema;
|
|
63
|
-
const components = sectionModule[`${camelName}Components`] || ((_b = sectionModule.default) == null ? void 0 : _b.components) || sectionModule.components;
|
|
64
|
-
if (!schema || !components) {
|
|
65
|
-
console.error(
|
|
66
|
-
`[ThemeRegistry] Section "${sectionName}" in theme "${themeId}" missing schema or components export.`,
|
|
67
|
-
`Expected: "${camelName}Schema" and "${camelName}Components"`
|
|
68
|
-
);
|
|
69
|
-
failureCount++;
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
const defaultComponent = components.default || Object.values(components)[0];
|
|
73
|
-
if (!defaultComponent) {
|
|
74
|
-
console.error(
|
|
75
|
-
`[ThemeRegistry] Section "${sectionName}" has no default component`
|
|
76
|
-
);
|
|
77
|
-
failureCount++;
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
const templates = Object.entries(components).map(
|
|
81
|
-
([templateId, component]) => ({
|
|
82
|
-
definition: schema.templates.find((t) => t.id === templateId) || {
|
|
83
|
-
id: templateId,
|
|
84
|
-
name: templateId,
|
|
85
|
-
description: `${templateId} template`,
|
|
86
|
-
isDefault: templateId === "default",
|
|
87
|
-
settings: schema.settings,
|
|
88
|
-
defaults: schema.defaults
|
|
89
|
-
},
|
|
90
|
-
component
|
|
91
|
-
})
|
|
92
|
-
);
|
|
93
|
-
registry.register(schema.type, schema, defaultComponent, {
|
|
94
|
-
templates,
|
|
95
|
-
category: schema.category,
|
|
96
|
-
tags: schema.tags
|
|
97
|
-
});
|
|
98
|
-
successCount++;
|
|
99
|
-
if (this.debug) {
|
|
100
|
-
}
|
|
101
|
-
} catch (error) {
|
|
102
|
-
console.error(
|
|
103
|
-
`[ThemeRegistry] Failed to load section "${themeId}/${sectionName}":`,
|
|
104
|
-
error
|
|
105
|
-
);
|
|
106
|
-
failureCount++;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
this.initialized.add(themeId);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Get or create theme-specific registry
|
|
113
|
-
*/
|
|
114
|
-
getThemeRegistry(themeId) {
|
|
115
|
-
if (!this.registries.has(themeId)) {
|
|
116
|
-
const registry = createSectionRegistry({
|
|
117
|
-
debug: this.debug,
|
|
118
|
-
allowOverride: this.debug
|
|
119
|
-
});
|
|
120
|
-
this.registries.set(themeId, registry);
|
|
121
|
-
if (this.debug) ;
|
|
122
|
-
}
|
|
123
|
-
return this.registries.get(themeId);
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Check if theme has been initialized
|
|
127
|
-
*/
|
|
128
|
-
isThemeInitialized(themeId) {
|
|
129
|
-
return this.initialized.has(themeId);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Resolve a section component for a specific theme
|
|
133
|
-
* Returns null if not found (no fallback - strict validation)
|
|
134
|
-
*/
|
|
135
|
-
resolveSection(themeId, sectionType, templateId = "default") {
|
|
136
|
-
const registry = this.getThemeRegistry(themeId);
|
|
137
|
-
return registry.getTemplateComponent(sectionType, templateId) || null;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get section schema for a specific theme
|
|
141
|
-
*/
|
|
142
|
-
getSectionSchema(themeId, sectionType) {
|
|
143
|
-
const registry = this.getThemeRegistry(themeId);
|
|
144
|
-
return registry.getSchema(sectionType) || null;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Get all available themes
|
|
148
|
-
*/
|
|
149
|
-
getAvailableThemes() {
|
|
150
|
-
return Array.from(this.registries.keys());
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Get all section types for a theme
|
|
154
|
-
*/
|
|
155
|
-
getThemeSections(themeId) {
|
|
156
|
-
const registry = this.registries.get(themeId);
|
|
157
|
-
if (!registry) {
|
|
158
|
-
return [];
|
|
159
|
-
}
|
|
160
|
-
const all = registry.getAll();
|
|
161
|
-
return Array.from(all.keys());
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Clear a specific theme's registry
|
|
165
|
-
*/
|
|
166
|
-
clearTheme(themeId) {
|
|
167
|
-
const registry = this.registries.get(themeId);
|
|
168
|
-
if (registry) {
|
|
169
|
-
registry.clear();
|
|
170
|
-
this.initialized.delete(themeId);
|
|
171
|
-
if (this.debug) ;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Clear all theme registries
|
|
176
|
-
*/
|
|
177
|
-
clearAll() {
|
|
178
|
-
this.registries.forEach((registry) => registry.clear());
|
|
179
|
-
this.registries.clear();
|
|
180
|
-
this.initialized.clear();
|
|
181
|
-
if (this.debug) ;
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
var themeRegistryManager = new ThemeRegistryManager();
|
|
185
|
-
|
|
186
|
-
export { ThemeRegistryManager, themeRegistryManager };
|
|
1
|
+
export { ThemeRegistryManager, themeRegistryManager } from './chunk-WFGS5OFH.mjs';
|
|
2
|
+
import './chunk-ONJREDYY.mjs';
|
|
3
|
+
import './chunk-YOSPWY5K.mjs';
|
|
187
4
|
//# sourceMappingURL=server.mjs.map
|
|
188
5
|
//# sourceMappingURL=server.mjs.map
|
package/dist/server.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/registry/theme-registry-manager.ts"],"names":[],"mappings":";;;;;AAiBA,SAAS,YAAY,GAAA,EAAqB;AACxC,EAAA,OAAO,GAAA,CAAI,QAAQ,WAAA,EAAa,CAAC,MAAM,CAAA,CAAE,CAAC,CAAA,CAAE,WAAA,EAAa,CAAA;AAC3D;AAMO,IAAM,uBAAN,MAA2B;AAAA,EAKhC,WAAA,CAAY,KAAA,GAAiB,OAAA,CAAQ,GAAA,CAAI,aAAa,aAAA,EAAe;AACnE,IAAA,IAAA,CAAK,UAAA,uBAAiB,GAAA,EAAI;AAC1B,IAAA,IAAA,CAAK,WAAA,uBAAkB,GAAA,EAAI;AAC3B,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,sBAAsB,OAAA,EAAoC;AAC9D,IAAA,MAAM,eAAe,IAAA,CAAK,IAAA;AAAA,MACxB,QAAQ,GAAA,EAAI;AAAA,MACZ,cAAc,OAA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,IAAA,OAAO,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,IAAA,EAAM,CAAA;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,OAAA,EAAuB;AAChC,IAAA,MAAM,QAAA,GAAW,IAAA,CAAK,UAAA,CAAW,GAAA,CAAI,OAAO,CAAA;AAC5C,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA,QAAA,CAAS,KAAA,EAAM;AACf,MAAA,IAAA,CAAK,WAAA,CAAY,OAAO,OAAO,CAAA;AAE/B,MAAA,IAAI,KAAK,KAAA,EAAO;AAChB,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,QAAA,GAAiB;AACf,IAAA,IAAA,CAAK,WAAW,OAAA,CAAQ,CAAC,QAAA,KAAa,QAAA,CAAS,OAAO,CAAA;AACtD,IAAA,IAAA,CAAK,WAAW,KAAA,EAAM;AACtB,IAAA,IAAA,CAAK,YAAY,KAAA,EAAM;AAEvB,IAAA,IAAI,KAAK,KAAA,EAAO;AAChB,EACF;AACF;AAKO,IAAM,oBAAA,GAAuB,IAAI,oBAAA","file":"server.mjs","sourcesContent":["/**\n * Theme Registry Manager\n * Manages theme-specific section registries with auto-discovery\n *\n * SERVER-ONLY: Uses filesystem operations, cannot run in browser\n */\n\nimport \"server-only\";\nimport fs from \"fs/promises\";\nimport path from \"path\";\nimport type { SectionRegistry } from \"../types/registry\";\nimport type { SectionSchema, SectionComponentProps } from \"../types/section\";\nimport { createSectionRegistry } from \"./section-registry\";\n\n/**\n * Convert kebab-case to camelCase\n */\nfunction toCamelCase(str: string): string {\n return str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n}\n\n/**\n * Theme Registry Manager\n * Auto-discovers and manages theme-specific section registries\n */\nexport class ThemeRegistryManager {\n private registries: Map<string, SectionRegistry>;\n private initialized: Set<string>;\n private debug: boolean;\n\n constructor(debug: boolean = process.env.NODE_ENV === \"development\") {\n this.registries = new Map();\n this.initialized = new Set();\n this.debug = debug;\n }\n\n /**\n * Auto-discover sections from theme directory\n * Reads filesystem to find all section directories\n */\n async discoverThemeSections(themeId: string): Promise<string[]> {\n const sectionsPath = path.join(\n process.cwd(),\n `src/themes/${themeId}/sections`\n );\n\n try {\n const entries = await fs.readdir(sectionsPath, { withFileTypes: true });\n\n // Return only directories (each directory = one section)\n const sectionNames = entries\n .filter((entry) => entry.isDirectory())\n .map((entry) => entry.name);\n\n if (this.debug) {\n }\n\n return sectionNames;\n } catch (error) {\n if (this.debug) {\n console.warn(\n `[ThemeRegistry] No sections found for theme \"${themeId}\" at ${sectionsPath}`\n );\n }\n return [];\n }\n }\n\n /**\n * Initialize a theme's sections\n * Auto-discovers and registers all sections for a theme\n */\n async initializeTheme(themeId: string): Promise<void> {\n // Check if already initialized\n if (this.initialized.has(themeId)) {\n if (this.debug) {\n }\n return;\n }\n\n // Get or create registry for this theme\n const registry = this.getThemeRegistry(themeId);\n\n // Discover sections\n const sectionNames = await this.discoverThemeSections(themeId);\n\n if (sectionNames.length === 0) {\n console.warn(`[ThemeRegistry] No sections found for theme \"${themeId}\"`);\n this.initialized.add(themeId);\n return;\n }\n\n // Import and register each section\n let successCount = 0;\n let failureCount = 0;\n\n for (const sectionName of sectionNames) {\n try {\n // Dynamic import of section module\n const sectionModule = await import(\n `@/themes/${themeId}/sections/${sectionName}`\n );\n\n // Extract schema and components from module\n // Try different naming conventions\n const camelName = toCamelCase(sectionName);\n const schema: SectionSchema =\n sectionModule[`${camelName}Schema`] ||\n sectionModule.default?.schema ||\n sectionModule.schema;\n\n const components: Record<\n string,\n React.ComponentType<SectionComponentProps>\n > = sectionModule[`${camelName}Components`] ||\n sectionModule.default?.components ||\n sectionModule.components;\n\n if (!schema || !components) {\n console.error(\n `[ThemeRegistry] Section \"${sectionName}\" in theme \"${themeId}\" missing schema or components export.`,\n `Expected: \"${camelName}Schema\" and \"${camelName}Components\"`\n );\n failureCount++;\n continue;\n }\n\n // Register section to theme-specific registry\n // Get the default component for backward compatibility\n const defaultComponent =\n components.default || Object.values(components)[0];\n\n if (!defaultComponent) {\n console.error(\n `[ThemeRegistry] Section \"${sectionName}\" has no default component`\n );\n failureCount++;\n continue;\n }\n\n // Register with templates\n const templates = Object.entries(components).map(\n ([templateId, component]) => ({\n definition: schema.templates.find((t) => t.id === templateId) || {\n id: templateId,\n name: templateId,\n description: `${templateId} template`,\n isDefault: templateId === \"default\",\n settings: schema.settings,\n defaults: schema.defaults,\n },\n component,\n })\n );\n\n registry.register(schema.type, schema, defaultComponent, {\n templates,\n category: schema.category,\n tags: schema.tags,\n });\n\n successCount++;\n\n if (this.debug) {\n }\n } catch (error) {\n console.error(\n `[ThemeRegistry] Failed to load section \"${themeId}/${sectionName}\":`,\n error\n );\n failureCount++;\n }\n }\n\n // Mark as initialized\n this.initialized.add(themeId);\n }\n\n /**\n * Get or create theme-specific registry\n */\n getThemeRegistry(themeId: string): SectionRegistry {\n if (!this.registries.has(themeId)) {\n // Create new registry for this theme\n const registry = createSectionRegistry({\n debug: this.debug,\n allowOverride: this.debug,\n });\n\n this.registries.set(themeId, registry);\n\n if (this.debug) {\n }\n }\n\n return this.registries.get(themeId)!;\n }\n\n /**\n * Check if theme has been initialized\n */\n isThemeInitialized(themeId: string): boolean {\n return this.initialized.has(themeId);\n }\n\n /**\n * Resolve a section component for a specific theme\n * Returns null if not found (no fallback - strict validation)\n */\n resolveSection(\n themeId: string,\n sectionType: string,\n templateId: string = \"default\"\n ): React.ComponentType<SectionComponentProps> | null {\n const registry = this.getThemeRegistry(themeId);\n return registry.getTemplateComponent(sectionType, templateId) || null;\n }\n\n /**\n * Get section schema for a specific theme\n */\n getSectionSchema(themeId: string, sectionType: string): SectionSchema | null {\n const registry = this.getThemeRegistry(themeId);\n return registry.getSchema(sectionType) || null;\n }\n\n /**\n * Get all available themes\n */\n getAvailableThemes(): string[] {\n return Array.from(this.registries.keys());\n }\n\n /**\n * Get all section types for a theme\n */\n getThemeSections(themeId: string): string[] {\n const registry = this.registries.get(themeId);\n if (!registry) {\n return [];\n }\n\n const all = registry.getAll();\n return Array.from(all.keys());\n }\n\n /**\n * Clear a specific theme's registry\n */\n clearTheme(themeId: string): void {\n const registry = this.registries.get(themeId);\n if (registry) {\n registry.clear();\n this.initialized.delete(themeId);\n\n if (this.debug) {\n }\n }\n }\n\n /**\n * Clear all theme registries\n */\n clearAll(): void {\n this.registries.forEach((registry) => registry.clear());\n this.registries.clear();\n this.initialized.clear();\n\n if (this.debug) {\n }\n }\n}\n\n/**\n * Global theme registry manager instance\n */\nexport const themeRegistryManager = new ThemeRegistryManager();\n"]}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server.mjs"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkFQ7FWUZN_js = require('./chunk-FQ7FWUZN.js');
|
|
4
|
+
require('./chunk-2NMEKWO5.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "COMPONENT_CATEGORIES", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkFQ7FWUZN_js.COMPONENT_CATEGORIES; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "COMPONENT_TYPES", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkFQ7FWUZN_js.COMPONENT_TYPES; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "DEFAULT_INSPECTOR_CONFIG", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkFQ7FWUZN_js.DEFAULT_INSPECTOR_CONFIG; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "FIELD_TYPES", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkFQ7FWUZN_js.FIELD_TYPES; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "SECTION_CATEGORIES", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkFQ7FWUZN_js.SECTION_CATEGORIES; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "animationFieldDefinitions", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkFQ7FWUZN_js.animationFieldDefinitions; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "defaultAnimationSettings", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkFQ7FWUZN_js.defaultAnimationSettings; }
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=types.js.map
|
|
37
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { COMPONENT_CATEGORIES, COMPONENT_TYPES, DEFAULT_INSPECTOR_CONFIG, FIELD_TYPES, SECTION_CATEGORIES, animationFieldDefinitions, defaultAnimationSettings } from './chunk-F5TFNWFJ.mjs';
|
|
2
|
+
import './chunk-YOSPWY5K.mjs';
|
|
3
|
+
//# sourceMappingURL=types.mjs.map
|
|
4
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.mjs"}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkRPP5K2LP_js = require('./chunk-RPP5K2LP.js');
|
|
5
|
+
var chunkVJA3ER6A_js = require('./chunk-VJA3ER6A.js');
|
|
6
|
+
require('./chunk-FQ7FWUZN.js');
|
|
7
|
+
require('./chunk-2NMEKWO5.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "countEnabledItems", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkRPP5K2LP_js.countEnabledItems; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "filterEnabledBlocks", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkRPP5K2LP_js.filterEnabledBlocks; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "filterEnabledComponents", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkRPP5K2LP_js.filterEnabledComponents; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "findBlockInSection", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkRPP5K2LP_js.findBlockInSection; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "findComponentInSection", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkRPP5K2LP_js.findComponentInSection; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "formatBlockName", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkRPP5K2LP_js.formatBlockName; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "generateBlockId", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkRPP5K2LP_js.generateBlockId; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "generateHandle", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkRPP5K2LP_js.generateHandle; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "generateId", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkRPP5K2LP_js.generateId; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "generatePageId", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunkRPP5K2LP_js.generatePageId; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "generateSectionId", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunkRPP5K2LP_js.generateSectionId; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "generateThemeId", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunkRPP5K2LP_js.generateThemeId; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "getActiveBlocks", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return chunkRPP5K2LP_js.getActiveBlocks; }
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, "getActiveComponents", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () { return chunkRPP5K2LP_js.getActiveComponents; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "getBlockPath", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return chunkRPP5K2LP_js.getBlockPath; }
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "getComponentPath", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return chunkRPP5K2LP_js.getComponentPath; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "getComponentValues", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return chunkRPP5K2LP_js.getComponentValues; }
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "getComponentsByType", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () { return chunkRPP5K2LP_js.getComponentsByType; }
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, "getElementLabel", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () { return chunkRPP5K2LP_js.getElementLabel; }
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "getFirstComponentByType", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () { return chunkRPP5K2LP_js.getFirstComponentByType; }
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "getSectionValues", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function () { return chunkRPP5K2LP_js.getSectionValues; }
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(exports, "getSelectionColor", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () { return chunkRPP5K2LP_js.getSelectionColor; }
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, "groupBySlot", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () { return chunkRPP5K2LP_js.groupBySlot; }
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "hasComponentType", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () { return chunkRPP5K2LP_js.hasComponentType; }
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(exports, "hasEnabledItems", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: function () { return chunkRPP5K2LP_js.hasEnabledItems; }
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "removeNestedBlock", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () { return chunkRPP5K2LP_js.removeNestedBlock; }
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "sortBlocks", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () { return chunkRPP5K2LP_js.sortBlocks; }
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(exports, "sortComponents", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () { return chunkRPP5K2LP_js.sortComponents; }
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, "toComponentInstance", {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () { return chunkRPP5K2LP_js.toComponentInstance; }
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "updateNestedBlock", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return chunkRPP5K2LP_js.updateNestedBlock; }
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(exports, "updateNestedComponent", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () { return chunkRPP5K2LP_js.updateNestedComponent; }
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, "validateComponent", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () { return chunkRPP5K2LP_js.validateComponent; }
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, "validateContent", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () { return chunkRPP5K2LP_js.validateContent; }
|
|
142
|
+
});
|
|
143
|
+
Object.defineProperty(exports, "validateSection", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function () { return chunkRPP5K2LP_js.validateSection; }
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(exports, "validateSettings", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function () { return chunkRPP5K2LP_js.validateSettings; }
|
|
150
|
+
});
|
|
151
|
+
Object.defineProperty(exports, "validateStyle", {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function () { return chunkRPP5K2LP_js.validateStyle; }
|
|
154
|
+
});
|
|
155
|
+
Object.defineProperty(exports, "cn", {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: function () { return chunkVJA3ER6A_js.cn; }
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=utils.js.map
|
|
160
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"utils.js"}
|