@marvalt/dstyler 0.1.21 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,419 +1,5 @@
1
1
  import React, { useEffect } from 'react';
2
2
 
3
- var jsxRuntime = {exports: {}};
4
-
5
- var reactJsxRuntime_production = {};
6
-
7
- /**
8
- * @license React
9
- * react-jsx-runtime.production.js
10
- *
11
- * Copyright (c) Meta Platforms, Inc. and affiliates.
12
- *
13
- * This source code is licensed under the MIT license found in the
14
- * LICENSE file in the root directory of this source tree.
15
- */
16
-
17
- var hasRequiredReactJsxRuntime_production;
18
-
19
- function requireReactJsxRuntime_production () {
20
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
21
- hasRequiredReactJsxRuntime_production = 1;
22
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
23
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
24
- function jsxProd(type, config, maybeKey) {
25
- var key = null;
26
- void 0 !== maybeKey && (key = "" + maybeKey);
27
- void 0 !== config.key && (key = "" + config.key);
28
- if ("key" in config) {
29
- maybeKey = {};
30
- for (var propName in config)
31
- "key" !== propName && (maybeKey[propName] = config[propName]);
32
- } else maybeKey = config;
33
- config = maybeKey.ref;
34
- return {
35
- $$typeof: REACT_ELEMENT_TYPE,
36
- type: type,
37
- key: key,
38
- ref: void 0 !== config ? config : null,
39
- props: maybeKey
40
- };
41
- }
42
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
43
- reactJsxRuntime_production.jsx = jsxProd;
44
- reactJsxRuntime_production.jsxs = jsxProd;
45
- return reactJsxRuntime_production;
46
- }
47
-
48
- var reactJsxRuntime_development = {};
49
-
50
- /**
51
- * @license React
52
- * react-jsx-runtime.development.js
53
- *
54
- * Copyright (c) Meta Platforms, Inc. and affiliates.
55
- *
56
- * This source code is licensed under the MIT license found in the
57
- * LICENSE file in the root directory of this source tree.
58
- */
59
-
60
- var hasRequiredReactJsxRuntime_development;
61
-
62
- function requireReactJsxRuntime_development () {
63
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
64
- hasRequiredReactJsxRuntime_development = 1;
65
- "production" !== process.env.NODE_ENV &&
66
- (function () {
67
- function getComponentNameFromType(type) {
68
- if (null == type) return null;
69
- if ("function" === typeof type)
70
- return type.$$typeof === REACT_CLIENT_REFERENCE
71
- ? null
72
- : type.displayName || type.name || null;
73
- if ("string" === typeof type) return type;
74
- switch (type) {
75
- case REACT_FRAGMENT_TYPE:
76
- return "Fragment";
77
- case REACT_PROFILER_TYPE:
78
- return "Profiler";
79
- case REACT_STRICT_MODE_TYPE:
80
- return "StrictMode";
81
- case REACT_SUSPENSE_TYPE:
82
- return "Suspense";
83
- case REACT_SUSPENSE_LIST_TYPE:
84
- return "SuspenseList";
85
- case REACT_ACTIVITY_TYPE:
86
- return "Activity";
87
- }
88
- if ("object" === typeof type)
89
- switch (
90
- ("number" === typeof type.tag &&
91
- console.error(
92
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
93
- ),
94
- type.$$typeof)
95
- ) {
96
- case REACT_PORTAL_TYPE:
97
- return "Portal";
98
- case REACT_CONTEXT_TYPE:
99
- return type.displayName || "Context";
100
- case REACT_CONSUMER_TYPE:
101
- return (type._context.displayName || "Context") + ".Consumer";
102
- case REACT_FORWARD_REF_TYPE:
103
- var innerType = type.render;
104
- type = type.displayName;
105
- type ||
106
- ((type = innerType.displayName || innerType.name || ""),
107
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
108
- return type;
109
- case REACT_MEMO_TYPE:
110
- return (
111
- (innerType = type.displayName || null),
112
- null !== innerType
113
- ? innerType
114
- : getComponentNameFromType(type.type) || "Memo"
115
- );
116
- case REACT_LAZY_TYPE:
117
- innerType = type._payload;
118
- type = type._init;
119
- try {
120
- return getComponentNameFromType(type(innerType));
121
- } catch (x) {}
122
- }
123
- return null;
124
- }
125
- function testStringCoercion(value) {
126
- return "" + value;
127
- }
128
- function checkKeyStringCoercion(value) {
129
- try {
130
- testStringCoercion(value);
131
- var JSCompiler_inline_result = !1;
132
- } catch (e) {
133
- JSCompiler_inline_result = true;
134
- }
135
- if (JSCompiler_inline_result) {
136
- JSCompiler_inline_result = console;
137
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
138
- var JSCompiler_inline_result$jscomp$0 =
139
- ("function" === typeof Symbol &&
140
- Symbol.toStringTag &&
141
- value[Symbol.toStringTag]) ||
142
- value.constructor.name ||
143
- "Object";
144
- JSCompiler_temp_const.call(
145
- JSCompiler_inline_result,
146
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
147
- JSCompiler_inline_result$jscomp$0
148
- );
149
- return testStringCoercion(value);
150
- }
151
- }
152
- function getTaskName(type) {
153
- if (type === REACT_FRAGMENT_TYPE) return "<>";
154
- if (
155
- "object" === typeof type &&
156
- null !== type &&
157
- type.$$typeof === REACT_LAZY_TYPE
158
- )
159
- return "<...>";
160
- try {
161
- var name = getComponentNameFromType(type);
162
- return name ? "<" + name + ">" : "<...>";
163
- } catch (x) {
164
- return "<...>";
165
- }
166
- }
167
- function getOwner() {
168
- var dispatcher = ReactSharedInternals.A;
169
- return null === dispatcher ? null : dispatcher.getOwner();
170
- }
171
- function UnknownOwner() {
172
- return Error("react-stack-top-frame");
173
- }
174
- function hasValidKey(config) {
175
- if (hasOwnProperty.call(config, "key")) {
176
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
177
- if (getter && getter.isReactWarning) return false;
178
- }
179
- return void 0 !== config.key;
180
- }
181
- function defineKeyPropWarningGetter(props, displayName) {
182
- function warnAboutAccessingKey() {
183
- specialPropKeyWarningShown ||
184
- ((specialPropKeyWarningShown = true),
185
- console.error(
186
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
187
- displayName
188
- ));
189
- }
190
- warnAboutAccessingKey.isReactWarning = true;
191
- Object.defineProperty(props, "key", {
192
- get: warnAboutAccessingKey,
193
- configurable: true
194
- });
195
- }
196
- function elementRefGetterWithDeprecationWarning() {
197
- var componentName = getComponentNameFromType(this.type);
198
- didWarnAboutElementRef[componentName] ||
199
- ((didWarnAboutElementRef[componentName] = true),
200
- console.error(
201
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
202
- ));
203
- componentName = this.props.ref;
204
- return void 0 !== componentName ? componentName : null;
205
- }
206
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
207
- var refProp = props.ref;
208
- type = {
209
- $$typeof: REACT_ELEMENT_TYPE,
210
- type: type,
211
- key: key,
212
- props: props,
213
- _owner: owner
214
- };
215
- null !== (void 0 !== refProp ? refProp : null)
216
- ? Object.defineProperty(type, "ref", {
217
- enumerable: false,
218
- get: elementRefGetterWithDeprecationWarning
219
- })
220
- : Object.defineProperty(type, "ref", { enumerable: false, value: null });
221
- type._store = {};
222
- Object.defineProperty(type._store, "validated", {
223
- configurable: false,
224
- enumerable: false,
225
- writable: true,
226
- value: 0
227
- });
228
- Object.defineProperty(type, "_debugInfo", {
229
- configurable: false,
230
- enumerable: false,
231
- writable: true,
232
- value: null
233
- });
234
- Object.defineProperty(type, "_debugStack", {
235
- configurable: false,
236
- enumerable: false,
237
- writable: true,
238
- value: debugStack
239
- });
240
- Object.defineProperty(type, "_debugTask", {
241
- configurable: false,
242
- enumerable: false,
243
- writable: true,
244
- value: debugTask
245
- });
246
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
247
- return type;
248
- }
249
- function jsxDEVImpl(
250
- type,
251
- config,
252
- maybeKey,
253
- isStaticChildren,
254
- debugStack,
255
- debugTask
256
- ) {
257
- var children = config.children;
258
- if (void 0 !== children)
259
- if (isStaticChildren)
260
- if (isArrayImpl(children)) {
261
- for (
262
- isStaticChildren = 0;
263
- isStaticChildren < children.length;
264
- isStaticChildren++
265
- )
266
- validateChildKeys(children[isStaticChildren]);
267
- Object.freeze && Object.freeze(children);
268
- } else
269
- console.error(
270
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
271
- );
272
- else validateChildKeys(children);
273
- if (hasOwnProperty.call(config, "key")) {
274
- children = getComponentNameFromType(type);
275
- var keys = Object.keys(config).filter(function (k) {
276
- return "key" !== k;
277
- });
278
- isStaticChildren =
279
- 0 < keys.length
280
- ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
281
- : "{key: someKey}";
282
- didWarnAboutKeySpread[children + isStaticChildren] ||
283
- ((keys =
284
- 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
285
- console.error(
286
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
287
- isStaticChildren,
288
- children,
289
- keys,
290
- children
291
- ),
292
- (didWarnAboutKeySpread[children + isStaticChildren] = true));
293
- }
294
- children = null;
295
- void 0 !== maybeKey &&
296
- (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
297
- hasValidKey(config) &&
298
- (checkKeyStringCoercion(config.key), (children = "" + config.key));
299
- if ("key" in config) {
300
- maybeKey = {};
301
- for (var propName in config)
302
- "key" !== propName && (maybeKey[propName] = config[propName]);
303
- } else maybeKey = config;
304
- children &&
305
- defineKeyPropWarningGetter(
306
- maybeKey,
307
- "function" === typeof type
308
- ? type.displayName || type.name || "Unknown"
309
- : type
310
- );
311
- return ReactElement(
312
- type,
313
- children,
314
- maybeKey,
315
- getOwner(),
316
- debugStack,
317
- debugTask
318
- );
319
- }
320
- function validateChildKeys(node) {
321
- isValidElement(node)
322
- ? node._store && (node._store.validated = 1)
323
- : "object" === typeof node &&
324
- null !== node &&
325
- node.$$typeof === REACT_LAZY_TYPE &&
326
- ("fulfilled" === node._payload.status
327
- ? isValidElement(node._payload.value) &&
328
- node._payload.value._store &&
329
- (node._payload.value._store.validated = 1)
330
- : node._store && (node._store.validated = 1));
331
- }
332
- function isValidElement(object) {
333
- return (
334
- "object" === typeof object &&
335
- null !== object &&
336
- object.$$typeof === REACT_ELEMENT_TYPE
337
- );
338
- }
339
- var React$1 = React,
340
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
341
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
342
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
343
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
344
- REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
345
- REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
346
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
347
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
348
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
349
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
350
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
351
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
352
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
353
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
354
- ReactSharedInternals =
355
- React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
356
- hasOwnProperty = Object.prototype.hasOwnProperty,
357
- isArrayImpl = Array.isArray,
358
- createTask = console.createTask
359
- ? console.createTask
360
- : function () {
361
- return null;
362
- };
363
- React$1 = {
364
- react_stack_bottom_frame: function (callStackForError) {
365
- return callStackForError();
366
- }
367
- };
368
- var specialPropKeyWarningShown;
369
- var didWarnAboutElementRef = {};
370
- var unknownOwnerDebugStack = React$1.react_stack_bottom_frame.bind(
371
- React$1,
372
- UnknownOwner
373
- )();
374
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
375
- var didWarnAboutKeySpread = {};
376
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
377
- reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
378
- var trackActualOwner =
379
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
380
- return jsxDEVImpl(
381
- type,
382
- config,
383
- maybeKey,
384
- false,
385
- trackActualOwner
386
- ? Error("react-stack-top-frame")
387
- : unknownOwnerDebugStack,
388
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
389
- );
390
- };
391
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
392
- var trackActualOwner =
393
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
394
- return jsxDEVImpl(
395
- type,
396
- config,
397
- maybeKey,
398
- true,
399
- trackActualOwner
400
- ? Error("react-stack-top-frame")
401
- : unknownOwnerDebugStack,
402
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
403
- );
404
- };
405
- })();
406
- return reactJsxRuntime_development;
407
- }
408
-
409
- if (process.env.NODE_ENV === 'production') {
410
- jsxRuntime.exports = requireReactJsxRuntime_production();
411
- } else {
412
- jsxRuntime.exports = requireReactJsxRuntime_development();
413
- }
414
-
415
- var jsxRuntimeExports = jsxRuntime.exports;
416
-
417
3
  /**
418
4
  * Detect sections from WordPress blocks
419
5
  * Sections are defined by core/group blocks (with or without alignment)
@@ -532,6 +118,12 @@ function selectBlockRenderer(block) {
532
118
  }
533
119
  }
534
120
 
121
+ /**
122
+ * @license GPL-3.0-or-later
123
+ *
124
+ * This file is part of the MarVAlt Open SDK.
125
+ * Copyright (c) 2025 Vibune Pty Ltd.
126
+ */
535
127
  const BlockText = ({ block, className }) => {
536
128
  const attrs = block.attributes || {};
537
129
  const content = (attrs.content || attrs.text || '');
@@ -549,9 +141,15 @@ const BlockText = ({ block, className }) => {
549
141
  style.fontSize = `calc(1rem * var(--dstyler-font-scale) * ${attrs.level || 2})`;
550
142
  style.fontWeight = 'bold';
551
143
  }
552
- return (jsxRuntimeExports.jsx(Tag, { className: className, style: style, dangerouslySetInnerHTML: { __html: content } }));
144
+ return (React.createElement(Tag, { className: className, style: style, dangerouslySetInnerHTML: { __html: content } }));
553
145
  };
