astro-tractstack 2.0.0-rc.1 → 2.0.0-rc.2
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 +0 -0
- package/README.md +133 -13
- package/astro.d.ts +0 -0
- package/dist/index.js +6 -6
- package/package.json +3 -3
- 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 +0 -0
- package/templates/brand/static.jpg +0 -0
- package/templates/brand/wordmark.svg +0 -0
- package/templates/css/custom.css +0 -0
- package/templates/css/frontend.css +0 -0
- package/templates/css/storykeep.css +0 -0
- package/templates/custom/minimal/CodeHook.astro +0 -0
- package/templates/custom/minimal/CustomRoutes.astro +0 -0
- package/templates/custom/with-examples/CodeHook.astro +0 -0
- package/templates/custom/with-examples/CustomHero.astro +0 -0
- package/templates/custom/with-examples/CustomRoutes.astro +0 -0
- package/templates/custom/with-examples/pages/Collections.astro +0 -0
- package/templates/env.example +0 -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 +0 -0
- package/templates/icons/h3.svg +0 -0
- package/templates/icons/h4.svg +0 -0
- package/templates/icons/h5.svg +0 -0
- package/templates/icons/image.svg +0 -0
- package/templates/icons/text.svg +0 -0
- package/templates/socials/codepen.svg +0 -0
- package/templates/socials/discord.svg +0 -0
- package/templates/socials/facebook.svg +0 -0
- package/templates/socials/github.svg +0 -0
- package/templates/socials/instagram.svg +0 -0
- package/templates/socials/linkedin.svg +0 -0
- package/templates/socials/mail.svg +0 -0
- package/templates/socials/rumble.svg +0 -0
- package/templates/socials/tiktok.svg +0 -0
- package/templates/socials/twitch.svg +0 -0
- package/templates/socials/twitter.svg +0 -0
- package/templates/socials/x.svg +0 -0
- package/templates/socials/youtube.svg +0 -0
- package/templates/src/client/{analytics-events.ts → analytics-events.js} +16 -22
- package/templates/src/client/{belief-events.ts → belief-events.js} +15 -29
- package/templates/src/client/{sse.ts → sse.js} +20 -74
- package/templates/src/components/Footer.astro +0 -0
- package/templates/src/components/Fragment.astro +0 -0
- package/templates/src/components/Header.astro +0 -0
- package/templates/src/components/Menu.tsx +0 -0
- package/templates/src/components/codehooks/BunnyVideoSetup.tsx +0 -0
- package/templates/src/components/codehooks/BunnyVideoWrapper.astro +0 -0
- package/templates/src/components/codehooks/EpinetDurationSelector.tsx +0 -0
- package/templates/src/components/codehooks/EpinetTableView.tsx +0 -0
- package/templates/src/components/codehooks/EpinetWrapper.tsx +0 -0
- package/templates/src/components/codehooks/FeaturedContent.astro +0 -0
- package/templates/src/components/codehooks/FeaturedContentSetup.tsx +0 -0
- package/templates/src/components/codehooks/ListContent.astro +0 -0
- package/templates/src/components/codehooks/ListContentSetup.tsx +0 -0
- package/templates/src/components/codehooks/SankeyDiagram.tsx +0 -0
- package/templates/src/components/compositor/Compositor.tsx +0 -0
- package/templates/src/components/compositor/Node.tsx +0 -0
- package/templates/src/components/compositor/NodeWithGuid.tsx +0 -0
- package/templates/src/components/compositor/PanelVisibilityWrapper.tsx +0 -0
- package/templates/src/components/compositor/elements/Belief.tsx +0 -0
- package/templates/src/components/compositor/elements/BgImage.tsx +0 -0
- package/templates/src/components/compositor/elements/BgVisualBreak.tsx +0 -0
- package/templates/src/components/compositor/elements/BunnyVideo.tsx +0 -0
- package/templates/src/components/compositor/elements/IdentifyAs.tsx +0 -0
- package/templates/src/components/compositor/elements/PlayButton.tsx +0 -0
- package/templates/src/components/compositor/elements/SignUp.tsx +0 -0
- package/templates/src/components/compositor/elements/Svg.tsx +0 -0
- package/templates/src/components/compositor/elements/ToggleBelief.tsx +0 -0
- package/templates/src/components/compositor/elements/YouTubeWrapper.tsx +0 -0
- package/templates/src/components/compositor/nodes/BgPaneWrapper.tsx +0 -0
- package/templates/src/components/compositor/nodes/GhostInsertBlock.tsx +0 -0
- package/templates/src/components/compositor/nodes/Markdown.tsx +0 -0
- package/templates/src/components/compositor/nodes/Pane.tsx +0 -0
- package/templates/src/components/compositor/nodes/Pane_eraser.tsx +0 -0
- package/templates/src/components/compositor/nodes/Pane_layout.tsx +0 -0
- package/templates/src/components/compositor/nodes/RenderChildren.tsx +0 -0
- package/templates/src/components/compositor/nodes/StoryFragment.tsx +0 -0
- package/templates/src/components/compositor/nodes/TagElement.tsx +0 -0
- package/templates/src/components/compositor/nodes/Widget.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeA.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeA_eraser.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeAnchorComponent.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_eraser.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_insert.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_settings.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeButton.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeButton_eraser.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeImg.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/NodeText.tsx +0 -0
- package/templates/src/components/compositor/nodes/tagElements/TabIndicator.tsx +0 -0
- package/templates/src/components/compositor/preview/FeaturedContentPreview.tsx +0 -0
- package/templates/src/components/compositor/preview/ListContentPreview.tsx +0 -0
- package/templates/src/components/compositor/preview/OgImagePreview.tsx +0 -0
- package/templates/src/components/compositor/preview/PaneSnapshotGenerator.tsx +0 -0
- package/templates/src/components/compositor/preview/PanesPreviewGenerator.tsx +0 -0
- package/templates/src/components/compositor/preview/VisualBreakPreview.tsx +0 -0
- package/templates/src/components/edit/Header.tsx +0 -0
- package/templates/src/components/edit/PanelSwitch.tsx +0 -0
- package/templates/src/components/edit/SettingsPanel.tsx +0 -0
- package/templates/src/components/edit/ToolBar.tsx +0 -0
- package/templates/src/components/edit/ToolMode.tsx +0 -0
- package/templates/src/components/edit/context/ContextPaneConfig.tsx +0 -0
- package/templates/src/components/edit/context/ContextPaneConfig_slug.tsx +0 -0
- package/templates/src/components/edit/context/ContextPaneConfig_title.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_break.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_codehook.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_new.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_newAICopy.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_newAICopy_modal.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_newCopyMode.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_newCustomCopy.tsx +0 -0
- package/templates/src/components/edit/pane/AddPanePanel_reuse.tsx +0 -0
- package/templates/src/components/edit/pane/ConfigPanePanel.tsx +0 -0
- package/templates/src/components/edit/pane/PageGen.tsx +0 -0
- package/templates/src/components/edit/pane/PageGenSelector.tsx +0 -0
- package/templates/src/components/edit/pane/PageGenSpecial.tsx +0 -0
- package/templates/src/components/edit/pane/PageGen_preview.tsx +0 -0
- package/templates/src/components/edit/pane/PanePanel_impression.tsx +0 -0
- package/templates/src/components/edit/pane/PanePanel_path.tsx +0 -0
- package/templates/src/components/edit/pane/PanePanel_slug.tsx +0 -0
- package/templates/src/components/edit/pane/PanePanel_title.tsx +0 -0
- package/templates/src/components/edit/panels/StyleBreakPanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleCodeHookPanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleElementPanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleElementPanel_add.tsx +0 -0
- package/templates/src/components/edit/panels/StyleElementPanel_remove.tsx +0 -0
- package/templates/src/components/edit/panels/StyleElementPanel_update.tsx +0 -0
- package/templates/src/components/edit/panels/StyleImagePanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleImagePanel_add.tsx +0 -0
- package/templates/src/components/edit/panels/StyleImagePanel_remove.tsx +0 -0
- package/templates/src/components/edit/panels/StyleImagePanel_update.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel_add.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel_remove.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLiElementPanel_update.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLinkPanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_add.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_config.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_remove.tsx +0 -0
- package/templates/src/components/edit/panels/StyleLinkPanel_update.tsx +0 -0
- package/templates/src/components/edit/panels/StyleParentPanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleParentPanel_add.tsx +0 -0
- package/templates/src/components/edit/panels/StyleParentPanel_deleteLayer.tsx +0 -0
- package/templates/src/components/edit/panels/StyleParentPanel_remove.tsx +0 -0
- package/templates/src/components/edit/panels/StyleParentPanel_update.tsx +0 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel.tsx +0 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_add.tsx +0 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_config.tsx +0 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_remove.tsx +0 -0
- package/templates/src/components/edit/panels/StyleWidgetPanel_update.tsx +0 -0
- package/templates/src/components/edit/state/SaveModal.tsx +0 -0
- package/templates/src/components/edit/state/StylesMemory.tsx +0 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentConfigPanel.tsx +0 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_menu.tsx +0 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_og.tsx +0 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_slug.tsx +0 -0
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_title.tsx +0 -0
- package/templates/src/components/edit/widgets/BeliefWidget.tsx +0 -0
- package/templates/src/components/edit/widgets/BunnyWidget.tsx +0 -0
- package/templates/src/components/edit/widgets/IdentifyAsWidget.tsx +0 -0
- package/templates/src/components/edit/widgets/SignupWidget.tsx +0 -0
- package/templates/src/components/edit/widgets/ToggleWidget.tsx +0 -0
- package/templates/src/components/edit/widgets/YouTubeWidget.tsx +0 -0
- package/templates/src/components/fields/ActionBuilderTimeSelector.tsx +0 -0
- package/templates/src/components/fields/ArtpackImage.tsx +0 -0
- package/templates/src/components/fields/BackgroundImage.tsx +0 -0
- package/templates/src/components/fields/BackgroundImageWrapper.tsx +0 -0
- package/templates/src/components/fields/BooleanParam.tsx +0 -0
- package/templates/src/components/fields/BunnyMomentSelector.tsx +0 -0
- package/templates/src/components/fields/ColorPickerCombo.tsx +0 -0
- package/templates/src/components/fields/ImageUpload.tsx +0 -0
- package/templates/src/components/fields/MultiParam.tsx +0 -0
- package/templates/src/components/fields/PaneBreakCollectionSelector.tsx +0 -0
- package/templates/src/components/fields/PaneBreakShapeSelector.tsx +0 -0
- package/templates/src/components/fields/SelectedTailwindClass.tsx +0 -0
- package/templates/src/components/fields/SingleParam.tsx +0 -0
- package/templates/src/components/fields/ViewportComboBox.tsx +0 -0
- package/templates/src/components/form/ActionBuilderField.tsx +0 -0
- package/templates/src/components/form/ActionBuilderSlugSelector.tsx +0 -0
- package/templates/src/components/form/BooleanToggle.tsx +0 -0
- package/templates/src/components/form/ColorPicker.tsx +0 -0
- package/templates/src/components/form/DateTimeInput.tsx +0 -0
- package/templates/src/components/form/EnumSelect.tsx +0 -0
- package/templates/src/components/form/FileUpload.tsx +0 -0
- package/templates/src/components/form/MagicPathBuilder.tsx +0 -0
- package/templates/src/components/form/NumberInput.tsx +0 -0
- package/templates/src/components/form/ParagraphArrayInput.tsx +0 -0
- package/templates/src/components/form/StringArrayInput.tsx +0 -0
- package/templates/src/components/form/StringInput.tsx +0 -0
- package/templates/src/components/form/UnsavedChangesBar.tsx +0 -0
- package/templates/src/components/form/advanced/APIConfigSection.tsx +0 -0
- package/templates/src/components/form/advanced/AuthConfigSection.tsx +0 -0
- package/templates/src/components/form/brand/BrandAssetsSection.tsx +0 -0
- package/templates/src/components/form/brand/BrandColorsSection.tsx +0 -0
- package/templates/src/components/form/brand/SEOSection.tsx +0 -0
- package/templates/src/components/form/brand/SiteConfigSection.tsx +0 -0
- package/templates/src/components/form/brand/SocialLinksSection.tsx +0 -0
- package/templates/src/components/profile/ProfileConsent.tsx +0 -0
- package/templates/src/components/profile/ProfileCreate.tsx +0 -0
- package/templates/src/components/profile/ProfileEdit.tsx +0 -0
- package/templates/src/components/profile/ProfileSwitch.tsx +0 -0
- package/templates/src/components/profile/ProfileUnlock.tsx +0 -0
- package/templates/src/components/storykeep/Dashboard.tsx +0 -0
- package/templates/src/components/storykeep/Dashboard_Activity.tsx +0 -0
- package/templates/src/components/storykeep/Dashboard_Advanced.tsx +0 -0
- package/templates/src/components/storykeep/Dashboard_Analytics.tsx +0 -0
- package/templates/src/components/storykeep/Dashboard_Branding.tsx +0 -0
- package/templates/src/components/storykeep/Dashboard_Content.tsx +0 -0
- package/templates/src/components/storykeep/controls/UsageCell.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/BeliefForm.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/BeliefTable.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/ContentBrowser.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/ContentSummary.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/KnownResourceForm.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/KnownResourceTable.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/ManageContent.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/MenuForm.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/MenuTable.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/ResourceBulkIngest.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/ResourceForm.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/ResourceTable.tsx +0 -0
- package/templates/src/components/storykeep/controls/content/StoryFragmentTable.tsx +0 -0
- package/templates/src/components/storykeep/state/BrandingWrapper.tsx +0 -0
- package/templates/src/components/storykeep/state/FetchAnalytics.tsx +0 -0
- package/templates/src/components/storykeep/widgets/ResponsiveLine.tsx +0 -0
- package/templates/src/components/storykeep/widgets/Wizard.tsx +0 -0
- package/templates/src/components/tenant/RegistrationForm.tsx +0 -0
- package/templates/src/components/widgets/BunnyVideoHero.astro +0 -0
- package/templates/src/components/widgets/Impression.tsx +0 -0
- package/templates/src/components/widgets/ImpressionWrapper.tsx +0 -0
- package/templates/src/constants/beliefs.ts +0 -0
- package/templates/src/constants/brandThemes.ts +0 -0
- package/templates/src/constants/prompts.json +0 -0
- package/templates/src/constants/shapes.ts +0 -0
- package/templates/src/constants/stopWords.ts +0 -0
- package/templates/src/constants/tailwindColors.json +0 -0
- package/templates/src/constants.ts +0 -2
- package/templates/src/hooks/useFormState.ts +0 -0
- package/templates/src/layouts/Layout.astro +4 -4
- package/templates/src/lib/session.ts +0 -0
- package/templates/src/lib/storyData.ts +0 -0
- package/templates/src/middleware.ts +0 -0
- package/templates/src/pages/404.astro +0 -0
- package/templates/src/pages/[...slug]/edit.astro +1 -0
- package/templates/src/pages/[...slug].astro +0 -0
- package/templates/src/pages/api/auth/decode.ts +0 -0
- package/templates/src/pages/api/auth/login.ts +0 -0
- package/templates/src/pages/api/auth/logout.ts +0 -0
- package/templates/src/pages/api/auth/profile.ts +0 -0
- package/templates/src/pages/api/orphan-analysis.ts +0 -0
- package/templates/src/pages/api/tailwind.ts +0 -0
- package/templates/src/pages/collections/[param1].astro +0 -0
- package/templates/src/pages/context/[...contextSlug]/edit.astro +1 -0
- package/templates/src/pages/context/[...contextSlug].astro +0 -0
- package/templates/src/pages/llms.txt.ts +0 -0
- package/templates/src/pages/maint.astro +0 -0
- package/templates/src/pages/media/[...slug].astro +0 -0
- package/templates/src/pages/robots.txt.ts +0 -0
- package/templates/src/pages/sandbox/activate.astro +0 -0
- package/templates/src/pages/sandbox/register.astro +0 -0
- package/templates/src/pages/sandbox/success.astro +0 -0
- package/templates/src/pages/sitemap.xml.ts +0 -0
- package/templates/src/pages/storykeep/advanced.astro +1 -1
- package/templates/src/pages/storykeep/branding.astro +1 -1
- package/templates/src/pages/storykeep/content.astro +1 -1
- package/templates/src/pages/storykeep/init.astro +0 -0
- package/templates/src/pages/storykeep/login.astro +0 -0
- package/templates/src/pages/storykeep/logout.astro +0 -0
- package/templates/src/pages/storykeep/profile.astro +1 -1
- package/templates/src/pages/storykeep.astro +0 -0
- package/templates/src/stores/analytics.ts +0 -0
- package/templates/src/stores/backend.ts +0 -0
- package/templates/src/stores/navigation.ts +0 -0
- package/templates/src/stores/nodes.ts +0 -0
- package/templates/src/stores/nodesHistory.ts +0 -0
- package/templates/src/stores/notificationSystem.ts +0 -0
- package/templates/src/stores/orphanAnalysis.ts +0 -0
- package/templates/src/stores/storykeep.ts +0 -0
- package/templates/src/types/astro.ts +0 -0
- package/templates/src/types/compositorTypes.ts +0 -0
- package/templates/src/types/formTypes.ts +0 -0
- package/templates/src/types/multiTenant.ts +0 -0
- package/templates/src/types/nodeProps.ts +0 -0
- package/templates/src/types/tractstack.ts +0 -0
- package/templates/src/utils/aai/getTitleSlug.ts +0 -0
- package/templates/src/utils/actions/actionButton.ts +0 -0
- package/templates/src/utils/actions/lispLexer.ts +0 -0
- package/templates/src/utils/actions/preParse_Action.ts +0 -0
- package/templates/src/utils/actions/preParse_Bunny.ts +0 -0
- package/templates/src/utils/actions/preParse_Clicked.ts +0 -0
- package/templates/src/utils/actions/preParse_Impression.ts +0 -0
- package/templates/src/utils/api/advancedConfig.ts +0 -0
- package/templates/src/utils/api/advancedHelpers.ts +0 -0
- package/templates/src/utils/api/beliefConfig.ts +0 -0
- package/templates/src/utils/api/beliefHelpers.ts +0 -0
- package/templates/src/utils/api/brandConfig.ts +0 -0
- package/templates/src/utils/api/brandHelpers.ts +0 -0
- package/templates/src/utils/api/fileHelpers.ts +0 -0
- package/templates/src/utils/api/menuConfig.ts +0 -0
- package/templates/src/utils/api/menuHelpers.ts +0 -0
- package/templates/src/utils/api/resourceConfig.ts +0 -0
- package/templates/src/utils/api/resourceHelpers.ts +0 -0
- package/templates/src/utils/api/tenantConfig.ts +0 -0
- package/templates/src/utils/api/tenantHelpers.ts +0 -0
- package/templates/src/utils/api.ts +0 -0
- package/templates/src/utils/auth.ts +0 -0
- package/templates/src/utils/backend.ts +0 -0
- package/templates/src/utils/compositor/TemplateMarkdowns.ts +0 -0
- package/templates/src/utils/compositor/TemplateNodes.ts +0 -0
- package/templates/src/utils/compositor/TemplatePanes.ts +0 -0
- package/templates/src/utils/compositor/allowInsert.ts +0 -0
- package/templates/src/utils/compositor/domHelpers.ts +0 -0
- package/templates/src/utils/compositor/handleClickEvent.ts +0 -0
- package/templates/src/utils/compositor/nodesHelper.ts +0 -0
- package/templates/src/utils/compositor/nodesMarkdownGenerator.ts +0 -0
- package/templates/src/utils/compositor/processMarkdown.ts +0 -0
- package/templates/src/utils/compositor/reduceNodesClassNames.ts +0 -0
- package/templates/src/utils/compositor/tailwindClasses.ts +0 -0
- package/templates/src/utils/compositor/tailwindColors.ts +0 -0
- package/templates/src/utils/compositor/templateMarkdownStyles.ts +0 -0
- package/templates/src/utils/compositor/typeGuards.ts +0 -0
- package/templates/src/utils/etl/extractor.ts +0 -0
- package/templates/src/utils/etl/index.ts +0 -0
- package/templates/src/utils/etl/loader.ts +0 -0
- package/templates/src/utils/etl/transformer.ts +0 -0
- package/templates/src/utils/helpers.ts +0 -0
- package/templates/src/utils/layout.ts +0 -0
- package/templates/src/utils/profileStorage.ts +0 -0
- package/templates/src/utils/useInterval.ts +0 -0
- package/templates/tailwind.config.cjs +0 -0
- package/utils/create-resolver.ts +0 -0
- package/utils/inject-files.ts +6 -6
- package/utils/validate-config.ts +0 -0
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
interface AnalyticsEvent {
|
|
5
|
-
contentId: string;
|
|
6
|
-
contentType: 'Pane' | 'StoryFragment';
|
|
7
|
-
eventVerb: string;
|
|
8
|
-
duration?: number;
|
|
9
|
-
}
|
|
1
|
+
const THRESHOLD_GLOSSED = 7000; // 7 seconds in ms
|
|
2
|
+
const THRESHOLD_READ = 42000; // 42 seconds in ms
|
|
3
|
+
const VERBOSE = false;
|
|
10
4
|
|
|
11
|
-
const paneViewTimes = new Map
|
|
5
|
+
const paneViewTimes = new Map();
|
|
12
6
|
let hasTrackedEntered =
|
|
13
7
|
localStorage.getItem('tractstack_entered_tracked') === 'true';
|
|
14
|
-
let currentStoryfragmentId
|
|
8
|
+
let currentStoryfragmentId = null;
|
|
15
9
|
let isPageInitialized = false;
|
|
16
|
-
let globalObserver
|
|
10
|
+
let globalObserver = null;
|
|
17
11
|
|
|
18
|
-
function waitForSessionReady()
|
|
12
|
+
function waitForSessionReady() {
|
|
19
13
|
return new Promise((resolve) => {
|
|
20
14
|
if (window.TRACTSTACK_CONFIG?.session?.isReady) {
|
|
21
15
|
resolve();
|
|
@@ -27,7 +21,7 @@ function waitForSessionReady(): Promise<void> {
|
|
|
27
21
|
});
|
|
28
22
|
}
|
|
29
23
|
|
|
30
|
-
export async function initAnalyticsTracking(storyfragmentId
|
|
24
|
+
export async function initAnalyticsTracking(storyfragmentId) {
|
|
31
25
|
if (isPageInitialized) return;
|
|
32
26
|
isPageInitialized = true;
|
|
33
27
|
|
|
@@ -71,7 +65,7 @@ function initPaneVisibilityTracking() {
|
|
|
71
65
|
globalObserver = new IntersectionObserver(
|
|
72
66
|
(entries) => {
|
|
73
67
|
entries.forEach((entry) => {
|
|
74
|
-
const paneId = getPaneIdFromElement(entry.target
|
|
68
|
+
const paneId = getPaneIdFromElement(entry.target);
|
|
75
69
|
if (!paneId) return;
|
|
76
70
|
if (entry.isIntersecting) {
|
|
77
71
|
if (!paneViewTimes.has(paneId)) {
|
|
@@ -82,7 +76,7 @@ function initPaneVisibilityTracking() {
|
|
|
82
76
|
if (startTime) {
|
|
83
77
|
const duration = Date.now() - startTime;
|
|
84
78
|
paneViewTimes.delete(paneId);
|
|
85
|
-
let eventVerb
|
|
79
|
+
let eventVerb = null;
|
|
86
80
|
if (duration >= THRESHOLD_READ) eventVerb = 'READ';
|
|
87
81
|
else if (duration >= THRESHOLD_GLOSSED) eventVerb = 'GLOSSED';
|
|
88
82
|
if (eventVerb) {
|
|
@@ -105,7 +99,7 @@ function initPaneVisibilityTracking() {
|
|
|
105
99
|
function observeAllPanes() {
|
|
106
100
|
if (!globalObserver) return;
|
|
107
101
|
const panes = document.querySelectorAll('[data-pane-id]');
|
|
108
|
-
panes.forEach((pane) => globalObserver
|
|
102
|
+
panes.forEach((pane) => globalObserver.observe(pane));
|
|
109
103
|
}
|
|
110
104
|
|
|
111
105
|
function setupLifecycleListeners() {
|
|
@@ -151,7 +145,7 @@ function flushPendingPaneEvents() {
|
|
|
151
145
|
const flushTime = Date.now();
|
|
152
146
|
paneViewTimes.forEach((startTime, paneId) => {
|
|
153
147
|
const duration = flushTime - startTime;
|
|
154
|
-
let eventVerb
|
|
148
|
+
let eventVerb = null;
|
|
155
149
|
if (duration >= THRESHOLD_READ) eventVerb = 'READ';
|
|
156
150
|
else if (duration >= THRESHOLD_GLOSSED) eventVerb = 'GLOSSED';
|
|
157
151
|
if (eventVerb) {
|
|
@@ -166,13 +160,13 @@ function flushPendingPaneEvents() {
|
|
|
166
160
|
paneViewTimes.clear();
|
|
167
161
|
}
|
|
168
162
|
|
|
169
|
-
async function sendAnalyticsEvent(event
|
|
163
|
+
async function sendAnalyticsEvent(event) {
|
|
170
164
|
try {
|
|
171
165
|
const config = window.TRACTSTACK_CONFIG;
|
|
172
166
|
if (!config || !config.sessionId) return; // Use server-provided session ID
|
|
173
167
|
|
|
174
168
|
const sessionId = config.sessionId;
|
|
175
|
-
const formData
|
|
169
|
+
const formData = {
|
|
176
170
|
beliefId: event.contentId,
|
|
177
171
|
beliefType: event.contentType,
|
|
178
172
|
beliefValue: event.eventVerb,
|
|
@@ -198,11 +192,11 @@ async function sendAnalyticsEvent(event: AnalyticsEvent): Promise<void> {
|
|
|
198
192
|
}
|
|
199
193
|
}
|
|
200
194
|
|
|
201
|
-
function getPaneIdFromElement(element
|
|
195
|
+
function getPaneIdFromElement(element) {
|
|
202
196
|
return element.getAttribute('data-pane-id');
|
|
203
197
|
}
|
|
204
198
|
|
|
205
|
-
|
|
199
|
+
window.initAnalyticsTracking = initAnalyticsTracking;
|
|
206
200
|
|
|
207
201
|
setupLifecycleListeners();
|
|
208
202
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const VERBOSE = false;
|
|
2
2
|
|
|
3
3
|
// This function now contains all essential one-time and recurring HTMX setup.
|
|
4
4
|
function configureHtmx() {
|
|
@@ -9,7 +9,7 @@ function configureHtmx() {
|
|
|
9
9
|
window.HTMX_CONFIGURED = true;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
window.htmx.on(document.body, 'htmx:configRequest', function (evt
|
|
12
|
+
window.htmx.on(document.body, 'htmx:configRequest', function (evt) {
|
|
13
13
|
const config = window.TRACTSTACK_CONFIG;
|
|
14
14
|
if (!config || !config.sessionId) return; // Check for config and session ID
|
|
15
15
|
|
|
@@ -27,20 +27,10 @@ function configureHtmx() {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
beliefId: string;
|
|
33
|
-
beliefType: string;
|
|
34
|
-
beliefValue: string;
|
|
35
|
-
paneId: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const pageBeliefs: {
|
|
39
|
-
[storyfragmentId: string]: { [beliefId: string]: string };
|
|
40
|
-
} = {};
|
|
41
|
-
let activeStoryfragmentId: string | null = null;
|
|
30
|
+
const pageBeliefs = {};
|
|
31
|
+
let activeStoryfragmentId = null;
|
|
42
32
|
|
|
43
|
-
function waitForSessionReady()
|
|
33
|
+
function waitForSessionReady() {
|
|
44
34
|
return new Promise((resolve) => {
|
|
45
35
|
// This event is fired by sse.ts after the handshake is complete.
|
|
46
36
|
if (window.TRACTSTACK_CONFIG?.session?.isReady) {
|
|
@@ -66,21 +56,19 @@ function initializeBeliefs() {
|
|
|
66
56
|
|
|
67
57
|
configureHtmx(); // Run config on initial load.
|
|
68
58
|
|
|
69
|
-
document.addEventListener('change', function (event
|
|
70
|
-
const target = event.target
|
|
59
|
+
document.addEventListener('change', function (event) {
|
|
60
|
+
const target = event.target;
|
|
71
61
|
if (
|
|
72
62
|
target.matches &&
|
|
73
63
|
(target.matches('select[data-belief-id]') ||
|
|
74
64
|
target.matches('input[type="checkbox"][data-belief-id]'))
|
|
75
65
|
) {
|
|
76
|
-
handleBeliefChange(target
|
|
66
|
+
handleBeliefChange(target);
|
|
77
67
|
}
|
|
78
68
|
});
|
|
79
69
|
}
|
|
80
70
|
|
|
81
|
-
async function handleBeliefChange(
|
|
82
|
-
element: HTMLSelectElement | HTMLInputElement
|
|
83
|
-
): Promise<void> {
|
|
71
|
+
async function handleBeliefChange(element) {
|
|
84
72
|
const beliefId = element.getAttribute('data-belief-id');
|
|
85
73
|
const beliefType = element.getAttribute('data-belief-type');
|
|
86
74
|
const paneId = element.getAttribute('data-pane-id');
|
|
@@ -91,13 +79,11 @@ async function handleBeliefChange(
|
|
|
91
79
|
return;
|
|
92
80
|
}
|
|
93
81
|
|
|
94
|
-
let beliefValue
|
|
95
|
-
if (
|
|
96
|
-
beliefValue =
|
|
97
|
-
? 'BELIEVES_YES'
|
|
98
|
-
: 'BELIEVES_NO';
|
|
82
|
+
let beliefValue;
|
|
83
|
+
if (element.type === 'checkbox') {
|
|
84
|
+
beliefValue = element.checked ? 'BELIEVES_YES' : 'BELIEVES_NO';
|
|
99
85
|
} else {
|
|
100
|
-
beliefValue =
|
|
86
|
+
beliefValue = element.value;
|
|
101
87
|
}
|
|
102
88
|
|
|
103
89
|
if (VERBOSE)
|
|
@@ -119,7 +105,7 @@ async function handleBeliefChange(
|
|
|
119
105
|
});
|
|
120
106
|
}
|
|
121
107
|
|
|
122
|
-
async function sendBeliefUpdate(data
|
|
108
|
+
async function sendBeliefUpdate(data) {
|
|
123
109
|
await waitForSessionReady();
|
|
124
110
|
|
|
125
111
|
try {
|
|
@@ -164,7 +150,7 @@ async function sendBeliefUpdate(data: BeliefUpdateData): Promise<void> {
|
|
|
164
150
|
}
|
|
165
151
|
}
|
|
166
152
|
|
|
167
|
-
function trackBeliefState(beliefId
|
|
153
|
+
function trackBeliefState(beliefId, beliefValue) {
|
|
168
154
|
if (!activeStoryfragmentId) return;
|
|
169
155
|
|
|
170
156
|
if (!pageBeliefs[activeStoryfragmentId]) {
|
|
@@ -2,51 +2,15 @@
|
|
|
2
2
|
* SSE (Server-Sent Events) Client with Critical Debug Logging
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface StoryfragmentUpdate {
|
|
8
|
-
storyfragmentId: string;
|
|
9
|
-
affectedPanes: string[];
|
|
10
|
-
gotoPaneId?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface BatchPanesUpdatedEventData {
|
|
14
|
-
updates: StoryfragmentUpdate[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface PanesUpdatedEventData {
|
|
18
|
-
storyfragmentId: string;
|
|
19
|
-
affectedPanes: string[];
|
|
20
|
-
gotoPaneId?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
type PanesEventData = BatchPanesUpdatedEventData | PanesUpdatedEventData;
|
|
24
|
-
|
|
25
|
-
interface HandshakeRequest {
|
|
26
|
-
sessionId: string;
|
|
27
|
-
storyfragmentId: string;
|
|
28
|
-
consent: string;
|
|
29
|
-
encryptedEmail?: string;
|
|
30
|
-
encryptedCode?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface HandshakeResponse {
|
|
34
|
-
fingerprint: string;
|
|
35
|
-
visitId: string;
|
|
36
|
-
sessionId: string;
|
|
37
|
-
hasProfile: boolean;
|
|
38
|
-
consent: string;
|
|
39
|
-
restored?: boolean;
|
|
40
|
-
affectedPanes?: string[];
|
|
41
|
-
}
|
|
5
|
+
const VERBOSE = false;
|
|
42
6
|
|
|
43
7
|
// ============================================================================
|
|
44
8
|
// GLOBAL STATE
|
|
45
9
|
// ============================================================================
|
|
46
10
|
|
|
47
|
-
let eventSource
|
|
11
|
+
let eventSource = null;
|
|
48
12
|
let isHtmxReady = false;
|
|
49
|
-
let currentStoryfragmentId
|
|
13
|
+
let currentStoryfragmentId = null;
|
|
50
14
|
let reconnectAttempts = 0;
|
|
51
15
|
|
|
52
16
|
const BASE_RECONNECT_DELAY = 1000;
|
|
@@ -56,20 +20,15 @@ const MAX_RECONNECT_ATTEMPTS = 5;
|
|
|
56
20
|
// CRITICAL DEBUG LOGGING
|
|
57
21
|
// ============================================================================
|
|
58
22
|
|
|
59
|
-
function log(...args
|
|
23
|
+
function log(...args) {
|
|
60
24
|
if (VERBOSE) console.log('🔌 SSE DEBUG:', ...args);
|
|
61
25
|
}
|
|
62
26
|
|
|
63
|
-
function logCritical(...args
|
|
27
|
+
function logCritical(...args) {
|
|
64
28
|
if (VERBOSE) console.error('🚨 SSE CRITICAL:', ...args);
|
|
65
29
|
}
|
|
66
30
|
|
|
67
|
-
function logStoryfragmentChange(
|
|
68
|
-
action: string,
|
|
69
|
-
oldId: string | null,
|
|
70
|
-
newId: string | null,
|
|
71
|
-
source: string
|
|
72
|
-
): void {
|
|
31
|
+
function logStoryfragmentChange(action, oldId, newId, source) {
|
|
73
32
|
logCritical(`STORYFRAGMENT ${action}:`, {
|
|
74
33
|
action,
|
|
75
34
|
oldId,
|
|
@@ -81,12 +40,7 @@ function logStoryfragmentChange(
|
|
|
81
40
|
});
|
|
82
41
|
}
|
|
83
42
|
|
|
84
|
-
function logSSEEvent(
|
|
85
|
-
eventType: string,
|
|
86
|
-
data: any,
|
|
87
|
-
willProcess: boolean,
|
|
88
|
-
reason?: string
|
|
89
|
-
): void {
|
|
43
|
+
function logSSEEvent(eventType, data, willProcess, reason) {
|
|
90
44
|
logCritical(`SSE EVENT ${eventType}:`, {
|
|
91
45
|
eventType,
|
|
92
46
|
data,
|
|
@@ -102,9 +56,7 @@ function logSSEEvent(
|
|
|
102
56
|
// SSE HANDSHAKE
|
|
103
57
|
// ============================================================================
|
|
104
58
|
|
|
105
|
-
async function performSSEHandshake(
|
|
106
|
-
sessionId: string
|
|
107
|
-
): Promise<HandshakeResponse> {
|
|
59
|
+
async function performSSEHandshake(sessionId) {
|
|
108
60
|
log('=== STARTING SSE HANDSHAKE ===');
|
|
109
61
|
log('📤 Session ID provided by server:', sessionId);
|
|
110
62
|
|
|
@@ -144,7 +96,7 @@ async function performSSEHandshake(
|
|
|
144
96
|
const consent = localStorage.getItem('tractstack_consent') || '0';
|
|
145
97
|
log('📋 Consent status:', consent);
|
|
146
98
|
|
|
147
|
-
const handshakePayload
|
|
99
|
+
const handshakePayload = {
|
|
148
100
|
sessionId,
|
|
149
101
|
storyfragmentId: config.storyfragmentId,
|
|
150
102
|
consent,
|
|
@@ -178,7 +130,7 @@ async function performSSEHandshake(
|
|
|
178
130
|
throw new Error(`Handshake failed with status ${response.status}`);
|
|
179
131
|
}
|
|
180
132
|
|
|
181
|
-
const result
|
|
133
|
+
const result = await response.json();
|
|
182
134
|
log('📥 Handshake response received:', result);
|
|
183
135
|
|
|
184
136
|
const restorationDetails = {
|
|
@@ -272,7 +224,7 @@ async function performSSEHandshake(
|
|
|
272
224
|
// SSE CONNECTION
|
|
273
225
|
// ============================================================================
|
|
274
226
|
|
|
275
|
-
function initializeSSE(sessionId
|
|
227
|
+
function initializeSSE(sessionId) {
|
|
276
228
|
log('=== SSE CONNECTION INITIALIZATION ===');
|
|
277
229
|
|
|
278
230
|
if (eventSource) {
|
|
@@ -299,22 +251,19 @@ function initializeSSE(sessionId: string): void {
|
|
|
299
251
|
|
|
300
252
|
eventSource.addEventListener('connected', (event) => {
|
|
301
253
|
try {
|
|
302
|
-
const data = JSON.parse(
|
|
254
|
+
const data = JSON.parse(event.data);
|
|
303
255
|
log('📡 SSE Connected event received:', data);
|
|
304
256
|
} catch (error) {
|
|
305
|
-
log(
|
|
306
|
-
'⚠️ Failed to parse connected event data:',
|
|
307
|
-
(event as MessageEvent).data
|
|
308
|
-
);
|
|
257
|
+
log('⚠️ Failed to parse connected event data:', event.data);
|
|
309
258
|
}
|
|
310
259
|
});
|
|
311
260
|
|
|
312
261
|
eventSource.addEventListener('heartbeat', (event) => {
|
|
313
262
|
try {
|
|
314
|
-
const data = JSON.parse(
|
|
263
|
+
const data = JSON.parse(event.data);
|
|
315
264
|
log('💓 SSE Heartbeat:', data);
|
|
316
265
|
} catch (error) {
|
|
317
|
-
log('⚠️ Failed to parse heartbeat data:',
|
|
266
|
+
log('⚠️ Failed to parse heartbeat data:', event.data);
|
|
318
267
|
}
|
|
319
268
|
});
|
|
320
269
|
|
|
@@ -330,7 +279,7 @@ function initializeSSE(sessionId: string): void {
|
|
|
330
279
|
log('📨 === PANES_UPDATED EVENT ===');
|
|
331
280
|
|
|
332
281
|
try {
|
|
333
|
-
const data
|
|
282
|
+
const data = JSON.parse(event.data);
|
|
334
283
|
|
|
335
284
|
logCritical('📨 PANES_UPDATED PARSED:', {
|
|
336
285
|
data,
|
|
@@ -426,7 +375,7 @@ function initializeSSE(sessionId: string): void {
|
|
|
426
375
|
};
|
|
427
376
|
}
|
|
428
377
|
|
|
429
|
-
function processStoryfragmentUpdate(update
|
|
378
|
+
function processStoryfragmentUpdate(update) {
|
|
430
379
|
logCritical('🔄 PROCESSING UPDATE:', {
|
|
431
380
|
storyfragmentId: update.storyfragmentId,
|
|
432
381
|
affectedPanes: update.affectedPanes,
|
|
@@ -502,7 +451,7 @@ function processStoryfragmentUpdate(update: StoryfragmentUpdate): void {
|
|
|
502
451
|
log('🔄 === UPDATE PROCESSING COMPLETE ===');
|
|
503
452
|
}
|
|
504
453
|
|
|
505
|
-
function handleReconnection()
|
|
454
|
+
function handleReconnection() {
|
|
506
455
|
if (reconnectAttempts >= MAX_RECONNECT_ATTEMPTS) {
|
|
507
456
|
log(
|
|
508
457
|
`❌ Max reconnection attempts (${MAX_RECONNECT_ATTEMPTS}) reached. Giving up.`
|
|
@@ -531,10 +480,7 @@ function handleReconnection(): void {
|
|
|
531
480
|
// CONTEXT MANAGEMENT
|
|
532
481
|
// ============================================================================
|
|
533
482
|
|
|
534
|
-
function updateStoryfragmentContext(
|
|
535
|
-
newStoryfragmentId: string,
|
|
536
|
-
source: string
|
|
537
|
-
): void {
|
|
483
|
+
function updateStoryfragmentContext(newStoryfragmentId, source) {
|
|
538
484
|
const oldId = currentStoryfragmentId;
|
|
539
485
|
|
|
540
486
|
if (currentStoryfragmentId !== newStoryfragmentId) {
|
|
@@ -555,7 +501,7 @@ function updateStoryfragmentContext(
|
|
|
555
501
|
// CONNECTION SETUP
|
|
556
502
|
// ============================================================================
|
|
557
503
|
|
|
558
|
-
function setupSSEConnection()
|
|
504
|
+
function setupSSEConnection() {
|
|
559
505
|
log('=== SSE CONNECTION SETUP ===');
|
|
560
506
|
log('🚀 First-time SSE initialization');
|
|
561
507
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|