@olonjs/cli 3.0.136 → 3.0.138
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/assets/src_tenant_alpha.sh +125 -74
- package/assets/templates/alpha/src_tenant.sh +125 -74
- package/package.json +1 -1
|
@@ -1674,7 +1674,7 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
|
|
|
1674
1674
|
"@tiptap/extension-link": "^2.11.5",
|
|
1675
1675
|
"@tiptap/react": "^2.11.5",
|
|
1676
1676
|
"@tiptap/starter-kit": "^2.11.5",
|
|
1677
|
-
"@olonjs/core": "^1.
|
|
1677
|
+
"@olonjs/core": "^1.1.2",
|
|
1678
1678
|
"class-variance-authority": "^0.7.1",
|
|
1679
1679
|
"clsx": "^2.1.1",
|
|
1680
1680
|
"lucide-react": "^0.474.0",
|
|
@@ -2582,18 +2582,20 @@ cat << 'END_OF_FILE_CONTENT' > "src/App.tsx"
|
|
|
2582
2582
|
* Data from getHydratedData (file-backed or draft); assets from public/assets/images.
|
|
2583
2583
|
* Supports Hybrid Persistence: Local Filesystem (Dev) or Cloud Bridge (Prod).
|
|
2584
2584
|
*/
|
|
2585
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
import {
|
|
2585
|
+
import { useCallback, useEffect, useMemo, useRef, useState, Suspense, lazy } from 'react';
|
|
2586
|
+
// Visitor path uses the runtime-only bundle (~28 KB gz), per ADR-0009 D7.
|
|
2587
|
+
// The full @olonjs/core is loaded on demand only when the URL targets /admin.
|
|
2588
|
+
import { OlonJSEngine } from '@olonjs/core/runtime';
|
|
2589
|
+
import type { JsonPagesConfig, LibraryImageEntry, ProjectState } from '@olonjs/core/runtime';
|
|
2590
|
+
import { normalizeBasePath, withBasePath } from '@olonjs/core/runtime';
|
|
2589
2591
|
import { ComponentRegistry } from '@/lib/ComponentRegistry';
|
|
2590
2592
|
import { SECTION_SCHEMAS, SECTION_SUBMISSION_SCHEMAS } from '@/lib/schemas';
|
|
2591
2593
|
import { addSectionConfig } from '@/lib/addSectionConfig';
|
|
2592
2594
|
import { getHydratedData } from '@/lib/draftStorage';
|
|
2593
2595
|
import type { SiteConfig, ThemeConfig, MenuConfig, PageConfig } from '@/types';
|
|
2594
|
-
import type { DeployPhase, StepId } from '@olonjs/core';
|
|
2595
|
-
import { DEPLOY_STEPS } from '@olonjs/core';
|
|
2596
|
-
import { startCloudSaveStream } from '@olonjs/core';
|
|
2596
|
+
import type { DeployPhase, StepId } from '@olonjs/core/runtime';
|
|
2597
|
+
import { DEPLOY_STEPS } from '@olonjs/core/runtime';
|
|
2598
|
+
import { startCloudSaveStream } from '@olonjs/core/runtime';
|
|
2597
2599
|
import siteData from '@/data/config/site.json';
|
|
2598
2600
|
import themeData from '@/data/config/theme.json';
|
|
2599
2601
|
import menuData from '@/data/config/menu.json';
|
|
@@ -2603,9 +2605,23 @@ import { EmptyTenantView } from '@/components/empty-tenant';
|
|
|
2603
2605
|
import { Skeleton } from '@/components/ui/skeleton';
|
|
2604
2606
|
import { ThemeProvider } from '@/components/ThemeProvider';
|
|
2605
2607
|
import { useOlonForms } from '@/lib/useOlonForms';
|
|
2606
|
-
import { OlonFormsContext } from '@olonjs/core';
|
|
2608
|
+
import { OlonFormsContext } from '@olonjs/core/runtime';
|
|
2607
2609
|
import { iconMap } from '@/lib/IconResolver';
|
|
2608
2610
|
|
|
2611
|
+
/**
|
|
2612
|
+
* Engine selector. Visitors get OlonJSEngine (~28 KB gz); /admin paths
|
|
2613
|
+
* lazy-load the full JsonPagesEngine (~128 KB gz) which mounts the
|
|
2614
|
+
* Studio editor surface. The check runs at module load time — once per
|
|
2615
|
+
* page, before React mounts — so Vite statically splits the chunks.
|
|
2616
|
+
* See ADR-0008 + ADR-0009 + docs/plans/core-studio-split.md (Task 3.1).
|
|
2617
|
+
*/
|
|
2618
|
+
const isAdminPath =
|
|
2619
|
+
typeof window !== 'undefined' && window.location.pathname.startsWith('/admin');
|
|
2620
|
+
|
|
2621
|
+
const LazyJsonPagesEngine = lazy(() =>
|
|
2622
|
+
import('@olonjs/core').then((m) => ({ default: m.JsonPagesEngine })),
|
|
2623
|
+
);
|
|
2624
|
+
|
|
2609
2625
|
import tenantCss from './index.css?inline';
|
|
2610
2626
|
|
|
2611
2627
|
// Cloud Configuration (Injected by Vercel/Netlify Env Vars)
|
|
@@ -3664,7 +3680,17 @@ function App() {
|
|
|
3664
3680
|
</div>
|
|
3665
3681
|
</div>
|
|
3666
3682
|
) : null}
|
|
3667
|
-
{shouldRenderEngine ? (
|
|
3683
|
+
{shouldRenderEngine ? (
|
|
3684
|
+
isTenantEmpty ? (
|
|
3685
|
+
<EmptyTenantView />
|
|
3686
|
+
) : isAdminPath ? (
|
|
3687
|
+
<Suspense fallback={null}>
|
|
3688
|
+
<LazyJsonPagesEngine config={config} />
|
|
3689
|
+
</Suspense>
|
|
3690
|
+
) : (
|
|
3691
|
+
<OlonJSEngine config={config} />
|
|
3692
|
+
)
|
|
3693
|
+
) : null}
|
|
3668
3694
|
{isCloudMode && (contentMode === 'error' || contentFallback?.reasonCode === 'CLOUD_REFRESH_FAILED') ? (
|
|
3669
3695
|
<div
|
|
3670
3696
|
role="status"
|
|
@@ -3837,15 +3863,15 @@ export * from './types';
|
|
|
3837
3863
|
END_OF_FILE_CONTENT
|
|
3838
3864
|
echo "Creating src/components/empty-tenant/schema.ts..."
|
|
3839
3865
|
cat << 'END_OF_FILE_CONTENT' > "src/components/empty-tenant/schema.ts"
|
|
3840
|
-
import { z } from 'zod';
|
|
3841
|
-
import { BaseSectionData } from '@olonjs/core';
|
|
3842
|
-
|
|
3843
|
-
export const EmptyTenantSchema = BaseSectionData.extend({
|
|
3844
|
-
title: z.string().optional().describe('ui:text'),
|
|
3845
|
-
description: z.string().optional().describe('ui:textarea'),
|
|
3846
|
-
});
|
|
3847
|
-
|
|
3848
|
-
export const EmptyTenantSettingsSchema = z.object({});
|
|
3866
|
+
import { z } from 'zod';
|
|
3867
|
+
import { BaseSectionData } from '@olonjs/core/runtime';
|
|
3868
|
+
|
|
3869
|
+
export const EmptyTenantSchema = BaseSectionData.extend({
|
|
3870
|
+
title: z.string().optional().describe('ui:text'),
|
|
3871
|
+
description: z.string().optional().describe('ui:textarea'),
|
|
3872
|
+
});
|
|
3873
|
+
|
|
3874
|
+
export const EmptyTenantSettingsSchema = z.object({});
|
|
3849
3875
|
|
|
3850
3876
|
END_OF_FILE_CONTENT
|
|
3851
3877
|
echo "Creating src/components/empty-tenant/types.ts..."
|
|
@@ -3861,7 +3887,7 @@ mkdir -p "src/components/form-demo"
|
|
|
3861
3887
|
echo "Creating src/components/form-demo/View.tsx..."
|
|
3862
3888
|
cat << 'END_OF_FILE_CONTENT' > "src/components/form-demo/View.tsx"
|
|
3863
3889
|
import { Icon } from '@/lib/IconResolver';
|
|
3864
|
-
import { useFormState } from '@olonjs/core';
|
|
3890
|
+
import { useFormState } from '@olonjs/core/runtime';
|
|
3865
3891
|
import type { FormDemoData } from './types';
|
|
3866
3892
|
|
|
3867
3893
|
type FormDemoViewProps = {
|
|
@@ -4025,7 +4051,7 @@ END_OF_FILE_CONTENT
|
|
|
4025
4051
|
echo "Creating src/components/form-demo/schema.ts..."
|
|
4026
4052
|
cat << 'END_OF_FILE_CONTENT' > "src/components/form-demo/schema.ts"
|
|
4027
4053
|
import { z } from 'zod';
|
|
4028
|
-
import { BaseSectionData, WithFormRecipient } from '@olonjs/core';
|
|
4054
|
+
import { BaseSectionData, WithFormRecipient } from '@olonjs/core/runtime';
|
|
4029
4055
|
|
|
4030
4056
|
export const FormDemoSchema = BaseSectionData.merge(WithFormRecipient).extend({
|
|
4031
4057
|
icon: z.string().optional().describe('ui:icon-picker'),
|
|
@@ -4064,7 +4090,7 @@ END_OF_FILE_CONTENT
|
|
|
4064
4090
|
mkdir -p "src/components/save-drawer"
|
|
4065
4091
|
echo "Creating src/components/save-drawer/DeployConnector.tsx..."
|
|
4066
4092
|
cat << 'END_OF_FILE_CONTENT' > "src/components/save-drawer/DeployConnector.tsx"
|
|
4067
|
-
import type { StepState } from '@olonjs/core';
|
|
4093
|
+
import type { StepState } from '@olonjs/core/runtime';
|
|
4068
4094
|
|
|
4069
4095
|
interface DeployConnectorProps {
|
|
4070
4096
|
fromState: StepState;
|
|
@@ -4110,7 +4136,7 @@ END_OF_FILE_CONTENT
|
|
|
4110
4136
|
echo "Creating src/components/save-drawer/DeployNode.tsx..."
|
|
4111
4137
|
cat << 'END_OF_FILE_CONTENT' > "src/components/save-drawer/DeployNode.tsx"
|
|
4112
4138
|
import type { CSSProperties } from 'react';
|
|
4113
|
-
import type { DeployStep, StepState } from '@olonjs/core';
|
|
4139
|
+
import type { DeployStep, StepState } from '@olonjs/core/runtime';
|
|
4114
4140
|
|
|
4115
4141
|
interface DeployNodeProps {
|
|
4116
4142
|
step: DeployStep;
|
|
@@ -4198,8 +4224,8 @@ echo "Creating src/components/save-drawer/DopaDrawer.tsx..."
|
|
|
4198
4224
|
cat << 'END_OF_FILE_CONTENT' > "src/components/save-drawer/DopaDrawer.tsx"
|
|
4199
4225
|
import { useEffect, useMemo, useState } from 'react';
|
|
4200
4226
|
import { createPortal } from 'react-dom';
|
|
4201
|
-
import type { StepId, StepState } from '@olonjs/core';
|
|
4202
|
-
import { DEPLOY_STEPS } from '@olonjs/core';
|
|
4227
|
+
import type { StepId, StepState } from '@olonjs/core/runtime';
|
|
4228
|
+
import { DEPLOY_STEPS } from '@olonjs/core/runtime';
|
|
4203
4229
|
import fontsCss from '@/fonts.css?inline';
|
|
4204
4230
|
import saverStyleCss from './saverStyle.css?inline';
|
|
4205
4231
|
import { DeployNode } from './DeployNode';
|
|
@@ -5406,7 +5432,7 @@ import {
|
|
|
5406
5432
|
Code2, Quote, SquareCode,
|
|
5407
5433
|
Link2, Unlink2, ImagePlus, Eraser,
|
|
5408
5434
|
} from 'lucide-react';
|
|
5409
|
-
import { STUDIO_EVENTS, useConfig, useStudio } from '@olonjs/core';
|
|
5435
|
+
import { STUDIO_EVENTS, useConfig, useStudio } from '@olonjs/core/runtime';
|
|
5410
5436
|
import type { TiptapData, TiptapSettings } from './types';
|
|
5411
5437
|
|
|
5412
5438
|
// ── UI primitives ─────────────────────────────────────────────────
|
|
@@ -5729,7 +5755,7 @@ END_OF_FILE_CONTENT
|
|
|
5729
5755
|
echo "Creating src/components/tiptap/schema.ts..."
|
|
5730
5756
|
cat << 'END_OF_FILE_CONTENT' > "src/components/tiptap/schema.ts"
|
|
5731
5757
|
import { z } from 'zod';
|
|
5732
|
-
import { BaseSectionData } from '@olonjs/core';
|
|
5758
|
+
import { BaseSectionData } from '@olonjs/core/runtime';
|
|
5733
5759
|
|
|
5734
5760
|
export const TiptapSchema = BaseSectionData.extend({
|
|
5735
5761
|
content: z.string().default('').describe('ui:editorial-markdown'),
|
|
@@ -5750,7 +5776,7 @@ END_OF_FILE_CONTENT
|
|
|
5750
5776
|
mkdir -p "src/components/ui"
|
|
5751
5777
|
echo "Creating src/components/ui/OlonMark.tsx..."
|
|
5752
5778
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/OlonMark.tsx"
|
|
5753
|
-
import { cn } from '@olonjs/core'
|
|
5779
|
+
import { cn } from '@olonjs/core/runtime'
|
|
5754
5780
|
|
|
5755
5781
|
interface OlonMarkProps {
|
|
5756
5782
|
size?: number
|
|
@@ -5840,7 +5866,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/accordion.tsx"
|
|
|
5840
5866
|
import * as React from "react"
|
|
5841
5867
|
import { Accordion as AccordionPrimitive } from "radix-ui"
|
|
5842
5868
|
|
|
5843
|
-
import { cn } from "@olonjs/core"
|
|
5869
|
+
import { cn } from "@olonjs/core/runtime"
|
|
5844
5870
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
5845
5871
|
|
|
5846
5872
|
function Accordion({
|
|
@@ -5944,7 +5970,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/avatar.tsx"
|
|
|
5944
5970
|
import * as React from "react"
|
|
5945
5971
|
import { Avatar as AvatarPrimitive } from "radix-ui"
|
|
5946
5972
|
|
|
5947
|
-
import { cn } from "@olonjs/core"
|
|
5973
|
+
import { cn } from "@olonjs/core/runtime"
|
|
5948
5974
|
|
|
5949
5975
|
function Avatar({
|
|
5950
5976
|
className,
|
|
@@ -6059,7 +6085,7 @@ echo "Creating src/components/ui/badge.tsx..."
|
|
|
6059
6085
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/badge.tsx"
|
|
6060
6086
|
import * as React from 'react'
|
|
6061
6087
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
6062
|
-
import { cn } from '@olonjs/core'
|
|
6088
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6063
6089
|
|
|
6064
6090
|
const badgeVariants = cva(
|
|
6065
6091
|
'inline-flex items-center px-2.5 py-0.5 text-xs font-medium transition-colors',
|
|
@@ -6094,7 +6120,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/breadcrumb.tsx"
|
|
|
6094
6120
|
import * as React from "react"
|
|
6095
6121
|
import { Slot } from "radix-ui"
|
|
6096
6122
|
|
|
6097
|
-
import { cn } from "@olonjs/core"
|
|
6123
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6098
6124
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
|
|
6099
6125
|
|
|
6100
6126
|
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
@@ -6221,7 +6247,7 @@ echo "Creating src/components/ui/button.tsx..."
|
|
|
6221
6247
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/button.tsx"
|
|
6222
6248
|
import * as React from 'react'
|
|
6223
6249
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
6224
|
-
import { cn } from '@olonjs/core'
|
|
6250
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6225
6251
|
|
|
6226
6252
|
const buttonVariants = cva(
|
|
6227
6253
|
'inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40 shrink-0',
|
|
@@ -6282,7 +6308,7 @@ END_OF_FILE_CONTENT
|
|
|
6282
6308
|
echo "Creating src/components/ui/card.tsx..."
|
|
6283
6309
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/card.tsx"
|
|
6284
6310
|
import * as React from 'react'
|
|
6285
|
-
import { cn } from '@olonjs/core'
|
|
6311
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6286
6312
|
|
|
6287
6313
|
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
6288
6314
|
({ className, ...props }, ref) => (
|
|
@@ -6341,7 +6367,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/checkbox.tsx"
|
|
|
6341
6367
|
import * as React from "react"
|
|
6342
6368
|
import { Checkbox as CheckboxPrimitive } from "radix-ui"
|
|
6343
6369
|
|
|
6344
|
-
import { cn } from "@olonjs/core"
|
|
6370
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6345
6371
|
import { CheckIcon } from "lucide-react"
|
|
6346
6372
|
|
|
6347
6373
|
function Checkbox({
|
|
@@ -6381,7 +6407,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/dialog.tsx"
|
|
|
6381
6407
|
import * as React from "react"
|
|
6382
6408
|
import { Dialog as DialogPrimitive } from "radix-ui"
|
|
6383
6409
|
|
|
6384
|
-
import { cn } from "@olonjs/core"
|
|
6410
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6385
6411
|
import { Button } from "@/components/ui/button"
|
|
6386
6412
|
import { XIcon } from "lucide-react"
|
|
6387
6413
|
|
|
@@ -6553,7 +6579,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/dropdown-menu.tsx"
|
|
|
6553
6579
|
import * as React from "react"
|
|
6554
6580
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
6555
6581
|
|
|
6556
|
-
import { cn } from "@olonjs/core"
|
|
6582
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6557
6583
|
import { CheckIcon, ChevronRightIcon } from "lucide-react"
|
|
6558
6584
|
|
|
6559
6585
|
function DropdownMenu({
|
|
@@ -6828,7 +6854,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/hover-card.tsx"
|
|
|
6828
6854
|
import * as React from "react"
|
|
6829
6855
|
import { HoverCard as HoverCardPrimitive } from "radix-ui"
|
|
6830
6856
|
|
|
6831
|
-
import { cn } from "@olonjs/core"
|
|
6857
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6832
6858
|
|
|
6833
6859
|
function HoverCard({
|
|
6834
6860
|
...props
|
|
@@ -6874,7 +6900,7 @@ END_OF_FILE_CONTENT
|
|
|
6874
6900
|
echo "Creating src/components/ui/input.tsx..."
|
|
6875
6901
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/input.tsx"
|
|
6876
6902
|
import * as React from 'react'
|
|
6877
|
-
import { cn } from '@olonjs/core'
|
|
6903
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6878
6904
|
|
|
6879
6905
|
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
6880
6906
|
|
|
@@ -6905,7 +6931,7 @@ END_OF_FILE_CONTENT
|
|
|
6905
6931
|
echo "Creating src/components/ui/label.tsx..."
|
|
6906
6932
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/label.tsx"
|
|
6907
6933
|
import * as React from 'react'
|
|
6908
|
-
import { cn } from '@olonjs/core'
|
|
6934
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6909
6935
|
|
|
6910
6936
|
const Label = React.forwardRef<
|
|
6911
6937
|
HTMLLabelElement,
|
|
@@ -6929,7 +6955,7 @@ import * as React from "react"
|
|
|
6929
6955
|
import { cva } from "class-variance-authority"
|
|
6930
6956
|
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui"
|
|
6931
6957
|
|
|
6932
|
-
import { cn } from "@olonjs/core"
|
|
6958
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6933
6959
|
import { ChevronDownIcon } from "lucide-react"
|
|
6934
6960
|
|
|
6935
6961
|
function NavigationMenu({
|
|
@@ -7098,7 +7124,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/progress.tsx"
|
|
|
7098
7124
|
import * as React from "react"
|
|
7099
7125
|
import { Progress as ProgressPrimitive } from "radix-ui"
|
|
7100
7126
|
|
|
7101
|
-
import { cn } from "@olonjs/core"
|
|
7127
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7102
7128
|
|
|
7103
7129
|
function Progress({
|
|
7104
7130
|
className,
|
|
@@ -7133,7 +7159,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/scroll-area.tsx"
|
|
|
7133
7159
|
import * as React from "react"
|
|
7134
7160
|
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
|
|
7135
7161
|
|
|
7136
|
-
import { cn } from "@olonjs/core"
|
|
7162
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7137
7163
|
|
|
7138
7164
|
function ScrollArea({
|
|
7139
7165
|
className,
|
|
@@ -7192,7 +7218,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/select.tsx"
|
|
|
7192
7218
|
import * as React from "react"
|
|
7193
7219
|
import { Select as SelectPrimitive } from "radix-ui"
|
|
7194
7220
|
|
|
7195
|
-
import { cn } from "@olonjs/core"
|
|
7221
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7196
7222
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
|
|
7197
7223
|
|
|
7198
7224
|
function Select({
|
|
@@ -7578,7 +7604,7 @@ END_OF_FILE_CONTENT
|
|
|
7578
7604
|
echo "Creating src/components/ui/separator.tsx..."
|
|
7579
7605
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/separator.tsx"
|
|
7580
7606
|
import * as React from 'react'
|
|
7581
|
-
import { cn } from '@olonjs/core'
|
|
7607
|
+
import { cn } from '@olonjs/core/runtime'
|
|
7582
7608
|
|
|
7583
7609
|
const Separator = React.forwardRef<
|
|
7584
7610
|
HTMLDivElement,
|
|
@@ -7607,7 +7633,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/sheet.tsx"
|
|
|
7607
7633
|
import * as React from "react"
|
|
7608
7634
|
import { Dialog as SheetPrimitive } from "radix-ui"
|
|
7609
7635
|
|
|
7610
|
-
import { cn } from "@olonjs/core"
|
|
7636
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7611
7637
|
import { Button } from "@/components/ui/button"
|
|
7612
7638
|
import { XIcon } from "lucide-react"
|
|
7613
7639
|
|
|
@@ -7755,22 +7781,22 @@ END_OF_FILE_CONTENT
|
|
|
7755
7781
|
# SKIP: src/components/ui/sheet.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
7756
7782
|
echo "Creating src/components/ui/skeleton.tsx..."
|
|
7757
7783
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/skeleton.tsx"
|
|
7758
|
-
import { cn } from '@olonjs/core';
|
|
7759
|
-
import type { HTMLAttributes } from 'react';
|
|
7760
|
-
|
|
7761
|
-
function Skeleton({
|
|
7762
|
-
className,
|
|
7763
|
-
...props
|
|
7764
|
-
}: HTMLAttributes<HTMLDivElement>) {
|
|
7765
|
-
return (
|
|
7766
|
-
<div
|
|
7767
|
-
className={cn('animate-pulse rounded-md bg-muted', className)}
|
|
7768
|
-
{...props}
|
|
7769
|
-
/>
|
|
7770
|
-
);
|
|
7771
|
-
}
|
|
7772
|
-
|
|
7773
|
-
export { Skeleton };
|
|
7784
|
+
import { cn } from '@olonjs/core/runtime';
|
|
7785
|
+
import type { HTMLAttributes } from 'react';
|
|
7786
|
+
|
|
7787
|
+
function Skeleton({
|
|
7788
|
+
className,
|
|
7789
|
+
...props
|
|
7790
|
+
}: HTMLAttributes<HTMLDivElement>) {
|
|
7791
|
+
return (
|
|
7792
|
+
<div
|
|
7793
|
+
className={cn('animate-pulse rounded-md bg-muted', className)}
|
|
7794
|
+
{...props}
|
|
7795
|
+
/>
|
|
7796
|
+
);
|
|
7797
|
+
}
|
|
7798
|
+
|
|
7799
|
+
export { Skeleton };
|
|
7774
7800
|
|
|
7775
7801
|
END_OF_FILE_CONTENT
|
|
7776
7802
|
# SKIP: src/components/ui/skeleton.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
@@ -7779,7 +7805,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/switch.tsx"
|
|
|
7779
7805
|
import * as React from "react"
|
|
7780
7806
|
import { Switch as SwitchPrimitive } from "radix-ui"
|
|
7781
7807
|
|
|
7782
|
-
import { cn } from "@olonjs/core"
|
|
7808
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7783
7809
|
|
|
7784
7810
|
function Switch({
|
|
7785
7811
|
className,
|
|
@@ -7815,7 +7841,7 @@ echo "Creating src/components/ui/table.tsx..."
|
|
|
7815
7841
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/table.tsx"
|
|
7816
7842
|
import * as React from "react"
|
|
7817
7843
|
|
|
7818
|
-
import { cn } from "@olonjs/core"
|
|
7844
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7819
7845
|
|
|
7820
7846
|
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
7821
7847
|
return (
|
|
@@ -7939,7 +7965,7 @@ import * as React from "react"
|
|
|
7939
7965
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
7940
7966
|
import { Tabs as TabsPrimitive } from "radix-ui"
|
|
7941
7967
|
|
|
7942
|
-
import { cn } from "@olonjs/core"
|
|
7968
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7943
7969
|
|
|
7944
7970
|
function Tabs({
|
|
7945
7971
|
className,
|
|
@@ -8031,7 +8057,7 @@ echo "Creating src/components/ui/textarea.tsx..."
|
|
|
8031
8057
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/textarea.tsx"
|
|
8032
8058
|
import * as React from "react"
|
|
8033
8059
|
|
|
8034
|
-
import { cn } from "@olonjs/core"
|
|
8060
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8035
8061
|
|
|
8036
8062
|
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
8037
8063
|
return (
|
|
@@ -8060,7 +8086,7 @@ import * as React from "react"
|
|
|
8060
8086
|
import { type VariantProps } from "class-variance-authority"
|
|
8061
8087
|
import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui"
|
|
8062
8088
|
|
|
8063
|
-
import { cn } from "@olonjs/core"
|
|
8089
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8064
8090
|
import { toggleVariants } from "@/components/ui/toggle"
|
|
8065
8091
|
|
|
8066
8092
|
const ToggleGroupContext = React.createContext<
|
|
@@ -8155,7 +8181,7 @@ import * as React from "react"
|
|
|
8155
8181
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
8156
8182
|
import { Toggle as TogglePrimitive } from "radix-ui"
|
|
8157
8183
|
|
|
8158
|
-
import { cn } from "@olonjs/core"
|
|
8184
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8159
8185
|
|
|
8160
8186
|
const toggleVariants = cva(
|
|
8161
8187
|
"group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -8207,7 +8233,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/tooltip.tsx"
|
|
|
8207
8233
|
import * as React from "react"
|
|
8208
8234
|
import { Tooltip as TooltipPrimitive } from "radix-ui"
|
|
8209
8235
|
|
|
8210
|
-
import { cn } from "@olonjs/core"
|
|
8236
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8211
8237
|
|
|
8212
8238
|
function TooltipProvider({
|
|
8213
8239
|
delayDuration = 0,
|
|
@@ -8910,7 +8936,7 @@ echo "Creating src/entry-ssg.tsx..."
|
|
|
8910
8936
|
cat << 'END_OF_FILE_CONTENT' > "src/entry-ssg.tsx"
|
|
8911
8937
|
import { renderToString } from 'react-dom/server';
|
|
8912
8938
|
import { StaticRouter } from 'react-router-dom/server';
|
|
8913
|
-
import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core';
|
|
8939
|
+
import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core/runtime';
|
|
8914
8940
|
import type { JsonPagesConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
|
|
8915
8941
|
import { ThemeProvider } from '@/components/ThemeProvider';
|
|
8916
8942
|
import { ComponentRegistry } from '@/lib/ComponentRegistry';
|
|
@@ -10118,7 +10144,7 @@ export const Icon: React.FC<IconProps> = ({ name, size = 20, className }) => {
|
|
|
10118
10144
|
END_OF_FILE_CONTENT
|
|
10119
10145
|
echo "Creating src/lib/addSectionConfig.ts..."
|
|
10120
10146
|
cat << 'END_OF_FILE_CONTENT' > "src/lib/addSectionConfig.ts"
|
|
10121
|
-
import type { AddSectionConfig } from '@olonjs/core';
|
|
10147
|
+
import type { AddSectionConfig } from '@olonjs/core/runtime';
|
|
10122
10148
|
|
|
10123
10149
|
const addableSectionTypes = ['empty-tenant', 'form-demo'] as const;
|
|
10124
10150
|
|
|
@@ -10259,7 +10285,7 @@ export {
|
|
|
10259
10285
|
BaseSectionSettingsSchema,
|
|
10260
10286
|
CtaSchema,
|
|
10261
10287
|
ImageSelectionSchema,
|
|
10262
|
-
} from '@olonjs/core';
|
|
10288
|
+
} from '@olonjs/core/runtime';
|
|
10263
10289
|
|
|
10264
10290
|
END_OF_FILE_CONTENT
|
|
10265
10291
|
echo "Creating src/lib/useFormSubmit.ts..."
|
|
@@ -10354,7 +10380,7 @@ END_OF_FILE_CONTENT
|
|
|
10354
10380
|
echo "Creating src/lib/useOlonForms.ts..."
|
|
10355
10381
|
cat << 'END_OF_FILE_CONTENT' > "src/lib/useOlonForms.ts"
|
|
10356
10382
|
import { useCallback, useEffect, useState } from 'react';
|
|
10357
|
-
import type { FormState } from '@olonjs/core';
|
|
10383
|
+
import type { FormState } from '@olonjs/core/runtime';
|
|
10358
10384
|
|
|
10359
10385
|
const API_BASE =
|
|
10360
10386
|
(import.meta.env.VITE_OLONJS_CLOUD_URL as string | undefined) ??
|
|
@@ -10555,6 +10581,12 @@ export type SectionComponentPropsMap = {
|
|
|
10555
10581
|
'form-demo': { data: FormDemoData; settings?: FormDemoSettings };
|
|
10556
10582
|
};
|
|
10557
10583
|
|
|
10584
|
+
// MTRP module augmentation. TypeScript treats `@olonjs/core` and
|
|
10585
|
+
// `@olonjs/core/runtime` as separate module identifiers (different
|
|
10586
|
+
// import specifiers). After ADR-0009 the tenant imports JsonPagesConfig
|
|
10587
|
+
// from `/runtime` for the visitor path, so the section registries must
|
|
10588
|
+
// be augmented for *both* identifiers, otherwise PageConfig.sections
|
|
10589
|
+
// resolves to a generic FallbackSection on the runtime side.
|
|
10558
10590
|
declare module '@olonjs/core' {
|
|
10559
10591
|
export interface SectionDataRegistry {
|
|
10560
10592
|
'empty-tenant': EmptyTenantData;
|
|
@@ -10566,7 +10598,26 @@ declare module '@olonjs/core' {
|
|
|
10566
10598
|
}
|
|
10567
10599
|
}
|
|
10568
10600
|
|
|
10569
|
-
|
|
10601
|
+
declare module '@olonjs/core/runtime' {
|
|
10602
|
+
export interface SectionDataRegistry {
|
|
10603
|
+
'empty-tenant': EmptyTenantData;
|
|
10604
|
+
'form-demo': FormDemoData;
|
|
10605
|
+
}
|
|
10606
|
+
export interface SectionSettingsRegistry {
|
|
10607
|
+
'empty-tenant': EmptyTenantSettings;
|
|
10608
|
+
'form-demo': FormDemoSettings;
|
|
10609
|
+
}
|
|
10610
|
+
}
|
|
10611
|
+
|
|
10612
|
+
// ADR-0009 D7: tenant types re-export from the runtime subpath, NOT the
|
|
10613
|
+
// full @olonjs/core. This is a value re-export — even though every
|
|
10614
|
+
// consumer in this codebase only does `import type`, Vite's static
|
|
10615
|
+
// graph treats `export *` as a runtime dependency edge. Pointing it at
|
|
10616
|
+
// '@olonjs/core' would pull the full Studio bundle (AdminSidebar,
|
|
10617
|
+
// FormFactory, StudioStage, admin-skin) into the visitor main chunk.
|
|
10618
|
+
// Pointing it at '@olonjs/core/runtime' anchors the graph to the
|
|
10619
|
+
// runtime-only bundle (~28 KB gz) so the visitor entry stays clean.
|
|
10620
|
+
export * from '@olonjs/core/runtime';
|
|
10570
10621
|
|
|
10571
10622
|
END_OF_FILE_CONTENT
|
|
10572
10623
|
echo "Creating src/vite-env.d.ts..."
|
|
@@ -1674,7 +1674,7 @@ cat << 'END_OF_FILE_CONTENT' > "package.json"
|
|
|
1674
1674
|
"@tiptap/extension-link": "^2.11.5",
|
|
1675
1675
|
"@tiptap/react": "^2.11.5",
|
|
1676
1676
|
"@tiptap/starter-kit": "^2.11.5",
|
|
1677
|
-
"@olonjs/core": "^1.
|
|
1677
|
+
"@olonjs/core": "^1.1.2",
|
|
1678
1678
|
"class-variance-authority": "^0.7.1",
|
|
1679
1679
|
"clsx": "^2.1.1",
|
|
1680
1680
|
"lucide-react": "^0.474.0",
|
|
@@ -2582,18 +2582,20 @@ cat << 'END_OF_FILE_CONTENT' > "src/App.tsx"
|
|
|
2582
2582
|
* Data from getHydratedData (file-backed or draft); assets from public/assets/images.
|
|
2583
2583
|
* Supports Hybrid Persistence: Local Filesystem (Dev) or Cloud Bridge (Prod).
|
|
2584
2584
|
*/
|
|
2585
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
import {
|
|
2585
|
+
import { useCallback, useEffect, useMemo, useRef, useState, Suspense, lazy } from 'react';
|
|
2586
|
+
// Visitor path uses the runtime-only bundle (~28 KB gz), per ADR-0009 D7.
|
|
2587
|
+
// The full @olonjs/core is loaded on demand only when the URL targets /admin.
|
|
2588
|
+
import { OlonJSEngine } from '@olonjs/core/runtime';
|
|
2589
|
+
import type { JsonPagesConfig, LibraryImageEntry, ProjectState } from '@olonjs/core/runtime';
|
|
2590
|
+
import { normalizeBasePath, withBasePath } from '@olonjs/core/runtime';
|
|
2589
2591
|
import { ComponentRegistry } from '@/lib/ComponentRegistry';
|
|
2590
2592
|
import { SECTION_SCHEMAS, SECTION_SUBMISSION_SCHEMAS } from '@/lib/schemas';
|
|
2591
2593
|
import { addSectionConfig } from '@/lib/addSectionConfig';
|
|
2592
2594
|
import { getHydratedData } from '@/lib/draftStorage';
|
|
2593
2595
|
import type { SiteConfig, ThemeConfig, MenuConfig, PageConfig } from '@/types';
|
|
2594
|
-
import type { DeployPhase, StepId } from '@olonjs/core';
|
|
2595
|
-
import { DEPLOY_STEPS } from '@olonjs/core';
|
|
2596
|
-
import { startCloudSaveStream } from '@olonjs/core';
|
|
2596
|
+
import type { DeployPhase, StepId } from '@olonjs/core/runtime';
|
|
2597
|
+
import { DEPLOY_STEPS } from '@olonjs/core/runtime';
|
|
2598
|
+
import { startCloudSaveStream } from '@olonjs/core/runtime';
|
|
2597
2599
|
import siteData from '@/data/config/site.json';
|
|
2598
2600
|
import themeData from '@/data/config/theme.json';
|
|
2599
2601
|
import menuData from '@/data/config/menu.json';
|
|
@@ -2603,9 +2605,23 @@ import { EmptyTenantView } from '@/components/empty-tenant';
|
|
|
2603
2605
|
import { Skeleton } from '@/components/ui/skeleton';
|
|
2604
2606
|
import { ThemeProvider } from '@/components/ThemeProvider';
|
|
2605
2607
|
import { useOlonForms } from '@/lib/useOlonForms';
|
|
2606
|
-
import { OlonFormsContext } from '@olonjs/core';
|
|
2608
|
+
import { OlonFormsContext } from '@olonjs/core/runtime';
|
|
2607
2609
|
import { iconMap } from '@/lib/IconResolver';
|
|
2608
2610
|
|
|
2611
|
+
/**
|
|
2612
|
+
* Engine selector. Visitors get OlonJSEngine (~28 KB gz); /admin paths
|
|
2613
|
+
* lazy-load the full JsonPagesEngine (~128 KB gz) which mounts the
|
|
2614
|
+
* Studio editor surface. The check runs at module load time — once per
|
|
2615
|
+
* page, before React mounts — so Vite statically splits the chunks.
|
|
2616
|
+
* See ADR-0008 + ADR-0009 + docs/plans/core-studio-split.md (Task 3.1).
|
|
2617
|
+
*/
|
|
2618
|
+
const isAdminPath =
|
|
2619
|
+
typeof window !== 'undefined' && window.location.pathname.startsWith('/admin');
|
|
2620
|
+
|
|
2621
|
+
const LazyJsonPagesEngine = lazy(() =>
|
|
2622
|
+
import('@olonjs/core').then((m) => ({ default: m.JsonPagesEngine })),
|
|
2623
|
+
);
|
|
2624
|
+
|
|
2609
2625
|
import tenantCss from './index.css?inline';
|
|
2610
2626
|
|
|
2611
2627
|
// Cloud Configuration (Injected by Vercel/Netlify Env Vars)
|
|
@@ -3664,7 +3680,17 @@ function App() {
|
|
|
3664
3680
|
</div>
|
|
3665
3681
|
</div>
|
|
3666
3682
|
) : null}
|
|
3667
|
-
{shouldRenderEngine ? (
|
|
3683
|
+
{shouldRenderEngine ? (
|
|
3684
|
+
isTenantEmpty ? (
|
|
3685
|
+
<EmptyTenantView />
|
|
3686
|
+
) : isAdminPath ? (
|
|
3687
|
+
<Suspense fallback={null}>
|
|
3688
|
+
<LazyJsonPagesEngine config={config} />
|
|
3689
|
+
</Suspense>
|
|
3690
|
+
) : (
|
|
3691
|
+
<OlonJSEngine config={config} />
|
|
3692
|
+
)
|
|
3693
|
+
) : null}
|
|
3668
3694
|
{isCloudMode && (contentMode === 'error' || contentFallback?.reasonCode === 'CLOUD_REFRESH_FAILED') ? (
|
|
3669
3695
|
<div
|
|
3670
3696
|
role="status"
|
|
@@ -3837,15 +3863,15 @@ export * from './types';
|
|
|
3837
3863
|
END_OF_FILE_CONTENT
|
|
3838
3864
|
echo "Creating src/components/empty-tenant/schema.ts..."
|
|
3839
3865
|
cat << 'END_OF_FILE_CONTENT' > "src/components/empty-tenant/schema.ts"
|
|
3840
|
-
import { z } from 'zod';
|
|
3841
|
-
import { BaseSectionData } from '@olonjs/core';
|
|
3842
|
-
|
|
3843
|
-
export const EmptyTenantSchema = BaseSectionData.extend({
|
|
3844
|
-
title: z.string().optional().describe('ui:text'),
|
|
3845
|
-
description: z.string().optional().describe('ui:textarea'),
|
|
3846
|
-
});
|
|
3847
|
-
|
|
3848
|
-
export const EmptyTenantSettingsSchema = z.object({});
|
|
3866
|
+
import { z } from 'zod';
|
|
3867
|
+
import { BaseSectionData } from '@olonjs/core/runtime';
|
|
3868
|
+
|
|
3869
|
+
export const EmptyTenantSchema = BaseSectionData.extend({
|
|
3870
|
+
title: z.string().optional().describe('ui:text'),
|
|
3871
|
+
description: z.string().optional().describe('ui:textarea'),
|
|
3872
|
+
});
|
|
3873
|
+
|
|
3874
|
+
export const EmptyTenantSettingsSchema = z.object({});
|
|
3849
3875
|
|
|
3850
3876
|
END_OF_FILE_CONTENT
|
|
3851
3877
|
echo "Creating src/components/empty-tenant/types.ts..."
|
|
@@ -3861,7 +3887,7 @@ mkdir -p "src/components/form-demo"
|
|
|
3861
3887
|
echo "Creating src/components/form-demo/View.tsx..."
|
|
3862
3888
|
cat << 'END_OF_FILE_CONTENT' > "src/components/form-demo/View.tsx"
|
|
3863
3889
|
import { Icon } from '@/lib/IconResolver';
|
|
3864
|
-
import { useFormState } from '@olonjs/core';
|
|
3890
|
+
import { useFormState } from '@olonjs/core/runtime';
|
|
3865
3891
|
import type { FormDemoData } from './types';
|
|
3866
3892
|
|
|
3867
3893
|
type FormDemoViewProps = {
|
|
@@ -4025,7 +4051,7 @@ END_OF_FILE_CONTENT
|
|
|
4025
4051
|
echo "Creating src/components/form-demo/schema.ts..."
|
|
4026
4052
|
cat << 'END_OF_FILE_CONTENT' > "src/components/form-demo/schema.ts"
|
|
4027
4053
|
import { z } from 'zod';
|
|
4028
|
-
import { BaseSectionData, WithFormRecipient } from '@olonjs/core';
|
|
4054
|
+
import { BaseSectionData, WithFormRecipient } from '@olonjs/core/runtime';
|
|
4029
4055
|
|
|
4030
4056
|
export const FormDemoSchema = BaseSectionData.merge(WithFormRecipient).extend({
|
|
4031
4057
|
icon: z.string().optional().describe('ui:icon-picker'),
|
|
@@ -4064,7 +4090,7 @@ END_OF_FILE_CONTENT
|
|
|
4064
4090
|
mkdir -p "src/components/save-drawer"
|
|
4065
4091
|
echo "Creating src/components/save-drawer/DeployConnector.tsx..."
|
|
4066
4092
|
cat << 'END_OF_FILE_CONTENT' > "src/components/save-drawer/DeployConnector.tsx"
|
|
4067
|
-
import type { StepState } from '@olonjs/core';
|
|
4093
|
+
import type { StepState } from '@olonjs/core/runtime';
|
|
4068
4094
|
|
|
4069
4095
|
interface DeployConnectorProps {
|
|
4070
4096
|
fromState: StepState;
|
|
@@ -4110,7 +4136,7 @@ END_OF_FILE_CONTENT
|
|
|
4110
4136
|
echo "Creating src/components/save-drawer/DeployNode.tsx..."
|
|
4111
4137
|
cat << 'END_OF_FILE_CONTENT' > "src/components/save-drawer/DeployNode.tsx"
|
|
4112
4138
|
import type { CSSProperties } from 'react';
|
|
4113
|
-
import type { DeployStep, StepState } from '@olonjs/core';
|
|
4139
|
+
import type { DeployStep, StepState } from '@olonjs/core/runtime';
|
|
4114
4140
|
|
|
4115
4141
|
interface DeployNodeProps {
|
|
4116
4142
|
step: DeployStep;
|
|
@@ -4198,8 +4224,8 @@ echo "Creating src/components/save-drawer/DopaDrawer.tsx..."
|
|
|
4198
4224
|
cat << 'END_OF_FILE_CONTENT' > "src/components/save-drawer/DopaDrawer.tsx"
|
|
4199
4225
|
import { useEffect, useMemo, useState } from 'react';
|
|
4200
4226
|
import { createPortal } from 'react-dom';
|
|
4201
|
-
import type { StepId, StepState } from '@olonjs/core';
|
|
4202
|
-
import { DEPLOY_STEPS } from '@olonjs/core';
|
|
4227
|
+
import type { StepId, StepState } from '@olonjs/core/runtime';
|
|
4228
|
+
import { DEPLOY_STEPS } from '@olonjs/core/runtime';
|
|
4203
4229
|
import fontsCss from '@/fonts.css?inline';
|
|
4204
4230
|
import saverStyleCss from './saverStyle.css?inline';
|
|
4205
4231
|
import { DeployNode } from './DeployNode';
|
|
@@ -5406,7 +5432,7 @@ import {
|
|
|
5406
5432
|
Code2, Quote, SquareCode,
|
|
5407
5433
|
Link2, Unlink2, ImagePlus, Eraser,
|
|
5408
5434
|
} from 'lucide-react';
|
|
5409
|
-
import { STUDIO_EVENTS, useConfig, useStudio } from '@olonjs/core';
|
|
5435
|
+
import { STUDIO_EVENTS, useConfig, useStudio } from '@olonjs/core/runtime';
|
|
5410
5436
|
import type { TiptapData, TiptapSettings } from './types';
|
|
5411
5437
|
|
|
5412
5438
|
// ── UI primitives ─────────────────────────────────────────────────
|
|
@@ -5729,7 +5755,7 @@ END_OF_FILE_CONTENT
|
|
|
5729
5755
|
echo "Creating src/components/tiptap/schema.ts..."
|
|
5730
5756
|
cat << 'END_OF_FILE_CONTENT' > "src/components/tiptap/schema.ts"
|
|
5731
5757
|
import { z } from 'zod';
|
|
5732
|
-
import { BaseSectionData } from '@olonjs/core';
|
|
5758
|
+
import { BaseSectionData } from '@olonjs/core/runtime';
|
|
5733
5759
|
|
|
5734
5760
|
export const TiptapSchema = BaseSectionData.extend({
|
|
5735
5761
|
content: z.string().default('').describe('ui:editorial-markdown'),
|
|
@@ -5750,7 +5776,7 @@ END_OF_FILE_CONTENT
|
|
|
5750
5776
|
mkdir -p "src/components/ui"
|
|
5751
5777
|
echo "Creating src/components/ui/OlonMark.tsx..."
|
|
5752
5778
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/OlonMark.tsx"
|
|
5753
|
-
import { cn } from '@olonjs/core'
|
|
5779
|
+
import { cn } from '@olonjs/core/runtime'
|
|
5754
5780
|
|
|
5755
5781
|
interface OlonMarkProps {
|
|
5756
5782
|
size?: number
|
|
@@ -5840,7 +5866,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/accordion.tsx"
|
|
|
5840
5866
|
import * as React from "react"
|
|
5841
5867
|
import { Accordion as AccordionPrimitive } from "radix-ui"
|
|
5842
5868
|
|
|
5843
|
-
import { cn } from "@olonjs/core"
|
|
5869
|
+
import { cn } from "@olonjs/core/runtime"
|
|
5844
5870
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
5845
5871
|
|
|
5846
5872
|
function Accordion({
|
|
@@ -5944,7 +5970,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/avatar.tsx"
|
|
|
5944
5970
|
import * as React from "react"
|
|
5945
5971
|
import { Avatar as AvatarPrimitive } from "radix-ui"
|
|
5946
5972
|
|
|
5947
|
-
import { cn } from "@olonjs/core"
|
|
5973
|
+
import { cn } from "@olonjs/core/runtime"
|
|
5948
5974
|
|
|
5949
5975
|
function Avatar({
|
|
5950
5976
|
className,
|
|
@@ -6059,7 +6085,7 @@ echo "Creating src/components/ui/badge.tsx..."
|
|
|
6059
6085
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/badge.tsx"
|
|
6060
6086
|
import * as React from 'react'
|
|
6061
6087
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
6062
|
-
import { cn } from '@olonjs/core'
|
|
6088
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6063
6089
|
|
|
6064
6090
|
const badgeVariants = cva(
|
|
6065
6091
|
'inline-flex items-center px-2.5 py-0.5 text-xs font-medium transition-colors',
|
|
@@ -6094,7 +6120,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/breadcrumb.tsx"
|
|
|
6094
6120
|
import * as React from "react"
|
|
6095
6121
|
import { Slot } from "radix-ui"
|
|
6096
6122
|
|
|
6097
|
-
import { cn } from "@olonjs/core"
|
|
6123
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6098
6124
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
|
|
6099
6125
|
|
|
6100
6126
|
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
@@ -6221,7 +6247,7 @@ echo "Creating src/components/ui/button.tsx..."
|
|
|
6221
6247
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/button.tsx"
|
|
6222
6248
|
import * as React from 'react'
|
|
6223
6249
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
6224
|
-
import { cn } from '@olonjs/core'
|
|
6250
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6225
6251
|
|
|
6226
6252
|
const buttonVariants = cva(
|
|
6227
6253
|
'inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40 shrink-0',
|
|
@@ -6282,7 +6308,7 @@ END_OF_FILE_CONTENT
|
|
|
6282
6308
|
echo "Creating src/components/ui/card.tsx..."
|
|
6283
6309
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/card.tsx"
|
|
6284
6310
|
import * as React from 'react'
|
|
6285
|
-
import { cn } from '@olonjs/core'
|
|
6311
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6286
6312
|
|
|
6287
6313
|
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
6288
6314
|
({ className, ...props }, ref) => (
|
|
@@ -6341,7 +6367,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/checkbox.tsx"
|
|
|
6341
6367
|
import * as React from "react"
|
|
6342
6368
|
import { Checkbox as CheckboxPrimitive } from "radix-ui"
|
|
6343
6369
|
|
|
6344
|
-
import { cn } from "@olonjs/core"
|
|
6370
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6345
6371
|
import { CheckIcon } from "lucide-react"
|
|
6346
6372
|
|
|
6347
6373
|
function Checkbox({
|
|
@@ -6381,7 +6407,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/dialog.tsx"
|
|
|
6381
6407
|
import * as React from "react"
|
|
6382
6408
|
import { Dialog as DialogPrimitive } from "radix-ui"
|
|
6383
6409
|
|
|
6384
|
-
import { cn } from "@olonjs/core"
|
|
6410
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6385
6411
|
import { Button } from "@/components/ui/button"
|
|
6386
6412
|
import { XIcon } from "lucide-react"
|
|
6387
6413
|
|
|
@@ -6553,7 +6579,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/dropdown-menu.tsx"
|
|
|
6553
6579
|
import * as React from "react"
|
|
6554
6580
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
6555
6581
|
|
|
6556
|
-
import { cn } from "@olonjs/core"
|
|
6582
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6557
6583
|
import { CheckIcon, ChevronRightIcon } from "lucide-react"
|
|
6558
6584
|
|
|
6559
6585
|
function DropdownMenu({
|
|
@@ -6828,7 +6854,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/hover-card.tsx"
|
|
|
6828
6854
|
import * as React from "react"
|
|
6829
6855
|
import { HoverCard as HoverCardPrimitive } from "radix-ui"
|
|
6830
6856
|
|
|
6831
|
-
import { cn } from "@olonjs/core"
|
|
6857
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6832
6858
|
|
|
6833
6859
|
function HoverCard({
|
|
6834
6860
|
...props
|
|
@@ -6874,7 +6900,7 @@ END_OF_FILE_CONTENT
|
|
|
6874
6900
|
echo "Creating src/components/ui/input.tsx..."
|
|
6875
6901
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/input.tsx"
|
|
6876
6902
|
import * as React from 'react'
|
|
6877
|
-
import { cn } from '@olonjs/core'
|
|
6903
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6878
6904
|
|
|
6879
6905
|
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
6880
6906
|
|
|
@@ -6905,7 +6931,7 @@ END_OF_FILE_CONTENT
|
|
|
6905
6931
|
echo "Creating src/components/ui/label.tsx..."
|
|
6906
6932
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/label.tsx"
|
|
6907
6933
|
import * as React from 'react'
|
|
6908
|
-
import { cn } from '@olonjs/core'
|
|
6934
|
+
import { cn } from '@olonjs/core/runtime'
|
|
6909
6935
|
|
|
6910
6936
|
const Label = React.forwardRef<
|
|
6911
6937
|
HTMLLabelElement,
|
|
@@ -6929,7 +6955,7 @@ import * as React from "react"
|
|
|
6929
6955
|
import { cva } from "class-variance-authority"
|
|
6930
6956
|
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui"
|
|
6931
6957
|
|
|
6932
|
-
import { cn } from "@olonjs/core"
|
|
6958
|
+
import { cn } from "@olonjs/core/runtime"
|
|
6933
6959
|
import { ChevronDownIcon } from "lucide-react"
|
|
6934
6960
|
|
|
6935
6961
|
function NavigationMenu({
|
|
@@ -7098,7 +7124,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/progress.tsx"
|
|
|
7098
7124
|
import * as React from "react"
|
|
7099
7125
|
import { Progress as ProgressPrimitive } from "radix-ui"
|
|
7100
7126
|
|
|
7101
|
-
import { cn } from "@olonjs/core"
|
|
7127
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7102
7128
|
|
|
7103
7129
|
function Progress({
|
|
7104
7130
|
className,
|
|
@@ -7133,7 +7159,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/scroll-area.tsx"
|
|
|
7133
7159
|
import * as React from "react"
|
|
7134
7160
|
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
|
|
7135
7161
|
|
|
7136
|
-
import { cn } from "@olonjs/core"
|
|
7162
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7137
7163
|
|
|
7138
7164
|
function ScrollArea({
|
|
7139
7165
|
className,
|
|
@@ -7192,7 +7218,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/select.tsx"
|
|
|
7192
7218
|
import * as React from "react"
|
|
7193
7219
|
import { Select as SelectPrimitive } from "radix-ui"
|
|
7194
7220
|
|
|
7195
|
-
import { cn } from "@olonjs/core"
|
|
7221
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7196
7222
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
|
|
7197
7223
|
|
|
7198
7224
|
function Select({
|
|
@@ -7578,7 +7604,7 @@ END_OF_FILE_CONTENT
|
|
|
7578
7604
|
echo "Creating src/components/ui/separator.tsx..."
|
|
7579
7605
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/separator.tsx"
|
|
7580
7606
|
import * as React from 'react'
|
|
7581
|
-
import { cn } from '@olonjs/core'
|
|
7607
|
+
import { cn } from '@olonjs/core/runtime'
|
|
7582
7608
|
|
|
7583
7609
|
const Separator = React.forwardRef<
|
|
7584
7610
|
HTMLDivElement,
|
|
@@ -7607,7 +7633,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/sheet.tsx"
|
|
|
7607
7633
|
import * as React from "react"
|
|
7608
7634
|
import { Dialog as SheetPrimitive } from "radix-ui"
|
|
7609
7635
|
|
|
7610
|
-
import { cn } from "@olonjs/core"
|
|
7636
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7611
7637
|
import { Button } from "@/components/ui/button"
|
|
7612
7638
|
import { XIcon } from "lucide-react"
|
|
7613
7639
|
|
|
@@ -7755,22 +7781,22 @@ END_OF_FILE_CONTENT
|
|
|
7755
7781
|
# SKIP: src/components/ui/sheet.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
7756
7782
|
echo "Creating src/components/ui/skeleton.tsx..."
|
|
7757
7783
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/skeleton.tsx"
|
|
7758
|
-
import { cn } from '@olonjs/core';
|
|
7759
|
-
import type { HTMLAttributes } from 'react';
|
|
7760
|
-
|
|
7761
|
-
function Skeleton({
|
|
7762
|
-
className,
|
|
7763
|
-
...props
|
|
7764
|
-
}: HTMLAttributes<HTMLDivElement>) {
|
|
7765
|
-
return (
|
|
7766
|
-
<div
|
|
7767
|
-
className={cn('animate-pulse rounded-md bg-muted', className)}
|
|
7768
|
-
{...props}
|
|
7769
|
-
/>
|
|
7770
|
-
);
|
|
7771
|
-
}
|
|
7772
|
-
|
|
7773
|
-
export { Skeleton };
|
|
7784
|
+
import { cn } from '@olonjs/core/runtime';
|
|
7785
|
+
import type { HTMLAttributes } from 'react';
|
|
7786
|
+
|
|
7787
|
+
function Skeleton({
|
|
7788
|
+
className,
|
|
7789
|
+
...props
|
|
7790
|
+
}: HTMLAttributes<HTMLDivElement>) {
|
|
7791
|
+
return (
|
|
7792
|
+
<div
|
|
7793
|
+
className={cn('animate-pulse rounded-md bg-muted', className)}
|
|
7794
|
+
{...props}
|
|
7795
|
+
/>
|
|
7796
|
+
);
|
|
7797
|
+
}
|
|
7798
|
+
|
|
7799
|
+
export { Skeleton };
|
|
7774
7800
|
|
|
7775
7801
|
END_OF_FILE_CONTENT
|
|
7776
7802
|
# SKIP: src/components/ui/skeleton.tsx:Zone.Identifier is binary and cannot be embedded as text.
|
|
@@ -7779,7 +7805,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/switch.tsx"
|
|
|
7779
7805
|
import * as React from "react"
|
|
7780
7806
|
import { Switch as SwitchPrimitive } from "radix-ui"
|
|
7781
7807
|
|
|
7782
|
-
import { cn } from "@olonjs/core"
|
|
7808
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7783
7809
|
|
|
7784
7810
|
function Switch({
|
|
7785
7811
|
className,
|
|
@@ -7815,7 +7841,7 @@ echo "Creating src/components/ui/table.tsx..."
|
|
|
7815
7841
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/table.tsx"
|
|
7816
7842
|
import * as React from "react"
|
|
7817
7843
|
|
|
7818
|
-
import { cn } from "@olonjs/core"
|
|
7844
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7819
7845
|
|
|
7820
7846
|
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
7821
7847
|
return (
|
|
@@ -7939,7 +7965,7 @@ import * as React from "react"
|
|
|
7939
7965
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
7940
7966
|
import { Tabs as TabsPrimitive } from "radix-ui"
|
|
7941
7967
|
|
|
7942
|
-
import { cn } from "@olonjs/core"
|
|
7968
|
+
import { cn } from "@olonjs/core/runtime"
|
|
7943
7969
|
|
|
7944
7970
|
function Tabs({
|
|
7945
7971
|
className,
|
|
@@ -8031,7 +8057,7 @@ echo "Creating src/components/ui/textarea.tsx..."
|
|
|
8031
8057
|
cat << 'END_OF_FILE_CONTENT' > "src/components/ui/textarea.tsx"
|
|
8032
8058
|
import * as React from "react"
|
|
8033
8059
|
|
|
8034
|
-
import { cn } from "@olonjs/core"
|
|
8060
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8035
8061
|
|
|
8036
8062
|
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
8037
8063
|
return (
|
|
@@ -8060,7 +8086,7 @@ import * as React from "react"
|
|
|
8060
8086
|
import { type VariantProps } from "class-variance-authority"
|
|
8061
8087
|
import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui"
|
|
8062
8088
|
|
|
8063
|
-
import { cn } from "@olonjs/core"
|
|
8089
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8064
8090
|
import { toggleVariants } from "@/components/ui/toggle"
|
|
8065
8091
|
|
|
8066
8092
|
const ToggleGroupContext = React.createContext<
|
|
@@ -8155,7 +8181,7 @@ import * as React from "react"
|
|
|
8155
8181
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
8156
8182
|
import { Toggle as TogglePrimitive } from "radix-ui"
|
|
8157
8183
|
|
|
8158
|
-
import { cn } from "@olonjs/core"
|
|
8184
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8159
8185
|
|
|
8160
8186
|
const toggleVariants = cva(
|
|
8161
8187
|
"group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -8207,7 +8233,7 @@ cat << 'END_OF_FILE_CONTENT' > "src/components/ui/tooltip.tsx"
|
|
|
8207
8233
|
import * as React from "react"
|
|
8208
8234
|
import { Tooltip as TooltipPrimitive } from "radix-ui"
|
|
8209
8235
|
|
|
8210
|
-
import { cn } from "@olonjs/core"
|
|
8236
|
+
import { cn } from "@olonjs/core/runtime"
|
|
8211
8237
|
|
|
8212
8238
|
function TooltipProvider({
|
|
8213
8239
|
delayDuration = 0,
|
|
@@ -8910,7 +8936,7 @@ echo "Creating src/entry-ssg.tsx..."
|
|
|
8910
8936
|
cat << 'END_OF_FILE_CONTENT' > "src/entry-ssg.tsx"
|
|
8911
8937
|
import { renderToString } from 'react-dom/server';
|
|
8912
8938
|
import { StaticRouter } from 'react-router-dom/server';
|
|
8913
|
-
import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core';
|
|
8939
|
+
import { ConfigProvider, PageRenderer, StudioProvider, resolveRuntimeConfig } from '@olonjs/core/runtime';
|
|
8914
8940
|
import type { JsonPagesConfig, PageConfig, SiteConfig, ThemeConfig } from '@/types';
|
|
8915
8941
|
import { ThemeProvider } from '@/components/ThemeProvider';
|
|
8916
8942
|
import { ComponentRegistry } from '@/lib/ComponentRegistry';
|
|
@@ -10118,7 +10144,7 @@ export const Icon: React.FC<IconProps> = ({ name, size = 20, className }) => {
|
|
|
10118
10144
|
END_OF_FILE_CONTENT
|
|
10119
10145
|
echo "Creating src/lib/addSectionConfig.ts..."
|
|
10120
10146
|
cat << 'END_OF_FILE_CONTENT' > "src/lib/addSectionConfig.ts"
|
|
10121
|
-
import type { AddSectionConfig } from '@olonjs/core';
|
|
10147
|
+
import type { AddSectionConfig } from '@olonjs/core/runtime';
|
|
10122
10148
|
|
|
10123
10149
|
const addableSectionTypes = ['empty-tenant', 'form-demo'] as const;
|
|
10124
10150
|
|
|
@@ -10259,7 +10285,7 @@ export {
|
|
|
10259
10285
|
BaseSectionSettingsSchema,
|
|
10260
10286
|
CtaSchema,
|
|
10261
10287
|
ImageSelectionSchema,
|
|
10262
|
-
} from '@olonjs/core';
|
|
10288
|
+
} from '@olonjs/core/runtime';
|
|
10263
10289
|
|
|
10264
10290
|
END_OF_FILE_CONTENT
|
|
10265
10291
|
echo "Creating src/lib/useFormSubmit.ts..."
|
|
@@ -10354,7 +10380,7 @@ END_OF_FILE_CONTENT
|
|
|
10354
10380
|
echo "Creating src/lib/useOlonForms.ts..."
|
|
10355
10381
|
cat << 'END_OF_FILE_CONTENT' > "src/lib/useOlonForms.ts"
|
|
10356
10382
|
import { useCallback, useEffect, useState } from 'react';
|
|
10357
|
-
import type { FormState } from '@olonjs/core';
|
|
10383
|
+
import type { FormState } from '@olonjs/core/runtime';
|
|
10358
10384
|
|
|
10359
10385
|
const API_BASE =
|
|
10360
10386
|
(import.meta.env.VITE_OLONJS_CLOUD_URL as string | undefined) ??
|
|
@@ -10555,6 +10581,12 @@ export type SectionComponentPropsMap = {
|
|
|
10555
10581
|
'form-demo': { data: FormDemoData; settings?: FormDemoSettings };
|
|
10556
10582
|
};
|
|
10557
10583
|
|
|
10584
|
+
// MTRP module augmentation. TypeScript treats `@olonjs/core` and
|
|
10585
|
+
// `@olonjs/core/runtime` as separate module identifiers (different
|
|
10586
|
+
// import specifiers). After ADR-0009 the tenant imports JsonPagesConfig
|
|
10587
|
+
// from `/runtime` for the visitor path, so the section registries must
|
|
10588
|
+
// be augmented for *both* identifiers, otherwise PageConfig.sections
|
|
10589
|
+
// resolves to a generic FallbackSection on the runtime side.
|
|
10558
10590
|
declare module '@olonjs/core' {
|
|
10559
10591
|
export interface SectionDataRegistry {
|
|
10560
10592
|
'empty-tenant': EmptyTenantData;
|
|
@@ -10566,7 +10598,26 @@ declare module '@olonjs/core' {
|
|
|
10566
10598
|
}
|
|
10567
10599
|
}
|
|
10568
10600
|
|
|
10569
|
-
|
|
10601
|
+
declare module '@olonjs/core/runtime' {
|
|
10602
|
+
export interface SectionDataRegistry {
|
|
10603
|
+
'empty-tenant': EmptyTenantData;
|
|
10604
|
+
'form-demo': FormDemoData;
|
|
10605
|
+
}
|
|
10606
|
+
export interface SectionSettingsRegistry {
|
|
10607
|
+
'empty-tenant': EmptyTenantSettings;
|
|
10608
|
+
'form-demo': FormDemoSettings;
|
|
10609
|
+
}
|
|
10610
|
+
}
|
|
10611
|
+
|
|
10612
|
+
// ADR-0009 D7: tenant types re-export from the runtime subpath, NOT the
|
|
10613
|
+
// full @olonjs/core. This is a value re-export — even though every
|
|
10614
|
+
// consumer in this codebase only does `import type`, Vite's static
|
|
10615
|
+
// graph treats `export *` as a runtime dependency edge. Pointing it at
|
|
10616
|
+
// '@olonjs/core' would pull the full Studio bundle (AdminSidebar,
|
|
10617
|
+
// FormFactory, StudioStage, admin-skin) into the visitor main chunk.
|
|
10618
|
+
// Pointing it at '@olonjs/core/runtime' anchors the graph to the
|
|
10619
|
+
// runtime-only bundle (~28 KB gz) so the visitor entry stays clean.
|
|
10620
|
+
export * from '@olonjs/core/runtime';
|
|
10570
10621
|
|
|
10571
10622
|
END_OF_FILE_CONTENT
|
|
10572
10623
|
echo "Creating src/vite-env.d.ts..."
|