554
146
 
147
+ /**
148
+ * @license GPL-3.0-or-later
149
+ *
150
+ * This file is part of the MarVAlt Open SDK.
151
+ * Copyright (c) 2025 Vibune Pty Ltd.
152
+ */
555
153
  const BlockImage = ({ block, className }) => {
556
154
  const attrs = block.attributes || {};
557
155
  const url = (attrs.url || attrs.sourceUrl || '');
@@ -560,7 +158,7 @@ const BlockImage = ({ block, className }) => {
560
158
  const height = attrs.height;
561
159
  if (!url)
562
160
  return null;
563
- return (jsxRuntimeExports.jsx("img", { src: url, alt: alt, width: width, height: height, className: className, style: {
161
+ return (React.createElement("img", { src: url, alt: alt, width: width, height: height, className: className, style: {
564
162
  maxWidth: '100%',
565
163
  height: 'auto',
566
164
  marginBottom: 'var(--dstyler-spacing-md)',
@@ -568,6 +166,12 @@ const BlockImage = ({ block, className }) => {
568
166
  }, loading: "lazy" }));
569
167
  };
570
168
 
169
+ /**
170
+ * @license GPL-3.0-or-later
171
+ *
172
+ * This file is part of the MarVAlt Open SDK.
173
+ * Copyright (c) 2025 Vibune Pty Ltd.
174
+ */
571
175
  const BlockButton = ({ block, className }) => {
572
176
  const attrs = block.attributes || {};
573
177
  const text = (attrs.text || attrs.label || 'Button');
@@ -575,7 +179,7 @@ const BlockButton = ({ block, className }) => {
575
179
  const isExternal = typeof window !== 'undefined'
576
180
  ? url.startsWith('http') && !url.includes(window.location.hostname)
577
181
  : url.startsWith('http');
578
- return (jsxRuntimeExports.jsx("a", { href: url, target: isExternal ? '_blank' : undefined, rel: isExternal ? 'noopener noreferrer' : undefined, className: className, style: {
182
+ return (React.createElement("a", { href: url, target: isExternal ? '_blank' : undefined, rel: isExternal ? 'noopener noreferrer' : undefined, className: className, style: {
579
183
  display: 'inline-block',
580
184
  padding: 'var(--dstyler-spacing-md) var(--dstyler-spacing-lg)',
581
185
  backgroundColor: 'var(--dstyler-color-primary)',
@@ -589,19 +193,31 @@ const BlockButton = ({ block, className }) => {
589
193
  e.currentTarget.style.opacity = '0.9';
590
194
  }, onMouseLeave: (e) => {
591
195
  e.currentTarget.style.opacity = '1';
592
- }, children: text }));
196
+ } }, text));
593
197
  };
594
198
 
199
+ /**
200
+ * @license GPL-3.0-or-later
201
+ *
202
+ * This file is part of the MarVAlt Open SDK.
203
+ * Copyright (c) 2025 Vibune Pty Ltd.
204
+ */
595
205
  const BlockForm = ({ block, className }) => {
596
206
  const attrs = block.attributes || {};
597
207
  const content = (attrs.content || attrs.html || '');
598
208
  // For now, just render the HTML content
599
209
  // In the future, this could parse and render using Gravity Forms or Mautic components
600
- return (jsxRuntimeExports.jsx("div", { className: className, style: {
210
+ return (React.createElement("div", { className: className, style: {
601
211
  marginBottom: 'var(--dstyler-spacing-lg)',
602
212
  }, dangerouslySetInnerHTML: { __html: content } }));
603
213
  };
604
214
 
215
+ /**
216
+ * @license GPL-3.0-or-later
217
+ *
218
+ * This file is part of the MarVAlt Open SDK.
219
+ * Copyright (c) 2025 Vibune Pty Ltd.
220
+ */
605
221
  /**
606
222
  * AutoBlock - Automatically selects and renders the appropriate block renderer
607
223
  *
@@ -613,25 +229,35 @@ const AutoBlock = ({ block, registry, className }) => {
613
229
  // If registry is provided, use it for rendering (integrates with wparser)
614
230
  if (registry && registry.renderers[block.name]) {
615
231
  const Renderer = registry.renderers[block.name];
616
- return jsxRuntimeExports.jsx(Renderer, { block: block, context: { registry } });
232
+ return React.createElement(Renderer, { block: block, context: { registry } });
617
233
  }
618
234
  // Otherwise, use dstyler's block renderers
619
235
  const rendererName = selectBlockRenderer(block);
620
236
  switch (rendererName) {
621
237
  case 'BlockText':
622
- return jsxRuntimeExports.jsx(BlockText, { block: block, className: className });
238
+ return React.createElement(BlockText, { block: block, className: className });
623
239
  case 'BlockImage':
624
- return jsxRuntimeExports.jsx(BlockImage, { block: block, className: className });
240
+ return React.createElement(BlockImage, { block: block, className: className });
625
241
  case 'BlockButton':
626
- return jsxRuntimeExports.jsx(BlockButton, { block: block, className: className });
242
+ return React.createElement(BlockButton, { block: block, className: className });
627
243
  case 'BlockForm':
628
- return jsxRuntimeExports.jsx(BlockForm, { block: block, className: className });
244
+ return React.createElement(BlockForm, { block: block, className: className });
629
245
  default:
630
246
  // Fallback: render block name or content
631
- return (jsxRuntimeExports.jsx("div", { style: { marginBottom: 'var(--dstyler-spacing-md)' }, children: jsxRuntimeExports.jsxs("pre", { style: { fontSize: '0.875rem', color: '#666' }, children: [block.name, ": ", JSON.stringify(block.attributes, null, 2)] }) }));
247
+ return (React.createElement("div", { style: { marginBottom: 'var(--dstyler-spacing-md)' } },
248
+ React.createElement("pre", { style: { fontSize: '0.875rem', color: '#666' } },
249
+ block.name,
250
+ ": ",
251
+ JSON.stringify(block.attributes, null, 2))));
632
252
  }
633
253
  };
634
254
 
255
+ /**
256
+ * @license GPL-3.0-or-later
257
+ *
258
+ * This file is part of the MarVAlt Open SDK.
259
+ * Copyright (c) 2025 Vibune Pty Ltd.
260
+ */
635
261
  const SectionBase = ({ section, children }) => {
636
262
  const style = section.style || 'default';
637
263
  const bgColor = `var(--dstyler-color-${style})`;
@@ -640,15 +266,22 @@ const SectionBase = ({ section, children }) => {
640
266
  `dstyler-section-${style}`,
641
267
  section.customClass,
642
268
  ].filter(Boolean).join(' ');
643
- return (jsxRuntimeExports.jsx("section", { className: className, id: section.customId, style: {
269
+ return (React.createElement("section", { className: className, id: section.customId, style: {
644
270
  backgroundColor: bgColor,
645
271
  padding: 'var(--dstyler-spacing-xl) var(--dstyler-spacing-md)',
646
- }, children: jsxRuntimeExports.jsx("div", { style: {
272
+ } },
273
+ React.createElement("div", { style: {
647
274
  maxWidth: 'var(--dstyler-container-max-width, 1200px)',
648
275
  margin: '0 auto',
649
- }, children: children }) }));
276
+ } }, children)));
650
277
  };
651
278
 
279
+ /**
280
+ * @license GPL-3.0-or-later
281
+ *
282
+ * This file is part of the MarVAlt Open SDK.
283
+ * Copyright (c) 2025 Vibune Pty Ltd.
284
+ */
652
285
  const SectionWave = ({ section, children, waveTop = true, waveBottom = true, }) => {
653
286
  const style = section.style || 'default';
654
287
  const bgColor = `var(--dstyler-color-${style})`;
@@ -659,23 +292,34 @@ const SectionWave = ({ section, children, waveTop = true, waveBottom = true, })
659
292
  section.customClass,
660
293
  ].filter(Boolean).join(' ');
661
294
  // Wave SVG
662
- const waveSvg = (jsxRuntimeExports.jsx("svg", { viewBox: "0 0 1440 120", preserveAspectRatio: "none", style: {
295
+ const waveSvg = (React.createElement("svg", { viewBox: "0 0 1440 120", preserveAspectRatio: "none", style: {
663
296
  width: '100%',
664
297
  height: '60px',
665
298
  display: 'block',
666
299
  fill: bgColor,
667
- }, children: jsxRuntimeExports.jsx("path", { d: "M0,60 C240,0 480,120 720,60 C960,0 1200,120 1440,60 L1440,120 L0,120 Z" }) }));
668
- return (jsxRuntimeExports.jsxs("section", { className: className, id: section.customId, style: {
300
+ } },
301
+ React.createElement("path", { d: "M0,60 C240,0 480,120 720,60 C960,0 1200,120 1440,60 L1440,120 L0,120 Z" })));
302
+ return (React.createElement("section", { className: className, id: section.customId, style: {
669
303
  backgroundColor: bgColor,
670
304
  position: 'relative',
671
- }, children: [waveTop && jsxRuntimeExports.jsx("div", { style: { marginTop: '-1px' }, children: waveSvg }), jsxRuntimeExports.jsx("div", { style: {
672
- padding: 'var(--dstyler-spacing-xl) var(--dstyler-spacing-md)',
673
- }, children: jsxRuntimeExports.jsx("div", { style: {
674
- maxWidth: 'var(--dstyler-container-max-width, 1200px)',
675
- margin: '0 auto',
676
- }, children: children }) }), waveBottom && (jsxRuntimeExports.jsx("div", { style: { marginBottom: '-1px', transform: 'rotate(180deg)' }, children: waveSvg }))] }));
305
+ } },
306
+ waveTop && React.createElement("div", { style: { marginTop: '-1px' } }, waveSvg),
307
+ React.createElement("div", { style: {
308
+ padding: 'var(--dstyler-spacing-xl) var(--dstyler-spacing-md)',
309
+ } },
310
+ React.createElement("div", { style: {
311
+ maxWidth: 'var(--dstyler-container-max-width, 1200px)',
312
+ margin: '0 auto',
313
+ } }, children)),
314
+ waveBottom && (React.createElement("div", { style: { marginBottom: '-1px', transform: 'rotate(180deg)' } }, waveSvg))));
677
315
  };
678
316
 
317
+ /**
318
+ * @license GPL-3.0-or-later
319
+ *
320
+ * This file is part of the MarVAlt Open SDK.
321
+ * Copyright (c) 2025 Vibune Pty Ltd.
322
+ */
679
323
  const HeroDefault = ({ section, children }) => {
680
324
  const style = section.style || 'default';
681
325
  const bgColor = `var(--dstyler-color-${style})`;
@@ -685,20 +329,27 @@ const HeroDefault = ({ section, children }) => {
685
329
  `dstyler-hero-${style}`,
686
330
  section.customClass,
687
331
  ].filter(Boolean).join(' ');
688
- return (jsxRuntimeExports.jsx("section", { className: className, id: section.customId, style: {
332
+ return (React.createElement("section", { className: className, id: section.customId, style: {
689
333
  backgroundColor: bgColor,
690
334
  padding: 'var(--dstyler-spacing-xl) var(--dstyler-spacing-md)',
691
335
  minHeight: '50vh',
692
336
  display: 'flex',
693
337
  alignItems: 'center',
694
338
  justifyContent: 'center',
695
- }, children: jsxRuntimeExports.jsx("div", { style: {
339
+ } },
340
+ React.createElement("div", { style: {
696
341
  maxWidth: 'var(--dstyler-container-max-width, 1200px)',
697
342
  margin: '0 auto',
698
343
  textAlign: 'center',
699
- }, children: children }) }));
344
+ } }, children)));
700
345
  };
701
346
 
347
+ /**
348
+ * @license GPL-3.0-or-later
349
+ *
350
+ * This file is part of the MarVAlt Open SDK.
351
+ * Copyright (c) 2025 Vibune Pty Ltd.
352
+ */
702
353
  const FooterMinimal = ({ section, children }) => {
703
354
  const style = section.style || 'default';
704
355
  const bgColor = `var(--dstyler-color-${style})`;
@@ -708,19 +359,26 @@ const FooterMinimal = ({ section, children }) => {
708
359
  `dstyler-footer-${style}`,
709
360
  section.customClass,
710
361
  ].filter(Boolean).join(' ');
711
- return (jsxRuntimeExports.jsx("footer", { className: className, id: section.customId, style: {
362
+ return (React.createElement("footer", { className: className, id: section.customId, style: {
712
363
  backgroundColor: bgColor,
713
364
  padding: 'var(--dstyler-spacing-lg) var(--dstyler-spacing-md)',
714
365
  borderTop: '1px solid var(--dstyler-color-alternate)',
715
- }, children: jsxRuntimeExports.jsx("div", { style: {
366
+ } },
367
+ React.createElement("div", { style: {
716
368
  maxWidth: 'var(--dstyler-container-max-width, 1200px)',
717
369
  margin: '0 auto',
718
370
  textAlign: 'center',
719
371
  fontSize: '0.875rem',
720
372
  color: 'var(--dstyler-color-text)',
721
- }, children: children }) }));
373
+ } }, children)));
722
374
  };
723
375
 
376
+ /**
377
+ * @license GPL-3.0-or-later
378
+ *
379
+ * This file is part of the MarVAlt Open SDK.
380
+ * Copyright (c) 2025 Vibune Pty Ltd.
381
+ */
724
382
  /**
725
383
  * AutoSection - Automatically selects and renders the appropriate section template
726
384
  */
@@ -730,10 +388,10 @@ const AutoSection = ({ section, registry }) => {
730
388
  const renderBlocks = () => {
731
389
  if (registry) {
732
390
  // Use registry for block rendering (integrates with wparser)
733
- return section.blocks.map((block, index) => (jsxRuntimeExports.jsx(AutoBlock, { block: block, registry: registry }, `${block.name}-${index}`)));
391
+ return section.blocks.map((block, index) => (React.createElement(AutoBlock, { key: `${block.name}-${index}`, block: block, registry: registry })));
734
392
  }
735
393
  // Fallback to simple block rendering
736
- return section.blocks.map((block, index) => (jsxRuntimeExports.jsx(AutoBlock, { block: block }, `${block.name}-${index}`)));
394
+ return section.blocks.map((block, index) => (React.createElement(AutoBlock, { key: `${block.name}-${index}`, block: block })));
737
395
  };
738
396
  // Select template component
739
397
  switch (templateName) {
@@ -741,17 +399,23 @@ const AutoSection = ({ section, registry }) => {
741
399
  const className = section.customClass?.toLowerCase() || '';
742
400
  const waveTop = className.includes('wave-top') || !className.includes('wave-bottom');
743
401
  const waveBottom = className.includes('wave-bottom') || !className.includes('wave-top');
744
- return (jsxRuntimeExports.jsx(SectionWave, { section: section, waveTop: waveTop, waveBottom: waveBottom, children: renderBlocks() }));
402
+ return (React.createElement(SectionWave, { section: section, waveTop: waveTop, waveBottom: waveBottom }, renderBlocks()));
745
403
  }
746
404
  case 'HeroDefault':
747
- return jsxRuntimeExports.jsx(HeroDefault, { section: section, children: renderBlocks() });
405
+ return React.createElement(HeroDefault, { section: section }, renderBlocks());
748
406
  case 'FooterMinimal':
749
- return jsxRuntimeExports.jsx(FooterMinimal, { section: section, children: renderBlocks() });
407
+ return React.createElement(FooterMinimal, { section: section }, renderBlocks());
750
408
  default:
751
- return jsxRuntimeExports.jsx(SectionBase, { section: section, children: renderBlocks() });
409
+ return React.createElement(SectionBase, { section: section }, renderBlocks());
752
410
  }
753
411
  };
754
412
 
413
+ /**
414
+ * @license GPL-3.0-or-later
415
+ *
416
+ * This file is part of the MarVAlt Open SDK.
417
+ * Copyright (c) 2025 Vibune Pty Ltd.
418
+ */
755
419
  /**
756
420
  * StyledPage - Main entry point for dstyler
757
421
  *
@@ -772,7 +436,7 @@ const StyledPage = ({ page, registry }) => {
772
436
  style,
773
437
  };
774
438
  });
775
- return (jsxRuntimeExports.jsx(React.Fragment, { children: styledSections.map((section) => (jsxRuntimeExports.jsx(AutoSection, { section: section, registry: registry }, section.id))) }));
439
+ return (React.createElement(React.Fragment, null, styledSections.map((section) => (React.createElement(AutoSection, { key: section.id, section: section, registry: registry })))));
776
440
  };
777
441
 
778
442
  const defaultTokens = {