astro-tractstack 2.0.0-rc.0
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/LICENSE +110 -0
- package/README.md +56 -0
- package/astro.d.ts +64 -0
- package/bin/create-tractstack.js +483 -0
- package/dist/config.js +80 -0
- package/dist/index.js +2129 -0
- package/package.json +89 -0
- package/templates/artpacks/kCz/captainBreakfast_1080px.webp +0 -0
- package/templates/artpacks/kCz/captainBreakfast_1920px.webp +0 -0
- package/templates/artpacks/kCz/captainBreakfast_600px.webp +0 -0
- package/templates/artpacks/kCz/cleanDrips_1080px.webp +0 -0
- package/templates/artpacks/kCz/cleanDrips_1920px.webp +0 -0
- package/templates/artpacks/kCz/cleanDrips_600px.webp +0 -0
- package/templates/artpacks/kCz/crispwaves_1080px.webp +0 -0
- package/templates/artpacks/kCz/crispwaves_1920px.webp +0 -0
- package/templates/artpacks/kCz/crispwaves_600px.webp +0 -0
- package/templates/artpacks/kCz/dragonSkin_1080px.webp +0 -0
- package/templates/artpacks/kCz/dragonSkin_1920px.webp +0 -0
- package/templates/artpacks/kCz/dragonSkin_600px.webp +0 -0
- package/templates/artpacks/kCz/dragon_1080px.webp +0 -0
- package/templates/artpacks/kCz/dragon_1920px.webp +0 -0
- package/templates/artpacks/kCz/dragon_600px.webp +0 -0
- package/templates/artpacks/kCz/nightcity_1080px.webp +0 -0
- package/templates/artpacks/kCz/nightcity_1920px.webp +0 -0
- package/templates/artpacks/kCz/nightcity_600px.webp +0 -0
- package/templates/artpacks/kCz/pattern1_1080px.webp +0 -0
- package/templates/artpacks/kCz/pattern1_1920px.webp +0 -0
- package/templates/artpacks/kCz/pattern1_600px.webp +0 -0
- package/templates/artpacks/kCz/pattern2_1080px.webp +0 -0
- package/templates/artpacks/kCz/pattern2_1920px.webp +0 -0
- package/templates/artpacks/kCz/pattern2_600px.webp +0 -0
- package/templates/artpacks/kCz/skindrips_1080px.webp +0 -0
- package/templates/artpacks/kCz/skindrips_1920px.webp +0 -0
- package/templates/artpacks/kCz/skindrips_600px.webp +0 -0
- package/templates/artpacks/kCz/slimetime_1080px.webp +0 -0
- package/templates/artpacks/kCz/slimetime_1920px.webp +0 -0
- package/templates/artpacks/kCz/slimetime_600px.webp +0 -0
- package/templates/artpacks/kCz/snake_1080px.webp +0 -0
- package/templates/artpacks/kCz/snake_1920px.webp +0 -0
- package/templates/artpacks/kCz/snake_600px.webp +0 -0
- package/templates/artpacks/kCz/toxicshock_1080px.webp +0 -0
- package/templates/artpacks/kCz/toxicshock_1920px.webp +0 -0
- package/templates/artpacks/kCz/toxicshock_600px.webp +0 -0
- package/templates/artpacks/kCz/tractstack_1080px.webp +0 -0
- package/templates/artpacks/kCz/tractstack_1920px.webp +0 -0
- package/templates/artpacks/kCz/tractstack_600px.webp +0 -0
- package/templates/artpacks/kCz/tripdrips_1080px.webp +0 -0
- package/templates/artpacks/kCz/tripdrips_1920px.webp +0 -0
- package/templates/artpacks/kCz/tripdrips_600px.webp +0 -0
- package/templates/artpacks/kCz/wavedrips_1080px.webp +0 -0
- package/templates/artpacks/kCz/wavedrips_1920px.webp +0 -0
- package/templates/artpacks/kCz/wavedrips_600px.webp +0 -0
- package/templates/artpacks/t8k/beach_1080px.webp +0 -0
- package/templates/artpacks/t8k/beach_1920px.webp +0 -0
- package/templates/artpacks/t8k/beach_600px.webp +0 -0
- package/templates/artpacks/t8k/blast_1080px.webp +0 -0
- package/templates/artpacks/t8k/blast_1920px.webp +0 -0
- package/templates/artpacks/t8k/blast_600px.webp +0 -0
- package/templates/artpacks/t8k/bokeh_1080px.webp +0 -0
- package/templates/artpacks/t8k/bokeh_1920px.webp +0 -0
- package/templates/artpacks/t8k/bokeh_600px.webp +0 -0
- package/templates/artpacks/t8k/cartoon_1080px.webp +0 -0
- package/templates/artpacks/t8k/cartoon_1920px.webp +0 -0
- package/templates/artpacks/t8k/cartoon_600px.webp +0 -0
- package/templates/artpacks/t8k/darkeggshell_1080px.webp +0 -0
- package/templates/artpacks/t8k/darkeggshell_1920px.webp +0 -0
- package/templates/artpacks/t8k/darkeggshell_600px.webp +0 -0
- package/templates/artpacks/t8k/explosion_1080px.webp +0 -0
- package/templates/artpacks/t8k/explosion_1920px.webp +0 -0
- package/templates/artpacks/t8k/explosion_600px.webp +0 -0
- package/templates/artpacks/t8k/floral_1080px.webp +0 -0
- package/templates/artpacks/t8k/floral_1920px.webp +0 -0
- package/templates/artpacks/t8k/floral_600px.webp +0 -0
- package/templates/artpacks/t8k/flower_1080px.webp +0 -0
- package/templates/artpacks/t8k/flower_1920px.webp +0 -0
- package/templates/artpacks/t8k/flower_600px.webp +0 -0
- package/templates/artpacks/t8k/foliage_1080px.webp +0 -0
- package/templates/artpacks/t8k/foliage_1920px.webp +0 -0
- package/templates/artpacks/t8k/foliage_600px.webp +0 -0
- package/templates/artpacks/t8k/mist_1080px.webp +0 -0
- package/templates/artpacks/t8k/mist_1920px.webp +0 -0
- package/templates/artpacks/t8k/mist_600px.webp +0 -0
- package/templates/artpacks/t8k/portal_1080px.webp +0 -0
- package/templates/artpacks/t8k/portal_1920px.webp +0 -0
- package/templates/artpacks/t8k/portal_600px.webp +0 -0
- package/templates/artpacks/t8k/storytime_1080px.webp +0 -0
- package/templates/artpacks/t8k/storytime_1920px.webp +0 -0
- package/templates/artpacks/t8k/storytime_600px.webp +0 -0
- package/templates/artpacks/t8k/tacky_1080px.webp +0 -0
- package/templates/artpacks/t8k/tacky_1920px.webp +0 -0
- package/templates/artpacks/t8k/tacky_600px.webp +0 -0
- package/templates/artpacks/t8k/wallpaper_1080px.webp +0 -0
- package/templates/artpacks/t8k/wallpaper_1920px.webp +0 -0
- package/templates/artpacks/t8k/wallpaper_600px.webp +0 -0
- package/templates/brand/favicon.ico +0 -0
- package/templates/brand/logo.svg +19 -0
- package/templates/brand/static.jpg +0 -0
- package/templates/brand/wordmark.svg +4 -0
- package/templates/css/custom.css +51 -0
- package/templates/css/frontend.css +3519 -0
- package/templates/css/storykeep.css +92872 -0
- package/templates/custom/minimal/CodeHook.astro +53 -0
- package/templates/custom/minimal/CustomRoutes.astro +46 -0
- package/templates/custom/with-examples/CodeHook.astro +49 -0
- package/templates/custom/with-examples/CustomHero.astro +13 -0
- package/templates/custom/with-examples/CustomRoutes.astro +39 -0
- package/templates/custom/with-examples/pages/Collections.astro +110 -0
- package/templates/env.example +8 -0
- package/templates/fonts/Inter-Black.woff2 +0 -0
- package/templates/fonts/Inter-Bold.woff2 +0 -0
- package/templates/fonts/Inter-Regular.woff2 +0 -0
- package/templates/icons/h2.svg +1 -0
- package/templates/icons/h3.svg +1 -0
- package/templates/icons/h4.svg +1 -0
- package/templates/icons/h5.svg +1 -0
- package/templates/icons/image.svg +7 -0
- package/templates/icons/text.svg +6 -0
- package/templates/socials/codepen.svg +1 -0
- package/templates/socials/discord.svg +1 -0
- package/templates/socials/facebook.svg +1 -0
- package/templates/socials/github.svg +1 -0
- package/templates/socials/instagram.svg +1 -0
- package/templates/socials/linkedin.svg +1 -0
- package/templates/socials/mail.svg +1 -0
- package/templates/socials/rumble.svg +1 -0
- package/templates/socials/tiktok.svg +1 -0
- package/templates/socials/twitch.svg +1 -0
- package/templates/socials/twitter.svg +1 -0
- package/templates/socials/x.svg +1 -0
- package/templates/socials/youtube.svg +1 -0
- package/templates/src/client/analytics-events.ts +213 -0
- package/templates/src/client/belief-events.ts +205 -0
- package/templates/src/client/sse.ts +667 -0
- package/templates/src/components/Footer.astro +246 -0
- package/templates/src/components/Fragment.astro +70 -0
- package/templates/src/components/Header.astro +458 -0
- package/templates/src/components/Menu.tsx +196 -0
- package/templates/src/components/codehooks/BunnyVideoSetup.tsx +692 -0
- package/templates/src/components/codehooks/BunnyVideoWrapper.astro +78 -0
- package/templates/src/components/codehooks/EpinetDurationSelector.tsx +1020 -0
- package/templates/src/components/codehooks/EpinetTableView.tsx +594 -0
- package/templates/src/components/codehooks/EpinetWrapper.tsx +424 -0
- package/templates/src/components/codehooks/FeaturedContent.astro +273 -0
- package/templates/src/components/codehooks/FeaturedContentSetup.tsx +738 -0
- package/templates/src/components/codehooks/ListContent.astro +460 -0
- package/templates/src/components/codehooks/ListContentSetup.tsx +649 -0
- package/templates/src/components/codehooks/SankeyDiagram.tsx +359 -0
- package/templates/src/components/compositor/Compositor.tsx +144 -0
- package/templates/src/components/compositor/Node.tsx +415 -0
- package/templates/src/components/compositor/NodeWithGuid.tsx +25 -0
- package/templates/src/components/compositor/PanelVisibilityWrapper.tsx +87 -0
- package/templates/src/components/compositor/elements/Belief.tsx +148 -0
- package/templates/src/components/compositor/elements/BgImage.tsx +118 -0
- package/templates/src/components/compositor/elements/BgVisualBreak.tsx +102 -0
- package/templates/src/components/compositor/elements/BunnyVideo.tsx +63 -0
- package/templates/src/components/compositor/elements/IdentifyAs.tsx +66 -0
- package/templates/src/components/compositor/elements/PlayButton.tsx +19 -0
- package/templates/src/components/compositor/elements/SignUp.tsx +179 -0
- package/templates/src/components/compositor/elements/Svg.tsx +33 -0
- package/templates/src/components/compositor/elements/ToggleBelief.tsx +36 -0
- package/templates/src/components/compositor/elements/YouTubeWrapper.tsx +33 -0
- package/templates/src/components/compositor/nodes/BgPaneWrapper.tsx +35 -0
- package/templates/src/components/compositor/nodes/GhostInsertBlock.tsx +189 -0
- package/templates/src/components/compositor/nodes/Markdown.tsx +179 -0
- package/templates/src/components/compositor/nodes/Pane.tsx +277 -0
- package/templates/src/components/compositor/nodes/Pane_eraser.tsx +69 -0
- package/templates/src/components/compositor/nodes/Pane_layout.tsx +77 -0
- package/templates/src/components/compositor/nodes/RenderChildren.tsx +19 -0
- package/templates/src/components/compositor/nodes/StoryFragment.tsx +35 -0
- package/templates/src/components/compositor/nodes/TagElement.tsx +14 -0
- package/templates/src/components/compositor/nodes/Widget.tsx +115 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeA.tsx +4 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeA_eraser.tsx +26 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeAnchorComponent.tsx +248 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag.tsx +684 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_eraser.tsx +62 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_insert.tsx +120 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_settings.tsx +62 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeButton.tsx +5 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeButton_eraser.tsx +26 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeImg.tsx +28 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeText.tsx +18 -0
- package/templates/src/components/compositor/nodes/tagElements/TabIndicator.tsx +51 -0
- package/templates/src/components/compositor/preview/FeaturedContentPreview.tsx +128 -0
- package/templates/src/components/compositor/preview/ListContentPreview.tsx +213 -0
- package/templates/src/components/compositor/preview/OgImagePreview.tsx +223 -0
- package/templates/src/components/compositor/preview/PaneSnapshotGenerator.tsx +199 -0
- package/templates/src/components/compositor/preview/PanesPreviewGenerator.tsx +123 -0
- package/templates/src/components/compositor/preview/VisualBreakPreview.tsx +154 -0
- package/templates/src/components/edit/Header.tsx +181 -0
- package/templates/src/components/edit/PanelSwitch.tsx +446 -0
- package/templates/src/components/edit/SettingsPanel.tsx +70 -0
- package/templates/src/components/edit/ToolBar.tsx +101 -0
- package/templates/src/components/edit/ToolMode.tsx +121 -0
- package/templates/src/components/edit/context/ContextPaneConfig.tsx +91 -0
- package/templates/src/components/edit/context/ContextPaneConfig_slug.tsx +174 -0
- package/templates/src/components/edit/context/ContextPaneConfig_title.tsx +186 -0
- package/templates/src/components/edit/pane/AddPanePanel.tsx +136 -0
- package/templates/src/components/edit/pane/AddPanePanel_break.tsx +470 -0
- package/templates/src/components/edit/pane/AddPanePanel_codehook.tsx +264 -0
- package/templates/src/components/edit/pane/AddPanePanel_new.tsx +623 -0
- package/templates/src/components/edit/pane/AddPanePanel_newAICopy.tsx +107 -0
- package/templates/src/components/edit/pane/AddPanePanel_newAICopy_modal.tsx +217 -0
- package/templates/src/components/edit/pane/AddPanePanel_newCopyMode.tsx +109 -0
- package/templates/src/components/edit/pane/AddPanePanel_newCustomCopy.tsx +39 -0
- package/templates/src/components/edit/pane/AddPanePanel_reuse.tsx +445 -0
- package/templates/src/components/edit/pane/ConfigPanePanel.tsx +245 -0
- package/templates/src/components/edit/pane/PageGen.tsx +485 -0
- package/templates/src/components/edit/pane/PageGenSelector.tsx +238 -0
- package/templates/src/components/edit/pane/PageGenSpecial.tsx +362 -0
- package/templates/src/components/edit/pane/PageGen_preview.tsx +495 -0
- package/templates/src/components/edit/pane/PanePanel_impression.tsx +258 -0
- package/templates/src/components/edit/pane/PanePanel_path.tsx +268 -0
- package/templates/src/components/edit/pane/PanePanel_slug.tsx +219 -0
- package/templates/src/components/edit/pane/PanePanel_title.tsx +142 -0
- package/templates/src/components/edit/panels/StyleBreakPanel.tsx +182 -0
- package/templates/src/components/edit/panels/StyleCodeHookPanel.tsx +439 -0
- package/templates/src/components/edit/panels/StyleElementPanel.tsx +177 -0
- package/templates/src/components/edit/panels/StyleElementPanel_add.tsx +349 -0
- package/templates/src/components/edit/panels/StyleElementPanel_remove.tsx +159 -0
- package/templates/src/components/edit/panels/StyleElementPanel_update.tsx +320 -0
- package/templates/src/components/edit/panels/StyleImagePanel.tsx +460 -0
- package/templates/src/components/edit/panels/StyleImagePanel_add.tsx +296 -0
- package/templates/src/components/edit/panels/StyleImagePanel_remove.tsx +153 -0
- package/templates/src/components/edit/panels/StyleImagePanel_update.tsx +312 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel.tsx +273 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel_add.tsx +301 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel_remove.tsx +132 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel_update.tsx +313 -0
- package/templates/src/components/edit/panels/StyleLinkPanel.tsx +346 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_add.tsx +265 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_config.tsx +240 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_remove.tsx +94 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_update.tsx +110 -0
- package/templates/src/components/edit/panels/StyleParentPanel.tsx +263 -0
- package/templates/src/components/edit/panels/StyleParentPanel_add.tsx +275 -0
- package/templates/src/components/edit/panels/StyleParentPanel_deleteLayer.tsx +112 -0
- package/templates/src/components/edit/panels/StyleParentPanel_remove.tsx +87 -0
- package/templates/src/components/edit/panels/StyleParentPanel_update.tsx +141 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel.tsx +428 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_add.tsx +292 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_config.tsx +190 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_remove.tsx +152 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_update.tsx +308 -0
- package/templates/src/components/edit/state/SaveModal.tsx +811 -0
- package/templates/src/components/edit/state/StylesMemory.tsx +310 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentConfigPanel.tsx +289 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_menu.tsx +320 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_og.tsx +888 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_slug.tsx +269 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_title.tsx +190 -0
- package/templates/src/components/edit/widgets/BeliefWidget.tsx +183 -0
- package/templates/src/components/edit/widgets/BunnyWidget.tsx +134 -0
- package/templates/src/components/edit/widgets/IdentifyAsWidget.tsx +193 -0
- package/templates/src/components/edit/widgets/SignupWidget.tsx +177 -0
- package/templates/src/components/edit/widgets/ToggleWidget.tsx +152 -0
- package/templates/src/components/edit/widgets/YouTubeWidget.tsx +65 -0
- package/templates/src/components/fields/ActionBuilderTimeSelector.tsx +353 -0
- package/templates/src/components/fields/ArtpackImage.tsx +480 -0
- package/templates/src/components/fields/BackgroundImage.tsx +530 -0
- package/templates/src/components/fields/BackgroundImageWrapper.tsx +192 -0
- package/templates/src/components/fields/BooleanParam.tsx +67 -0
- package/templates/src/components/fields/BunnyMomentSelector.tsx +56 -0
- package/templates/src/components/fields/ColorPickerCombo.tsx +284 -0
- package/templates/src/components/fields/ImageUpload.tsx +405 -0
- package/templates/src/components/fields/MultiParam.tsx +75 -0
- package/templates/src/components/fields/PaneBreakCollectionSelector.tsx +97 -0
- package/templates/src/components/fields/PaneBreakShapeSelector.tsx +134 -0
- package/templates/src/components/fields/SelectedTailwindClass.tsx +44 -0
- package/templates/src/components/fields/SingleParam.tsx +73 -0
- package/templates/src/components/fields/ViewportComboBox.tsx +252 -0
- package/templates/src/components/form/ActionBuilderField.tsx +282 -0
- package/templates/src/components/form/ActionBuilderSlugSelector.tsx +182 -0
- package/templates/src/components/form/BooleanToggle.tsx +94 -0
- package/templates/src/components/form/ColorPicker.tsx +153 -0
- package/templates/src/components/form/DateTimeInput.tsx +638 -0
- package/templates/src/components/form/EnumSelect.tsx +88 -0
- package/templates/src/components/form/FileUpload.tsx +465 -0
- package/templates/src/components/form/MagicPathBuilder.tsx +546 -0
- package/templates/src/components/form/NumberInput.tsx +101 -0
- package/templates/src/components/form/ParagraphArrayInput.tsx +207 -0
- package/templates/src/components/form/StringArrayInput.tsx +163 -0
- package/templates/src/components/form/StringInput.tsx +88 -0
- package/templates/src/components/form/UnsavedChangesBar.tsx +295 -0
- package/templates/src/components/form/advanced/APIConfigSection.tsx +69 -0
- package/templates/src/components/form/advanced/AuthConfigSection.tsx +97 -0
- package/templates/src/components/form/brand/BrandAssetsSection.tsx +93 -0
- package/templates/src/components/form/brand/BrandColorsSection.tsx +201 -0
- package/templates/src/components/form/brand/SEOSection.tsx +101 -0
- package/templates/src/components/form/brand/SiteConfigSection.tsx +61 -0
- package/templates/src/components/form/brand/SocialLinksSection.tsx +393 -0
- package/templates/src/components/profile/ProfileConsent.tsx +65 -0
- package/templates/src/components/profile/ProfileCreate.tsx +462 -0
- package/templates/src/components/profile/ProfileEdit.tsx +409 -0
- package/templates/src/components/profile/ProfileSwitch.tsx +255 -0
- package/templates/src/components/profile/ProfileUnlock.tsx +221 -0
- package/templates/src/components/storykeep/Dashboard.tsx +160 -0
- package/templates/src/components/storykeep/Dashboard_Activity.tsx +56 -0
- package/templates/src/components/storykeep/Dashboard_Advanced.tsx +165 -0
- package/templates/src/components/storykeep/Dashboard_Analytics.tsx +451 -0
- package/templates/src/components/storykeep/Dashboard_Branding.tsx +95 -0
- package/templates/src/components/storykeep/Dashboard_Content.tsx +191 -0
- package/templates/src/components/storykeep/controls/UsageCell.tsx +71 -0
- package/templates/src/components/storykeep/controls/content/BeliefForm.tsx +378 -0
- package/templates/src/components/storykeep/controls/content/BeliefTable.tsx +329 -0
- package/templates/src/components/storykeep/controls/content/ContentBrowser.tsx +385 -0
- package/templates/src/components/storykeep/controls/content/ContentSummary.tsx +149 -0
- package/templates/src/components/storykeep/controls/content/KnownResourceForm.tsx +397 -0
- package/templates/src/components/storykeep/controls/content/KnownResourceTable.tsx +260 -0
- package/templates/src/components/storykeep/controls/content/ManageContent.tsx +439 -0
- package/templates/src/components/storykeep/controls/content/MenuForm.tsx +239 -0
- package/templates/src/components/storykeep/controls/content/MenuTable.tsx +332 -0
- package/templates/src/components/storykeep/controls/content/ResourceBulkIngest.tsx +724 -0
- package/templates/src/components/storykeep/controls/content/ResourceForm.tsx +355 -0
- package/templates/src/components/storykeep/controls/content/ResourceTable.tsx +222 -0
- package/templates/src/components/storykeep/controls/content/StoryFragmentTable.tsx +482 -0
- package/templates/src/components/storykeep/state/BrandingWrapper.tsx +42 -0
- package/templates/src/components/storykeep/state/FetchAnalytics.tsx +350 -0
- package/templates/src/components/storykeep/widgets/ResponsiveLine.tsx +319 -0
- package/templates/src/components/storykeep/widgets/Wizard.tsx +278 -0
- package/templates/src/components/tenant/RegistrationForm.tsx +447 -0
- package/templates/src/components/widgets/BunnyVideoHero.astro +775 -0
- package/templates/src/components/widgets/Impression.tsx +102 -0
- package/templates/src/components/widgets/ImpressionWrapper.tsx +214 -0
- package/templates/src/constants/beliefs.ts +61 -0
- package/templates/src/constants/brandThemes.ts +133 -0
- package/templates/src/constants/prompts.json +55 -0
- package/templates/src/constants/shapes.ts +556 -0
- package/templates/src/constants/stopWords.ts +116 -0
- package/templates/src/constants/tailwindColors.json +344 -0
- package/templates/src/constants.ts +274 -0
- package/templates/src/hooks/useFormState.ts +203 -0
- package/templates/src/layouts/Layout.astro +290 -0
- package/templates/src/lib/session.ts +126 -0
- package/templates/src/lib/storyData.ts +56 -0
- package/templates/src/middleware.ts +52 -0
- package/templates/src/pages/404.astro +54 -0
- package/templates/src/pages/[...slug]/edit.astro +216 -0
- package/templates/src/pages/[...slug].astro +148 -0
- package/templates/src/pages/api/auth/decode.ts +101 -0
- package/templates/src/pages/api/auth/login.ts +122 -0
- package/templates/src/pages/api/auth/logout.ts +37 -0
- package/templates/src/pages/api/auth/profile.ts +76 -0
- package/templates/src/pages/api/orphan-analysis.ts +106 -0
- package/templates/src/pages/api/tailwind.ts +116 -0
- package/templates/src/pages/collections/[param1].astro +65 -0
- package/templates/src/pages/context/[...contextSlug]/edit.astro +207 -0
- package/templates/src/pages/context/[...contextSlug].astro +161 -0
- package/templates/src/pages/llms.txt.ts +122 -0
- package/templates/src/pages/maint.astro +183 -0
- package/templates/src/pages/media/[...slug].astro +67 -0
- package/templates/src/pages/robots.txt.ts +36 -0
- package/templates/src/pages/sandbox/activate.astro +258 -0
- package/templates/src/pages/sandbox/register.astro +44 -0
- package/templates/src/pages/sandbox/success.astro +179 -0
- package/templates/src/pages/sitemap.xml.ts +119 -0
- package/templates/src/pages/storykeep/advanced.astro +69 -0
- package/templates/src/pages/storykeep/branding.astro +57 -0
- package/templates/src/pages/storykeep/content.astro +71 -0
- package/templates/src/pages/storykeep/init.astro +36 -0
- package/templates/src/pages/storykeep/login.astro +266 -0
- package/templates/src/pages/storykeep/logout.astro +84 -0
- package/templates/src/pages/storykeep/profile.astro +98 -0
- package/templates/src/pages/storykeep.astro +81 -0
- package/templates/src/stores/analytics.ts +171 -0
- package/templates/src/stores/backend.ts +16 -0
- package/templates/src/stores/navigation.ts +149 -0
- package/templates/src/stores/nodes.ts +2390 -0
- package/templates/src/stores/nodesHistory.ts +85 -0
- package/templates/src/stores/notificationSystem.ts +41 -0
- package/templates/src/stores/orphanAnalysis.ts +409 -0
- package/templates/src/stores/storykeep.ts +247 -0
- package/templates/src/types/astro.ts +86 -0
- package/templates/src/types/compositorTypes.ts +456 -0
- package/templates/src/types/formTypes.ts +281 -0
- package/templates/src/types/multiTenant.ts +77 -0
- package/templates/src/types/nodeProps.ts +66 -0
- package/templates/src/types/tractstack.ts +445 -0
- package/templates/src/utils/aai/getTitleSlug.ts +72 -0
- package/templates/src/utils/actions/actionButton.ts +101 -0
- package/templates/src/utils/actions/lispLexer.ts +57 -0
- package/templates/src/utils/actions/preParse_Action.ts +85 -0
- package/templates/src/utils/actions/preParse_Bunny.ts +50 -0
- package/templates/src/utils/actions/preParse_Clicked.ts +87 -0
- package/templates/src/utils/actions/preParse_Impression.ts +71 -0
- package/templates/src/utils/api/advancedConfig.ts +66 -0
- package/templates/src/utils/api/advancedHelpers.ts +134 -0
- package/templates/src/utils/api/beliefConfig.ts +87 -0
- package/templates/src/utils/api/beliefHelpers.ts +196 -0
- package/templates/src/utils/api/brandConfig.ts +126 -0
- package/templates/src/utils/api/brandHelpers.ts +155 -0
- package/templates/src/utils/api/fileHelpers.ts +306 -0
- package/templates/src/utils/api/menuConfig.ts +57 -0
- package/templates/src/utils/api/menuHelpers.ts +156 -0
- package/templates/src/utils/api/resourceConfig.ts +158 -0
- package/templates/src/utils/api/resourceHelpers.ts +72 -0
- package/templates/src/utils/api/tenantConfig.ts +97 -0
- package/templates/src/utils/api/tenantHelpers.ts +172 -0
- package/templates/src/utils/api.ts +183 -0
- package/templates/src/utils/auth.ts +150 -0
- package/templates/src/utils/backend.ts +243 -0
- package/templates/src/utils/compositor/TemplateMarkdowns.ts +118 -0
- package/templates/src/utils/compositor/TemplateNodes.ts +138 -0
- package/templates/src/utils/compositor/TemplatePanes.ts +100 -0
- package/templates/src/utils/compositor/allowInsert.ts +100 -0
- package/templates/src/utils/compositor/domHelpers.ts +37 -0
- package/templates/src/utils/compositor/handleClickEvent.ts +131 -0
- package/templates/src/utils/compositor/nodesHelper.ts +491 -0
- package/templates/src/utils/compositor/nodesMarkdownGenerator.ts +292 -0
- package/templates/src/utils/compositor/processMarkdown.ts +431 -0
- package/templates/src/utils/compositor/reduceNodesClassNames.ts +192 -0
- package/templates/src/utils/compositor/tailwindClasses.ts +1795 -0
- package/templates/src/utils/compositor/tailwindColors.ts +227 -0
- package/templates/src/utils/compositor/templateMarkdownStyles.ts +1265 -0
- package/templates/src/utils/compositor/typeGuards.ts +193 -0
- package/templates/src/utils/etl/extractor.ts +119 -0
- package/templates/src/utils/etl/index.ts +88 -0
- package/templates/src/utils/etl/loader.ts +36 -0
- package/templates/src/utils/etl/transformer.ts +286 -0
- package/templates/src/utils/helpers.ts +435 -0
- package/templates/src/utils/layout.ts +209 -0
- package/templates/src/utils/profileStorage.ts +306 -0
- package/templates/src/utils/useInterval.ts +27 -0
- package/templates/tailwind.config.cjs +169 -0
- package/utils/create-resolver.ts +10 -0
- package/utils/inject-files.ts +2140 -0
- package/utils/validate-config.ts +43 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
import type { BrandConfig } from './tractstack';
|
|
2
|
+
|
|
3
|
+
export type ViewportKey = 'mobile' | 'tablet' | 'desktop' | 'auto';
|
|
4
|
+
export type ViewportAuto = 'mobile' | 'tablet' | 'desktop';
|
|
5
|
+
export type ToolModeVal =
|
|
6
|
+
| 'styles'
|
|
7
|
+
| 'text'
|
|
8
|
+
| 'insert'
|
|
9
|
+
| 'eraser'
|
|
10
|
+
| 'move'
|
|
11
|
+
| 'layout'
|
|
12
|
+
| 'debug';
|
|
13
|
+
|
|
14
|
+
export const toolAddModes = [
|
|
15
|
+
'p',
|
|
16
|
+
'h2',
|
|
17
|
+
'h3',
|
|
18
|
+
'h4',
|
|
19
|
+
'img',
|
|
20
|
+
'signup',
|
|
21
|
+
'yt',
|
|
22
|
+
'bunny',
|
|
23
|
+
'belief',
|
|
24
|
+
'identify',
|
|
25
|
+
'toggle',
|
|
26
|
+
//"aside",
|
|
27
|
+
] as const;
|
|
28
|
+
export type ToolAddMode = (typeof toolAddModes)[number];
|
|
29
|
+
|
|
30
|
+
export enum ContextPaneMode {
|
|
31
|
+
DEFAULT = 'DEFAULT',
|
|
32
|
+
TITLE = 'TITLE',
|
|
33
|
+
SLUG = 'SLUG',
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export enum PaneAddMode {
|
|
37
|
+
DEFAULT = 'DEFAULT',
|
|
38
|
+
NEW = 'NEW',
|
|
39
|
+
BREAK = 'BREAK',
|
|
40
|
+
REUSE = 'REUSE',
|
|
41
|
+
CODEHOOK = 'CODEHOOK',
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export enum PaneConfigMode {
|
|
45
|
+
DEFAULT = 'DEFAULT',
|
|
46
|
+
TITLE = 'TITLE',
|
|
47
|
+
SLUG = 'SLUG',
|
|
48
|
+
PATH = 'PATH',
|
|
49
|
+
IMPRESSION = 'IMPRESSION',
|
|
50
|
+
CODEHOOK = 'CODEHOOK',
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export enum StoryFragmentMode {
|
|
54
|
+
DEFAULT = 'DEFAULT',
|
|
55
|
+
SLUG = 'SLUG',
|
|
56
|
+
MENU = 'MENU',
|
|
57
|
+
OG = 'OG',
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface PanelState {
|
|
61
|
+
paneId: string;
|
|
62
|
+
panel: string;
|
|
63
|
+
mode: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type SettingsPanelSignal = {
|
|
67
|
+
action: string;
|
|
68
|
+
nodeId: string;
|
|
69
|
+
childId?: string;
|
|
70
|
+
layer?: number;
|
|
71
|
+
className?: string;
|
|
72
|
+
minimized?: boolean;
|
|
73
|
+
expanded?: boolean;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export interface OgImageParams {
|
|
77
|
+
textColor: string;
|
|
78
|
+
bgColor: string;
|
|
79
|
+
fontSize?: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type ParentClassesPayload = Array<{
|
|
83
|
+
mobile: Record<string, string>;
|
|
84
|
+
tablet: Record<string, string>;
|
|
85
|
+
desktop: Record<string, string>;
|
|
86
|
+
}>;
|
|
87
|
+
|
|
88
|
+
export interface BeliefDatum {
|
|
89
|
+
[key: string]: string | string[];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface BeliefOptionDatum {
|
|
93
|
+
id: number;
|
|
94
|
+
slug: string;
|
|
95
|
+
name: string;
|
|
96
|
+
color: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface ClosestColor {
|
|
100
|
+
name: string;
|
|
101
|
+
shade: number;
|
|
102
|
+
}
|
|
103
|
+
export interface RGB {
|
|
104
|
+
r: number;
|
|
105
|
+
g: number;
|
|
106
|
+
b: number;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface VideoMoment {
|
|
110
|
+
startTime: number; // in seconds
|
|
111
|
+
endTime: number; // in seconds
|
|
112
|
+
title: string;
|
|
113
|
+
description?: string;
|
|
114
|
+
linkedPaneId?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type TupleValue = string | number | boolean;
|
|
118
|
+
export type Tuple =
|
|
119
|
+
| [TupleValue]
|
|
120
|
+
| [TupleValue, TupleValue]
|
|
121
|
+
| [TupleValue, TupleValue, TupleValue];
|
|
122
|
+
|
|
123
|
+
export type Tag =
|
|
124
|
+
| 'modal'
|
|
125
|
+
| 'parent'
|
|
126
|
+
| 'p'
|
|
127
|
+
| 'h2'
|
|
128
|
+
| 'h3'
|
|
129
|
+
| 'h4'
|
|
130
|
+
| 'h5'
|
|
131
|
+
| 'img'
|
|
132
|
+
| 'li'
|
|
133
|
+
| 'ol'
|
|
134
|
+
| 'ul'
|
|
135
|
+
| 'signup'
|
|
136
|
+
| 'yt'
|
|
137
|
+
| 'bunny'
|
|
138
|
+
| 'belief'
|
|
139
|
+
| 'identify'
|
|
140
|
+
| 'toggle'
|
|
141
|
+
| 'code';
|
|
142
|
+
|
|
143
|
+
export const tagTitles: Record<Tag, string> = {
|
|
144
|
+
p: 'Paragraph',
|
|
145
|
+
h2: 'Heading 2',
|
|
146
|
+
h3: 'Heading 3',
|
|
147
|
+
h4: 'Heading 4',
|
|
148
|
+
h5: 'Heading 5',
|
|
149
|
+
img: 'Image',
|
|
150
|
+
code: 'Widget',
|
|
151
|
+
li: `List Item`,
|
|
152
|
+
ol: 'Outer Container',
|
|
153
|
+
ul: 'Outer Container',
|
|
154
|
+
parent: 'Pane Styles',
|
|
155
|
+
modal: 'Modal Styles',
|
|
156
|
+
signup: 'Email Signup Widget',
|
|
157
|
+
yt: 'YouTube Widget',
|
|
158
|
+
bunny: 'Bunny Video Widget',
|
|
159
|
+
belief: 'Belief Select Widget',
|
|
160
|
+
toggle: 'Belief Toggle Widget',
|
|
161
|
+
identify: 'Identify As Widget',
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export type NodeType =
|
|
165
|
+
| 'Root'
|
|
166
|
+
| 'Pane'
|
|
167
|
+
| 'StoryFragment'
|
|
168
|
+
| 'BgPane'
|
|
169
|
+
| 'Markdown'
|
|
170
|
+
| 'TagElement'
|
|
171
|
+
| 'TractStack'
|
|
172
|
+
| 'Menu'
|
|
173
|
+
| 'Impression'
|
|
174
|
+
| 'File'
|
|
175
|
+
| 'Belief'
|
|
176
|
+
| 'Resource';
|
|
177
|
+
|
|
178
|
+
export interface BaseNode {
|
|
179
|
+
id: string;
|
|
180
|
+
parentId: string | null;
|
|
181
|
+
nodeType: NodeType;
|
|
182
|
+
isChanged?: boolean;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface MenuLink {
|
|
186
|
+
name: string;
|
|
187
|
+
description: string;
|
|
188
|
+
featured: boolean;
|
|
189
|
+
actionLisp: string;
|
|
190
|
+
}
|
|
191
|
+
export interface MenuNode extends BaseNode {
|
|
192
|
+
title: string;
|
|
193
|
+
theme: string;
|
|
194
|
+
optionsPayload: MenuLink[];
|
|
195
|
+
nodeType: `Menu`;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface ImpressionNode extends BaseNode {
|
|
199
|
+
nodeType: 'Impression';
|
|
200
|
+
tagName: 'impression';
|
|
201
|
+
title: string;
|
|
202
|
+
body: string;
|
|
203
|
+
buttonText: string;
|
|
204
|
+
actionsLisp: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface PaneNode extends BaseNode {
|
|
208
|
+
title: string;
|
|
209
|
+
slug: string;
|
|
210
|
+
isDecorative: boolean;
|
|
211
|
+
created?: Date;
|
|
212
|
+
changed?: Date;
|
|
213
|
+
bgColour?: string;
|
|
214
|
+
isContextPane?: boolean;
|
|
215
|
+
heightOffsetDesktop?: number;
|
|
216
|
+
heightOffsetMobile?: number;
|
|
217
|
+
heightOffsetTablet?: number;
|
|
218
|
+
heightRatioDesktop?: string;
|
|
219
|
+
heightRatioMobile?: string;
|
|
220
|
+
heightRatioTablet?: string;
|
|
221
|
+
codeHookTarget?: string;
|
|
222
|
+
codeHookPayload?: {
|
|
223
|
+
[key: string]: string;
|
|
224
|
+
};
|
|
225
|
+
heldBeliefs?: BeliefDatum;
|
|
226
|
+
withheldBeliefs?: BeliefDatum;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface StoryFragmentNode extends BaseNode {
|
|
230
|
+
title: string;
|
|
231
|
+
slug: string;
|
|
232
|
+
tractStackId?: string;
|
|
233
|
+
paneIds: string[];
|
|
234
|
+
menuId?: string;
|
|
235
|
+
tailwindBgColour?: string;
|
|
236
|
+
socialImagePath?: string | null;
|
|
237
|
+
created?: Date;
|
|
238
|
+
changed?: Date;
|
|
239
|
+
impressions?: ImpressionNode[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface TractStackNode extends BaseNode {
|
|
243
|
+
title: string;
|
|
244
|
+
slug: string;
|
|
245
|
+
socialImagePath?: string;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface PaneFragmentNode extends BaseNode {
|
|
249
|
+
type: 'markdown' | 'visual-break' | 'background-image' | 'artpack-image';
|
|
250
|
+
hiddenViewportMobile?: boolean;
|
|
251
|
+
hiddenViewportTablet?: boolean;
|
|
252
|
+
hiddenViewportDesktop?: boolean;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface MarkdownPaneFragmentNode extends PaneFragmentNode {
|
|
256
|
+
type: 'markdown';
|
|
257
|
+
markdownId: string;
|
|
258
|
+
defaultClasses?: Record<
|
|
259
|
+
string,
|
|
260
|
+
{
|
|
261
|
+
mobile: Record<string, string>;
|
|
262
|
+
tablet: Record<string, string>;
|
|
263
|
+
desktop: Record<string, string>;
|
|
264
|
+
}
|
|
265
|
+
>;
|
|
266
|
+
parentClasses?: ParentClassesPayload;
|
|
267
|
+
parentCss?: string[];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface ArtpackImageNode extends PaneFragmentNode {
|
|
271
|
+
type: 'artpack-image';
|
|
272
|
+
collection: string;
|
|
273
|
+
image: string;
|
|
274
|
+
src: string;
|
|
275
|
+
srcSet?: string;
|
|
276
|
+
alt?: string;
|
|
277
|
+
objectFit: 'cover' | 'contain' | 'fill';
|
|
278
|
+
position?: 'background' | 'left' | 'right' | 'leftBleed' | 'rightBleed';
|
|
279
|
+
size?: 'equal' | 'narrow' | 'wide';
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface BgImageNode extends PaneFragmentNode {
|
|
283
|
+
type: 'background-image';
|
|
284
|
+
fileId: string;
|
|
285
|
+
src: string;
|
|
286
|
+
srcSet?: string;
|
|
287
|
+
alt?: string;
|
|
288
|
+
base64Data?: string;
|
|
289
|
+
objectFit: 'cover' | 'contain' | 'fill';
|
|
290
|
+
position?: 'background' | 'left' | 'right' | 'leftBleed' | 'rightBleed';
|
|
291
|
+
size?: 'equal' | 'narrow' | 'wide';
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface VisualBreakData {
|
|
295
|
+
collection: string;
|
|
296
|
+
image: string;
|
|
297
|
+
svgFill: string;
|
|
298
|
+
}
|
|
299
|
+
export interface VisualBreakNode extends PaneFragmentNode {
|
|
300
|
+
type: 'visual-break';
|
|
301
|
+
breakDesktop?: VisualBreakData;
|
|
302
|
+
breakTablet?: VisualBreakData;
|
|
303
|
+
breakMobile?: VisualBreakData;
|
|
304
|
+
hiddenViewportDesktop?: boolean;
|
|
305
|
+
hiddenViewportTablet?: boolean;
|
|
306
|
+
hiddenViewportMobile?: boolean;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface ImageFileNode extends BaseNode {
|
|
310
|
+
filename: string;
|
|
311
|
+
altDescription: string;
|
|
312
|
+
src: string;
|
|
313
|
+
nodeType: `File`;
|
|
314
|
+
srcSet?: string;
|
|
315
|
+
position?: string;
|
|
316
|
+
size?: string;
|
|
317
|
+
base64Data?: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface ResourceNode extends BaseNode {
|
|
321
|
+
title: string;
|
|
322
|
+
slug: string;
|
|
323
|
+
oneliner: string;
|
|
324
|
+
optionsPayload: any;
|
|
325
|
+
category?: string;
|
|
326
|
+
actionLisp?: string;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface BeliefNode extends BaseNode {
|
|
330
|
+
title: string;
|
|
331
|
+
slug: string;
|
|
332
|
+
scale: string;
|
|
333
|
+
customValues?: string[];
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export interface FlatNode extends BaseNode {
|
|
337
|
+
tagName: string;
|
|
338
|
+
tagNameCustom?: string;
|
|
339
|
+
copy?: string;
|
|
340
|
+
src?: string;
|
|
341
|
+
srcSet?: string;
|
|
342
|
+
base64Data?: string;
|
|
343
|
+
alt?: string;
|
|
344
|
+
href?: string;
|
|
345
|
+
text?: string;
|
|
346
|
+
fileId?: string;
|
|
347
|
+
isPlaceholder?: boolean;
|
|
348
|
+
codeHookParams?: (string | string[])[];
|
|
349
|
+
overrideClasses?: {
|
|
350
|
+
mobile?: Record<string, string>;
|
|
351
|
+
tablet?: Record<string, string>;
|
|
352
|
+
desktop?: Record<string, string>;
|
|
353
|
+
};
|
|
354
|
+
elementCss?: string;
|
|
355
|
+
buttonPayload?: {
|
|
356
|
+
buttonClasses: Record<string, string[]>;
|
|
357
|
+
buttonHoverClasses: Record<string, string[]>;
|
|
358
|
+
callbackPayload: string;
|
|
359
|
+
isExternalUrl?: boolean;
|
|
360
|
+
bunnyPayload?: {
|
|
361
|
+
t: string;
|
|
362
|
+
videoId: string | null;
|
|
363
|
+
slug?: string;
|
|
364
|
+
isContext?: boolean;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export type TemplateNode = FlatNode & {
|
|
370
|
+
id?: string;
|
|
371
|
+
parentId?: string;
|
|
372
|
+
tagName?: string;
|
|
373
|
+
nodes?: TemplateNode[];
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
export type TemplateMarkdown = MarkdownPaneFragmentNode & {
|
|
377
|
+
nodes?: TemplateNode[];
|
|
378
|
+
markdownBody?: string;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
export type TemplatePane = PaneNode & {
|
|
382
|
+
id?: string;
|
|
383
|
+
parentId?: string;
|
|
384
|
+
markdown?: TemplateMarkdown;
|
|
385
|
+
bgPane?: VisualBreakNode | ArtpackImageNode;
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
export interface LinkNode extends FlatNode {
|
|
389
|
+
tagName: 'a' | 'button';
|
|
390
|
+
buttonPayload?: {
|
|
391
|
+
buttonClasses: Record<string, string[]>;
|
|
392
|
+
buttonHoverClasses: Record<string, string[]>;
|
|
393
|
+
callbackPayload: string;
|
|
394
|
+
isExternalUrl?: boolean;
|
|
395
|
+
bunnyPayload?: {
|
|
396
|
+
t: string;
|
|
397
|
+
videoId: string | null;
|
|
398
|
+
slug?: string;
|
|
399
|
+
isContext?: boolean;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export type LoadData = {
|
|
405
|
+
fileNodes?: ImageFileNode[];
|
|
406
|
+
menuNodes?: MenuNode[];
|
|
407
|
+
resourceNodes?: ResourceNode[];
|
|
408
|
+
storyfragmentNodes?: StoryFragmentNode[];
|
|
409
|
+
paneNodes?: PaneNode[];
|
|
410
|
+
tractstackNodes?: TractStackNode[];
|
|
411
|
+
childNodes?: (BaseNode | FlatNode)[];
|
|
412
|
+
paneFragmentNodes?: PaneFragmentNode[];
|
|
413
|
+
flatNodes?: FlatNode[];
|
|
414
|
+
impressionNodes?: ImpressionNode[];
|
|
415
|
+
beliefNodes?: BeliefNode[];
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
export type PageDesign = {
|
|
419
|
+
// TODO: fix TemplatePane to allow required fn
|
|
420
|
+
id: string;
|
|
421
|
+
title: string;
|
|
422
|
+
introDesign: any; // Will be TemplatePane
|
|
423
|
+
contentDesign: any; // Will be TemplatePane
|
|
424
|
+
visualBreaks?: {
|
|
425
|
+
odd: any; // Will be TemplatePane
|
|
426
|
+
even: any; // Will be TemplatePane
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
export interface BasePanelProps {
|
|
431
|
+
node: FlatNode | null;
|
|
432
|
+
config?: BrandConfig | null;
|
|
433
|
+
parentNode?: FlatNode;
|
|
434
|
+
containerNode?: FlatNode;
|
|
435
|
+
outerContainerNode?: FlatNode;
|
|
436
|
+
layer?: number;
|
|
437
|
+
className?: string;
|
|
438
|
+
childId?: string;
|
|
439
|
+
availableCodeHooks?: string[];
|
|
440
|
+
onTitleChange?: (title: string) => void;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
interface WidgetParameterDefinition {
|
|
444
|
+
label: string;
|
|
445
|
+
defaultValue: string;
|
|
446
|
+
type: 'string' | 'boolean' | 'scale' | 'multi-string';
|
|
447
|
+
isBeliefTag?: boolean;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export interface WidgetMeta {
|
|
451
|
+
[key: string]: {
|
|
452
|
+
title: string;
|
|
453
|
+
parameters: WidgetParameterDefinition[];
|
|
454
|
+
isBelief?: boolean;
|
|
455
|
+
};
|
|
456
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// Base props interface for all atomic form components
|
|
2
|
+
export interface BaseFormComponentProps<T> {
|
|
3
|
+
value: T;
|
|
4
|
+
onChange: (value: T) => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// String input specific props
|
|
13
|
+
export interface StringInputProps extends BaseFormComponentProps<string> {
|
|
14
|
+
type?: 'text' | 'email' | 'url' | 'password';
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
autoComplete?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// String array input props (for tags/chips)
|
|
20
|
+
export interface StringArrayInputProps
|
|
21
|
+
extends BaseFormComponentProps<string[]> {
|
|
22
|
+
maxItems?: number;
|
|
23
|
+
allowDuplicates?: boolean;
|
|
24
|
+
separator?: string; // For parsing pasted content
|
|
25
|
+
suggestions?: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Boolean toggle props
|
|
29
|
+
export interface BooleanToggleProps extends BaseFormComponentProps<boolean> {
|
|
30
|
+
size?: 'sm' | 'md' | 'lg';
|
|
31
|
+
variant?: 'switch' | 'checkbox';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Enum select props
|
|
35
|
+
export interface EnumSelectProps extends BaseFormComponentProps<string> {
|
|
36
|
+
options: Array<{
|
|
37
|
+
value: string;
|
|
38
|
+
label: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
clearable?: boolean;
|
|
42
|
+
searchable?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Color picker props
|
|
46
|
+
export interface ColorPickerProps extends BaseFormComponentProps<string> {
|
|
47
|
+
format?: 'hex' | 'rgb' | 'hsl';
|
|
48
|
+
showAlpha?: boolean;
|
|
49
|
+
presetColors?: string[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// File upload props
|
|
53
|
+
export interface FileUploadProps extends BaseFormComponentProps<string> {
|
|
54
|
+
accept?: string;
|
|
55
|
+
maxSize?: number; // in bytes
|
|
56
|
+
preview?: boolean;
|
|
57
|
+
encoding?: 'base64' | 'url';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Number input props
|
|
61
|
+
export interface NumberInputProps extends BaseFormComponentProps<number> {
|
|
62
|
+
min?: number;
|
|
63
|
+
max?: number;
|
|
64
|
+
step?: number;
|
|
65
|
+
precision?: number;
|
|
66
|
+
allowFloat?: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Form section props (for composed form sections)
|
|
70
|
+
export interface FormSectionProps {
|
|
71
|
+
title: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
collapsible?: boolean;
|
|
75
|
+
defaultExpanded?: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Form actions props
|
|
79
|
+
export interface FormActionsProps {
|
|
80
|
+
onSave: () => void;
|
|
81
|
+
onCancel: () => void;
|
|
82
|
+
saveLabel?: string;
|
|
83
|
+
cancelLabel?: string;
|
|
84
|
+
saveDisabled?: boolean;
|
|
85
|
+
cancelDisabled?: boolean;
|
|
86
|
+
isLoading?: boolean;
|
|
87
|
+
isDirty?: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Brand-specific form section props
|
|
91
|
+
export interface BrandFormSectionProps<T> {
|
|
92
|
+
formState: {
|
|
93
|
+
state: T;
|
|
94
|
+
updateField: (field: keyof T, value: any) => void;
|
|
95
|
+
errors: Record<string, string | undefined>;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Social link entry type
|
|
100
|
+
export interface SocialLink {
|
|
101
|
+
platform: string;
|
|
102
|
+
url: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// File upload result type
|
|
106
|
+
export interface FileUploadResult {
|
|
107
|
+
content: string; // base64 or URL
|
|
108
|
+
name: string;
|
|
109
|
+
size: number;
|
|
110
|
+
type: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Validation result type
|
|
114
|
+
export interface ValidationResult {
|
|
115
|
+
isValid: boolean;
|
|
116
|
+
errors: Record<string, string>;
|
|
117
|
+
warnings?: Record<string, string>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type AllowedImageFormat =
|
|
121
|
+
| 'svg'
|
|
122
|
+
| 'ico'
|
|
123
|
+
| 'png'
|
|
124
|
+
| 'jpg'
|
|
125
|
+
| 'jpeg'
|
|
126
|
+
| 'webp'
|
|
127
|
+
| 'gif';
|
|
128
|
+
|
|
129
|
+
export interface ImageDimensions {
|
|
130
|
+
width: number;
|
|
131
|
+
height: number;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Base props interface for all atomic form components
|
|
135
|
+
export interface BaseFormComponentProps<T> {
|
|
136
|
+
value: T;
|
|
137
|
+
onChange: (value: T) => void;
|
|
138
|
+
label?: string;
|
|
139
|
+
error?: string;
|
|
140
|
+
disabled?: boolean;
|
|
141
|
+
placeholder?: string;
|
|
142
|
+
className?: string;
|
|
143
|
+
required?: boolean;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// String input specific props
|
|
147
|
+
export interface StringInputProps extends BaseFormComponentProps<string> {
|
|
148
|
+
type?: 'text' | 'email' | 'url' | 'password';
|
|
149
|
+
maxLength?: number;
|
|
150
|
+
autoComplete?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// String array input props (for tags/chips)
|
|
154
|
+
export interface StringArrayInputProps
|
|
155
|
+
extends BaseFormComponentProps<string[]> {
|
|
156
|
+
maxItems?: number;
|
|
157
|
+
allowDuplicates?: boolean;
|
|
158
|
+
separator?: string; // For parsing pasted content
|
|
159
|
+
suggestions?: string[];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Boolean toggle props
|
|
163
|
+
export interface BooleanToggleProps extends BaseFormComponentProps<boolean> {
|
|
164
|
+
size?: 'sm' | 'md' | 'lg';
|
|
165
|
+
variant?: 'switch' | 'checkbox';
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Enum select props
|
|
169
|
+
export interface EnumSelectProps extends BaseFormComponentProps<string> {
|
|
170
|
+
options: Array<{
|
|
171
|
+
value: string;
|
|
172
|
+
label: string;
|
|
173
|
+
disabled?: boolean;
|
|
174
|
+
}>;
|
|
175
|
+
clearable?: boolean;
|
|
176
|
+
searchable?: boolean;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Color picker props
|
|
180
|
+
export interface ColorPickerProps extends BaseFormComponentProps<string> {
|
|
181
|
+
format?: 'hex' | 'rgb' | 'hsl';
|
|
182
|
+
showAlpha?: boolean;
|
|
183
|
+
presetColors?: string[];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Enhanced file upload props with advanced image processing
|
|
187
|
+
export interface FileUploadProps extends BaseFormComponentProps<string> {
|
|
188
|
+
// Basic options
|
|
189
|
+
accept?: string;
|
|
190
|
+
maxSizeKB?: number;
|
|
191
|
+
showPreview?: boolean;
|
|
192
|
+
previewAlt?: string;
|
|
193
|
+
|
|
194
|
+
// Enhanced validation options
|
|
195
|
+
allowedFormats?: AllowedImageFormat[];
|
|
196
|
+
requiredDimensions?: ImageDimensions;
|
|
197
|
+
allowAnyImageWithWarning?: boolean;
|
|
198
|
+
|
|
199
|
+
// Auto-processing options
|
|
200
|
+
autoResize?: ImageDimensions;
|
|
201
|
+
imageQuality?: number; // 0.1 to 1.0 for JPEG compression
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Number input props
|
|
205
|
+
export interface NumberInputProps extends BaseFormComponentProps<number> {
|
|
206
|
+
min?: number;
|
|
207
|
+
max?: number;
|
|
208
|
+
step?: number;
|
|
209
|
+
precision?: number;
|
|
210
|
+
allowFloat?: boolean;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Form section props (for composed form sections)
|
|
214
|
+
export interface FormSectionProps {
|
|
215
|
+
title: string;
|
|
216
|
+
description?: string;
|
|
217
|
+
children: React.ReactNode;
|
|
218
|
+
collapsible?: boolean;
|
|
219
|
+
defaultExpanded?: boolean;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Form actions props
|
|
223
|
+
export interface FormActionsProps {
|
|
224
|
+
onSave: () => void;
|
|
225
|
+
onCancel: () => void;
|
|
226
|
+
saveLabel?: string;
|
|
227
|
+
cancelLabel?: string;
|
|
228
|
+
saveDisabled?: boolean;
|
|
229
|
+
cancelDisabled?: boolean;
|
|
230
|
+
isLoading?: boolean;
|
|
231
|
+
isDirty?: boolean;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Brand-specific form section props
|
|
235
|
+
export interface BrandFormSectionProps<T> {
|
|
236
|
+
formState: {
|
|
237
|
+
state: T;
|
|
238
|
+
updateField: (field: keyof T, value: any) => void;
|
|
239
|
+
errors: Record<string, string | undefined>;
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Social link entry type
|
|
244
|
+
export interface SocialLink {
|
|
245
|
+
platform: string;
|
|
246
|
+
url: string;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Enhanced file upload result type
|
|
250
|
+
export interface FileUploadResult {
|
|
251
|
+
content: string; // base64 or URL
|
|
252
|
+
name: string;
|
|
253
|
+
size: number;
|
|
254
|
+
type: string;
|
|
255
|
+
originalDimensions?: ImageDimensions;
|
|
256
|
+
finalDimensions?: ImageDimensions;
|
|
257
|
+
warnings?: string[];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Validation result type
|
|
261
|
+
export interface ValidationResult {
|
|
262
|
+
isValid: boolean;
|
|
263
|
+
errors: Record<string, string>;
|
|
264
|
+
warnings?: Record<string, string>;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Image processing result type
|
|
268
|
+
export interface ImageProcessingResult {
|
|
269
|
+
processedFile: string; // base64
|
|
270
|
+
warnings: string[];
|
|
271
|
+
originalDimensions: ImageDimensions;
|
|
272
|
+
finalDimensions: ImageDimensions;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// File validation options type
|
|
276
|
+
export interface FileValidationOptions {
|
|
277
|
+
maxSizeKB?: number;
|
|
278
|
+
allowedFormats?: AllowedImageFormat[];
|
|
279
|
+
requiredDimensions?: ImageDimensions;
|
|
280
|
+
allowAnyImageWithWarning?: boolean;
|
|
281
|
+
}
|