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,118 @@
|
|
|
1
|
+
import type { BgImageNode, ViewportKey } from '@/types/compositorTypes';
|
|
2
|
+
|
|
3
|
+
interface BgImageProps {
|
|
4
|
+
payload: BgImageNode;
|
|
5
|
+
viewportKey?: ViewportKey;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const BgImage = ({ payload, viewportKey }: BgImageProps) => {
|
|
9
|
+
// Use base64Data if available (pending upload), otherwise use src (uploaded file)
|
|
10
|
+
const imageSrc = payload.base64Data || payload.src;
|
|
11
|
+
|
|
12
|
+
// Helper to check if the image should be hidden on a specific viewport
|
|
13
|
+
const isHiddenOnViewport = (
|
|
14
|
+
viewport: 'Mobile' | 'Tablet' | 'Desktop'
|
|
15
|
+
): boolean => {
|
|
16
|
+
const key = `hiddenViewport${viewport}` as keyof BgImageNode;
|
|
17
|
+
return !!payload[key];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Check if we should render as normal image
|
|
21
|
+
const isFlexImage =
|
|
22
|
+
payload.position === 'left' || payload.position === 'right';
|
|
23
|
+
|
|
24
|
+
// For viewport-specific rendering
|
|
25
|
+
if (
|
|
26
|
+
viewportKey === 'mobile' ||
|
|
27
|
+
viewportKey === 'tablet' ||
|
|
28
|
+
viewportKey === 'desktop'
|
|
29
|
+
) {
|
|
30
|
+
const viewportCapitalized =
|
|
31
|
+
viewportKey.charAt(0).toUpperCase() + viewportKey.slice(1);
|
|
32
|
+
const hiddenViewportKey =
|
|
33
|
+
`hiddenViewport${viewportCapitalized}` as keyof BgImageNode;
|
|
34
|
+
|
|
35
|
+
// Skip rendering if this viewport should be hidden
|
|
36
|
+
if (payload[hiddenViewportKey]) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (isFlexImage) {
|
|
41
|
+
return (
|
|
42
|
+
<img
|
|
43
|
+
src={imageSrc}
|
|
44
|
+
{...(payload.srcSet ? { srcSet: payload.srcSet } : {})}
|
|
45
|
+
alt={payload.alt || 'Background image'}
|
|
46
|
+
className={`h-full w-full object-${payload.objectFit || 'cover'}`}
|
|
47
|
+
style={{ objectFit: payload.objectFit || 'cover' }}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div
|
|
54
|
+
className="absolute left-0 top-0 h-full w-full"
|
|
55
|
+
style={{
|
|
56
|
+
backgroundImage: `url(${imageSrc})`,
|
|
57
|
+
backgroundSize: payload.objectFit || 'cover',
|
|
58
|
+
backgroundRepeat: 'no-repeat',
|
|
59
|
+
backgroundPosition: 'center',
|
|
60
|
+
zIndex: 0,
|
|
61
|
+
}}
|
|
62
|
+
role="img"
|
|
63
|
+
aria-label={payload.alt || 'Background image'}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Build responsive class based on visibility settings
|
|
69
|
+
const buildResponsiveClass = (): string => {
|
|
70
|
+
const hiddenMobile = isHiddenOnViewport('Mobile');
|
|
71
|
+
const hiddenTablet = isHiddenOnViewport('Tablet');
|
|
72
|
+
const hiddenDesktop = isHiddenOnViewport('Desktop');
|
|
73
|
+
|
|
74
|
+
const classes = [];
|
|
75
|
+
|
|
76
|
+
if (hiddenMobile) classes.push('hidden xs:hidden');
|
|
77
|
+
else classes.push('block');
|
|
78
|
+
|
|
79
|
+
if (hiddenTablet) classes.push('md:hidden');
|
|
80
|
+
else if (hiddenMobile) classes.push('md:block');
|
|
81
|
+
|
|
82
|
+
if (hiddenDesktop) classes.push('xl:hidden');
|
|
83
|
+
else if (hiddenTablet) classes.push('xl:block');
|
|
84
|
+
|
|
85
|
+
return classes.join(' ');
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Render based on position
|
|
89
|
+
if (isFlexImage) {
|
|
90
|
+
return (
|
|
91
|
+
<img
|
|
92
|
+
src={imageSrc}
|
|
93
|
+
{...(payload.srcSet ? { srcSet: payload.srcSet } : {})}
|
|
94
|
+
alt={payload.alt || 'Background image'}
|
|
95
|
+
className={`h-full w-full object-${payload.objectFit || 'cover'} ${buildResponsiveClass()}`}
|
|
96
|
+
style={{ objectFit: payload.objectFit || 'cover' }}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Render as background (default)
|
|
102
|
+
return (
|
|
103
|
+
<div
|
|
104
|
+
className={`absolute left-0 top-0 h-full w-full ${buildResponsiveClass()}`}
|
|
105
|
+
style={{
|
|
106
|
+
backgroundImage: `url(${imageSrc})`,
|
|
107
|
+
backgroundSize: payload.objectFit || 'cover',
|
|
108
|
+
backgroundRepeat: 'no-repeat',
|
|
109
|
+
backgroundPosition: 'center',
|
|
110
|
+
zIndex: 0,
|
|
111
|
+
}}
|
|
112
|
+
role="img"
|
|
113
|
+
aria-label={payload.alt || 'Background image'}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export default BgImage;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Svg } from './Svg';
|
|
2
|
+
import type { VisualBreakNode, ViewportKey } from '@/types/compositorTypes';
|
|
3
|
+
|
|
4
|
+
interface BgPaneProps {
|
|
5
|
+
payload: VisualBreakNode;
|
|
6
|
+
viewportKey: ViewportKey;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const BgPane = ({ payload, viewportKey }: BgPaneProps) => {
|
|
10
|
+
// For specific viewport rendering
|
|
11
|
+
if (
|
|
12
|
+
viewportKey === 'mobile' ||
|
|
13
|
+
viewportKey === 'tablet' ||
|
|
14
|
+
viewportKey === 'desktop'
|
|
15
|
+
) {
|
|
16
|
+
const capitalizedViewport =
|
|
17
|
+
viewportKey.charAt(0).toUpperCase() + viewportKey.slice(1);
|
|
18
|
+
const hiddenViewportKey =
|
|
19
|
+
`hiddenViewport${capitalizedViewport}` as keyof VisualBreakNode;
|
|
20
|
+
const breakKey = `break${capitalizedViewport}` as keyof VisualBreakNode;
|
|
21
|
+
|
|
22
|
+
// Check if this viewport should be hidden
|
|
23
|
+
if (payload[hiddenViewportKey]) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const breakData = payload[breakKey] as
|
|
28
|
+
| {
|
|
29
|
+
collection: string;
|
|
30
|
+
image: string;
|
|
31
|
+
svgFill: string;
|
|
32
|
+
}
|
|
33
|
+
| undefined;
|
|
34
|
+
|
|
35
|
+
if (!breakData) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return (
|
|
39
|
+
<div className="grid" style={{ fill: breakData.svgFill || 'none' }}>
|
|
40
|
+
<Svg
|
|
41
|
+
shapeName={`${breakData.collection}${breakData.image}`}
|
|
42
|
+
viewportKey={viewportKey}
|
|
43
|
+
id={`${viewportKey}-${breakData.collection}${breakData.image}`}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// For responsive rendering
|
|
50
|
+
const baseClasses = {
|
|
51
|
+
mobile: 'md:hidden',
|
|
52
|
+
tablet: 'hidden md:block xl:hidden',
|
|
53
|
+
desktop: 'hidden xl:block',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const breakpoints = ['mobile', 'tablet', 'desktop'] as const;
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<>
|
|
60
|
+
{breakpoints.map((breakpoint) => {
|
|
61
|
+
const capitalizedBreakpoint =
|
|
62
|
+
breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1);
|
|
63
|
+
const hiddenViewportKey =
|
|
64
|
+
`hiddenViewport${capitalizedBreakpoint}` as keyof VisualBreakNode;
|
|
65
|
+
|
|
66
|
+
if (payload[hiddenViewportKey]) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const breakData = payload[
|
|
71
|
+
`break${capitalizedBreakpoint}` as keyof VisualBreakNode
|
|
72
|
+
] as
|
|
73
|
+
| {
|
|
74
|
+
collection: string;
|
|
75
|
+
image: string;
|
|
76
|
+
svgFill: string;
|
|
77
|
+
}
|
|
78
|
+
| undefined;
|
|
79
|
+
|
|
80
|
+
if (!breakData) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div
|
|
86
|
+
key={breakpoint}
|
|
87
|
+
className={baseClasses[breakpoint]}
|
|
88
|
+
style={{ fill: breakData.svgFill || 'none' }}
|
|
89
|
+
>
|
|
90
|
+
<Svg
|
|
91
|
+
shapeName={`${breakData.collection}${breakData.image}`}
|
|
92
|
+
viewportKey={breakpoint}
|
|
93
|
+
id={`${breakpoint}-${breakData.collection}${breakData.image}`}
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
})}
|
|
98
|
+
</>
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default BgPane;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
interface BunnyVideoProps {
|
|
2
|
+
embedUrl: string;
|
|
3
|
+
title: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const BunnyVideo = ({ embedUrl, title, className = '' }: BunnyVideoProps) => {
|
|
8
|
+
// Check if a string is a valid URL
|
|
9
|
+
const isValidUrl = (url: string): boolean => {
|
|
10
|
+
try {
|
|
11
|
+
new URL(url);
|
|
12
|
+
return true;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Render placeholder when URL is invalid
|
|
19
|
+
if (!isValidUrl(embedUrl)) {
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
className={`flex aspect-video w-full items-center justify-center bg-gray-100 ${className}`}
|
|
23
|
+
>
|
|
24
|
+
<div className="p-4 text-center">
|
|
25
|
+
<div className="text-mydarkgrey mb-2">Video URL not set</div>
|
|
26
|
+
<div className="text-mygrey text-sm">
|
|
27
|
+
Configure this widget with a valid Bunny Stream URL
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Build URL with default parameters for preview
|
|
35
|
+
let videoUrl;
|
|
36
|
+
try {
|
|
37
|
+
videoUrl = new URL(embedUrl);
|
|
38
|
+
videoUrl.searchParams.set('autoplay', '0');
|
|
39
|
+
videoUrl.searchParams.set('preload', 'false');
|
|
40
|
+
videoUrl.searchParams.set('responsive', 'true');
|
|
41
|
+
} catch (e) {
|
|
42
|
+
return (
|
|
43
|
+
<div
|
|
44
|
+
className={`flex aspect-video w-full items-center justify-center bg-gray-100 ${className}`}
|
|
45
|
+
>
|
|
46
|
+
<div className="text-mydarkgrey text-center">Invalid video URL</div>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div className={`relative w-full ${className}`}>
|
|
53
|
+
<iframe
|
|
54
|
+
src={videoUrl.toString()}
|
|
55
|
+
className="aspect-video w-full"
|
|
56
|
+
title={title}
|
|
57
|
+
allow="autoplay; fullscreen"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default BunnyVideo;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { classNames } from '@/utils/helpers';
|
|
2
|
+
|
|
3
|
+
const SingleIdentifyAs = ({
|
|
4
|
+
value,
|
|
5
|
+
noprompt,
|
|
6
|
+
}: {
|
|
7
|
+
value: { slug: string; target: string; extra: string };
|
|
8
|
+
noprompt: boolean;
|
|
9
|
+
}) => {
|
|
10
|
+
const thisTitle = noprompt ? `Tell me more!` : value.target;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className="mt-3 block w-fit">
|
|
14
|
+
<div
|
|
15
|
+
className={classNames(
|
|
16
|
+
`bg-gray-100 ring-orange-500 hover:bg-orange-200`,
|
|
17
|
+
`rounded-md px-3 py-2 text-lg text-black shadow-sm ring-1 ring-inset`
|
|
18
|
+
)}
|
|
19
|
+
>
|
|
20
|
+
<div className="flex items-center">
|
|
21
|
+
<span
|
|
22
|
+
aria-label="Color swatch for belief"
|
|
23
|
+
className={classNames(
|
|
24
|
+
`motion-safe:animate-pulse`,
|
|
25
|
+
`bg-orange-500`,
|
|
26
|
+
`inline-block h-2 w-2 flex-shrink-0 rounded-full`
|
|
27
|
+
)}
|
|
28
|
+
/>
|
|
29
|
+
<span className="ml-3 block w-fit whitespace-normal text-left">
|
|
30
|
+
{thisTitle}
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const IdentifyAs = ({
|
|
39
|
+
value,
|
|
40
|
+
classNames = '',
|
|
41
|
+
}: {
|
|
42
|
+
value: { slug: string; target: string; extra: string };
|
|
43
|
+
classNames: string;
|
|
44
|
+
}) => {
|
|
45
|
+
const targets =
|
|
46
|
+
typeof value.target === `string`
|
|
47
|
+
? value.target.split(',').map((t) => t.trim())
|
|
48
|
+
: value.target;
|
|
49
|
+
const extra = value && typeof value.extra === `string` ? value.extra : null;
|
|
50
|
+
const noprompt = extra === ``;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
{extra ? <span className={classNames}>{extra}</span> : null}
|
|
55
|
+
<div className="flex flex-wrap gap-2">
|
|
56
|
+
{targets.map((target, index) => (
|
|
57
|
+
<SingleIdentifyAs
|
|
58
|
+
key={`${value.slug}-${index}`}
|
|
59
|
+
value={{ ...value, target }}
|
|
60
|
+
noprompt={noprompt}
|
|
61
|
+
/>
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const PlayButton = () => {
|
|
2
|
+
return (
|
|
3
|
+
<svg
|
|
4
|
+
viewBox="0 0 459 459"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet"
|
|
7
|
+
className="inline-block"
|
|
8
|
+
style={{ height: `1em` }}
|
|
9
|
+
>
|
|
10
|
+
<path
|
|
11
|
+
d="M229.5,0C102.751,0,0,102.751,0,229.5S102.751,459,229.5,459S459,356.249,459,229.5S356.249,0,229.5,0z M310.292,239.651
|
|
12
|
+
l-111.764,76.084c-3.761,2.56-8.63,2.831-12.652,0.704c-4.022-2.128-6.538-6.305-6.538-10.855V153.416
|
|
13
|
+
c0-4.55,2.516-8.727,6.538-10.855c4.022-2.127,8.891-1.857,12.652,0.704l111.764,76.084c3.359,2.287,5.37,6.087,5.37,10.151
|
|
14
|
+
C315.662,233.564,313.652,237.364,310.292,239.651z"
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
/>
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Select } from '@ark-ui/react/select';
|
|
2
|
+
import { Portal } from '@ark-ui/react/portal';
|
|
3
|
+
import { createListCollection } from '@ark-ui/react/collection';
|
|
4
|
+
import ChevronUpDownIcon from '@heroicons/react/20/solid/ChevronUpDownIcon';
|
|
5
|
+
import CheckIcon from '@heroicons/react/20/solid/CheckIcon';
|
|
6
|
+
|
|
7
|
+
export interface SignupProps {
|
|
8
|
+
persona: string;
|
|
9
|
+
prompt: string;
|
|
10
|
+
clarifyConsent: boolean;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Static contact persona data
|
|
15
|
+
const contactPersona = [
|
|
16
|
+
{
|
|
17
|
+
id: 'major',
|
|
18
|
+
title: 'Major Updates Only',
|
|
19
|
+
description: 'Will only send major updates and do so infrequently.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'all',
|
|
23
|
+
title: 'All Updates',
|
|
24
|
+
description: 'Be fully in the know!',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'open',
|
|
28
|
+
title: 'DMs open',
|
|
29
|
+
description: "Leave your contact details and we'll get in touch!",
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export const SignUp = ({
|
|
34
|
+
persona,
|
|
35
|
+
prompt,
|
|
36
|
+
clarifyConsent,
|
|
37
|
+
id,
|
|
38
|
+
}: SignupProps) => {
|
|
39
|
+
// Static values for visual representation
|
|
40
|
+
const personaSelected =
|
|
41
|
+
contactPersona.find((p) => p.id === persona) || contactPersona[0];
|
|
42
|
+
|
|
43
|
+
// Create collection for Ark UI Select
|
|
44
|
+
const personaCollection = createListCollection({
|
|
45
|
+
items: contactPersona,
|
|
46
|
+
itemToValue: (item) => item.id,
|
|
47
|
+
itemToString: (item) => item.title,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className="rounded-md border border-gray-200 bg-white p-4 shadow-inner">
|
|
52
|
+
<h3 className="mb-4 text-lg font-bold text-gray-900">{prompt}</h3>
|
|
53
|
+
|
|
54
|
+
<form className="space-y-4">
|
|
55
|
+
<div>
|
|
56
|
+
<label
|
|
57
|
+
htmlFor={`${id}-firstname`}
|
|
58
|
+
className="mb-1 block text-sm font-bold text-gray-700"
|
|
59
|
+
>
|
|
60
|
+
First Name
|
|
61
|
+
</label>
|
|
62
|
+
<input
|
|
63
|
+
type="text"
|
|
64
|
+
id={`${id}-firstname`}
|
|
65
|
+
name="firstname"
|
|
66
|
+
placeholder="First name"
|
|
67
|
+
autoComplete="given-name"
|
|
68
|
+
disabled
|
|
69
|
+
className="w-full cursor-not-allowed rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 opacity-50 shadow-sm focus:border-cyan-600 focus:outline-none focus:ring-2 focus:ring-cyan-600"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div>
|
|
74
|
+
<label
|
|
75
|
+
htmlFor={`${id}-email`}
|
|
76
|
+
className="mb-1 block text-sm font-bold text-gray-700"
|
|
77
|
+
>
|
|
78
|
+
Email Address
|
|
79
|
+
</label>
|
|
80
|
+
<input
|
|
81
|
+
type="email"
|
|
82
|
+
id={`${id}-email`}
|
|
83
|
+
name="email"
|
|
84
|
+
placeholder="Email address"
|
|
85
|
+
autoComplete="email"
|
|
86
|
+
disabled
|
|
87
|
+
className="w-full cursor-not-allowed rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 opacity-50 shadow-sm focus:border-cyan-600 focus:outline-none focus:ring-2 focus:ring-cyan-600"
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div>
|
|
92
|
+
<label
|
|
93
|
+
htmlFor={`${id}-codeword`}
|
|
94
|
+
className="mb-1 block text-sm font-bold text-gray-700"
|
|
95
|
+
>
|
|
96
|
+
Code Word
|
|
97
|
+
</label>
|
|
98
|
+
<input
|
|
99
|
+
type="password"
|
|
100
|
+
id={`${id}-codeword`}
|
|
101
|
+
name="codeword"
|
|
102
|
+
placeholder="Choose a code word"
|
|
103
|
+
autoComplete="new-password"
|
|
104
|
+
disabled
|
|
105
|
+
className="w-full cursor-not-allowed rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 opacity-50 shadow-sm focus:border-cyan-600 focus:outline-none focus:ring-2 focus:ring-cyan-600"
|
|
106
|
+
/>
|
|
107
|
+
<p className="mt-1 text-xs text-gray-500">
|
|
108
|
+
Remember this code word to manage your preferences later.
|
|
109
|
+
</p>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
{clarifyConsent && (
|
|
113
|
+
<div>
|
|
114
|
+
<Select.Root
|
|
115
|
+
collection={personaCollection}
|
|
116
|
+
value={[personaSelected.id]}
|
|
117
|
+
positioning={{ sameWidth: true }}
|
|
118
|
+
disabled
|
|
119
|
+
>
|
|
120
|
+
<div className="mb-1 block text-sm font-bold text-gray-700">
|
|
121
|
+
Contact Preferences
|
|
122
|
+
</div>
|
|
123
|
+
<Select.Control className="relative">
|
|
124
|
+
<Select.Trigger className="relative w-full cursor-not-allowed rounded-md bg-white py-2 pl-3 pr-10 text-left opacity-50 shadow-md focus:outline-none">
|
|
125
|
+
<Select.ValueText className="block truncate">
|
|
126
|
+
{personaSelected.title}
|
|
127
|
+
</Select.ValueText>
|
|
128
|
+
<Select.Indicator className="absolute inset-y-0 right-0 flex items-center pr-2">
|
|
129
|
+
<ChevronUpDownIcon
|
|
130
|
+
className="h-5 w-5 text-gray-400"
|
|
131
|
+
aria-hidden="true"
|
|
132
|
+
/>
|
|
133
|
+
</Select.Indicator>
|
|
134
|
+
</Select.Trigger>
|
|
135
|
+
</Select.Control>
|
|
136
|
+
<Portal>
|
|
137
|
+
<Select.Positioner>
|
|
138
|
+
<Select.Content className="z-50 max-h-56 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm">
|
|
139
|
+
{personaCollection.items.map((option) => (
|
|
140
|
+
<Select.Item
|
|
141
|
+
key={option.id}
|
|
142
|
+
item={option}
|
|
143
|
+
className="relative cursor-default select-none py-2 pl-10 pr-4 text-black"
|
|
144
|
+
>
|
|
145
|
+
<div className="flex flex-col">
|
|
146
|
+
<Select.ItemText className="block truncate font-bold">
|
|
147
|
+
{option.title}
|
|
148
|
+
</Select.ItemText>
|
|
149
|
+
<span className="text-xs text-black">
|
|
150
|
+
{option.description}
|
|
151
|
+
</span>
|
|
152
|
+
</div>
|
|
153
|
+
<Select.ItemIndicator className="absolute inset-y-0 left-0 flex items-center pl-3 text-cyan-600">
|
|
154
|
+
<CheckIcon className="h-5 w-5" aria-hidden="true" />
|
|
155
|
+
</Select.ItemIndicator>
|
|
156
|
+
</Select.Item>
|
|
157
|
+
))}
|
|
158
|
+
</Select.Content>
|
|
159
|
+
</Select.Positioner>
|
|
160
|
+
</Portal>
|
|
161
|
+
</Select.Root>
|
|
162
|
+
</div>
|
|
163
|
+
)}
|
|
164
|
+
|
|
165
|
+
<div>
|
|
166
|
+
<button
|
|
167
|
+
type="button"
|
|
168
|
+
disabled
|
|
169
|
+
className="w-full cursor-not-allowed rounded-md bg-cyan-700 px-4 py-2 text-sm font-bold text-white opacity-50 shadow-sm"
|
|
170
|
+
>
|
|
171
|
+
Sign up
|
|
172
|
+
</button>
|
|
173
|
+
</div>
|
|
174
|
+
</form>
|
|
175
|
+
</div>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export default SignUp;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SvgBreaks } from '@/constants/shapes';
|
|
2
|
+
|
|
3
|
+
export const Svg = ({
|
|
4
|
+
shapeName,
|
|
5
|
+
viewportKey,
|
|
6
|
+
id,
|
|
7
|
+
}: {
|
|
8
|
+
shapeName: string;
|
|
9
|
+
viewportKey: string;
|
|
10
|
+
id: string;
|
|
11
|
+
}) => {
|
|
12
|
+
const shapeData =
|
|
13
|
+
//typeof SvgPanes[shapeName] !== `undefined` &&
|
|
14
|
+
// typeof SvgPanes[shapeName][viewportKey] !== `undefined`
|
|
15
|
+
// ? SvgPanes[shapeName][viewportKey]
|
|
16
|
+
// :
|
|
17
|
+
typeof SvgBreaks[shapeName] !== `undefined` ? SvgBreaks[shapeName] : null;
|
|
18
|
+
if (!shapeData) return <></>;
|
|
19
|
+
return (
|
|
20
|
+
<svg
|
|
21
|
+
id={`svg__${id}`}
|
|
22
|
+
data-name={`svg__${shapeName}--${viewportKey}`}
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
viewBox={`0 0 ${shapeData.viewBox[0]} ${shapeData.viewBox[1]}`}
|
|
25
|
+
className={`svg svg__${shapeName} svg__${shapeName}--${viewportKey}`}
|
|
26
|
+
>
|
|
27
|
+
<desc>decorative background</desc>
|
|
28
|
+
<g>
|
|
29
|
+
<path d={shapeData.path} />
|
|
30
|
+
</g>
|
|
31
|
+
</svg>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Switch } from '@ark-ui/react';
|
|
2
|
+
import { classNames } from '@/utils/helpers';
|
|
3
|
+
|
|
4
|
+
export const ToggleBelief = ({ prompt }: { prompt: string }) => {
|
|
5
|
+
return (
|
|
6
|
+
<div className={classNames(`mt-6 flex items-center`)}>
|
|
7
|
+
<Switch.Root
|
|
8
|
+
checked={false}
|
|
9
|
+
disabled={true}
|
|
10
|
+
className="inline-flex items-center"
|
|
11
|
+
>
|
|
12
|
+
<Switch.Control
|
|
13
|
+
className={classNames(
|
|
14
|
+
`bg-myblue`,
|
|
15
|
+
`relative inline-flex h-6 w-11 flex-shrink-0`,
|
|
16
|
+
`cursor-not-allowed opacity-50`,
|
|
17
|
+
`rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-cyan-600 focus:ring-offset-2`
|
|
18
|
+
)}
|
|
19
|
+
>
|
|
20
|
+
<Switch.Thumb
|
|
21
|
+
className={classNames(
|
|
22
|
+
`motion-safe:animate-wig translate-x-0`,
|
|
23
|
+
`pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow ring-0 transition-transform duration-200 ease-in-out`
|
|
24
|
+
)}
|
|
25
|
+
/>
|
|
26
|
+
</Switch.Control>
|
|
27
|
+
<Switch.HiddenInput />
|
|
28
|
+
<div className="ml-3 flex h-6 items-center">
|
|
29
|
+
<Switch.Label className="cursor-default">
|
|
30
|
+
<span>{prompt}</span>
|
|
31
|
+
</Switch.Label>
|
|
32
|
+
</div>
|
|
33
|
+
</Switch.Root>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const YouTubeWrapper = ({
|
|
2
|
+
embedCode,
|
|
3
|
+
title,
|
|
4
|
+
}: {
|
|
5
|
+
embedCode: string;
|
|
6
|
+
title: string;
|
|
7
|
+
}) => {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
style={{
|
|
11
|
+
position: 'relative',
|
|
12
|
+
width: '100%',
|
|
13
|
+
height: '0',
|
|
14
|
+
paddingBottom: '56.25%',
|
|
15
|
+
}}
|
|
16
|
+
>
|
|
17
|
+
<iframe
|
|
18
|
+
src={`https://www.youtube.com/embed/${embedCode}`}
|
|
19
|
+
title={title}
|
|
20
|
+
style={{
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
top: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
width: '100%',
|
|
25
|
+
height: '100%',
|
|
26
|
+
border: 'none',
|
|
27
|
+
}}
|
|
28
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
29
|
+
allowFullScreen
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { getCtx } from '@/stores/nodes';
|
|
2
|
+
import { viewportKeyStore } from '@/stores/storykeep';
|
|
3
|
+
import {
|
|
4
|
+
isBgImageNode,
|
|
5
|
+
isArtpackImageNode,
|
|
6
|
+
} from '@/utils/compositor/typeGuards';
|
|
7
|
+
import BgVisualBreak from '@/components/compositor/elements/BgVisualBreak';
|
|
8
|
+
import BgImage from '@/components/compositor/elements/BgImage';
|
|
9
|
+
import type { NodeProps } from '@/types/nodeProps';
|
|
10
|
+
import type { BgImageNode, VisualBreakNode } from '@/types/compositorTypes';
|
|
11
|
+
|
|
12
|
+
export const BgPaneWrapper = (props: NodeProps) => {
|
|
13
|
+
const node = getCtx(props).allNodes.get().get(props.nodeId);
|
|
14
|
+
if (!node) return null;
|
|
15
|
+
|
|
16
|
+
const viewport = viewportKeyStore.get().value;
|
|
17
|
+
|
|
18
|
+
const handleClick = (e: React.MouseEvent) => {
|
|
19
|
+
getCtx(props).setClickedNodeId(props.nodeId, true);
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
if (isBgImageNode(node) || isArtpackImageNode(node)) {
|
|
24
|
+
return <BgImage payload={node as BgImageNode} viewportKey={viewport} />;
|
|
25
|
+
} else {
|
|
26
|
+
return (
|
|
27
|
+
<div onClick={handleClick}>
|
|
28
|
+
<BgVisualBreak
|
|
29
|
+
payload={node as VisualBreakNode}
|
|
30
|
+
viewportKey={viewport}
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
};
|