@pixelated-tech/components 3.11.5 → 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/global-error.js +2 -2
- package/dist/components/general/hero.css +20 -0
- package/dist/components/general/hero.js +13 -0
- package/dist/components/general/humanstxt.js +81 -0
- package/dist/components/general/styleguide.js +35 -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 +6 -3
- package/dist/index.server.js +2 -0
- package/dist/scripts/create-pixelated-app.js +1 -1
- package/dist/scripts/create-pixelated-app.json +21 -11
- package/dist/scripts/release.sh +134 -94
- package/dist/scripts/zip-pixelated-theme.js +123 -0
- package/dist/types/components/general/global-error.d.ts +3 -3
- package/dist/types/components/general/global-error.d.ts.map +1 -1
- 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/general/humanstxt.d.ts +37 -0
- package/dist/types/components/general/humanstxt.d.ts.map +1 -0
- package/dist/types/components/general/styleguide.d.ts +9 -0
- package/dist/types/components/general/styleguide.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 +6 -3
- package/dist/types/index.server.d.ts +2 -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/global-error.stories.d.ts +2 -2
- package/dist/types/stories/general/global-error.stories.d.ts.map +1 -1
- 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/general/styleguide.stories.d.ts +8 -0
- package/dist/types/stories/general/styleguide.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/humanstxt.test.d.ts +2 -0
- package/dist/types/tests/humanstxt.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/sitemap.test.d.ts.map +1 -1
- package/dist/types/tests/styleguide.test.d.ts +2 -0
- package/dist/types/tests/styleguide.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/tests/components/general/sitemap.test.d.ts +0 -2
- package/dist/types/tests/components/general/sitemap.test.d.ts.map +0 -1
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
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PropTypes, { InferProps } from 'prop-types';
|
|
2
2
|
import './global-error.css';
|
|
3
|
-
export type
|
|
4
|
-
export declare function
|
|
5
|
-
export declare namespace
|
|
3
|
+
export type GlobalErrorUIType = InferProps<typeof GlobalErrorUI.propTypes>;
|
|
4
|
+
export declare function GlobalErrorUI({ error, reset, siteInfo, className }: GlobalErrorUIType): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace GlobalErrorUI {
|
|
6
6
|
var propTypes: {
|
|
7
7
|
error: PropTypes.Requireable<any>;
|
|
8
8
|
reset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-error.d.ts","sourceRoot":"","sources":["../../../../src/components/general/global-error.tsx"],"names":[],"mappings":"AAGA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,oBAAoB,CAAC;AAQ5B,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"global-error.d.ts","sourceRoot":"","sources":["../../../../src/components/general/global-error.tsx"],"names":[],"mappings":"AAGA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,oBAAoB,CAAC;AAQ5B,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,CAAC;AAC3E,wBAAgB,aAAa,CAAC,EAAE,KAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAc,EAAE,EAAG,iBAAiB,2CA2ClG;yBA3Ce,aAAa"}
|
|
@@ -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,37 @@
|
|
|
1
|
+
import type { NextRequest } from 'next/server';
|
|
2
|
+
import { NextResponse } from 'next/server';
|
|
3
|
+
/**
|
|
4
|
+
* Read JSON from disk safely — returns null on error.
|
|
5
|
+
* Exported for testing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function safeJSON(path: string): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* Normalize a value into a single-line trimmed string (safe for humans.txt).
|
|
10
|
+
* Exported for testing.
|
|
11
|
+
*/
|
|
12
|
+
export declare function sanitizeString(v: unknown): string;
|
|
13
|
+
export type GenerateHumansOpts = {
|
|
14
|
+
/** base directory to read package.json / routes.json from (defaults to process.cwd()) */
|
|
15
|
+
cwd?: string;
|
|
16
|
+
/** optional package.json object (if provided, fs is not used) */
|
|
17
|
+
pkg?: Record<string, any> | null;
|
|
18
|
+
/** optional routes.json object (if provided, fs is not used) */
|
|
19
|
+
routesJson?: any;
|
|
20
|
+
/** limit how many routes to include (default 50) */
|
|
21
|
+
maxRoutes?: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Generate the humans.txt body + metadata. Pure function when pkg/routesJson are provided —
|
|
25
|
+
* otherwise will attempt to read from disk (runtime apps).
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateHumansTxt(opts?: GenerateHumansOpts): Promise<{
|
|
28
|
+
body: string;
|
|
29
|
+
etag: string;
|
|
30
|
+
headers: Record<string, string>;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Next.js convenience: return a NextResponse for a humans.txt request.
|
|
34
|
+
* Accepts the same options as `generateHumansTxt` (pass `pkg`/`routesJson` in tests).
|
|
35
|
+
*/
|
|
36
|
+
export declare function createHumansTxtResponse(req?: NextRequest, opts?: GenerateHumansOpts): Promise<NextResponse<unknown>>;
|
|
37
|
+
//# sourceMappingURL=humanstxt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanstxt.d.ts","sourceRoot":"","sources":["../../../../src/components/general/humanstxt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,gBAO1C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,UAExC;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,yFAAyF;IACzF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACjC,gEAAgE;IAChE,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,GAAE,kBAAuB;;;;GA+CpE;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE,kBAAuB,kCAM7F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import PropTypes, { InferProps } from "prop-types";
|
|
2
|
+
export type StyleGuideUIType = InferProps<typeof StyleGuideUI.propTypes>;
|
|
3
|
+
export declare function StyleGuideUI(props: StyleGuideUIType): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare namespace StyleGuideUI {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
routes: PropTypes.Requireable<any[]>;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=styleguide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleguide.d.ts","sourceRoot":"","sources":["../../../../src/components/general/styleguide.tsx"],"names":[],"mappings":"AAGA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AASnD,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,2CAiEnD;yBAjEe,YAAY"}
|
|
@@ -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":"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"}
|
|
@@ -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
|