@pixelated-tech/components 3.11.6 → 3.11.8
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/components/general/hero.css +20 -0
- package/dist/components/general/hero.js +13 -0
- package/dist/components/integrations/loremipsum.js +125 -0
- package/dist/components/sitebuilder/form/formcomponents.js +0 -4
- package/dist/components/sitebuilder/form/formengine.js +17 -2
- package/dist/config/pixelated.config.json.enc +1 -1
- package/dist/index.js +5 -3
- package/dist/index.server.js +1 -0
- package/dist/scripts/release.sh +134 -94
- package/dist/scripts/zip-pixelated-theme.js +123 -0
- package/dist/types/components/general/hero.d.ts +13 -0
- package/dist/types/components/general/hero.d.ts.map +1 -0
- package/dist/types/components/integrations/loremipsum.d.ts +14 -0
- package/dist/types/components/integrations/loremipsum.d.ts.map +1 -0
- package/dist/types/components/sitebuilder/form/formcomponents.d.ts +1 -3
- package/dist/types/components/sitebuilder/form/formcomponents.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/form/formengine.d.ts +2 -0
- package/dist/types/components/sitebuilder/form/formengine.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/form/formtypes.d.ts +0 -28
- package/dist/types/components/sitebuilder/form/formtypes.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/page/lib/componentGeneration.d.ts +2 -1
- package/dist/types/components/sitebuilder/page/lib/componentGeneration.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/page/lib/propTypeIntrospection.d.ts +3 -2
- package/dist/types/components/sitebuilder/page/lib/propTypeIntrospection.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/page/lib/types.d.ts +0 -7
- package/dist/types/components/sitebuilder/page/lib/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.server.d.ts +1 -0
- package/dist/types/scripts/zip-pixelated-theme.d.ts +10 -0
- package/dist/types/scripts/zip-pixelated-theme.d.ts.map +1 -0
- package/dist/types/stories/general/hero.stories.d.ts +43 -0
- package/dist/types/stories/general/hero.stories.d.ts.map +1 -0
- package/dist/types/stories/integrations/loremipsum.stories.d.ts +46 -0
- package/dist/types/stories/integrations/loremipsum.stories.d.ts.map +1 -0
- package/dist/types/tests/formcomponents.exports.test.d.ts +2 -0
- package/dist/types/tests/formcomponents.exports.test.d.ts.map +1 -0
- package/dist/types/tests/hero.test.d.ts +2 -0
- package/dist/types/tests/hero.test.d.ts.map +1 -0
- package/dist/types/tests/loremipsum.test.d.ts +2 -0
- package/dist/types/tests/loremipsum.test.d.ts.map +1 -0
- package/dist/types/tests/zip-pixelated-theme.test.d.ts +2 -0
- package/dist/types/tests/zip-pixelated-theme.test.d.ts.map +1 -0
- package/package.json +9 -8
- package/dist/types/stories/general/humans.stories.d.ts +0 -8
- package/dist/types/stories/general/humans.stories.d.ts.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
.hero {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 60vh;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
margin-bottom: 30px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
/* Background image styles */
|
|
12
|
+
background-position: center;
|
|
13
|
+
background-repeat: no-repeat;
|
|
14
|
+
background-size: cover;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.hero.anchored {
|
|
18
|
+
/* Create the parallax scrolling effect */
|
|
19
|
+
background-attachment: fixed;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import "./hero.css";
|
|
4
|
+
Hero.propTypes = {
|
|
5
|
+
img: PropTypes.string.isRequired,
|
|
6
|
+
// imgAlt: PropTypes.string.isRequired,
|
|
7
|
+
variant: PropTypes.oneOf(['static', 'anchored']),
|
|
8
|
+
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
9
|
+
children: PropTypes.node,
|
|
10
|
+
};
|
|
11
|
+
export function Hero({ img, /* imgAlt, */ variant = 'static', height = '60vh', children }) {
|
|
12
|
+
return (_jsx(_Fragment, { children: _jsx("div", { className: "hero" + (variant ? " " + variant : ''), style: { backgroundImage: `url(${img})`, height: height ?? '60vh' }, children: children }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { usePixelatedConfig } from '@/components/config/config.client';
|
|
6
|
+
const debug = false;
|
|
7
|
+
LoremIpsum.propTypes = {
|
|
8
|
+
paragraphs: PropTypes.number,
|
|
9
|
+
seed: PropTypes.string,
|
|
10
|
+
proxyBase: PropTypes.string,
|
|
11
|
+
className: PropTypes.string,
|
|
12
|
+
};
|
|
13
|
+
export function LoremIpsum({ paragraphs = 1, seed = '', proxyBase, className = '' }) {
|
|
14
|
+
const config = usePixelatedConfig();
|
|
15
|
+
// Prefer the global proxy from the app/config provider when present —
|
|
16
|
+
// that ensures Storybook and in-browser environments use the site-wide proxy
|
|
17
|
+
// instead of a per-call `proxyBase` (per user request).
|
|
18
|
+
const resolvedProxy = config?.global?.proxyUrl || proxyBase || undefined;
|
|
19
|
+
const [items, setItems] = useState(null);
|
|
20
|
+
const [error, setError] = useState(null);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const controller = new AbortController();
|
|
23
|
+
const apiUrl = new URL('https://lorem-api.com/api/lorem');
|
|
24
|
+
apiUrl.searchParams.set('paragraphs', String(paragraphs));
|
|
25
|
+
if (seed)
|
|
26
|
+
apiUrl.searchParams.set('seed', String(seed));
|
|
27
|
+
const tryFetch = async (url) => {
|
|
28
|
+
const res = await fetch(url, { signal: controller.signal });
|
|
29
|
+
if (!res.ok)
|
|
30
|
+
throw new Error(`fetch failed: ${res.status}`);
|
|
31
|
+
return res;
|
|
32
|
+
};
|
|
33
|
+
(async () => {
|
|
34
|
+
setItems(null);
|
|
35
|
+
setError(null);
|
|
36
|
+
try {
|
|
37
|
+
// First attempt: direct fetch
|
|
38
|
+
let res;
|
|
39
|
+
try {
|
|
40
|
+
res = await tryFetch(apiUrl.toString());
|
|
41
|
+
if (debug)
|
|
42
|
+
console.log('LoremIpsum: fetched directly', res);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
// If CORS/network error and we have a proxy, retry via proxy
|
|
46
|
+
if (resolvedProxy) {
|
|
47
|
+
const proxied = `${resolvedProxy}${encodeURIComponent(apiUrl.toString())}`;
|
|
48
|
+
res = await tryFetch(proxied);
|
|
49
|
+
if (debug)
|
|
50
|
+
console.log('LoremIpsum: fetched via proxy', res);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
throw err;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Read response as text to avoid "body stream already read" errors,
|
|
57
|
+
// then attempt to parse JSON; otherwise treat as plaintext.
|
|
58
|
+
const txt = await res.text();
|
|
59
|
+
try {
|
|
60
|
+
const parsed = JSON.parse(txt);
|
|
61
|
+
if (Array.isArray(parsed)) {
|
|
62
|
+
if (debug)
|
|
63
|
+
console.log('LoremIpsum: parsed array', parsed);
|
|
64
|
+
const newItems = parsed.map(String);
|
|
65
|
+
if (debug)
|
|
66
|
+
console.log('LoremIpsum: setting items', newItems);
|
|
67
|
+
setItems(newItems);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// JSON string literal containing paragraphs -> split
|
|
71
|
+
if (typeof parsed === 'string') {
|
|
72
|
+
if (debug)
|
|
73
|
+
console.log('LoremIpsum: parsed json string', parsed);
|
|
74
|
+
const newItems = parsed.split(/\n+/).map((s) => s.trim()).filter(Boolean);
|
|
75
|
+
if (debug)
|
|
76
|
+
console.log('LoremIpsum: setting items', newItems);
|
|
77
|
+
setItems(newItems);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (parsed && Array.isArray(parsed.paragraphs)) {
|
|
81
|
+
if (debug)
|
|
82
|
+
console.log('LoremIpsum: parsed object with paragraphs', parsed);
|
|
83
|
+
const newItems = parsed.paragraphs.map(String);
|
|
84
|
+
if (debug)
|
|
85
|
+
console.log('LoremIpsum: setting items', newItems);
|
|
86
|
+
setItems(newItems);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
// object with `text` property
|
|
90
|
+
if (parsed && typeof parsed.text === 'string') {
|
|
91
|
+
if (debug)
|
|
92
|
+
console.log('LoremIpsum: parsed object with text property', parsed);
|
|
93
|
+
const newItems = parsed.text.split(/\n+/).map((s) => s.trim()).filter(Boolean);
|
|
94
|
+
if (debug)
|
|
95
|
+
console.log('LoremIpsum: setting items', newItems);
|
|
96
|
+
setItems(newItems);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
// fallback: stringify into single paragraph
|
|
100
|
+
setItems([String(parsed)]);
|
|
101
|
+
}
|
|
102
|
+
catch (_) {
|
|
103
|
+
if (debug)
|
|
104
|
+
console.log('LoremIpsum: parsed plaintext', txt);
|
|
105
|
+
const newItems = txt.split(/\n+/).map((s) => s.trim()).filter(Boolean);
|
|
106
|
+
if (debug)
|
|
107
|
+
console.log('LoremIpsum: setting items', newItems);
|
|
108
|
+
setItems(newItems);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (err) {
|
|
113
|
+
if (err?.name === 'AbortError')
|
|
114
|
+
return;
|
|
115
|
+
setError(err?.message ?? 'Unable to load placeholder text.');
|
|
116
|
+
}
|
|
117
|
+
})();
|
|
118
|
+
return () => controller.abort();
|
|
119
|
+
}, [paragraphs, seed, resolvedProxy]);
|
|
120
|
+
if (error)
|
|
121
|
+
return _jsx("div", { className: `loremipsum ${className}`, "aria-live": "polite", children: error });
|
|
122
|
+
if (!items)
|
|
123
|
+
return _jsx("div", { className: `loremipsum ${className}`, children: "Loading\u2026" });
|
|
124
|
+
return (_jsx("div", { className: `loremipsum ${className}`, children: items.map((p, i) => (_jsx("p", { children: p }, i))) }));
|
|
125
|
+
}
|
|
@@ -5,8 +5,6 @@ import PropTypes from "prop-types";
|
|
|
5
5
|
import { validateField } from "./formvalidator";
|
|
6
6
|
import { useFormValidation } from "./formvalidator";
|
|
7
7
|
import * as FVF from "./formfieldvalidations";
|
|
8
|
-
import { FontSelector } from "../config/FontSelector";
|
|
9
|
-
import { CompoundFontSelector } from "../config/CompoundFontSelector";
|
|
10
8
|
import "./form.css";
|
|
11
9
|
/*
|
|
12
10
|
InferProps to generate Types
|
|
@@ -494,5 +492,3 @@ export function FormHoneypot({ id = "winnie", name }) {
|
|
|
494
492
|
};
|
|
495
493
|
return (_jsx(FormInput, { ...hpProps }));
|
|
496
494
|
}
|
|
497
|
-
// Re-export FontSelector for use in forms
|
|
498
|
-
export { FontSelector, CompoundFontSelector };
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import * as FC from './formcomponents';
|
|
6
5
|
import { generateKey } from './formutils';
|
|
7
6
|
import { FormValidationProvider, useFormValidation } from './formvalidator';
|
|
7
|
+
import * as FC from './formcomponents';
|
|
8
|
+
import { CompoundFontSelector } from '../config/CompoundFontSelector';
|
|
9
|
+
import { FontSelector } from '../config/FontSelector';
|
|
10
|
+
// Merge a local components map to include config-level components without re-exporting them
|
|
11
|
+
export const COMPONENTS = {
|
|
12
|
+
...FC,
|
|
13
|
+
CompoundFontSelector,
|
|
14
|
+
FontSelector,
|
|
15
|
+
};
|
|
8
16
|
const debug = false;
|
|
9
17
|
/* ===== FORM ENGINE =====
|
|
10
18
|
Generate all the elements to display a form */
|
|
@@ -18,6 +26,13 @@ FormEngine.propTypes = {
|
|
|
18
26
|
export function FormEngine(props) {
|
|
19
27
|
return (_jsx(FormValidationProvider, { children: _jsx(FormEngineInner, { ...props }) }));
|
|
20
28
|
}
|
|
29
|
+
FormEngineInner.propTypes = {
|
|
30
|
+
name: PropTypes.string,
|
|
31
|
+
id: PropTypes.string,
|
|
32
|
+
method: PropTypes.string,
|
|
33
|
+
onSubmitHandler: PropTypes.func,
|
|
34
|
+
formData: PropTypes.object.isRequired
|
|
35
|
+
};
|
|
21
36
|
function FormEngineInner(props) {
|
|
22
37
|
const { validateAllFields } = useFormValidation();
|
|
23
38
|
function generateFormProps(props) {
|
|
@@ -63,7 +78,7 @@ function FormEngineInner(props) {
|
|
|
63
78
|
}
|
|
64
79
|
});
|
|
65
80
|
const componentName = thisField.component;
|
|
66
|
-
const newElementType =
|
|
81
|
+
const newElementType = COMPONENTS[componentName];
|
|
67
82
|
const newElement = React.createElement(newElementType, newProps);
|
|
68
83
|
newFields.push(newElement);
|
|
69
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
pxl:v1:
|
|
1
|
+
pxl:v1:f137cd9910c1845e60779ee1:40e9d679351a8e443af6934ef5c886a7:6f74f57915504ddf50fa5541cd3170b0e6b3f7d6eba7c867d45c74f999ff14199e4bc43273ffd14afe56bb6e47bd33ac3f02d961e745a3c43206e1e50afd34baf4381bd2fa16d5583db56955b033fd701d89ea55891b3b99420529d6cba88fbee1028effa2670071a9a7251fc3a46ec89f0e620ed7f1579564c9ddf4b4be42de9a5c29ec8c1791d03beae59f1689dbc71b9c772f7777d6595f16bed4c534ac9f71e43db93945473d680fa9f1913fa4975ec6697c4c4ec75122166dfad4312a26a29c5c209c24290f9a231fd55b3a52e97a69d8fc8a3b2a8f3441729c775d7ec637a7b78d493e80de51e40545f698dc357fc84b64fffa40e58ef1b87b873b9d81cab6ddaddde0e8ff1cea3d42c08183197ab296514d10e39675b98a0cb77c000d7f4369b5581e527d3eaac9a30846149d326b7bf796575511d59897ce518742243342e7cdd74030cc53ba2618620cb8459c34775fb8e033e34af13d54f86ccbee41d920d401262a50f8c364bd474a5f6064c19a5ba1cd2f05579e09bede8aafccd5b4667ff5601c750154361cd4888b6976c57b1b70362b42486ba316d3d0012fc339931c5fa675ec2a2dc426d0d061ae72f9a9bd4e51803072fd68c3ce696b2b7e6ee88d0962cc96a7633b332c0216f064c5a41335e8eb06179215c55e50efadefa4b82b88d30eebdbe002ff8bf9cfb7b43c0464d25cd9818fbceffb510830c611c8fc995fc15ab7ccd4a64f315608de512ad5ae7bdafcdac7534f29c3d0c9ca84efda9dd499ff29300164416ce9dbad92843feed5b6542c4cdac31b304fcf4fb1b47ebc176483f06c472d31ad7a5f0a8f685283c003049d4f0d79c116c378ea45c0d6d508634d8c478b67ac3b635753eed230a31e201dfde794bcac94719eda799bef296bf45bdf02df543fc446ba0c21401c5233ef06d3015048f9593d82ffb2efc552d0b5f4bc43e4eb5f5b63d3d246a5c3cbd243c070b709900eb8765dac652f82f247fc08a1bcd3285cec825092823dd7a0808ad98e8e784bbfe661c585d1d9b155c243b835bb2d7537273c0cc5391814d6fb7191ed61361c459938c4e94c67567f35af45549a26d4f66735ab4c33951440019f6255638a0550f315a0646f08455ebab6285b27e6b6f4dc35bcb8593746a835ba974c1e97d22b89a6f3ec381333b8d837bf736044096fffff71d5f46cae0087e62b85d0f5487234e75861aaead50467fb2937adc8e87f80abd14fba348ca1abd781391e42786817d9c8fad10eb3eabccfa8caa66da1a97a867314858bb1888f31729032dbe04ec29f74941420dab94fa9601817274cf448c6f60a29856c0d6bead4a8ee49fb5bfdb7aea2507df5244c7a33c1825b36698b9dce47ef27978824eb8a40ad1810731af5e59694e7f20a3dfab5224e2dbf28946b686d067e57434d6d1929e834083ef9e2c31630c6d16cc7ebdf1528a088b445bf7dda1e99450dcaf2cd3098509f79fe342aeb641616aafa0ec0c76d98f77a05e30eac31c03af1ab03c4d11614d0fcff839c78ddaba90ef57b9fc26c8504e983b89d49947c553200f78761cdf81137bab582604102f461f1b8cbfab046a041b6d7c31c19bbc56d8e700b8d7bd174d0b13dae6d10f5d18d3e9be7830928fd2c9b3b8820b17e13098688af9e0a95a740e1990018fde07666d3afb08e4d0b7a31347160c5c7f6522e928e3faab283f8e09a5202e3b46c659a933e088996b74627947a73c243609e6b83f09dbc7e9240dccc4e1611a90157f7fc57c29eca02346b95abbca18140524810c15648b825e56356a788cad13ec5cd58b711905eaeaf46f6ea4801ca5767688e38b5ae72f1d78846f5e3092f0f20953b78c6aa170910ba11e5c4598d26c72c2162eff8c72c88d21fb3d298b839dcb19a6ab7dc00f72d3063f2d14c6db5b17b947b412a614a48945c26651f450819a5553b8bfa4e05a60f0643f24bd8f6af2276ff525974d8f0a2a5cbdfd9f1a8acfd7e65247b36409a8eae0e4ba692bbbd3741d91ebaf038ac7a83370ab92559636f19a0a30a4a7f5b8400ca7667087fad32f9193a71c4b8e251b7fd0a7236ba15fed5c615f48b05c731cc813bcf5c9084b46f2b98b73403fd216cc7d5ed1e257280928d988ba4f6a7caaa24e85d8a91ce04cfab67074d6f932cfd7516a68487a4b87ec0562bf751c957679f9db7131c5d196dcf45bdab2a703abf36684731cc6b21f5d4fcbc41e87152713fd3ae3b2c05df87b56962a70e6b2a74ce1c6fc5a7494c3e8ba7df8265a6d30208ced926866c0d4817dc73919bd3c593cc465d58db9e2b1e236b2324c5cfe0e5b7715b86f7614866d5d57ff087dc4ab98173ef6e0dc6d63e20e6eb9fa14a9a486c82674801d548f343727f6fbb750cbdd0ddd209b66d57f7e90c095711aec08e2726b1f2b4424eed4b5eae98eae0e699ed3d2241509f9f91be55ba4ba00e749e5dd38182eb14186ccb971468923174307a5c27163309d1485ca41c9efb43be7fea00e79e527de999bcd08fdb3880f7cedabd7ec4eb10cc08545113a5b072e92ed9b117e39c37a6250945ced7fe8b185698c1634fe1926b84476a2681e2313f3854fd386c83cf626d8f1dd4618377c057895faaad7a752a7cc4c9a00134590561318ea3bbe927aac53db4f8b4b16a96ee8cd0d14f020b5507698ec38873079eb3e4183c2fe2f515ff53e12260c53d64fd5baf1539fa8e42086e1e1b2d9c71979cc3a696444c0f9331241bfacf0e2b662b7d304501a8a08dcab08aff5c2bc01eb86fcf33ad3509418bd9b9ee9c0d2090b8564ba2d94939b3ab81b3f970c79f7a96f5d700bc6da1ea1708557571d9dc31264b25007892a60121517be78f67b58b8a5c0f8192e01414e51a58b238eae33f5b89b5c133a2dea6c1d680a7610c413e3957367db85a5a7d462b479bf0ad36f3cf3121cbe4b33980f905971ba4f99e5c9f9b1ee586ed4845766d13099c64c8b4076ec990da4a7698df6f8247c4026036c560d1390c15c81e6c92894d65da4c7a1a1e5d0a97445ceddca9a40d4158a3b3fe19fc83eec97bd4931a24db79716a3545c83221e797581634ec563cfecdcc86e1285c687bf22db55ba18b2336078cc8926bedd2c703f91da4bcec61311c69e9e8ede3e419eab17b71175cdb8c140901c0f08d496c91956bc7ee52efa28a60f46225e883200266a72df1a1ab2b29bac0a80153e16bb6aba7455328c98dfc20852e22632ca72e7463d40ec62cd2a35f4e37c771f8ce8baf2a5ac8a96e835eca8f9f608a5055f5001f5e5ff812b9ca437bcc5d0fbd352ba143787e32b1cf7595c45d309d9ebd3fcb38eaad4b2420be02c84712d7b4795d6a48b59e911ac18004498e0b2c8aaf5797d912b7219f5339b5a452e35206f394bb2856765b4ae87ff5bff84eeff5ae93092d473f7203a1d2d0e302be676afb416721427055f252b32f94f0dfe5cef546c3ee26e64bce651f827f7df4527c73e63803ccbf08dbe0f73b7ea0ec475a7818a8ca508bdd62f44eb3b05301eb2fa7551e8e006caddb934dc0bd21326840e3e393f16c7af48ed4313d2c98e1e40379bee95671d0804567db426ed3274172cc67227da35d6bd3fe8eb51e3bfa4c7658724db2dd0be6f9ffbd6f981c6dcff96fac311f1a6284e4c6aa4f8a6a7d9cc0d8b94b1f8b2c5e8e2d7ce12a0bf19d85409150d341cca7c7c67ab09ae70f6be8613daa2a37fd332aa010c38968fc6d5d0661b991dbd6952894c476c7ff94fe53ac089f42b1cb3a35e2f64eac918e3f64303ce964055ee290efa99cdfbb8d835b157b79b0f0e7c8ac971bd771552c19fde00d972d36658e6c49ee5a8a0c0faab9a00743ccec21fc9ee83e0faa8c8e62d44f924cc308b38324b0a6c4368c5f4f7311fec7b56ad207b057790819eff0b3f257391193a3cf02c3a64e602ecca7c09d3063ef64f36c859ab9cfe067644e6994c2bb0a4256b59868672c8d25d982fcdde837be4342ae5d14e93258121ccc1b9ea09d805e371a8924eac5ec1ba80b920bc5c9955c9f5d4b430496e986269df1add3073883c9ab3cf2a879140d07c1732bfcc69eab559c9b3e322ec9a7831df0e3a98e2415125c9b7ddead5c511508ad7cb7424a542b8090a0bfd375c15ff74cc0c3b67d475c93ab3dae5ea1a95b79a7e193a8b1d5daec5801c03586b6601739c5021e26c6d794923a874d30d95afbda63b53fcabfc0ee84cc561f4f26e005622803588700ba1874c0bb5671b1afff1316c574c7ec18c684dc0d3b19f48487fd228d22ad65e0713064a2c460a7a4aacc527ab7bd9e970bc8cd1081ad790fc832a24ad2be6751df118eb63070be35bb6e90b4e0d77ed8df64df6b8969b7a3d2494188664859288331fe5ab8ed0a57b5f31edf2d36e0b29d378edfb03ee7dd5f34836ebca52fa6475e4a768f601d280e4405a95b36047c949c773230cad57483fe0179d1f043189ccccaf09285125e22bd3469a3cdfe2415e5e85166972a7f0e1af6f186f674ca83881fc056fcedeebdd10c945aec415df868ef5ddde2079bbf7d2dd475ee9acaef2a451e072744106bc77816470a4b0be192dc5838a609865446beccfb199987c9c6075462ee7e0b19c363373d3fd7eb4bd41fcbcd675688638756c5048a728da5d445b6ca3ee8bdd955f907113b49520462e58b0e19f71fecd0268130b66e4fefc06fe91dedbad5e4dbb372df38a64831762db0af416f7387e42c95017e4c81b0ffc6866133004fe246cc2d258fe248eec407d9da50641e7ac2d4a7011d8a0bcd1956dad17d5c1a82dea06d2fb60a758b4667a5406f4ef9d1e09ead1461440ebccae7d018b7ee3645c774410ca1e756f1a58ce92c40725d4728ef86075018e3fbed6498b1aea0523ccfe17fe085ce8e7592801298c5497709944e9e50de07acf1bbea8ca557c0f37871d1486e7854a8aadc24e88da93e39ddd0df6846aef069eefcb5bcfd69d94bb2cd1fc1931672ccd480034813019f84746036c3f1787103ef64f0e9f4742f282fce9da08498b1da936011f2df5a72769a246a67b015d632ce7f074196a61a2d9d621ffa81b8b86e5a5c98f5a7821d7c6c3501bf5b68aa3c9d26975c6aae119d83c46ac636f7fd53edf5a2248d4fdff95fec94613450bc4096b9fc9c8488a60013a18e676fabc6520c8367f6fc40c4
|
package/dist/index.js
CHANGED
|
@@ -12,12 +12,10 @@ export * from './components/general/carousel';
|
|
|
12
12
|
export * from './components/general/carousel.drag';
|
|
13
13
|
export * from './components/general/css';
|
|
14
14
|
export * from './components/general/faq-accordion';
|
|
15
|
+
export * from './components/general/hero';
|
|
15
16
|
export * from './components/general/image';
|
|
16
17
|
export * from './components/general/intersection-observer';
|
|
17
18
|
export * from './components/general/loading';
|
|
18
|
-
export * from './components/general/skeleton';
|
|
19
|
-
export * from './components/general/skeleton-loading';
|
|
20
|
-
export * from './components/general/splitscroll';
|
|
21
19
|
export * from './components/general/manifest';
|
|
22
20
|
export * from './components/general/markdown';
|
|
23
21
|
export * from './components/general/menu-accordion';
|
|
@@ -41,7 +39,10 @@ export * from './components/general/schema-website';
|
|
|
41
39
|
export * from './components/general/semantic';
|
|
42
40
|
export * from './components/general/sidepanel';
|
|
43
41
|
export * from './components/general/sitemap';
|
|
42
|
+
export * from './components/general/skeleton';
|
|
43
|
+
export * from './components/general/skeleton-loading';
|
|
44
44
|
export * from './components/general/smartimage';
|
|
45
|
+
export * from './components/general/splitscroll';
|
|
45
46
|
export * from './components/general/styleguide';
|
|
46
47
|
export * from './components/general/global-error';
|
|
47
48
|
export * from './components/general/tab';
|
|
@@ -50,6 +51,7 @@ export * from './components/general/tiles';
|
|
|
50
51
|
export * from './components/general/timeline';
|
|
51
52
|
export * from './components/integrations/calendly';
|
|
52
53
|
export * from './components/integrations/cloudinary';
|
|
54
|
+
export * from './components/integrations/loremipsum';
|
|
53
55
|
export * from './components/integrations/contentful.delivery';
|
|
54
56
|
export * from './components/integrations/contentful.items.components';
|
|
55
57
|
export * from './components/integrations/contentful.management';
|
package/dist/index.server.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from './components/config/config.utils';
|
|
|
10
10
|
export * from './components/config/config.validators';
|
|
11
11
|
export * from './components/config/crypto';
|
|
12
12
|
export * from './components/general/manifest';
|
|
13
|
+
export * from './components/general/hero';
|
|
13
14
|
export * from './components/general/metadata.functions';
|
|
14
15
|
export * from './components/general/proxy-handler';
|
|
15
16
|
export * from './components/general/resume';
|
package/dist/scripts/release.sh
CHANGED
|
@@ -304,6 +304,20 @@ fi
|
|
|
304
304
|
|
|
305
305
|
|
|
306
306
|
|
|
307
|
+
echo ""
|
|
308
|
+
# Prompt for release mode (default: both = push dev and update main, tag, and publish)
|
|
309
|
+
echo "🔀 Step $((STEP_COUNT++)): Choose release mode"
|
|
310
|
+
echo "================================================="
|
|
311
|
+
echo "1) Dev and Main (default - pushes dev, updates main, tags, creates release, and publishes)"
|
|
312
|
+
echo "2) Dev only (push dev only; skip main update, tagging, GitHub release, and npm publish)"
|
|
313
|
+
read -p "Enter choice (1-2) [default 1]: " release_choice
|
|
314
|
+
if [ -z "$release_choice" ] || [ "$release_choice" = "1" ]; then
|
|
315
|
+
RELEASE_MODE="both"
|
|
316
|
+
else
|
|
317
|
+
RELEASE_MODE="dev-only"
|
|
318
|
+
fi
|
|
319
|
+
echo "Selected release mode: $RELEASE_MODE"
|
|
320
|
+
|
|
307
321
|
echo ""
|
|
308
322
|
echo "📤 Step $((STEP_COUNT++)): Pushing dev branch..."
|
|
309
323
|
echo "================================================="
|
|
@@ -326,116 +340,136 @@ fi
|
|
|
326
340
|
|
|
327
341
|
|
|
328
342
|
echo ""
|
|
329
|
-
|
|
330
|
-
echo "
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
git
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
git
|
|
343
|
+
if [ "$RELEASE_MODE" = "dev-only" ]; then
|
|
344
|
+
echo "🔕 Step $((STEP_COUNT++)): Skipping main update (RELEASE_MODE=dev-only)."
|
|
345
|
+
echo "================================================="
|
|
346
|
+
else
|
|
347
|
+
echo ""
|
|
348
|
+
echo "🔄 Step $((STEP_COUNT++)): Updating main branch..."
|
|
349
|
+
echo "================================================="
|
|
350
|
+
# Force main to match dev exactly
|
|
351
|
+
git push $REMOTE_NAME dev:main --force
|
|
352
|
+
|
|
353
|
+
# Also update main locally if it exists
|
|
354
|
+
if git show-ref --verify --quiet refs/heads/main; then
|
|
355
|
+
git branch -D main 2>/dev/null || true
|
|
356
|
+
git checkout -b main
|
|
357
|
+
git reset --hard dev
|
|
358
|
+
git push $REMOTE_NAME main --force
|
|
359
|
+
git checkout dev
|
|
360
|
+
fi
|
|
341
361
|
fi
|
|
342
362
|
|
|
343
363
|
|
|
344
364
|
|
|
345
365
|
echo ""
|
|
346
|
-
|
|
347
|
-
echo "
|
|
348
|
-
|
|
349
|
-
release_tag="v${new_version}"
|
|
350
|
-
# Use commit message as tag/release message when available, otherwise default
|
|
351
|
-
tag_message="${commit_message:-"Release $release_tag"}"
|
|
352
|
-
if ! git tag -l | grep -q "$release_tag"; then
|
|
353
|
-
echo "🔖 Creating annotated tag $release_tag"
|
|
354
|
-
git tag -a "$release_tag" -m "$tag_message"
|
|
355
|
-
git push $REMOTE_NAME "$release_tag"
|
|
366
|
+
if [ "$RELEASE_MODE" = "dev-only" ]; then
|
|
367
|
+
echo "🔕 Step $((STEP_COUNT++)): Skipping tag/release creation (RELEASE_MODE=dev-only)."
|
|
368
|
+
echo "================================================="
|
|
356
369
|
else
|
|
357
|
-
echo "
|
|
370
|
+
echo ""
|
|
371
|
+
echo "🏷️ Step $((STEP_COUNT++)): Creating and pushing git tag and release..."
|
|
372
|
+
echo "================================================="
|
|
373
|
+
new_version=$(get_current_version)
|
|
374
|
+
release_tag="v${new_version}"
|
|
375
|
+
# Use commit message as tag/release message when available, otherwise default
|
|
376
|
+
tag_message="${commit_message:-"Release $release_tag"}"
|
|
377
|
+
if ! git tag -l | grep -q "$release_tag"; then
|
|
378
|
+
echo "🔖 Creating annotated tag $release_tag"
|
|
379
|
+
git tag -a "$release_tag" -m "$tag_message"
|
|
380
|
+
git push $REMOTE_NAME "$release_tag"
|
|
381
|
+
else
|
|
382
|
+
echo "ℹ️ Tag $release_tag already exists"
|
|
383
|
+
fi
|
|
358
384
|
fi
|
|
359
385
|
|
|
360
386
|
|
|
361
387
|
|
|
362
388
|
# Create a published GitHub release for this tag (prefer gh CLI, fallback to API)
|
|
363
|
-
|
|
364
|
-
echo "
|
|
365
|
-
echo "================================================="
|
|
366
|
-
REMOTE_URL=$(git remote get-url $REMOTE_NAME 2>/dev/null || true)
|
|
367
|
-
|
|
368
|
-
# Use GitHub API only (no gh CLI). Ensure GITHUB_TOKEN is present
|
|
369
|
-
if [ -z "$GITHUB_TOKEN" ]; then
|
|
370
|
-
echo "⚠️ GITHUB_TOKEN not set; skipping GitHub release creation via API"
|
|
389
|
+
if [ "$RELEASE_MODE" = "dev-only" ]; then
|
|
390
|
+
echo "🔕 Skipping GitHub release creation (RELEASE_MODE=dev-only)."
|
|
391
|
+
echo "================================================="
|
|
371
392
|
else
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
393
|
+
echo ""
|
|
394
|
+
echo "📣 Step $((STEP_COUNT++)): Creating GitHub release..."
|
|
395
|
+
echo "================================================="
|
|
396
|
+
REMOTE_URL=$(git remote get-url $REMOTE_NAME 2>/dev/null || true)
|
|
397
|
+
|
|
398
|
+
# Use GitHub API only (no gh CLI). Ensure GITHUB_TOKEN is present
|
|
399
|
+
if [ -z "$GITHUB_TOKEN" ]; then
|
|
400
|
+
echo "⚠️ GITHUB_TOKEN not set; skipping GitHub release creation via API"
|
|
401
|
+
else
|
|
402
|
+
# Derive owner/repo from remote URL using shell-only parsing (robust across platforms)
|
|
403
|
+
repo_path="${REMOTE_URL#git@github.com:}"
|
|
404
|
+
repo_path="${repo_path#https://github.com/}"
|
|
405
|
+
repo_path="${repo_path%.git}"
|
|
406
|
+
repo_path="${repo_path%%/}"
|
|
407
|
+
if [ -z "$repo_path" ]; then
|
|
408
|
+
echo "⚠️ Unable to determine repo path from remote URL; skipping API-based release creation"
|
|
409
|
+
else
|
|
410
|
+
# Check if release exists
|
|
411
|
+
# Diagnostic: show remote and derived repo path (non-secret)
|
|
412
|
+
echo "Remote URL: $REMOTE_URL"
|
|
413
|
+
echo "Derived repo_path: $repo_path"
|
|
414
|
+
|
|
415
|
+
# Quick access check to see if token and repo path are valid
|
|
416
|
+
access_resp=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$repo_path")
|
|
417
|
+
if echo "$access_resp" | grep -q '"full_name"'; then
|
|
418
|
+
echo "✅ Repo accessible via API: $(echo "$access_resp" | sed -n 's/.*"full_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')"
|
|
419
|
+
else
|
|
420
|
+
echo "❌ Repo not accessible via API. GitHub API response: $access_resp"
|
|
421
|
+
echo "Make sure GITHUB_TOKEN has 'repo' scope and the repo path is correct; aborting release creation."
|
|
422
|
+
# Do not attempt to create a release if the repo isn't accessible
|
|
423
|
+
exit 1
|
|
424
|
+
fi
|
|
425
|
+
|
|
426
|
+
if curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$repo_path/releases/tags/$release_tag" | grep -q '"tag_name"'; then
|
|
427
|
+
echo "ℹ️ Release for $release_tag already exists on GitHub (API)."
|
|
428
|
+
else
|
|
429
|
+
echo "🔔 Creating release via GitHub API for $release_tag"
|
|
430
|
+
payload=$(printf '{"tag_name":"%s","name":"%s","body":"%s","draft":false,"prerelease":false}' "$release_tag" "$release_tag" "${tag_message//\"/\\\"}")
|
|
431
|
+
resp=$(curl -s -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" -d "$payload" "https://api.github.com/repos/$repo_path/releases")
|
|
432
|
+
if echo "$resp" | grep -q '"id"'; then
|
|
433
|
+
echo "✅ Created GitHub release $release_tag"
|
|
434
|
+
else
|
|
435
|
+
echo "❌ Failed to create GitHub release: $resp"
|
|
436
|
+
fi
|
|
437
|
+
fi
|
|
438
|
+
fi
|
|
439
|
+
fi
|
|
409
440
|
fi
|
|
410
441
|
|
|
411
|
-
|
|
412
|
-
|
|
413
442
|
echo ""
|
|
414
443
|
echo "🔐 Step $((STEP_COUNT++)): Publishing to npm..."
|
|
415
444
|
echo "================================================="
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
445
|
+
if [ "$RELEASE_MODE" = "dev-only" ]; then
|
|
446
|
+
echo "🔕 Skipping npm publish (RELEASE_MODE=dev-only)."
|
|
447
|
+
echo "You can publish manually with: npm publish --access public"
|
|
448
|
+
else
|
|
449
|
+
# Function to prompt for publishing
|
|
450
|
+
prompt_publish() {
|
|
451
|
+
read -p "Do you want to publish to npm? (y/n): " should_publish
|
|
452
|
+
if [ "$should_publish" = "y" ] || [ "$should_publish" = "Y" ]; then
|
|
453
|
+
echo "yes"
|
|
454
|
+
else
|
|
455
|
+
echo "no"
|
|
456
|
+
fi
|
|
457
|
+
}
|
|
458
|
+
# Function to prompt for OTP
|
|
459
|
+
prompt_otp() {
|
|
460
|
+
read -p "Enter npm OTP: " otp
|
|
461
|
+
echo "$otp"
|
|
462
|
+
}
|
|
463
|
+
should_publish=$(prompt_publish)
|
|
464
|
+
if [ "$should_publish" = "yes" ]; then
|
|
465
|
+
npm login
|
|
466
|
+
otp=$(prompt_otp)
|
|
467
|
+
npm publish --loglevel warn --access public --otp=$otp
|
|
468
|
+
echo "✅ Successfully published to npm!"
|
|
421
469
|
else
|
|
422
|
-
echo "
|
|
470
|
+
echo "ℹ️ Skipping npm publish"
|
|
471
|
+
echo "You can publish manually with: npm publish --access public"
|
|
423
472
|
fi
|
|
424
|
-
}
|
|
425
|
-
# Function to prompt for OTP
|
|
426
|
-
prompt_otp() {
|
|
427
|
-
read -p "Enter npm OTP: " otp
|
|
428
|
-
echo "$otp"
|
|
429
|
-
}
|
|
430
|
-
should_publish=$(prompt_publish)
|
|
431
|
-
if [ "$should_publish" = "yes" ]; then
|
|
432
|
-
npm login
|
|
433
|
-
otp=$(prompt_otp)
|
|
434
|
-
npm publish --loglevel warn --access public --otp=$otp
|
|
435
|
-
echo "✅ Successfully published to npm!"
|
|
436
|
-
else
|
|
437
|
-
echo "ℹ️ Skipping npm publish"
|
|
438
|
-
echo "You can publish manually with: npm publish --access public"
|
|
439
473
|
fi
|
|
440
474
|
|
|
441
475
|
|
|
@@ -454,9 +488,15 @@ echo ""
|
|
|
454
488
|
echo "================================================="
|
|
455
489
|
echo "✅ Release complete!"
|
|
456
490
|
echo "================================================="
|
|
457
|
-
|
|
458
|
-
echo "
|
|
459
|
-
echo "
|
|
491
|
+
if [ "$RELEASE_MODE" = "dev-only" ]; then
|
|
492
|
+
echo "📦 Version: $(get_current_version)"
|
|
493
|
+
echo "📋 Branches updated: dev"
|
|
494
|
+
echo "🏷️ Tag created: (skipped)"
|
|
495
|
+
else
|
|
496
|
+
echo "📦 Version: $(get_current_version)"
|
|
497
|
+
echo "📋 Branches updated: dev, main"
|
|
498
|
+
echo "🏷️ Tag created: v$(get_current_version)"
|
|
499
|
+
fi
|
|
460
500
|
|
|
461
501
|
if [ "$should_publish" = "yes" ]; then
|
|
462
502
|
echo "🔗 https://www.npmjs.com/package/$PROJECT_NAME"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import * as childProcess from 'child_process';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Zip the contents of a WordPress theme folder into Pixelated.zip.
|
|
7
|
+
* - Default target folder: sibling `pixelated-blog-wp-theme` in the repo root
|
|
8
|
+
* - Uses the system `zip` command (macOS/Linux). Fails with a helpful message if zip is not available.
|
|
9
|
+
*
|
|
10
|
+
* Exported for unit testing.
|
|
11
|
+
*/
|
|
12
|
+
export function buildZipArgs(zipName = 'Pixelated.zip') {
|
|
13
|
+
// exported for unit-testing
|
|
14
|
+
// Exclude: the zip itself, VCS, macOS metadata, dev/build artifacts and common folders
|
|
15
|
+
return [
|
|
16
|
+
'-r',
|
|
17
|
+
zipName,
|
|
18
|
+
'.',
|
|
19
|
+
'-x', zipName,
|
|
20
|
+
'-x', '.git/*',
|
|
21
|
+
'-x', '.git/**',
|
|
22
|
+
'-x', '.DS_Store',
|
|
23
|
+
'-x', 'node_modules/**',
|
|
24
|
+
'-x', 'dist/**',
|
|
25
|
+
'-x', '.cache/**',
|
|
26
|
+
'-x', 'coverage/**',
|
|
27
|
+
'-x', '.vscode/**',
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function zipPixelatedTheme(inputPath, zipName = 'Pixelated.zip') {
|
|
32
|
+
const scriptDir = path.resolve(new URL(import.meta.url).pathname, '..');
|
|
33
|
+
// repo layout: <repo-root>/pixelated-components/src/scripts
|
|
34
|
+
const repoRoot = path.resolve(scriptDir, '..', '..');
|
|
35
|
+
const themeDir = inputPath
|
|
36
|
+
? path.resolve(process.cwd(), inputPath)
|
|
37
|
+
: path.resolve(repoRoot, '..', 'pixelated-blog-wp-theme');
|
|
38
|
+
|
|
39
|
+
if (!fs.existsSync(themeDir) || !fs.statSync(themeDir).isDirectory()) {
|
|
40
|
+
throw new Error(`Theme directory not found or not a directory: ${themeDir}`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const zipPath = path.join(themeDir, zipName);
|
|
44
|
+
|
|
45
|
+
// Remove existing zip (non-fatal if it doesn't exist)
|
|
46
|
+
try {
|
|
47
|
+
if (fs.existsSync(zipPath)) {
|
|
48
|
+
fs.unlinkSync(zipPath);
|
|
49
|
+
console.log(`Removed existing zip: ${zipPath}`);
|
|
50
|
+
}
|
|
51
|
+
} catch (err) {
|
|
52
|
+
throw new Error(`Failed to remove existing zip '${zipPath}': ${err?.message ?? err}`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Ensure `zip` command is available
|
|
56
|
+
// Prefer checking availability via `which` but handle ENOENT gracefully (some test runners don't have `which`).
|
|
57
|
+
let which;
|
|
58
|
+
try {
|
|
59
|
+
which = childProcess.spawnSync('which', ['zip']);
|
|
60
|
+
} catch (err) {
|
|
61
|
+
// spawnSync may throw ENOENT if `which` isn't available in the environment
|
|
62
|
+
which = { error: err };
|
|
63
|
+
}
|
|
64
|
+
if ((which && which.error && (which.error.code === 'ENOENT' || which.status !== 0)) || (which && typeof which.status === 'number' && which.status !== 0)) {
|
|
65
|
+
throw new Error('`zip` command not found on PATH — please install zip (e.g. `brew install zip`)');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Run: zip -r Pixelated.zip . (exclude the zip file itself and .git to avoid embedding repo history)
|
|
69
|
+
// Note: patterns are passed directly to zip; include both simple and recursive patterns to be safe.
|
|
70
|
+
const args = buildZipArgs(zipName);
|
|
71
|
+
let result;
|
|
72
|
+
try {
|
|
73
|
+
result = childProcess.spawnSync('zip', args, { cwd: themeDir, stdio: 'inherit' });
|
|
74
|
+
} catch (err) {
|
|
75
|
+
// Normalize ENOENT into a clearer message for callers/tests
|
|
76
|
+
if (err && err.code === 'ENOENT') {
|
|
77
|
+
throw new Error('`zip` command not found on PATH — please install zip (e.g. `brew install zip`)');
|
|
78
|
+
}
|
|
79
|
+
throw new Error(`Failed to run zip: ${String(err)}`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (result && result.error) {
|
|
83
|
+
// If zip produced the archive file despite reporting an error, accept the result
|
|
84
|
+
if (fs.existsSync(zipPath)) {
|
|
85
|
+
console.warn('zip reported an error but output file exists; continuing');
|
|
86
|
+
} else if (result.error && result.error.code === 'ENOENT') {
|
|
87
|
+
throw new Error('`zip` command not found on PATH — please install zip (e.g. `brew install zip`)');
|
|
88
|
+
} else {
|
|
89
|
+
throw new Error(`Failed to run zip: ${String(result.error)}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (typeof result?.status === 'number' && result.status !== 0) {
|
|
93
|
+
// If the zip CLI returned non-zero but produced the file, treat as success (warnings)
|
|
94
|
+
if (!fs.existsSync(zipPath)) {
|
|
95
|
+
throw new Error(`zip exited with status ${result.status}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!fs.existsSync(zipPath)) {
|
|
100
|
+
throw new Error(`zip command completed but output not found at ${zipPath}`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
console.log(`Created ${zipPath}`);
|
|
104
|
+
return zipPath;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// CLI (ESM-friendly)
|
|
108
|
+
import { pathToFileURL } from 'url';
|
|
109
|
+
const entryUrl = process.argv[1] ? pathToFileURL(process.argv[1]).href : null;
|
|
110
|
+
if (entryUrl && entryUrl === import.meta.url) {
|
|
111
|
+
(async () => {
|
|
112
|
+
try {
|
|
113
|
+
const arg = process.argv[2];
|
|
114
|
+
const zipName = process.argv[3] || 'Pixelated.zip';
|
|
115
|
+
const out = await zipPixelatedTheme(arg, zipName);
|
|
116
|
+
console.log('OK ->', out);
|
|
117
|
+
process.exit(0);
|
|
118
|
+
} catch (err) {
|
|
119
|
+
console.error('ERROR:', err?.message ?? err);
|
|
120
|
+
process.exit(2);
|
|
121
|
+
}
|
|
122
|
+
})();
|
|
123
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import PropTypes, { InferProps } from 'prop-types';
|
|
2
|
+
import "./hero.css";
|
|
3
|
+
export type HeroType = InferProps<typeof Hero.propTypes>;
|
|
4
|
+
export declare function Hero({ img, /* imgAlt, */ variant, height, children }: HeroType): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace Hero {
|
|
6
|
+
var propTypes: {
|
|
7
|
+
img: PropTypes.Validator<string>;
|
|
8
|
+
variant: PropTypes.Requireable<string>;
|
|
9
|
+
height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
10
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=hero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../src/components/general/hero.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,YAAY,CAAC;AASpB,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;AACzD,wBAAgB,IAAI,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,OAAkB,EAAE,MAAe,EAAE,QAAQ,EAAE,EAAE,QAAQ,2CASlG;yBATe,IAAI"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import PropTypes, { InferProps } from 'prop-types';
|
|
2
|
+
export type LoremIpsumType = InferProps<typeof LoremIpsum.propTypes> & {
|
|
3
|
+
proxyBase?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function LoremIpsum({ paragraphs, seed, proxyBase, className }: LoremIpsumType): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare namespace LoremIpsum {
|
|
7
|
+
var propTypes: {
|
|
8
|
+
paragraphs: PropTypes.Requireable<number>;
|
|
9
|
+
seed: PropTypes.Requireable<string>;
|
|
10
|
+
proxyBase: PropTypes.Requireable<string>;
|
|
11
|
+
className: PropTypes.Requireable<string>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=loremipsum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loremipsum.d.ts","sourceRoot":"","sources":["../../../../src/components/integrations/loremipsum.tsx"],"names":[],"mappings":"AAGA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAWnD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC9F,wBAAgB,UAAU,CAAC,EAAE,UAAc,EAAE,IAAS,EAAE,SAAS,EAAE,SAAc,EAAE,EAAE,cAAc,2CAyGlG;yBAzGe,UAAU"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import PropTypes, { InferProps } from "prop-types";
|
|
2
|
-
import { FontSelector } from "../config/FontSelector";
|
|
3
|
-
import { CompoundFontSelector } from "../config/CompoundFontSelector";
|
|
4
2
|
import "./form.css";
|
|
5
3
|
export type FormLabelType = InferProps<typeof FormLabel.propTypes>;
|
|
6
4
|
declare function FormLabel(props: FormLabelType): import("react/jsx-runtime").JSX.Element;
|
|
@@ -231,5 +229,5 @@ export declare namespace FormHoneypot {
|
|
|
231
229
|
name: PropTypes.Requireable<string>;
|
|
232
230
|
};
|
|
233
231
|
}
|
|
234
|
-
export {
|
|
232
|
+
export {};
|
|
235
233
|
//# sourceMappingURL=formcomponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formcomponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/sitebuilder/form/formcomponents.tsx"],"names":[],"mappings":"AAIA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"formcomponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/sitebuilder/form/formcomponents.tsx"],"names":[],"mappings":"AAIA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMnD,OAAO,YAAY,CAAC;AAuIpB,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;AACnE,iBAAS,SAAS,CAAC,KAAK,EAAE,aAAa,2CAYtC;kBAZQ,SAAS;;;;;;;;;;;;;AA4BlB,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;AACvE,iBAAS,WAAW,CAAC,KAAK,EAAE,eAAe,kDA2C1C;kBA3CQ,WAAW;;;;;;;;;;;;AAoFpB,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;AACnE,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,2CAmB7C;yBAnBe,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDzB,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;AACrE,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CAc/C;yBAde,UAAU;;;;;;;;;;;;;;;;;;;;;AA6B1B,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC;AACjF,iBAAS,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,2CAUpD;kBAVQ,gBAAgB;;;;;;;AAyCzB,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,2CAWnD;yBAXe,YAAY;;;;;;;;;;;;;;;;;;;;;;AAmC5B,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;AACnE,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,2CAY7C;yBAZe,SAAS;;;;;;;;;;;;;;;;AA4BzB,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;AAC/E,iBAAS,eAAe,CAAC,KAAK,EAAE,mBAAmB,2CA4BlD;kBA5BQ,eAAe;;;;;;;;;AAmDxB,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,2CAYnD;yBAZe,YAAY;;;;;;;;;;;;;;;;AA6B5B,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACrF,iBAAS,kBAAkB,CAAC,KAAK,EAAE,sBAAsB,2CA2BxD;kBA3BQ,kBAAkB;;;;;;;;AA0C3B,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;AACrE,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CAU/C;yBAVe,UAAU;;;;;;;;;AAuB1B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,2CAWnD;yBAXe,YAAY;;;;;;AAuC5B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,2CA2HnD;yBA3He,YAAY;;;;;;;;;;;;;;;;;;;AAsI5B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,2CAInD;yBAJe,YAAY;;;AAyB5B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAC,EAAE,EAAa,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CAcrE;yBAde,YAAY"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import PropTypes, { InferProps } from 'prop-types';
|
|
3
|
+
export declare const COMPONENTS: Record<string, React.ElementType>;
|
|
2
4
|
export type FormEngineType = InferProps<typeof FormEngine.propTypes>;
|
|
3
5
|
export declare function FormEngine(props: FormEngineType): import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
export declare namespace FormEngine {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formengine.d.ts","sourceRoot":"","sources":["../../../../../src/components/sitebuilder/form/formengine.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formengine.d.ts","sourceRoot":"","sources":["../../../../../src/components/sitebuilder/form/formengine.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AASnD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,CAIxD,CAAC;AAeF,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;AACrE,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CAM/C;yBANe,UAAU"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InferProps } from 'prop-types';
|
|
3
1
|
export interface ValidationResult {
|
|
4
2
|
isValid: boolean;
|
|
5
3
|
errors: string[];
|
|
@@ -34,33 +32,7 @@ export interface FormValidationContextType extends FormValidationState {
|
|
|
34
32
|
validateAllFields: () => boolean;
|
|
35
33
|
resetValidation: () => void;
|
|
36
34
|
}
|
|
37
|
-
export interface FormEngineProps {
|
|
38
|
-
name?: string | null;
|
|
39
|
-
id?: string | null;
|
|
40
|
-
method?: string | null;
|
|
41
|
-
onSubmitHandler?: (event: React.FormEvent) => void;
|
|
42
|
-
formData: FormData;
|
|
43
|
-
}
|
|
44
35
|
export interface FormBuilderProps {
|
|
45
36
|
setFormData?: (data: any) => void;
|
|
46
37
|
}
|
|
47
|
-
export interface FormExtractorProps {
|
|
48
|
-
url?: string;
|
|
49
|
-
htmlPaste?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface FormExtractEngineProps {
|
|
52
|
-
url?: string;
|
|
53
|
-
htmlPaste?: string;
|
|
54
|
-
setFormData: (data: any) => void;
|
|
55
|
-
}
|
|
56
|
-
export interface FormExtractUIProps {
|
|
57
|
-
setParentState: (state: {
|
|
58
|
-
url: string;
|
|
59
|
-
htmlPaste: string;
|
|
60
|
-
}) => void;
|
|
61
|
-
}
|
|
62
|
-
export type FormEngineType = InferProps<any>;
|
|
63
|
-
export type FormExtractorType = InferProps<any>;
|
|
64
|
-
export type FormExtractEngineType = InferProps<any>;
|
|
65
|
-
export type FormExtractUIType = InferProps<any>;
|
|
66
38
|
//# sourceMappingURL=formtypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formtypes.d.ts","sourceRoot":"","sources":["../../../../../src/components/sitebuilder/form/formtypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formtypes.d.ts","sourceRoot":"","sources":["../../../../../src/components/sitebuilder/form/formtypes.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7E,iBAAiB,EAAE,MAAM,OAAO,CAAC;IACjC,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentGeneration.d.ts","sourceRoot":"","sources":["../../../../../../src/components/sitebuilder/page/lib/componentGeneration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"componentGeneration.d.ts","sourceRoot":"","sources":["../../../../../../src/components/sitebuilder/page/lib/componentGeneration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAItE;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,GAAG;IACtD,SAAS,EAAE,aAAa,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAgDA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,GAAG,EACnB,UAAU,CAAC,EAAE,MAAM,GACjB,QAAQ,CAyDV"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { PropTypeInfo
|
|
1
|
+
import type { PropTypeInfo } from './types';
|
|
2
|
+
import type { FormFieldConfig } from '../../form/formtypes';
|
|
2
3
|
/**
|
|
3
4
|
* PropTypes Introspection Utilities
|
|
4
5
|
* Analyzes PropTypes to generate appropriate form fields
|
|
@@ -20,5 +21,5 @@ export declare function getPropTypeInfo(propType: any, componentName?: string, p
|
|
|
20
21
|
/**
|
|
21
22
|
* Generates appropriate form field configuration based on PropType
|
|
22
23
|
*/
|
|
23
|
-
export declare function generateFormFieldFromPropType(propName: string, propType: any, value?: any, componentName?: string):
|
|
24
|
+
export declare function generateFormFieldFromPropType(propName: string, propType: any, value?: any, componentName?: string): FormFieldConfig;
|
|
24
25
|
//# sourceMappingURL=propTypeIntrospection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propTypeIntrospection.d.ts","sourceRoot":"","sources":["../../../../../../src/components/sitebuilder/page/lib/propTypeIntrospection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"propTypeIntrospection.d.ts","sourceRoot":"","sources":["../../../../../../src/components/sitebuilder/page/lib/propTypeIntrospection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;;;;;;;;;;;;GAaG;AAEH;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,CAiEtG;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC5C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,EACb,KAAK,CAAC,EAAE,GAAG,EACX,aAAa,CAAC,EAAE,MAAM,GACpB,eAAe,CA0GjB"}
|
|
@@ -20,13 +20,6 @@ export interface PropTypeInfo {
|
|
|
20
20
|
isRequired?: boolean;
|
|
21
21
|
elementType?: any;
|
|
22
22
|
}
|
|
23
|
-
export interface FormField {
|
|
24
|
-
component: string;
|
|
25
|
-
props: Record<string, any>;
|
|
26
|
-
}
|
|
27
|
-
export interface FormData {
|
|
28
|
-
fields: FormField[];
|
|
29
|
-
}
|
|
30
23
|
export type ComponentSelectorEditMode = {
|
|
31
24
|
component: string;
|
|
32
25
|
props: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/sitebuilder/page/lib/types.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACxB,UAAU,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/sitebuilder/page/lib/types.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACxB,UAAU,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,12 +11,10 @@ export * from "./components/general/carousel";
|
|
|
11
11
|
export * from "./components/general/carousel.drag";
|
|
12
12
|
export * from "./components/general/css";
|
|
13
13
|
export * from "./components/general/faq-accordion";
|
|
14
|
+
export * from "./components/general/hero";
|
|
14
15
|
export * from "./components/general/image";
|
|
15
16
|
export * from "./components/general/intersection-observer";
|
|
16
17
|
export * from "./components/general/loading";
|
|
17
|
-
export * from "./components/general/skeleton";
|
|
18
|
-
export * from "./components/general/skeleton-loading";
|
|
19
|
-
export * from "./components/general/splitscroll";
|
|
20
18
|
export * from "./components/general/manifest";
|
|
21
19
|
export * from "./components/general/markdown";
|
|
22
20
|
export * from "./components/general/menu-accordion";
|
|
@@ -40,7 +38,10 @@ export * from "./components/general/schema-website";
|
|
|
40
38
|
export * from "./components/general/semantic";
|
|
41
39
|
export * from "./components/general/sidepanel";
|
|
42
40
|
export * from "./components/general/sitemap";
|
|
41
|
+
export * from "./components/general/skeleton";
|
|
42
|
+
export * from "./components/general/skeleton-loading";
|
|
43
43
|
export * from "./components/general/smartimage";
|
|
44
|
+
export * from "./components/general/splitscroll";
|
|
44
45
|
export * from "./components/general/styleguide";
|
|
45
46
|
export * from "./components/general/global-error";
|
|
46
47
|
export * from "./components/general/tab";
|
|
@@ -49,6 +50,7 @@ export * from "./components/general/tiles";
|
|
|
49
50
|
export * from "./components/general/timeline";
|
|
50
51
|
export * from "./components/integrations/calendly";
|
|
51
52
|
export * from "./components/integrations/cloudinary";
|
|
53
|
+
export * from "./components/integrations/loremipsum";
|
|
52
54
|
export * from "./components/integrations/contentful.delivery";
|
|
53
55
|
export * from "./components/integrations/contentful.items.components";
|
|
54
56
|
export * from "./components/integrations/contentful.management";
|
|
@@ -6,6 +6,7 @@ export * from "./components/config/config.utils";
|
|
|
6
6
|
export * from "./components/config/config.validators";
|
|
7
7
|
export * from "./components/config/crypto";
|
|
8
8
|
export * from "./components/general/manifest";
|
|
9
|
+
export * from "./components/general/hero";
|
|
9
10
|
export * from "./components/general/metadata.functions";
|
|
10
11
|
export * from "./components/general/proxy-handler";
|
|
11
12
|
export * from "./components/general/resume";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zip the contents of a WordPress theme folder into Pixelated.zip.
|
|
3
|
+
* - Default target folder: sibling `pixelated-blog-wp-theme` in the repo root
|
|
4
|
+
* - Uses the system `zip` command (macOS/Linux). Fails with a helpful message if zip is not available.
|
|
5
|
+
*
|
|
6
|
+
* Exported for unit testing.
|
|
7
|
+
*/
|
|
8
|
+
export function buildZipArgs(zipName?: string): string[];
|
|
9
|
+
export function zipPixelatedTheme(inputPath: any, zipName?: string): string;
|
|
10
|
+
//# sourceMappingURL=zip-pixelated-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip-pixelated-theme.d.ts","sourceRoot":"","sources":["../../../src/scripts/zip-pixelated-theme.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,yDAiBC;AAED,4EA0EC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Hero } from '@/components/general/hero';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Hero;
|
|
6
|
+
argTypes: {
|
|
7
|
+
img: {
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
variant: {
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
options: string[];
|
|
17
|
+
};
|
|
18
|
+
height: {
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
paragraphs: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
min: number;
|
|
27
|
+
max: number;
|
|
28
|
+
step: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
export declare const HeroPlayground: {
|
|
35
|
+
render: React.FC<any>;
|
|
36
|
+
args: {
|
|
37
|
+
img: string;
|
|
38
|
+
variant: string;
|
|
39
|
+
paragraphs: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=hero.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/general/hero.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGjD,wBASE;AAiBF,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoremIpsum } from '@/components/integrations/loremipsum';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof LoremIpsum;
|
|
6
|
+
argTypes: {
|
|
7
|
+
paragraphs: {
|
|
8
|
+
control: string;
|
|
9
|
+
};
|
|
10
|
+
seed: {
|
|
11
|
+
control: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const Playground: {
|
|
17
|
+
render: React.FC<import("prop-types").InferPropsInner<Pick<{
|
|
18
|
+
paragraphs: import("prop-types").Requireable<number>;
|
|
19
|
+
seed: import("prop-types").Requireable<string>;
|
|
20
|
+
proxyBase: import("prop-types").Requireable<string>;
|
|
21
|
+
className: import("prop-types").Requireable<string>;
|
|
22
|
+
}, never>> & Partial<import("prop-types").InferPropsInner<Pick<{
|
|
23
|
+
paragraphs: import("prop-types").Requireable<number>;
|
|
24
|
+
seed: import("prop-types").Requireable<string>;
|
|
25
|
+
proxyBase: import("prop-types").Requireable<string>;
|
|
26
|
+
className: import("prop-types").Requireable<string>;
|
|
27
|
+
}, "className" | "seed" | "paragraphs" | "proxyBase">>> & {
|
|
28
|
+
proxyBase?: string;
|
|
29
|
+
}>;
|
|
30
|
+
args: {
|
|
31
|
+
paragraphs: number;
|
|
32
|
+
seed: string;
|
|
33
|
+
proxyBase: string;
|
|
34
|
+
};
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
source: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
description: {
|
|
41
|
+
story: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=loremipsum.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loremipsum.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/integrations/loremipsum.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;;;;;;;;;;;;;AAElE,wBAOE;AASF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formcomponents.exports.test.d.ts","sourceRoot":"","sources":["../../../src/tests/formcomponents.exports.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero.test.d.ts","sourceRoot":"","sources":["../../../src/tests/hero.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loremipsum.test.d.ts","sourceRoot":"","sources":["../../../src/tests/loremipsum.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip-pixelated-theme.test.d.ts","sourceRoot":"","sources":["../../../src/tests/zip-pixelated-theme.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixelated-tech/components",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Pixelated Technologies",
|
|
@@ -84,7 +84,8 @@
|
|
|
84
84
|
"config:vault": "npm run vault --",
|
|
85
85
|
"config:encrypt": "npm run config:vault -- encrypt src/config/pixelated.config.json",
|
|
86
86
|
"config:decrypt": "npm run config:vault -- decrypt src/config/pixelated.config.json.enc",
|
|
87
|
-
"create-pixelated-app": "node src/scripts/create-pixelated-app.js"
|
|
87
|
+
"create-pixelated-app": "node src/scripts/create-pixelated-app.js",
|
|
88
|
+
"zip-theme": "node src/scripts/zip-pixelated-theme.js ../pixelated-blog-wp-theme Pixelated.zip"
|
|
88
89
|
},
|
|
89
90
|
"scripts-20260113": {
|
|
90
91
|
"build": "npm run validate-exports && npm run buildClean && npm run tsc && npm run rsync && npm run tscClean ",
|
|
@@ -129,8 +130,8 @@
|
|
|
129
130
|
"@types/prop-types": "^15.7.15",
|
|
130
131
|
"@types/react": "^19.2.9",
|
|
131
132
|
"@types/react-dom": "^19.2.3",
|
|
132
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
133
|
-
"@typescript-eslint/parser": "^8.
|
|
133
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
134
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
134
135
|
"@vitejs/plugin-react": "^5.1.2",
|
|
135
136
|
"@vitest/coverage-v8": "^4.0.18",
|
|
136
137
|
"@vitest/ui": "^4.0.18",
|
|
@@ -153,13 +154,13 @@
|
|
|
153
154
|
"jsdom": "^27.4.0",
|
|
154
155
|
"less-loader": "^12.3.0",
|
|
155
156
|
"mini-css-extract-plugin": "^2.10.0",
|
|
156
|
-
"next": "^16.1.
|
|
157
|
+
"next": "^16.1.5",
|
|
157
158
|
"null-loader": "^4.0.1",
|
|
158
159
|
"prop-types": "^15.8.1",
|
|
159
|
-
"react": "^19.2.
|
|
160
|
-
"react-dom": "^19.2.
|
|
160
|
+
"react": "^19.2.4",
|
|
161
|
+
"react-dom": "^19.2.4",
|
|
161
162
|
"react-redux": "^9.2.0",
|
|
162
|
-
"react-test-renderer": "^19.2.
|
|
163
|
+
"react-test-renderer": "^19.2.4",
|
|
163
164
|
"redux": "^5.0.1",
|
|
164
165
|
"sass": "^1.97.3",
|
|
165
166
|
"sass-loader": "^16.0.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"humans.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/general/humans.stories.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,IAAI;;CAEA,CAAC;AACX,eAAe,IAAI,CAAC;AAuBpB,eAAO,MAAM,OAAO;mBAAoB,GAAG;CAA4B,CAAC"}
|