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,1265 @@
|
|
|
1
|
+
import { ulid } from 'ulid';
|
|
2
|
+
import { getColor, tailwindToHex } from './tailwindColors';
|
|
3
|
+
import type { Theme } from '@/types/tractstack';
|
|
4
|
+
import type {
|
|
5
|
+
ArtpackImageNode,
|
|
6
|
+
TemplatePane,
|
|
7
|
+
ParentClassesPayload,
|
|
8
|
+
} from '@/types/compositorTypes';
|
|
9
|
+
|
|
10
|
+
const defaultMarkdownBody = `### tell us what happened\n\nyour story continues... and continues... and continues... and continues... and continues... and continues... with nice layout and typography.\n\n#### Add in those important details\n\nWrite for both the humans and for the search engine rankings!\n\nCapture attention and make moves.`;
|
|
11
|
+
const defaultSectionBody = `### An incredible journey awaits... An incredible journey awaits... An incredible journey awaits...`;
|
|
12
|
+
const defaultIntroBody = `## An incredible journey awaits\n\nAn incredible journey awaits... An incredible journey awaits...`;
|
|
13
|
+
const defaultImageHeroBody = `1. ## An incredible journey awaits\n\n* \n`;
|
|
14
|
+
|
|
15
|
+
export const templateCategories = [
|
|
16
|
+
{
|
|
17
|
+
id: 'all',
|
|
18
|
+
title: 'All designs',
|
|
19
|
+
getTemplates: (theme: Theme, brand: string, useOdd: boolean) => [
|
|
20
|
+
...templateCategories[1].getTemplates(theme, brand, useOdd),
|
|
21
|
+
...templateCategories[2].getTemplates(theme, brand, useOdd),
|
|
22
|
+
...templateCategories[3].getTemplates(theme, brand, useOdd),
|
|
23
|
+
...templateCategories[4].getTemplates(theme, brand, useOdd),
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'paragraph',
|
|
28
|
+
title: 'Tell your story',
|
|
29
|
+
getTemplates: (theme: Theme, brand: string, useOdd: boolean) => [
|
|
30
|
+
getJustCopyDesign(theme, brand, useOdd, false, `default`),
|
|
31
|
+
getJustCopyDesign(theme, brand, useOdd, true, `default`),
|
|
32
|
+
getJustCopyDesign(theme, brand, useOdd, false, `onecol`),
|
|
33
|
+
getJustCopyDesign(theme, brand, useOdd, true, `onecol`),
|
|
34
|
+
getJustCopyDesign(theme, brand, useOdd, false, `center`),
|
|
35
|
+
getJustCopyDesign(theme, brand, useOdd, true, `center`),
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'intro',
|
|
40
|
+
title: 'Page Intro sections',
|
|
41
|
+
getTemplates: (theme: Theme, brand: string, useOdd: boolean) => [
|
|
42
|
+
getIntroDesign(theme, brand, useOdd, false, `default`),
|
|
43
|
+
getIntroDesign(theme, brand, useOdd, true, `default`),
|
|
44
|
+
getIntroDesign(theme, brand, useOdd, false, `onecol`),
|
|
45
|
+
getIntroDesign(theme, brand, useOdd, true, `onecol`),
|
|
46
|
+
getIntroDesign(theme, brand, useOdd, false, `center`),
|
|
47
|
+
getIntroDesign(theme, brand, useOdd, true, `center`),
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'section',
|
|
52
|
+
title: 'Sub-title sections',
|
|
53
|
+
getTemplates: (theme: Theme, brand: string, useOdd: boolean) => [
|
|
54
|
+
getSubTitleDesign(theme, brand, useOdd, false, `default`),
|
|
55
|
+
getSubTitleDesign(theme, brand, useOdd, true, `default`),
|
|
56
|
+
getSubTitleDesign(theme, brand, useOdd, false, `onecol`),
|
|
57
|
+
getSubTitleDesign(theme, brand, useOdd, true, `onecol`),
|
|
58
|
+
getSubTitleDesign(theme, brand, useOdd, false, `center`),
|
|
59
|
+
getSubTitleDesign(theme, brand, useOdd, true, `center`),
|
|
60
|
+
getSubTitleDesign(theme, brand, useOdd, false, `default-brand`),
|
|
61
|
+
getSubTitleDesign(theme, brand, useOdd, false, `onecol-brand`),
|
|
62
|
+
getSubTitleDesign(theme, brand, useOdd, false, `center-brand`),
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'with-background',
|
|
67
|
+
title: 'With Background Image',
|
|
68
|
+
getTemplates: (theme: Theme, brand: string, useOdd: boolean) => [
|
|
69
|
+
getWithArtpackImageDesign(
|
|
70
|
+
getSubTitleDesign,
|
|
71
|
+
theme,
|
|
72
|
+
brand,
|
|
73
|
+
useOdd,
|
|
74
|
+
't8k',
|
|
75
|
+
'blast',
|
|
76
|
+
'cover',
|
|
77
|
+
true,
|
|
78
|
+
'default'
|
|
79
|
+
),
|
|
80
|
+
getWithArtpackImageDesign(
|
|
81
|
+
getSubTitleDesign,
|
|
82
|
+
theme,
|
|
83
|
+
brand,
|
|
84
|
+
useOdd,
|
|
85
|
+
't8k',
|
|
86
|
+
'blast',
|
|
87
|
+
'cover',
|
|
88
|
+
true,
|
|
89
|
+
'onecol'
|
|
90
|
+
),
|
|
91
|
+
getWithArtpackImageDesign(
|
|
92
|
+
getSubTitleDesign,
|
|
93
|
+
theme,
|
|
94
|
+
brand,
|
|
95
|
+
useOdd,
|
|
96
|
+
't8k',
|
|
97
|
+
'blast',
|
|
98
|
+
'cover',
|
|
99
|
+
true,
|
|
100
|
+
'center'
|
|
101
|
+
),
|
|
102
|
+
getWithArtpackImageDesign(
|
|
103
|
+
getIntroDesign,
|
|
104
|
+
theme,
|
|
105
|
+
brand,
|
|
106
|
+
useOdd,
|
|
107
|
+
't8k',
|
|
108
|
+
'blast',
|
|
109
|
+
'cover',
|
|
110
|
+
true,
|
|
111
|
+
'default'
|
|
112
|
+
),
|
|
113
|
+
getWithArtpackImageDesign(
|
|
114
|
+
getIntroDesign,
|
|
115
|
+
theme,
|
|
116
|
+
brand,
|
|
117
|
+
useOdd,
|
|
118
|
+
't8k',
|
|
119
|
+
'blast',
|
|
120
|
+
'cover',
|
|
121
|
+
true,
|
|
122
|
+
'onecol'
|
|
123
|
+
),
|
|
124
|
+
getWithArtpackImageDesign(
|
|
125
|
+
getIntroDesign,
|
|
126
|
+
theme,
|
|
127
|
+
brand,
|
|
128
|
+
useOdd,
|
|
129
|
+
't8k',
|
|
130
|
+
'blast',
|
|
131
|
+
'cover',
|
|
132
|
+
true,
|
|
133
|
+
'center'
|
|
134
|
+
),
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
//{
|
|
138
|
+
// id: "image-hero",
|
|
139
|
+
// title: "Image Hero Section",
|
|
140
|
+
// getTemplates: (theme: Theme, brand: string, useOdd: boolean) => [
|
|
141
|
+
// getImageHeroSectionDefault(theme, brand, useOdd),
|
|
142
|
+
// getImageHeroSectionDefault(theme, brand, useOdd, true),
|
|
143
|
+
// ],
|
|
144
|
+
//},
|
|
145
|
+
] as const;
|
|
146
|
+
|
|
147
|
+
export function getWithArtpackImageDesign(
|
|
148
|
+
designFn: (
|
|
149
|
+
theme: Theme,
|
|
150
|
+
brand: string,
|
|
151
|
+
useOdd: boolean,
|
|
152
|
+
bordered?: boolean,
|
|
153
|
+
variant?: string
|
|
154
|
+
) => TemplatePane,
|
|
155
|
+
theme: Theme,
|
|
156
|
+
brand: string,
|
|
157
|
+
useOdd: boolean,
|
|
158
|
+
collection: string = 't8k',
|
|
159
|
+
imageName: string = 'blast',
|
|
160
|
+
objectFit: 'cover' | 'contain' | 'fill' = 'cover',
|
|
161
|
+
bordered: boolean = true,
|
|
162
|
+
variant: string = 'default'
|
|
163
|
+
): TemplatePane {
|
|
164
|
+
const baseTemplate = designFn(theme, brand, useOdd, bordered, variant);
|
|
165
|
+
|
|
166
|
+
const artpackNode: ArtpackImageNode = {
|
|
167
|
+
nodeType: 'BgPane',
|
|
168
|
+
id: '',
|
|
169
|
+
parentId: '',
|
|
170
|
+
type: 'artpack-image',
|
|
171
|
+
collection,
|
|
172
|
+
image: imageName,
|
|
173
|
+
src: `/artpacks/${collection}/${imageName}_1920px.webp`,
|
|
174
|
+
srcSet: `/artpacks/${collection}/${imageName}_1920px.webp 1920w, /artpacks/${collection}/${imageName}_1080px.webp 1080w, /artpacks/${collection}/${imageName}_600px.webp 600w`,
|
|
175
|
+
alt: `Artpack image from ${collection} collection`,
|
|
176
|
+
objectFit,
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
baseTemplate.title = `${baseTemplate.title} with artpack background`;
|
|
180
|
+
baseTemplate.slug = `${baseTemplate.slug}-artpack`;
|
|
181
|
+
|
|
182
|
+
if (baseTemplate.markdown?.parentClasses) {
|
|
183
|
+
baseTemplate.markdown.parentClasses.forEach((classSet) => {
|
|
184
|
+
if (classSet.mobile.bgCOLOR === 'mywhite') {
|
|
185
|
+
classSet.mobile.bgCOLOR = 'transparent';
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return {
|
|
191
|
+
...baseTemplate,
|
|
192
|
+
bgPane: artpackNode,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const getBaseParagraphClasses = (theme: Theme) => ({
|
|
197
|
+
h2: {
|
|
198
|
+
mobile: {
|
|
199
|
+
fontWEIGHT: 'bold',
|
|
200
|
+
textCOLOR: getColor(
|
|
201
|
+
{
|
|
202
|
+
light: 'brand-7',
|
|
203
|
+
'light-bw': 'brand-1',
|
|
204
|
+
'light-bold': 'brand-5',
|
|
205
|
+
dark: 'brand-4',
|
|
206
|
+
'dark-bw': 'brand-8',
|
|
207
|
+
'dark-bold': 'brand-3',
|
|
208
|
+
},
|
|
209
|
+
theme
|
|
210
|
+
),
|
|
211
|
+
textSIZE: '3xl',
|
|
212
|
+
lineHEIGHT: 'snug',
|
|
213
|
+
fontFACE: 'action',
|
|
214
|
+
pt: '6',
|
|
215
|
+
pb: '2.5',
|
|
216
|
+
},
|
|
217
|
+
tablet: {
|
|
218
|
+
textSIZE: '5xl',
|
|
219
|
+
pt: '9',
|
|
220
|
+
pb: '3.5',
|
|
221
|
+
},
|
|
222
|
+
desktop: {
|
|
223
|
+
textSIZE: '6xl',
|
|
224
|
+
pt: '12',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
h3: {
|
|
228
|
+
mobile: {
|
|
229
|
+
fontWEIGHT: 'bold',
|
|
230
|
+
textCOLOR: getColor(
|
|
231
|
+
{
|
|
232
|
+
light: 'brand-7',
|
|
233
|
+
'light-bw': 'brand-1',
|
|
234
|
+
'light-bold': 'brand-5',
|
|
235
|
+
dark: 'brand-4',
|
|
236
|
+
'dark-bw': 'white',
|
|
237
|
+
'dark-bold': 'brand-3',
|
|
238
|
+
},
|
|
239
|
+
theme
|
|
240
|
+
),
|
|
241
|
+
textSIZE: 'xl',
|
|
242
|
+
fontFACE: 'action',
|
|
243
|
+
pt: '6',
|
|
244
|
+
pb: '2.5',
|
|
245
|
+
},
|
|
246
|
+
tablet: {
|
|
247
|
+
textSIZE: '3xl',
|
|
248
|
+
pt: '9',
|
|
249
|
+
pb: '3.5',
|
|
250
|
+
},
|
|
251
|
+
desktop: {
|
|
252
|
+
pt: '12',
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
h4: {
|
|
256
|
+
mobile: {
|
|
257
|
+
textCOLOR: getColor(
|
|
258
|
+
{
|
|
259
|
+
light: 'brand-7',
|
|
260
|
+
'light-bw': 'brand-1',
|
|
261
|
+
'light-bold': 'brand-5',
|
|
262
|
+
dark: 'brand-4',
|
|
263
|
+
'dark-bw': 'white',
|
|
264
|
+
'dark-bold': 'brand-3',
|
|
265
|
+
},
|
|
266
|
+
theme
|
|
267
|
+
),
|
|
268
|
+
textSIZE: 'xl',
|
|
269
|
+
fontFACE: 'action',
|
|
270
|
+
pt: '4',
|
|
271
|
+
},
|
|
272
|
+
tablet: {
|
|
273
|
+
textSIZE: '2xl',
|
|
274
|
+
pt: '6',
|
|
275
|
+
},
|
|
276
|
+
desktop: {},
|
|
277
|
+
},
|
|
278
|
+
p: {
|
|
279
|
+
mobile: {
|
|
280
|
+
textCOLOR: getColor(
|
|
281
|
+
{
|
|
282
|
+
light: 'brand-7',
|
|
283
|
+
'light-bw': 'brand-1',
|
|
284
|
+
'light-bold': 'brand-7',
|
|
285
|
+
dark: 'brand-8',
|
|
286
|
+
'dark-bw': 'brand-2',
|
|
287
|
+
'dark-bold': 'brand-8',
|
|
288
|
+
},
|
|
289
|
+
theme
|
|
290
|
+
),
|
|
291
|
+
textSIZE: 'lg',
|
|
292
|
+
lineHEIGHT: 'loose',
|
|
293
|
+
py: '1.5',
|
|
294
|
+
},
|
|
295
|
+
tablet: {
|
|
296
|
+
textSIZE: 'xl',
|
|
297
|
+
py: '2.5',
|
|
298
|
+
},
|
|
299
|
+
desktop: {},
|
|
300
|
+
},
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
const getBaseParentClasses = (): ParentClassesPayload => {
|
|
304
|
+
return [
|
|
305
|
+
{
|
|
306
|
+
mobile: {
|
|
307
|
+
mx: '5',
|
|
308
|
+
my: '16',
|
|
309
|
+
},
|
|
310
|
+
tablet: {
|
|
311
|
+
mx: '10',
|
|
312
|
+
},
|
|
313
|
+
desktop: {},
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
mobile: {
|
|
317
|
+
mx: 'auto',
|
|
318
|
+
maxW: 'none',
|
|
319
|
+
},
|
|
320
|
+
tablet: {
|
|
321
|
+
maxW: 'screen-lg',
|
|
322
|
+
},
|
|
323
|
+
desktop: {
|
|
324
|
+
maxW: 'screen-xl',
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
mobile: {
|
|
329
|
+
px: '9',
|
|
330
|
+
py: '10',
|
|
331
|
+
},
|
|
332
|
+
tablet: {
|
|
333
|
+
px: '14',
|
|
334
|
+
},
|
|
335
|
+
desktop: {
|
|
336
|
+
px: '32',
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
];
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export function getJustCopyDesign(
|
|
343
|
+
theme: Theme,
|
|
344
|
+
brand: string,
|
|
345
|
+
useOdd: boolean,
|
|
346
|
+
bordered: boolean = false,
|
|
347
|
+
variant: string = `default`
|
|
348
|
+
): TemplatePane {
|
|
349
|
+
let title = '';
|
|
350
|
+
let slug = '';
|
|
351
|
+
const baseClasses = getBaseParentClasses();
|
|
352
|
+
switch (variant) {
|
|
353
|
+
case `onecol`: {
|
|
354
|
+
title = !bordered
|
|
355
|
+
? 'Copy goes here - one column'
|
|
356
|
+
: 'Copy goes here with border - one column';
|
|
357
|
+
slug = !bordered ? 'paragraph-onecol' : 'paragraph-onecol-bordered';
|
|
358
|
+
baseClasses[2].mobile.textALIGN = 'left';
|
|
359
|
+
baseClasses[2].mobile.textWRAP = 'pretty';
|
|
360
|
+
baseClasses[2].mobile.maxW = '3xl';
|
|
361
|
+
if (bordered) {
|
|
362
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
363
|
+
{
|
|
364
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
365
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
366
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
367
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
368
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
369
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
370
|
+
},
|
|
371
|
+
theme
|
|
372
|
+
);
|
|
373
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
374
|
+
}
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
case `center`: {
|
|
379
|
+
title = !bordered
|
|
380
|
+
? 'Copy goes here - centered'
|
|
381
|
+
: 'Copy goes here with border - centered';
|
|
382
|
+
slug = !bordered ? 'paragraph-centered' : 'paragraph-centered-bordered';
|
|
383
|
+
baseClasses[2].mobile.textALIGN = 'center';
|
|
384
|
+
baseClasses[2].mobile.textWRAP = 'balance';
|
|
385
|
+
if (bordered) {
|
|
386
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
387
|
+
{
|
|
388
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
389
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
390
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
391
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
392
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
393
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
394
|
+
},
|
|
395
|
+
theme
|
|
396
|
+
);
|
|
397
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
398
|
+
}
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
default: {
|
|
403
|
+
title = !bordered ? 'Copy goes here' : 'Copy goes here with border';
|
|
404
|
+
slug = !bordered ? 'paragraph-default' : 'paragraph-default-bordered';
|
|
405
|
+
baseClasses[2].mobile.textALIGN = 'left';
|
|
406
|
+
baseClasses[2].mobile.textWRAP = 'pretty';
|
|
407
|
+
if (bordered) {
|
|
408
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
409
|
+
{
|
|
410
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
411
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
412
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
413
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
414
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
415
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
416
|
+
},
|
|
417
|
+
theme
|
|
418
|
+
);
|
|
419
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return {
|
|
425
|
+
nodeType: 'Pane',
|
|
426
|
+
title,
|
|
427
|
+
slug,
|
|
428
|
+
id: '',
|
|
429
|
+
parentId: '',
|
|
430
|
+
isDecorative: false,
|
|
431
|
+
bgColour: tailwindToHex(
|
|
432
|
+
getColor(
|
|
433
|
+
{
|
|
434
|
+
light: !useOdd ? 'brand-2' : 'white',
|
|
435
|
+
'light-bw': !useOdd ? 'white' : 'brand-2',
|
|
436
|
+
'light-bold': !useOdd ? 'brand-2' : 'white',
|
|
437
|
+
dark: !useOdd ? 'black' : 'brand-1',
|
|
438
|
+
'dark-bw': !useOdd ? 'black' : 'brand-1',
|
|
439
|
+
'dark-bold': !useOdd ? 'brand-1' : 'black',
|
|
440
|
+
},
|
|
441
|
+
theme
|
|
442
|
+
),
|
|
443
|
+
brand
|
|
444
|
+
),
|
|
445
|
+
markdown: {
|
|
446
|
+
nodeType: 'Markdown',
|
|
447
|
+
id: '',
|
|
448
|
+
parentId: '',
|
|
449
|
+
type: 'markdown',
|
|
450
|
+
markdownId: ulid(),
|
|
451
|
+
defaultClasses: getBaseParagraphClasses(theme),
|
|
452
|
+
parentClasses: baseClasses,
|
|
453
|
+
markdownBody: defaultMarkdownBody,
|
|
454
|
+
},
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function getSubTitleDesign(
|
|
459
|
+
theme: Theme,
|
|
460
|
+
brand: string,
|
|
461
|
+
useOdd: boolean,
|
|
462
|
+
bordered: boolean = false,
|
|
463
|
+
variant: string = `default`
|
|
464
|
+
): TemplatePane {
|
|
465
|
+
const baseClasses = getBaseParentClasses();
|
|
466
|
+
let title = '';
|
|
467
|
+
let slug = '';
|
|
468
|
+
let bgColour = '';
|
|
469
|
+
let textCOLOR = '';
|
|
470
|
+
|
|
471
|
+
switch (variant) {
|
|
472
|
+
case `onecol`: {
|
|
473
|
+
title = !bordered
|
|
474
|
+
? 'Title section One Column'
|
|
475
|
+
: 'Title section one column with border';
|
|
476
|
+
slug = !bordered ? 'section-onecol' : 'section-onecol-bordered';
|
|
477
|
+
textCOLOR = getColor(
|
|
478
|
+
{
|
|
479
|
+
light: 'black',
|
|
480
|
+
'light-bw': 'black',
|
|
481
|
+
'light-bold': 'brand-5',
|
|
482
|
+
dark: 'brand-4',
|
|
483
|
+
'dark-bw': 'brand-8',
|
|
484
|
+
'dark-bold': 'brand-3',
|
|
485
|
+
},
|
|
486
|
+
theme
|
|
487
|
+
);
|
|
488
|
+
bgColour = tailwindToHex(
|
|
489
|
+
getColor(
|
|
490
|
+
{
|
|
491
|
+
light: !useOdd ? 'brand-2' : 'white',
|
|
492
|
+
'light-bw': !useOdd ? 'white' : 'brand-2',
|
|
493
|
+
'light-bold': !useOdd ? 'brand-2' : 'white',
|
|
494
|
+
dark: !useOdd ? 'black' : 'brand-1',
|
|
495
|
+
'dark-bw': !useOdd ? 'black' : 'brand-1',
|
|
496
|
+
'dark-bold': !useOdd ? 'brand-1' : 'black',
|
|
497
|
+
},
|
|
498
|
+
theme
|
|
499
|
+
),
|
|
500
|
+
brand
|
|
501
|
+
);
|
|
502
|
+
baseClasses[2].mobile.textALIGN = 'left';
|
|
503
|
+
baseClasses[2].mobile.textWRAP = 'pretty';
|
|
504
|
+
baseClasses[2].mobile.maxW = '3xl';
|
|
505
|
+
if (bordered) {
|
|
506
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
507
|
+
{
|
|
508
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
509
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
510
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
511
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
512
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
513
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
514
|
+
},
|
|
515
|
+
theme
|
|
516
|
+
);
|
|
517
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
518
|
+
}
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
case `center`: {
|
|
523
|
+
title = !bordered
|
|
524
|
+
? 'Title section centered'
|
|
525
|
+
: 'Title section centered with border';
|
|
526
|
+
slug = !bordered ? 'section-center' : 'section-center-bordered';
|
|
527
|
+
textCOLOR = getColor(
|
|
528
|
+
{
|
|
529
|
+
light: 'black',
|
|
530
|
+
'light-bw': 'black',
|
|
531
|
+
'light-bold': 'brand-5',
|
|
532
|
+
dark: 'brand-4',
|
|
533
|
+
'dark-bw': 'brand-8',
|
|
534
|
+
'dark-bold': 'brand-3',
|
|
535
|
+
},
|
|
536
|
+
theme
|
|
537
|
+
);
|
|
538
|
+
bgColour = tailwindToHex(
|
|
539
|
+
getColor(
|
|
540
|
+
{
|
|
541
|
+
light: !useOdd ? 'brand-2' : 'white',
|
|
542
|
+
'light-bw': !useOdd ? 'white' : 'brand-2',
|
|
543
|
+
'light-bold': !useOdd ? 'brand-2' : 'white',
|
|
544
|
+
dark: !useOdd ? 'black' : 'brand-1',
|
|
545
|
+
'dark-bw': !useOdd ? 'black' : 'brand-1',
|
|
546
|
+
'dark-bold': !useOdd ? 'brand-1' : 'black',
|
|
547
|
+
},
|
|
548
|
+
theme
|
|
549
|
+
),
|
|
550
|
+
brand
|
|
551
|
+
);
|
|
552
|
+
baseClasses[2].mobile.textALIGN = 'center';
|
|
553
|
+
baseClasses[2].mobile.textWRAP = 'balance';
|
|
554
|
+
if (bordered) {
|
|
555
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
556
|
+
{
|
|
557
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
558
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
559
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
560
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
561
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
562
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
563
|
+
},
|
|
564
|
+
theme
|
|
565
|
+
);
|
|
566
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
567
|
+
}
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
case `onecol-brand`: {
|
|
572
|
+
(title = 'Title section v2 one column'),
|
|
573
|
+
(slug = 'section-onecol-brand'),
|
|
574
|
+
(textCOLOR = getColor(
|
|
575
|
+
{
|
|
576
|
+
light: 'black',
|
|
577
|
+
'light-bw': 'black',
|
|
578
|
+
'light-bold': 'black',
|
|
579
|
+
dark: 'black',
|
|
580
|
+
'dark-bw': 'black',
|
|
581
|
+
'dark-bold': 'black',
|
|
582
|
+
},
|
|
583
|
+
theme
|
|
584
|
+
));
|
|
585
|
+
bgColour = tailwindToHex(
|
|
586
|
+
getColor(
|
|
587
|
+
{
|
|
588
|
+
light: !useOdd ? 'brand-3' : 'brand-4',
|
|
589
|
+
'light-bw': !useOdd ? 'brand-3' : 'brand-4',
|
|
590
|
+
'light-bold': !useOdd ? 'brand-3' : 'brand-4',
|
|
591
|
+
dark: !useOdd ? 'brand-3' : 'brand-4',
|
|
592
|
+
'dark-bw': !useOdd ? 'brand-3' : 'brand-4',
|
|
593
|
+
'dark-bold': !useOdd ? 'brand-3' : 'brand-4',
|
|
594
|
+
},
|
|
595
|
+
theme
|
|
596
|
+
),
|
|
597
|
+
brand
|
|
598
|
+
);
|
|
599
|
+
baseClasses[2].mobile.textALIGN = 'left';
|
|
600
|
+
baseClasses[2].mobile.textWRAP = 'pretty';
|
|
601
|
+
baseClasses[2].mobile.maxW = '3xl';
|
|
602
|
+
if (bordered) {
|
|
603
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
604
|
+
{
|
|
605
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
606
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
607
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
608
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
609
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
610
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
611
|
+
},
|
|
612
|
+
theme
|
|
613
|
+
);
|
|
614
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
615
|
+
}
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
case `center-brand`: {
|
|
620
|
+
(title = 'Title section v2 centered'),
|
|
621
|
+
(slug = 'section-center-brand'),
|
|
622
|
+
(textCOLOR = getColor(
|
|
623
|
+
{
|
|
624
|
+
light: 'black',
|
|
625
|
+
'light-bw': 'black',
|
|
626
|
+
'light-bold': 'black',
|
|
627
|
+
dark: 'black',
|
|
628
|
+
'dark-bw': 'black',
|
|
629
|
+
'dark-bold': 'black',
|
|
630
|
+
},
|
|
631
|
+
theme
|
|
632
|
+
));
|
|
633
|
+
bgColour = tailwindToHex(
|
|
634
|
+
getColor(
|
|
635
|
+
{
|
|
636
|
+
light: !useOdd ? 'brand-3' : 'brand-4',
|
|
637
|
+
'light-bw': !useOdd ? 'brand-3' : 'brand-4',
|
|
638
|
+
'light-bold': !useOdd ? 'brand-3' : 'brand-4',
|
|
639
|
+
dark: !useOdd ? 'brand-3' : 'brand-4',
|
|
640
|
+
'dark-bw': !useOdd ? 'brand-3' : 'brand-4',
|
|
641
|
+
'dark-bold': !useOdd ? 'brand-3' : 'brand-4',
|
|
642
|
+
},
|
|
643
|
+
theme
|
|
644
|
+
),
|
|
645
|
+
brand
|
|
646
|
+
);
|
|
647
|
+
baseClasses[2].mobile.textALIGN = 'center';
|
|
648
|
+
baseClasses[2].mobile.textWRAP = 'balance';
|
|
649
|
+
if (bordered) {
|
|
650
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
651
|
+
{
|
|
652
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
653
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
654
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
655
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
656
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
657
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
658
|
+
},
|
|
659
|
+
theme
|
|
660
|
+
);
|
|
661
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
662
|
+
}
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
case `default-brand`: {
|
|
667
|
+
(title = 'Title section v2'),
|
|
668
|
+
(slug = 'section-default-brand'),
|
|
669
|
+
(textCOLOR = getColor(
|
|
670
|
+
{
|
|
671
|
+
light: 'black',
|
|
672
|
+
'light-bw': 'black',
|
|
673
|
+
'light-bold': 'black',
|
|
674
|
+
dark: 'black',
|
|
675
|
+
'dark-bw': 'black',
|
|
676
|
+
'dark-bold': 'black',
|
|
677
|
+
},
|
|
678
|
+
theme
|
|
679
|
+
));
|
|
680
|
+
bgColour = tailwindToHex(
|
|
681
|
+
getColor(
|
|
682
|
+
{
|
|
683
|
+
light: !useOdd ? 'brand-3' : 'brand-4',
|
|
684
|
+
'light-bw': !useOdd ? 'brand-3' : 'brand-4',
|
|
685
|
+
'light-bold': !useOdd ? 'brand-3' : 'brand-4',
|
|
686
|
+
dark: !useOdd ? 'brand-3' : 'brand-4',
|
|
687
|
+
'dark-bw': !useOdd ? 'brand-3' : 'brand-4',
|
|
688
|
+
'dark-bold': !useOdd ? 'brand-3' : 'brand-4',
|
|
689
|
+
},
|
|
690
|
+
theme
|
|
691
|
+
),
|
|
692
|
+
brand
|
|
693
|
+
);
|
|
694
|
+
baseClasses[2].mobile.textALIGN = 'left';
|
|
695
|
+
baseClasses[2].mobile.textWRAP = 'pretty';
|
|
696
|
+
if (bordered) {
|
|
697
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
698
|
+
{
|
|
699
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
700
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
701
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
702
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
703
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
704
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
705
|
+
},
|
|
706
|
+
theme
|
|
707
|
+
);
|
|
708
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
709
|
+
}
|
|
710
|
+
break;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
default: {
|
|
714
|
+
title = !bordered ? 'Title section' : 'Title section with border';
|
|
715
|
+
slug = !bordered ? 'section-default' : 'section-default-bordered';
|
|
716
|
+
textCOLOR = getColor(
|
|
717
|
+
{
|
|
718
|
+
light: 'black',
|
|
719
|
+
'light-bw': 'black',
|
|
720
|
+
'light-bold': 'brand-5',
|
|
721
|
+
dark: 'brand-4',
|
|
722
|
+
'dark-bw': 'brand-8',
|
|
723
|
+
'dark-bold': 'brand-3',
|
|
724
|
+
},
|
|
725
|
+
theme
|
|
726
|
+
);
|
|
727
|
+
bgColour = tailwindToHex(
|
|
728
|
+
getColor(
|
|
729
|
+
{
|
|
730
|
+
light: !useOdd ? 'brand-2' : 'white',
|
|
731
|
+
'light-bw': !useOdd ? 'white' : 'brand-2',
|
|
732
|
+
'light-bold': !useOdd ? 'brand-2' : 'white',
|
|
733
|
+
dark: !useOdd ? 'black' : 'brand-1',
|
|
734
|
+
'dark-bw': !useOdd ? 'black' : 'brand-1',
|
|
735
|
+
'dark-bold': !useOdd ? 'brand-1' : 'black',
|
|
736
|
+
},
|
|
737
|
+
theme
|
|
738
|
+
),
|
|
739
|
+
brand
|
|
740
|
+
);
|
|
741
|
+
baseClasses[2].mobile.textALIGN = 'left';
|
|
742
|
+
baseClasses[2].mobile.textWRAP = 'pretty';
|
|
743
|
+
if (bordered) {
|
|
744
|
+
baseClasses[2].mobile.bgCOLOR = getColor(
|
|
745
|
+
{
|
|
746
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
747
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
748
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
749
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
750
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
751
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
752
|
+
},
|
|
753
|
+
theme
|
|
754
|
+
);
|
|
755
|
+
baseClasses[2].mobile.shadow = 'md';
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
return {
|
|
761
|
+
nodeType: 'Pane',
|
|
762
|
+
id: '',
|
|
763
|
+
parentId: '',
|
|
764
|
+
isDecorative: false,
|
|
765
|
+
title,
|
|
766
|
+
slug,
|
|
767
|
+
bgColour,
|
|
768
|
+
markdown: {
|
|
769
|
+
nodeType: 'Markdown',
|
|
770
|
+
id: '',
|
|
771
|
+
parentId: '',
|
|
772
|
+
type: 'markdown',
|
|
773
|
+
markdownId: ulid(),
|
|
774
|
+
defaultClasses: {
|
|
775
|
+
h2: {
|
|
776
|
+
mobile: {
|
|
777
|
+
fontWEIGHT: 'bold',
|
|
778
|
+
textCOLOR,
|
|
779
|
+
textSIZE: '3xl',
|
|
780
|
+
fontFACE: 'action',
|
|
781
|
+
},
|
|
782
|
+
tablet: {
|
|
783
|
+
textSIZE: '5xl',
|
|
784
|
+
},
|
|
785
|
+
desktop: {
|
|
786
|
+
textSIZE: '6xl',
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
h3: {
|
|
790
|
+
mobile: {
|
|
791
|
+
fontWEIGHT: 'bold',
|
|
792
|
+
textCOLOR,
|
|
793
|
+
textSIZE: '2xl',
|
|
794
|
+
fontFACE: 'action',
|
|
795
|
+
},
|
|
796
|
+
tablet: {
|
|
797
|
+
textSIZE: '3xl',
|
|
798
|
+
},
|
|
799
|
+
desktop: {},
|
|
800
|
+
},
|
|
801
|
+
h4: {
|
|
802
|
+
mobile: {
|
|
803
|
+
textCOLOR,
|
|
804
|
+
textSIZE: 'xl',
|
|
805
|
+
fontFACE: 'action',
|
|
806
|
+
pt: '4',
|
|
807
|
+
},
|
|
808
|
+
tablet: {
|
|
809
|
+
textSIZE: '2xl',
|
|
810
|
+
pt: '6',
|
|
811
|
+
},
|
|
812
|
+
desktop: {},
|
|
813
|
+
},
|
|
814
|
+
p: {
|
|
815
|
+
mobile: {
|
|
816
|
+
textCOLOR,
|
|
817
|
+
textSIZE: 'lg',
|
|
818
|
+
py: '1.5',
|
|
819
|
+
},
|
|
820
|
+
tablet: {
|
|
821
|
+
textSIZE: 'xl',
|
|
822
|
+
py: '2.5',
|
|
823
|
+
},
|
|
824
|
+
desktop: {},
|
|
825
|
+
},
|
|
826
|
+
},
|
|
827
|
+
parentClasses: baseClasses,
|
|
828
|
+
markdownBody: defaultSectionBody,
|
|
829
|
+
},
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
const getBaseIntroClasses = (theme: Theme) => ({
|
|
834
|
+
h2: {
|
|
835
|
+
mobile: {
|
|
836
|
+
fontWEIGHT: 'bold',
|
|
837
|
+
textCOLOR: getColor(
|
|
838
|
+
{
|
|
839
|
+
light: 'brand-7',
|
|
840
|
+
'light-bw': 'brand-1',
|
|
841
|
+
'light-bold': 'brand-5',
|
|
842
|
+
dark: 'brand-4',
|
|
843
|
+
'dark-bw': 'brand-8',
|
|
844
|
+
'dark-bold': 'brand-3',
|
|
845
|
+
},
|
|
846
|
+
theme
|
|
847
|
+
),
|
|
848
|
+
textSIZE: '3xl',
|
|
849
|
+
lineHEIGHT: 'snug',
|
|
850
|
+
fontFACE: 'action',
|
|
851
|
+
},
|
|
852
|
+
tablet: {
|
|
853
|
+
textSIZE: '4xl',
|
|
854
|
+
},
|
|
855
|
+
desktop: {
|
|
856
|
+
textSIZE: '5xl',
|
|
857
|
+
},
|
|
858
|
+
},
|
|
859
|
+
h3: {
|
|
860
|
+
mobile: {
|
|
861
|
+
fontWEIGHT: 'bold',
|
|
862
|
+
textCOLOR: getColor(
|
|
863
|
+
{
|
|
864
|
+
light: 'brand-7',
|
|
865
|
+
'light-bw': 'brand-1',
|
|
866
|
+
'light-bold': 'brand-5',
|
|
867
|
+
dark: 'brand-4',
|
|
868
|
+
'dark-bw': 'white',
|
|
869
|
+
'dark-bold': 'brand-3',
|
|
870
|
+
},
|
|
871
|
+
theme
|
|
872
|
+
),
|
|
873
|
+
textSIZE: 'xl',
|
|
874
|
+
lineHEIGHT: 'snug',
|
|
875
|
+
fontFACE: 'action',
|
|
876
|
+
},
|
|
877
|
+
tablet: {
|
|
878
|
+
textSIZE: '3xl',
|
|
879
|
+
},
|
|
880
|
+
desktop: {},
|
|
881
|
+
},
|
|
882
|
+
h4: {
|
|
883
|
+
mobile: {
|
|
884
|
+
textCOLOR: getColor(
|
|
885
|
+
{
|
|
886
|
+
light: 'brand-7',
|
|
887
|
+
'light-bw': 'brand-1',
|
|
888
|
+
'light-bold': 'brand-5',
|
|
889
|
+
dark: 'brand-4',
|
|
890
|
+
'dark-bw': 'white',
|
|
891
|
+
'dark-bold': 'brand-3',
|
|
892
|
+
},
|
|
893
|
+
theme
|
|
894
|
+
),
|
|
895
|
+
textSIZE: 'xl',
|
|
896
|
+
lineHEIGHT: 'snug',
|
|
897
|
+
fontFACE: 'action',
|
|
898
|
+
pt: '4',
|
|
899
|
+
},
|
|
900
|
+
tablet: {
|
|
901
|
+
textSIZE: '2xl',
|
|
902
|
+
pt: '6',
|
|
903
|
+
},
|
|
904
|
+
desktop: {},
|
|
905
|
+
},
|
|
906
|
+
p: {
|
|
907
|
+
mobile: {
|
|
908
|
+
textCOLOR: getColor(
|
|
909
|
+
{
|
|
910
|
+
light: 'brand-7',
|
|
911
|
+
'light-bw': 'brand-1',
|
|
912
|
+
'light-bold': 'brand-7',
|
|
913
|
+
dark: 'brand-8',
|
|
914
|
+
'dark-bw': 'brand-2',
|
|
915
|
+
'dark-bold': 'brand-8',
|
|
916
|
+
},
|
|
917
|
+
theme
|
|
918
|
+
),
|
|
919
|
+
textSIZE: 'lg',
|
|
920
|
+
lineHEIGHT: 'loose',
|
|
921
|
+
py: '1.5',
|
|
922
|
+
},
|
|
923
|
+
tablet: {
|
|
924
|
+
textSIZE: 'xl',
|
|
925
|
+
py: '2.5',
|
|
926
|
+
},
|
|
927
|
+
desktop: {},
|
|
928
|
+
},
|
|
929
|
+
});
|
|
930
|
+
|
|
931
|
+
const getIntroBaseParentClasses = (): ParentClassesPayload => [
|
|
932
|
+
{
|
|
933
|
+
mobile: {
|
|
934
|
+
mx: '5',
|
|
935
|
+
mt: '16',
|
|
936
|
+
mb: '16',
|
|
937
|
+
},
|
|
938
|
+
tablet: {
|
|
939
|
+
mx: '10',
|
|
940
|
+
mt: '20',
|
|
941
|
+
},
|
|
942
|
+
desktop: {},
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
mobile: {
|
|
946
|
+
mx: 'auto',
|
|
947
|
+
maxW: 'none',
|
|
948
|
+
},
|
|
949
|
+
tablet: {
|
|
950
|
+
maxW: 'screen-lg',
|
|
951
|
+
},
|
|
952
|
+
desktop: {
|
|
953
|
+
maxW: 'screen-xl',
|
|
954
|
+
},
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
mobile: {
|
|
958
|
+
px: '9',
|
|
959
|
+
py: '10',
|
|
960
|
+
},
|
|
961
|
+
tablet: {
|
|
962
|
+
px: '14',
|
|
963
|
+
},
|
|
964
|
+
desktop: {
|
|
965
|
+
px: '32',
|
|
966
|
+
},
|
|
967
|
+
},
|
|
968
|
+
];
|
|
969
|
+
|
|
970
|
+
export const getIntroDesign = (
|
|
971
|
+
theme: Theme,
|
|
972
|
+
brand: string,
|
|
973
|
+
useOdd: boolean = false,
|
|
974
|
+
bordered: boolean = false,
|
|
975
|
+
variant: string = `default`
|
|
976
|
+
): TemplatePane => {
|
|
977
|
+
const parentClasses = getIntroBaseParentClasses();
|
|
978
|
+
let title = '';
|
|
979
|
+
let slug = '';
|
|
980
|
+
switch (variant) {
|
|
981
|
+
case `center`: {
|
|
982
|
+
(title = !bordered
|
|
983
|
+
? 'Intro section centered'
|
|
984
|
+
: 'Intro section centered with border'),
|
|
985
|
+
(slug = !bordered ? 'intro-centered' : 'intro-centered-bordered'),
|
|
986
|
+
(parentClasses[2].mobile.textALIGN = 'center');
|
|
987
|
+
parentClasses[2].mobile.textWRAP = 'balance';
|
|
988
|
+
if (bordered) {
|
|
989
|
+
parentClasses[2].mobile.bgCOLOR = getColor(
|
|
990
|
+
{
|
|
991
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
992
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
993
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
994
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
995
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
996
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
997
|
+
},
|
|
998
|
+
theme
|
|
999
|
+
);
|
|
1000
|
+
parentClasses[2].mobile.shadow = 'lg';
|
|
1001
|
+
}
|
|
1002
|
+
break;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
case `onecol`: {
|
|
1006
|
+
(title = !bordered
|
|
1007
|
+
? 'Intro section one column'
|
|
1008
|
+
: 'Intro section one column with border'),
|
|
1009
|
+
(slug = !bordered ? 'intro-onecol' : 'intro-onecol-bordered'),
|
|
1010
|
+
(parentClasses[2].mobile.textALIGN = 'left');
|
|
1011
|
+
parentClasses[2].mobile.textWRAP = 'pretty';
|
|
1012
|
+
parentClasses[2].mobile.maxW = '3xl';
|
|
1013
|
+
if (bordered) {
|
|
1014
|
+
parentClasses[2].mobile.bgCOLOR = getColor(
|
|
1015
|
+
{
|
|
1016
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
1017
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
1018
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
1019
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
1020
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
1021
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
1022
|
+
},
|
|
1023
|
+
theme
|
|
1024
|
+
);
|
|
1025
|
+
parentClasses[2].mobile.shadow = 'lg';
|
|
1026
|
+
}
|
|
1027
|
+
break;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
default: {
|
|
1031
|
+
(title = !bordered ? 'Intro section' : 'Intro section with border'),
|
|
1032
|
+
(slug = !bordered ? 'intro-default' : 'intro-default-bordered'),
|
|
1033
|
+
(parentClasses[2].mobile.textALIGN = 'left');
|
|
1034
|
+
parentClasses[2].mobile.textWRAP = 'pretty';
|
|
1035
|
+
if (bordered) {
|
|
1036
|
+
parentClasses[2].mobile.bgCOLOR = getColor(
|
|
1037
|
+
{
|
|
1038
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
1039
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
1040
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
1041
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
1042
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
1043
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
1044
|
+
},
|
|
1045
|
+
theme
|
|
1046
|
+
);
|
|
1047
|
+
parentClasses[2].mobile.shadow = 'lg';
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
return {
|
|
1053
|
+
nodeType: 'Pane',
|
|
1054
|
+
id: '',
|
|
1055
|
+
parentId: '',
|
|
1056
|
+
isDecorative: false,
|
|
1057
|
+
title,
|
|
1058
|
+
slug,
|
|
1059
|
+
bgColour: tailwindToHex(
|
|
1060
|
+
getColor(
|
|
1061
|
+
{
|
|
1062
|
+
light: !useOdd ? 'brand-2' : 'white',
|
|
1063
|
+
'light-bw': !useOdd ? 'white' : 'brand-2',
|
|
1064
|
+
'light-bold': !useOdd ? 'brand-2' : 'white',
|
|
1065
|
+
dark: !useOdd ? 'black' : 'brand-1',
|
|
1066
|
+
'dark-bw': !useOdd ? 'black' : 'brand-1',
|
|
1067
|
+
'dark-bold': !useOdd ? 'brand-1' : 'black',
|
|
1068
|
+
},
|
|
1069
|
+
theme
|
|
1070
|
+
),
|
|
1071
|
+
brand
|
|
1072
|
+
),
|
|
1073
|
+
markdown: {
|
|
1074
|
+
nodeType: 'Markdown',
|
|
1075
|
+
id: '',
|
|
1076
|
+
parentId: '',
|
|
1077
|
+
type: 'markdown',
|
|
1078
|
+
markdownId: ulid(),
|
|
1079
|
+
defaultClasses: getBaseIntroClasses(theme),
|
|
1080
|
+
parentClasses,
|
|
1081
|
+
markdownBody: defaultIntroBody,
|
|
1082
|
+
},
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
export const getImageHeroSectionDefault = (
|
|
1087
|
+
theme: Theme,
|
|
1088
|
+
brand: string,
|
|
1089
|
+
useOdd: boolean = false,
|
|
1090
|
+
bordered: boolean = false
|
|
1091
|
+
): TemplatePane => {
|
|
1092
|
+
const parentClasses = getImageHeroBaseParentClasses();
|
|
1093
|
+
parentClasses[2].mobile.textALIGN = 'left';
|
|
1094
|
+
parentClasses[2].mobile.textWRAP = 'pretty';
|
|
1095
|
+
if (bordered) {
|
|
1096
|
+
parentClasses[2].mobile.bgCOLOR = getColor(
|
|
1097
|
+
{
|
|
1098
|
+
light: useOdd ? 'brand-2' : 'white',
|
|
1099
|
+
'light-bw': useOdd ? 'white' : 'brand-2',
|
|
1100
|
+
'light-bold': useOdd ? 'brand-2' : 'white',
|
|
1101
|
+
dark: useOdd ? 'black' : 'brand-1',
|
|
1102
|
+
'dark-bw': useOdd ? 'black' : 'brand-1',
|
|
1103
|
+
'dark-bold': useOdd ? 'brand-1' : 'black',
|
|
1104
|
+
},
|
|
1105
|
+
theme
|
|
1106
|
+
);
|
|
1107
|
+
parentClasses[2].mobile.shadow = 'lg';
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
return {
|
|
1111
|
+
nodeType: 'Pane',
|
|
1112
|
+
id: '',
|
|
1113
|
+
parentId: '',
|
|
1114
|
+
isDecorative: false,
|
|
1115
|
+
title: !bordered ? 'Hero Image section' : 'Hero Image section with border',
|
|
1116
|
+
slug: 'intro-default',
|
|
1117
|
+
bgColour: tailwindToHex(
|
|
1118
|
+
getColor(
|
|
1119
|
+
{
|
|
1120
|
+
light: !useOdd ? 'brand-2' : 'white',
|
|
1121
|
+
'light-bw': !useOdd ? 'white' : 'brand-2',
|
|
1122
|
+
'light-bold': !useOdd ? 'brand-2' : 'white',
|
|
1123
|
+
dark: !useOdd ? 'black' : 'brand-1',
|
|
1124
|
+
'dark-bw': !useOdd ? 'black' : 'brand-1',
|
|
1125
|
+
'dark-bold': !useOdd ? 'brand-1' : 'black',
|
|
1126
|
+
},
|
|
1127
|
+
theme
|
|
1128
|
+
),
|
|
1129
|
+
brand
|
|
1130
|
+
),
|
|
1131
|
+
markdown: {
|
|
1132
|
+
nodeType: 'Markdown',
|
|
1133
|
+
id: '',
|
|
1134
|
+
parentId: '',
|
|
1135
|
+
type: 'markdown',
|
|
1136
|
+
markdownId: ulid(),
|
|
1137
|
+
defaultClasses: getBaseImageHeroClasses(theme),
|
|
1138
|
+
parentClasses,
|
|
1139
|
+
markdownBody: defaultImageHeroBody,
|
|
1140
|
+
},
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1144
|
+
const getBaseImageHeroClasses = (theme: Theme) => ({
|
|
1145
|
+
h2: {
|
|
1146
|
+
mobile: {
|
|
1147
|
+
fontWEIGHT: 'bold',
|
|
1148
|
+
textCOLOR: getColor(
|
|
1149
|
+
{
|
|
1150
|
+
light: 'brand-7',
|
|
1151
|
+
'light-bw': 'brand-1',
|
|
1152
|
+
'light-bold': 'brand-5',
|
|
1153
|
+
dark: 'brand-4',
|
|
1154
|
+
'dark-bw': 'brand-8',
|
|
1155
|
+
'dark-bold': 'brand-3',
|
|
1156
|
+
},
|
|
1157
|
+
theme
|
|
1158
|
+
),
|
|
1159
|
+
textSIZE: '3xl',
|
|
1160
|
+
lineHEIGHT: 'snug',
|
|
1161
|
+
fontFACE: 'action',
|
|
1162
|
+
mb: '4',
|
|
1163
|
+
maxW: '2xl',
|
|
1164
|
+
},
|
|
1165
|
+
tablet: {
|
|
1166
|
+
textSIZE: '4xl',
|
|
1167
|
+
mb: '6',
|
|
1168
|
+
},
|
|
1169
|
+
desktop: {
|
|
1170
|
+
textSIZE: '5xl',
|
|
1171
|
+
mb: '8',
|
|
1172
|
+
},
|
|
1173
|
+
},
|
|
1174
|
+
p: {
|
|
1175
|
+
mobile: {
|
|
1176
|
+
textCOLOR: getColor(
|
|
1177
|
+
{
|
|
1178
|
+
light: 'brand-7',
|
|
1179
|
+
'light-bw': 'brand-1',
|
|
1180
|
+
'light-bold': 'brand-7',
|
|
1181
|
+
dark: 'brand-8',
|
|
1182
|
+
'dark-bw': 'brand-2',
|
|
1183
|
+
'dark-bold': 'brand-8',
|
|
1184
|
+
},
|
|
1185
|
+
theme
|
|
1186
|
+
),
|
|
1187
|
+
textSIZE: 'lg',
|
|
1188
|
+
lineHEIGHT: 'relaxed',
|
|
1189
|
+
maxW: 'xl',
|
|
1190
|
+
py: '1.5',
|
|
1191
|
+
},
|
|
1192
|
+
tablet: {
|
|
1193
|
+
textSIZE: 'xl',
|
|
1194
|
+
py: '2.5',
|
|
1195
|
+
},
|
|
1196
|
+
desktop: {
|
|
1197
|
+
maxW: '2xl',
|
|
1198
|
+
mb: '10',
|
|
1199
|
+
},
|
|
1200
|
+
},
|
|
1201
|
+
li: {
|
|
1202
|
+
mobile: {
|
|
1203
|
+
fontWEIGHT: 'bold',
|
|
1204
|
+
textCOLOR: getColor(
|
|
1205
|
+
{
|
|
1206
|
+
light: 'brand-7',
|
|
1207
|
+
'light-bw': 'brand-1',
|
|
1208
|
+
'light-bold': 'brand-5',
|
|
1209
|
+
dark: 'brand-4',
|
|
1210
|
+
'dark-bw': 'brand-8',
|
|
1211
|
+
'dark-bold': 'brand-3',
|
|
1212
|
+
},
|
|
1213
|
+
theme
|
|
1214
|
+
),
|
|
1215
|
+
textSIZE: '3xl',
|
|
1216
|
+
lineHEIGHT: 'snug',
|
|
1217
|
+
fontFACE: 'action',
|
|
1218
|
+
},
|
|
1219
|
+
tablet: {
|
|
1220
|
+
textSIZE: '4xl',
|
|
1221
|
+
},
|
|
1222
|
+
desktop: {
|
|
1223
|
+
textSIZE: '5xl',
|
|
1224
|
+
},
|
|
1225
|
+
},
|
|
1226
|
+
img: {
|
|
1227
|
+
mobile: {
|
|
1228
|
+
objectFIT: 'cover',
|
|
1229
|
+
mx: 'auto',
|
|
1230
|
+
},
|
|
1231
|
+
tablet: {
|
|
1232
|
+
maxH: 'none',
|
|
1233
|
+
h: 'full',
|
|
1234
|
+
},
|
|
1235
|
+
desktop: {
|
|
1236
|
+
w: '1/2',
|
|
1237
|
+
borderL: '8',
|
|
1238
|
+
borderCOLOR: 'brand-3',
|
|
1239
|
+
},
|
|
1240
|
+
},
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1243
|
+
const getImageHeroBaseParentClasses = (): ParentClassesPayload => [
|
|
1244
|
+
...getIntroBaseParentClasses(),
|
|
1245
|
+
{
|
|
1246
|
+
mobile: {
|
|
1247
|
+
display: 'flex',
|
|
1248
|
+
flexDIRECTION: 'col',
|
|
1249
|
+
gap: '8',
|
|
1250
|
+
p: '6',
|
|
1251
|
+
},
|
|
1252
|
+
tablet: {
|
|
1253
|
+
p: '12',
|
|
1254
|
+
gap: '12',
|
|
1255
|
+
},
|
|
1256
|
+
desktop: {
|
|
1257
|
+
flexDIRECTION: 'row',
|
|
1258
|
+
items: 'center',
|
|
1259
|
+
justify: 'between',
|
|
1260
|
+
gap: '0',
|
|
1261
|
+
overflow: 'hidden',
|
|
1262
|
+
p: '0',
|
|
1263
|
+
},
|
|
1264
|
+
},
|
|
1265
|
+
];
|