cursedbelt 1.0.0 → 2.5.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/dist/client/index.js +1 -1
- package/dist/core/category/index.d.ts.map +1 -1
- package/dist/core/category/index.js +2 -1
- package/dist/core/category/index.js.map +1 -1
- package/dist/core/category/types.js +1 -1
- package/dist/core/category/types.js.map +1 -1
- package/dist/core/file-tree/fileTreeModel.d.ts +49 -0
- package/dist/core/file-tree/fileTreeModel.d.ts.map +1 -1
- package/dist/core/file-tree/fileTreeModel.js +84 -0
- package/dist/core/file-tree/fileTreeModel.js.map +1 -1
- package/dist/core/layout/index.js +1 -1
- package/dist/core/layout/index.js.map +1 -1
- package/dist/core/media/index.js +1 -1
- package/dist/core/media/index.js.map +1 -1
- package/dist/core/media/types.js +1 -1
- package/dist/core/media/types.js.map +1 -1
- package/dist/core/media/uploadLimits.js +1 -1
- package/dist/core/media/uploadLimits.js.map +1 -1
- package/dist/core/sharing/model.d.ts +1 -1
- package/dist/ctgr/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react/activity-bar/ActivityBar.d.ts +17 -0
- package/dist/react/activity-bar/ActivityBar.d.ts.map +1 -1
- package/dist/react/activity-bar/ActivityBar.js.map +1 -1
- package/dist/react/analytics/index.d.ts +1 -1
- package/dist/react/analytics/index.js +1 -1
- package/dist/react/chat/MessageComposer.d.ts.map +1 -1
- package/dist/react/chat/MessageComposer.js +5 -4
- package/dist/react/chat/MessageComposer.js.map +1 -1
- package/dist/react/components/Button.d.ts.map +1 -1
- package/dist/react/components/Button.js +3 -2
- package/dist/react/components/Button.js.map +1 -1
- package/dist/react/components/Checkbox.d.ts +19 -3
- package/dist/react/components/Checkbox.d.ts.map +1 -1
- package/dist/react/components/Checkbox.js +29 -12
- package/dist/react/components/Checkbox.js.map +1 -1
- package/dist/react/components/CodeArea.d.ts.map +1 -1
- package/dist/react/components/CodeArea.js +2 -1
- package/dist/react/components/CodeArea.js.map +1 -1
- package/dist/react/components/Collapsible.d.ts.map +1 -1
- package/dist/react/components/Collapsible.js +2 -1
- package/dist/react/components/Collapsible.js.map +1 -1
- package/dist/react/components/ComboboxField.d.ts.map +1 -1
- package/dist/react/components/ComboboxField.js +3 -2
- package/dist/react/components/ComboboxField.js.map +1 -1
- package/dist/react/components/CopyButton.d.ts.map +1 -1
- package/dist/react/components/CopyButton.js +2 -1
- package/dist/react/components/CopyButton.js.map +1 -1
- package/dist/react/components/DataTable/ColumnChecklist.d.ts.map +1 -1
- package/dist/react/components/DataTable/ColumnChecklist.js +2 -1
- package/dist/react/components/DataTable/ColumnChecklist.js.map +1 -1
- package/dist/react/components/DataTable/Pagination.d.ts.map +1 -1
- package/dist/react/components/DataTable/Pagination.js +2 -1
- package/dist/react/components/DataTable/Pagination.js.map +1 -1
- package/dist/react/components/DataTable/SortHeader.d.ts.map +1 -1
- package/dist/react/components/DataTable/SortHeader.js +2 -1
- package/dist/react/components/DataTable/SortHeader.js.map +1 -1
- package/dist/react/components/DataTable/TableFilterBuilder.d.ts +61 -0
- package/dist/react/components/DataTable/TableFilterBuilder.d.ts.map +1 -0
- package/dist/react/components/DataTable/{FilterBuilder.js → TableFilterBuilder.js} +26 -3
- package/dist/react/components/DataTable/TableFilterBuilder.js.map +1 -0
- package/dist/react/components/DataTable/Toolbar.d.ts +1 -1
- package/dist/react/components/DataTable/Toolbar.js +3 -3
- package/dist/react/components/DataTable/Toolbar.js.map +1 -1
- package/dist/react/components/DataTable/cells/LinkCell.d.ts.map +1 -1
- package/dist/react/components/DataTable/cells/LinkCell.js +2 -1
- package/dist/react/components/DataTable/cells/LinkCell.js.map +1 -1
- package/dist/react/components/DataTable/index.d.ts +1 -1
- package/dist/react/components/DataTable/index.d.ts.map +1 -1
- package/dist/react/components/DataTable/index.js +4 -1
- package/dist/react/components/DataTable/index.js.map +1 -1
- package/dist/react/components/DragHandle.d.ts.map +1 -1
- package/dist/react/components/DragHandle.js +2 -1
- package/dist/react/components/DragHandle.js.map +1 -1
- package/dist/react/components/EmojiField.d.ts.map +1 -1
- package/dist/react/components/EmojiField.js +2 -1
- package/dist/react/components/EmojiField.js.map +1 -1
- package/dist/react/components/EventTimeline.d.ts +3 -2
- package/dist/react/components/EventTimeline.d.ts.map +1 -1
- package/dist/react/components/EventTimeline.js +3 -2
- package/dist/react/components/EventTimeline.js.map +1 -1
- package/dist/react/components/IconButton.d.ts +1 -1
- package/dist/react/components/IconButton.js +1 -1
- package/dist/react/components/InfoHint.d.ts.map +1 -1
- package/dist/react/components/InfoHint.js +5 -4
- package/dist/react/components/InfoHint.js.map +1 -1
- package/dist/react/components/InheritBadge.js +1 -1
- package/dist/react/components/InheritBadge.js.map +1 -1
- package/dist/react/components/InlineEditableText.d.ts.map +1 -1
- package/dist/react/components/InlineEditableText.js +2 -1
- package/dist/react/components/InlineEditableText.js.map +1 -1
- package/dist/react/components/MeterList.d.ts.map +1 -1
- package/dist/react/components/MeterList.js +2 -1
- package/dist/react/components/MeterList.js.map +1 -1
- package/dist/react/components/PathText.d.ts +2 -2
- package/dist/react/components/PathText.d.ts.map +1 -1
- package/dist/react/components/PathText.js +2 -1
- package/dist/react/components/PathText.js.map +1 -1
- package/dist/react/components/RatingField.d.ts.map +1 -1
- package/dist/react/components/RatingField.js +2 -1
- package/dist/react/components/RatingField.js.map +1 -1
- package/dist/react/components/SecretInput.js +3 -2
- package/dist/react/components/SecretInput.js.map +1 -1
- package/dist/react/components/SegmentedControl.d.ts.map +1 -1
- package/dist/react/components/SegmentedControl.js +2 -1
- package/dist/react/components/SegmentedControl.js.map +1 -1
- package/dist/react/components/StarRating.d.ts.map +1 -1
- package/dist/react/components/StarRating.js +9 -5
- package/dist/react/components/StarRating.js.map +1 -1
- package/dist/react/components/StatStrip.d.ts.map +1 -1
- package/dist/react/components/StatStrip.js +2 -1
- package/dist/react/components/StatStrip.js.map +1 -1
- package/dist/react/components/StatTile.d.ts.map +1 -1
- package/dist/react/components/StatTile.js +3 -2
- package/dist/react/components/StatTile.js.map +1 -1
- package/dist/react/components/Tabs.d.ts.map +1 -1
- package/dist/react/components/Tabs.js +2 -1
- package/dist/react/components/Tabs.js.map +1 -1
- package/dist/react/components/TruncatedText.d.ts +2 -1
- package/dist/react/components/TruncatedText.d.ts.map +1 -1
- package/dist/react/components/TruncatedText.js +2 -1
- package/dist/react/components/TruncatedText.js.map +1 -1
- package/dist/react/components/calendar/MonthGrid.d.ts.map +1 -1
- package/dist/react/components/calendar/MonthGrid.js +2 -1
- package/dist/react/components/calendar/MonthGrid.js.map +1 -1
- package/dist/react/components/calendar/WeekView.d.ts.map +1 -1
- package/dist/react/components/calendar/WeekView.js +2 -1
- package/dist/react/components/calendar/WeekView.js.map +1 -1
- package/dist/react/components/revealOnHover.d.ts.map +1 -1
- package/dist/react/components/revealOnHover.js +2 -1
- package/dist/react/components/revealOnHover.js.map +1 -1
- package/dist/react/file-tree/FileTree.d.ts +50 -1
- package/dist/react/file-tree/FileTree.d.ts.map +1 -1
- package/dist/react/file-tree/FileTree.js +234 -6
- package/dist/react/file-tree/FileTree.js.map +1 -1
- package/dist/react/file-tree/fileTree.css +52 -0
- package/dist/react/filter-rail/FilterRail.d.ts.map +1 -1
- package/dist/react/filter-rail/FilterRail.js +5 -4
- package/dist/react/filter-rail/FilterRail.js.map +1 -1
- package/dist/react/folder-tree/FolderTreeRail.d.ts.map +1 -1
- package/dist/react/folder-tree/FolderTreeRail.js +2 -1
- package/dist/react/folder-tree/FolderTreeRail.js.map +1 -1
- package/dist/react/index.d.ts +5 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +5 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/layoutEngine/index.js +1 -1
- package/dist/react/layoutEngine/index.js.map +1 -1
- package/dist/react/lib/field.d.ts.map +1 -1
- package/dist/react/lib/field.js +3 -2
- package/dist/react/lib/field.js.map +1 -1
- package/dist/react/lib/floatingStyles.d.ts.map +1 -1
- package/dist/react/lib/floatingStyles.js +2 -1
- package/dist/react/lib/floatingStyles.js.map +1 -1
- package/dist/react/lib/tapTarget.d.ts +96 -0
- package/dist/react/lib/tapTarget.d.ts.map +1 -0
- package/dist/react/lib/tapTarget.js +96 -0
- package/dist/react/lib/tapTarget.js.map +1 -0
- package/dist/react/media/VideoTrimmer.d.ts +1 -1
- package/dist/react/media/VideoTrimmer.js +1 -1
- package/dist/react/media/denseGallery.css +3 -3
- package/dist/react/media/ffmpegWasm.js +2 -2
- package/dist/react/media/ffmpegWasm.js.map +1 -1
- package/dist/react/media/videoPlayer.css +42 -0
- package/dist/react/namespace/NamespaceTargetCapsule.d.ts +2 -2
- package/dist/react/namespace/NamespaceTargetCapsule.d.ts.map +1 -1
- package/dist/react/nav/BreadcrumbTrail.d.ts.map +1 -1
- package/dist/react/nav/BreadcrumbTrail.js +4 -3
- package/dist/react/nav/BreadcrumbTrail.js.map +1 -1
- package/dist/react/nav/HubTileGrid.d.ts.map +1 -1
- package/dist/react/nav/HubTileGrid.js +2 -1
- package/dist/react/nav/HubTileGrid.js.map +1 -1
- package/dist/react/nav/SideNav.d.ts.map +1 -1
- package/dist/react/nav/SideNav.js +4 -3
- package/dist/react/nav/SideNav.js.map +1 -1
- package/dist/react/nav/SideNavCustomize.d.ts.map +1 -1
- package/dist/react/nav/SideNavCustomize.js +2 -1
- package/dist/react/nav/SideNavCustomize.js.map +1 -1
- package/dist/react/palette/CommandPalette.d.ts.map +1 -1
- package/dist/react/palette/CommandPalette.js +3 -2
- package/dist/react/palette/CommandPalette.js.map +1 -1
- package/dist/server/drivers/pooledControlStores.pg.test.js +1 -0
- package/dist/server/drivers/pooledControlStores.pg.test.js.map +1 -1
- package/dist/server/drivers/pooledIdentityStore.pg.test.js +1 -0
- package/dist/server/drivers/pooledIdentityStore.pg.test.js.map +1 -1
- package/dist/server/drivers/retentionPolicy.pg.test.js +1 -0
- package/dist/server/drivers/retentionPolicy.pg.test.js.map +1 -1
- package/dist/server/guard/argon2Binding.d.ts +1 -1
- package/dist/server/guard/argon2Binding.js +1 -1
- package/dist/server/incidents/store.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/master-lock/masterLock.d.ts +1 -1
- package/dist/server/media-bun/index.js +1 -1
- package/dist/server/media-bun/index.js.map +1 -1
- package/dist/server/paths/appDataHome.d.ts +20 -0
- package/dist/server/paths/appDataHome.d.ts.map +1 -0
- package/dist/server/paths/appDataHome.js +69 -0
- package/dist/server/paths/appDataHome.js.map +1 -0
- package/dist/server/retention/archive.d.ts +3 -4
- package/dist/server/retention/archive.d.ts.map +1 -1
- package/dist/server/retention/archive.js +20 -15
- package/dist/server/retention/archive.js.map +1 -1
- package/dist/server/retention/index.d.ts +1 -1
- package/dist/server/retention/index.js +1 -1
- package/dist/server/retention/policy.d.ts +2 -2
- package/dist/server/retention/policy.d.ts.map +1 -1
- package/dist/server/retention/policy.js +1 -1
- package/dist/server/retention/store.d.ts.map +1 -1
- package/dist/server/retention/store.js +27 -20
- package/dist/server/retention/store.js.map +1 -1
- package/dist/server/runtime/localHost.d.ts +10 -5
- package/dist/server/runtime/localHost.d.ts.map +1 -1
- package/dist/server/runtime/localHost.js +12 -8
- package/dist/server/runtime/localHost.js.map +1 -1
- package/dist/server/runtime/meterRollup.pg.test.js +1 -0
- package/dist/server/runtime/meterRollup.pg.test.js.map +1 -1
- package/dist/server/runtime/recipe.d.ts +4 -4
- package/dist/server/runtime/retentionJob.pg.test.js +1 -0
- package/dist/server/runtime/retentionJob.pg.test.js.map +1 -1
- package/dist/server/search/pgSearchProvider.pg.test.js +1 -0
- package/dist/server/search/pgSearchProvider.pg.test.js.map +1 -1
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.js +1 -1
- package/dist/styles-static.css +413 -0
- package/dist/styles-utilities.css +5074 -0
- package/dist/styles.css +49 -0
- package/package.json +30 -168
- package/scripts/generateStaticStyles.ts +122 -0
- package/scripts/generateUtilityStyles.ts +215 -0
- package/scripts/publicSurface.ts +455 -0
- package/scripts/testTmpRoot.ts +34 -5
- package/src/client/index.ts +1 -1
- package/src/core/category/index.ts +2 -1
- package/src/core/category/types.ts +1 -1
- package/src/core/file-tree/fileTreeModel.spec.ts +134 -0
- package/src/core/file-tree/fileTreeModel.ts +104 -0
- package/src/core/layout/index.ts +1 -1
- package/src/core/media/index.ts +1 -1
- package/src/core/media/types.ts +1 -1
- package/src/core/media/uploadLimits.ts +1 -1
- package/src/core/sharing/model.ts +1 -1
- package/src/ctgr/index.ts +1 -1
- package/src/declaredDepsAreImported.spec.ts +87 -0
- package/src/demoFixture.spec.ts +133 -0
- package/src/index.ts +1 -1
- package/src/lockfileIsTracked.spec.ts +50 -0
- package/src/namedSubpathsResolve.spec.ts +119 -0
- package/src/publicSurface.spec.ts +72 -0
- package/src/react/activity-bar/ActivityBar.tsx +17 -0
- package/src/react/analytics/index.ts +1 -1
- package/src/react/chat/MessageComposer.tsx +5 -4
- package/src/react/components/Button.tsx +3 -2
- package/src/react/components/Checkbox.spec.tsx +51 -0
- package/src/react/components/Checkbox.tsx +68 -26
- package/src/react/components/CodeArea.tsx +2 -1
- package/src/react/components/CodeChip.spec.tsx +2 -2
- package/src/react/components/Collapsible.tsx +2 -1
- package/src/react/components/ComboboxField.tsx +3 -2
- package/src/react/components/CopyButton.tsx +2 -1
- package/src/react/components/CopyableText.spec.tsx +1 -1
- package/src/react/components/DataTable/ColumnChecklist.tsx +2 -1
- package/src/react/components/DataTable/Pagination.tsx +2 -1
- package/src/react/components/DataTable/SortHeader.tsx +2 -1
- package/src/react/components/DataTable/{FilterBuilder.tsx → TableFilterBuilder.tsx} +33 -5
- package/src/react/components/DataTable/Toolbar.tsx +3 -3
- package/src/react/components/DataTable/cells/LinkCell.tsx +2 -1
- package/src/react/components/DataTable/index.ts +8 -1
- package/src/react/components/DragHandle.tsx +2 -1
- package/src/react/components/EmojiField.tsx +2 -1
- package/src/react/components/EventTimeline.tsx +3 -2
- package/src/react/components/FileLocation.spec.tsx +1 -1
- package/src/react/components/IconButton.tsx +1 -1
- package/src/react/components/InfoHint.tsx +5 -4
- package/src/react/components/InheritBadge.tsx +1 -1
- package/src/react/components/InlineEditableText.tsx +2 -1
- package/src/react/components/MeterList.tsx +2 -1
- package/src/react/components/PathText.tsx +4 -3
- package/src/react/components/RatingField.tsx +2 -1
- package/src/react/components/SecretInput.tsx +3 -3
- package/src/react/components/SegmentedControl.tsx +2 -2
- package/src/react/components/StarRating.spec.tsx +2 -2
- package/src/react/components/StarRating.tsx +9 -5
- package/src/react/components/StatStrip.tsx +2 -1
- package/src/react/components/StatTile.tsx +3 -3
- package/src/react/components/Tabs.spec.tsx +3 -2
- package/src/react/components/Tabs.tsx +2 -1
- package/src/react/components/TruncatedText.tsx +2 -1
- package/src/react/components/calendar/MonthGrid.spec.tsx +2 -1
- package/src/react/components/calendar/MonthGrid.tsx +2 -1
- package/src/react/components/calendar/WeekView.tsx +2 -1
- package/src/react/components/revealOnHover.ts +3 -2
- package/src/react/file-tree/FileTree.spec.tsx +248 -0
- package/src/react/file-tree/FileTree.tsx +304 -4
- package/src/react/file-tree/fileTree.css +52 -0
- package/src/react/file-tree/fileTreeGeometry.fixture.json +151 -0
- package/src/react/file-tree/fileTreeGeometry.spec.ts +33 -52
- package/src/react/filter-rail/FilterRail.spec.tsx +2 -1
- package/src/react/filter-rail/FilterRail.tsx +5 -4
- package/src/react/folder-tree/FolderTreeRail.tsx +2 -1
- package/src/react/index.ts +13 -3
- package/src/react/layoutEngine/index.ts +1 -1
- package/src/react/layoutEngine/types.ts +1 -1
- package/src/react/lib/field.ts +4 -2
- package/src/react/lib/floatingStyles.spec.ts +2 -1
- package/src/react/lib/floatingStyles.ts +3 -1
- package/src/react/lib/tapTarget.ts +100 -0
- package/src/react/media/MaskPainter.tsx +2 -2
- package/src/react/media/VideoTrimmer.tsx +1 -1
- package/src/react/media/denseGallery.css +3 -3
- package/src/react/media/ffmpegWasm.ts +2 -2
- package/src/react/media/videoPlayer.css +42 -0
- package/src/react/namespace/NamespaceTargetCapsule.tsx +2 -2
- package/src/react/nav/BreadcrumbTrail.tsx +4 -3
- package/src/react/nav/HubTileGrid.tsx +2 -1
- package/src/react/nav/SideNav.tsx +4 -3
- package/src/react/nav/SideNavCustomize.tsx +2 -1
- package/src/react/palette/CommandPalette.tsx +3 -2
- package/src/server/ctgr.ts +1 -1
- package/src/server/drivers/pooledControlStores.pg.test.ts +1 -0
- package/src/server/drivers/pooledIdentityStore.pg.test.ts +1 -0
- package/src/server/drivers/retentionPolicy.pg.test.ts +1 -0
- package/src/server/guard/argon2Binding.ts +1 -1
- package/src/server/incidents/store.ts +3 -3
- package/src/server/index.ts +1 -1
- package/src/server/master-lock/masterLock.spec.ts +18 -2
- package/src/server/master-lock/masterLock.ts +1 -1
- package/src/server/media-bun/image.spec.ts +1 -0
- package/src/server/media-bun/index.ts +1 -1
- package/src/server/media-bun/video.spec.ts +1 -0
- package/src/server/paths/appDataHome.spec.ts +87 -0
- package/src/server/paths/appDataHome.ts +84 -0
- package/src/server/retention/archive.spec.ts +26 -4
- package/src/server/retention/archive.ts +20 -15
- package/src/server/retention/index.ts +1 -1
- package/src/server/retention/policy.ts +2 -2
- package/src/server/retention/store.spec.ts +38 -10
- package/src/server/retention/store.ts +26 -19
- package/src/server/runtime/localHost.spec.ts +22 -3
- package/src/server/runtime/localHost.ts +12 -9
- package/src/server/runtime/meterRollup.pg.test.ts +1 -0
- package/src/server/runtime/recipe.ts +4 -4
- package/src/server/runtime/retentionJob.pg.test.ts +1 -0
- package/src/server/search/pgSearchProvider.pg.test.ts +1 -0
- package/src/server/storage/binaryServerProcessing.integration.spec.ts +6 -2
- package/src/server/storage/chunked.integration.spec.ts +5 -2
- package/src/server/storage/fileUploadClient-chunked.integration.spec.ts +5 -2
- package/src/server/storage/files/adapter.photo.display.spec.ts +1 -0
- package/src/server/storage/imageThumbnail.spec.ts +1 -0
- package/src/server/storage/transcode.integration.spec.ts +5 -2
- package/src/server/storage/videoProcessor.posterOnly.spec.ts +1 -0
- package/src/shared/errors.ts +1 -1
- package/src/skippedTestsAreAnswered.spec.ts +215 -0
- package/src/styles-static.css +413 -0
- package/src/styles-utilities.css +5074 -0
- package/src/styles.css +49 -0
- package/src/stylesStaticMatches.spec.ts +134 -0
- package/src/stylesUtilitiesMatches.spec.ts +314 -0
- package/src/tapTargetStylesheet.spec.ts +150 -0
- package/src/testTmpRoot.spec.ts +102 -0
- package/dist/core/duplicates/index.d.ts +0 -116
- package/dist/core/duplicates/index.d.ts.map +0 -1
- package/dist/core/duplicates/index.js +0 -178
- package/dist/core/duplicates/index.js.map +0 -1
- package/dist/core/namespace/helpers.d.ts +0 -14
- package/dist/core/namespace/helpers.d.ts.map +0 -1
- package/dist/core/namespace/helpers.js +0 -29
- package/dist/core/namespace/helpers.js.map +0 -1
- package/dist/core/namespace/index.d.ts +0 -4
- package/dist/core/namespace/index.d.ts.map +0 -1
- package/dist/core/namespace/index.js +0 -6
- package/dist/core/namespace/index.js.map +0 -1
- package/dist/core/namespace/memoryStore.d.ts +0 -19
- package/dist/core/namespace/memoryStore.d.ts.map +0 -1
- package/dist/core/namespace/memoryStore.js +0 -70
- package/dist/core/namespace/memoryStore.js.map +0 -1
- package/dist/core/namespace/types.d.ts +0 -44
- package/dist/core/namespace/types.d.ts.map +0 -1
- package/dist/core/namespace/types.js +0 -8
- package/dist/core/namespace/types.js.map +0 -1
- package/dist/game/core/DisposeRegistry.d.ts +0 -42
- package/dist/game/core/DisposeRegistry.d.ts.map +0 -1
- package/dist/game/core/DisposeRegistry.js +0 -67
- package/dist/game/core/DisposeRegistry.js.map +0 -1
- package/dist/game/core/drawBudget.d.ts +0 -26
- package/dist/game/core/drawBudget.d.ts.map +0 -1
- package/dist/game/core/drawBudget.js +0 -55
- package/dist/game/core/drawBudget.js.map +0 -1
- package/dist/game/core/fixedTimestep.d.ts +0 -38
- package/dist/game/core/fixedTimestep.d.ts.map +0 -1
- package/dist/game/core/fixedTimestep.js +0 -47
- package/dist/game/core/fixedTimestep.js.map +0 -1
- package/dist/game/core/index.d.ts +0 -9
- package/dist/game/core/index.d.ts.map +0 -1
- package/dist/game/core/index.js +0 -8
- package/dist/game/core/index.js.map +0 -1
- package/dist/game/core/inputCollector.d.ts +0 -82
- package/dist/game/core/inputCollector.d.ts.map +0 -1
- package/dist/game/core/inputCollector.js +0 -176
- package/dist/game/core/inputCollector.js.map +0 -1
- package/dist/game/core/resizeCanvas.d.ts +0 -19
- package/dist/game/core/resizeCanvas.d.ts.map +0 -1
- package/dist/game/core/resizeCanvas.js +0 -29
- package/dist/game/core/resizeCanvas.js.map +0 -1
- package/dist/game/react/index.d.ts +0 -3
- package/dist/game/react/index.d.ts.map +0 -1
- package/dist/game/react/index.js +0 -5
- package/dist/game/react/index.js.map +0 -1
- package/dist/game/react/useGameEngine.d.ts +0 -64
- package/dist/game/react/useGameEngine.d.ts.map +0 -1
- package/dist/game/react/useGameEngine.js +0 -78
- package/dist/game/react/useGameEngine.js.map +0 -1
- package/dist/react/canvas/CanvasNavHUD.d.ts +0 -64
- package/dist/react/canvas/CanvasNavHUD.d.ts.map +0 -1
- package/dist/react/canvas/CanvasNavHUD.js +0 -58
- package/dist/react/canvas/CanvasNavHUD.js.map +0 -1
- package/dist/react/canvas/fitLabel.d.ts +0 -53
- package/dist/react/canvas/fitLabel.d.ts.map +0 -1
- package/dist/react/canvas/fitLabel.js +0 -104
- package/dist/react/canvas/fitLabel.js.map +0 -1
- package/dist/react/canvas/index.d.ts +0 -4
- package/dist/react/canvas/index.d.ts.map +0 -1
- package/dist/react/canvas/index.js +0 -4
- package/dist/react/canvas/index.js.map +0 -1
- package/dist/react/canvas/lod.d.ts +0 -40
- package/dist/react/canvas/lod.d.ts.map +0 -1
- package/dist/react/canvas/lod.js +0 -37
- package/dist/react/canvas/lod.js.map +0 -1
- package/dist/react/components/DataTable/FilterBuilder.d.ts +0 -38
- package/dist/react/components/DataTable/FilterBuilder.d.ts.map +0 -1
- package/dist/react/components/DataTable/FilterBuilder.js.map +0 -1
- package/dist/react/seo/HeadProvider.d.ts +0 -14
- package/dist/react/seo/HeadProvider.d.ts.map +0 -1
- package/dist/react/seo/HeadProvider.js +0 -44
- package/dist/react/seo/HeadProvider.js.map +0 -1
- package/dist/react/seo/applyHeadToDocument.d.ts +0 -3
- package/dist/react/seo/applyHeadToDocument.d.ts.map +0 -1
- package/dist/react/seo/applyHeadToDocument.js +0 -66
- package/dist/react/seo/applyHeadToDocument.js.map +0 -1
- package/dist/react/seo/index.d.ts +0 -3
- package/dist/react/seo/index.d.ts.map +0 -1
- package/dist/react/seo/index.js +0 -7
- package/dist/react/seo/index.js.map +0 -1
- package/dist/react/timeline/ClipView.d.ts +0 -29
- package/dist/react/timeline/ClipView.d.ts.map +0 -1
- package/dist/react/timeline/ClipView.js +0 -53
- package/dist/react/timeline/ClipView.js.map +0 -1
- package/dist/react/timeline/Playhead.d.ts +0 -16
- package/dist/react/timeline/Playhead.d.ts.map +0 -1
- package/dist/react/timeline/Playhead.js +0 -26
- package/dist/react/timeline/Playhead.js.map +0 -1
- package/dist/react/timeline/TimeRuler.d.ts +0 -21
- package/dist/react/timeline/TimeRuler.d.ts.map +0 -1
- package/dist/react/timeline/TimeRuler.js +0 -31
- package/dist/react/timeline/TimeRuler.js.map +0 -1
- package/dist/react/timeline/TimelineSurface.d.ts +0 -29
- package/dist/react/timeline/TimelineSurface.d.ts.map +0 -1
- package/dist/react/timeline/TimelineSurface.js +0 -56
- package/dist/react/timeline/TimelineSurface.js.map +0 -1
- package/dist/react/timeline/TrackLane.d.ts +0 -31
- package/dist/react/timeline/TrackLane.d.ts.map +0 -1
- package/dist/react/timeline/TrackLane.js +0 -32
- package/dist/react/timeline/TrackLane.js.map +0 -1
- package/dist/react/timeline/index.d.ts +0 -6
- package/dist/react/timeline/index.d.ts.map +0 -1
- package/dist/react/timeline/index.js +0 -12
- package/dist/react/timeline/index.js.map +0 -1
- package/dist/server/private-media/index.d.ts +0 -7
- package/dist/server/private-media/index.d.ts.map +0 -1
- package/dist/server/private-media/index.js +0 -13
- package/dist/server/private-media/index.js.map +0 -1
- package/dist/server/seo/index.d.ts +0 -3
- package/dist/server/seo/index.d.ts.map +0 -1
- package/dist/server/seo/index.js +0 -6
- package/dist/server/seo/index.js.map +0 -1
- package/dist/server/seo/mountSeoRoutes.d.ts +0 -9
- package/dist/server/seo/mountSeoRoutes.d.ts.map +0 -1
- package/dist/server/seo/mountSeoRoutes.js +0 -19
- package/dist/server/seo/mountSeoRoutes.js.map +0 -1
- package/dist/server/seo/serveHeadInjectedIndex.d.ts +0 -9
- package/dist/server/seo/serveHeadInjectedIndex.d.ts.map +0 -1
- package/dist/server/seo/serveHeadInjectedIndex.js +0 -20
- package/dist/server/seo/serveHeadInjectedIndex.js.map +0 -1
- package/dist/upload.d.ts +0 -148
- package/dist/upload.d.ts.map +0 -1
- package/dist/upload.js +0 -159
- package/dist/upload.js.map +0 -1
- package/dist/verify/runtime/index.d.ts +0 -16
- package/dist/verify/runtime/index.d.ts.map +0 -1
- package/dist/verify/runtime/index.js +0 -16
- package/dist/verify/runtime/index.js.map +0 -1
- package/scripts/demoCheck.ts +0 -42
- package/src/core/duplicates/index.spec.ts +0 -116
- package/src/core/duplicates/index.ts +0 -203
- package/src/core/namespace/helpers.ts +0 -31
- package/src/core/namespace/index.ts +0 -12
- package/src/core/namespace/memoryStore.ts +0 -77
- package/src/core/namespace/namespace.spec.ts +0 -117
- package/src/core/namespace/types.ts +0 -53
- package/src/game/core/DisposeRegistry.spec.ts +0 -53
- package/src/game/core/DisposeRegistry.ts +0 -70
- package/src/game/core/drawBudget.spec.ts +0 -51
- package/src/game/core/drawBudget.ts +0 -75
- package/src/game/core/fixedTimestep.spec.ts +0 -91
- package/src/game/core/fixedTimestep.ts +0 -79
- package/src/game/core/index.ts +0 -16
- package/src/game/core/inputCollector.spec.ts +0 -29
- package/src/game/core/inputCollector.ts +0 -245
- package/src/game/core/resizeCanvas.ts +0 -31
- package/src/game/react/index.ts +0 -10
- package/src/game/react/useGameEngine.ts +0 -125
- package/src/react/canvas/CanvasNavHUD.spec.tsx +0 -62
- package/src/react/canvas/CanvasNavHUD.tsx +0 -210
- package/src/react/canvas/fitLabel.spec.ts +0 -82
- package/src/react/canvas/fitLabel.ts +0 -150
- package/src/react/canvas/index.ts +0 -15
- package/src/react/canvas/lod.ts +0 -53
- package/src/react/seo/HeadProvider.tsx +0 -67
- package/src/react/seo/applyHeadToDocument.ts +0 -73
- package/src/react/seo/index.ts +0 -12
- package/src/react/seo/seo.spec.tsx +0 -101
- package/src/react/timeline/ClipView.tsx +0 -146
- package/src/react/timeline/Playhead.tsx +0 -63
- package/src/react/timeline/TimeRuler.tsx +0 -85
- package/src/react/timeline/TimelineSurface.tsx +0 -157
- package/src/react/timeline/TrackLane.tsx +0 -87
- package/src/react/timeline/index.ts +0 -12
- package/src/react/timeline/timeline.spec.tsx +0 -175
- package/src/server/private-media/index.ts +0 -45
- package/src/server/seo/index.ts +0 -8
- package/src/server/seo/mountSeoRoutes.ts +0 -37
- package/src/server/seo/seo.spec.ts +0 -128
- package/src/server/seo/serveHeadInjectedIndex.ts +0 -36
- package/src/upload.spec.ts +0 -300
- package/src/upload.ts +0 -288
- package/src/verify/runtime/index.ts +0 -64
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { pxToSeconds, secondsToPx } from 'cwip/timeline';
|
|
3
|
-
import { AudioLines, Film } from 'lucide-react';
|
|
4
|
-
import { useRef } from 'react';
|
|
5
|
-
import { cn } from '../lib/cn';
|
|
6
|
-
export const TRACK_LANE_HEIGHT_PX = 108;
|
|
7
|
-
/**
|
|
8
|
-
* One track row: a sticky header (name + kind icon) and the clip runway. The
|
|
9
|
-
* runway is the `relative` positioning context `ClipView`s place themselves
|
|
10
|
-
* in, and the drop target for library assets (drop position is reported in
|
|
11
|
-
* SECONDS, scroll offset already accounted for via the runway's own rect).
|
|
12
|
-
*/
|
|
13
|
-
export function TrackLane({ track, zoomScale, durationSeconds, children, laneHeightPx = TRACK_LANE_HEIGHT_PX, onRunwayClick, onDropData, className, }) {
|
|
14
|
-
const runwayRef = useRef(null);
|
|
15
|
-
const secondsAt = (clientX) => {
|
|
16
|
-
const rect = runwayRef.current?.getBoundingClientRect();
|
|
17
|
-
if (!rect)
|
|
18
|
-
return 0;
|
|
19
|
-
return Math.max(0, pxToSeconds(clientX - rect.left, zoomScale));
|
|
20
|
-
};
|
|
21
|
-
const onDrop = (e) => {
|
|
22
|
-
if (!onDropData)
|
|
23
|
-
return;
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
onDropData({ atSeconds: secondsAt(e.clientX), dataTransfer: e.dataTransfer });
|
|
26
|
-
};
|
|
27
|
-
return (_jsxs("div", { className: cn('flex border-b border-border/60 transition-[min-height]', className), style: { minHeight: laneHeightPx }, children: [_jsxs("div", { className: 'sticky left-0 z-30 flex w-28 shrink-0 items-center gap-1.5 border-r border-border bg-muted/60 px-2 backdrop-blur-sm', children: [track.type === 'video' ? (_jsx(Film, { "aria-hidden": true, className: 'size-3.5 text-muted-foreground' })) : (_jsx(AudioLines, { "aria-hidden": true, className: 'size-3.5 text-muted-foreground' })), _jsx("span", { className: 'truncate text-xs text-foreground', children: track.name })] }), _jsx("div", { ref: runwayRef, className: 'relative', style: { width: secondsToPx(durationSeconds, zoomScale) }, onClick: (e) => onRunwayClick?.(secondsAt(e.clientX)), onDragOver: (e) => {
|
|
28
|
-
if (onDropData)
|
|
29
|
-
e.preventDefault(); // required for `drop` to fire
|
|
30
|
-
}, onDrop: onDrop, "data-track-id": track.id, children: children })] }));
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=TrackLane.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TrackLane.js","sourceRoot":"","sources":["../../../src/react/timeline/TrackLane.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAA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AC,IAAI,yBAAa,SAAS,EAAC,gCAAgC,GAAG,CAChE,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,yBAAa,SAAS,EAAC,gCAAgC,GAAG,CACtE,EACD,eAAM,SAAS,EAAC,kCAAkC,YAAE,KAAK,CAAC,IAAI,GAAQ,IAClE,EAGN,cACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE,EACzD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EACrD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;oBAChB,IAAI,UAAU;wBAAE,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,8BAA8B;gBACpE,CAAC,EACD,MAAM,EAAE,MAAM,mBACC,KAAK,CAAC,EAAE,YAEtB,QAAQ,GACL,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { ClipView, type ClipViewProps, type TrimEdge } from './ClipView';
|
|
2
|
-
export { Playhead, type PlayheadProps } from './Playhead';
|
|
3
|
-
export { TimelineSurface, type TimelineSurfaceProps } from './TimelineSurface';
|
|
4
|
-
export { TimeRuler, type TimeRulerProps } from './TimeRuler';
|
|
5
|
-
export { TRACK_LANE_HEIGHT_PX, TrackLane, type TrackLaneProps } from './TrackLane';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/timeline/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// cursedbelt/react/timeline — the generic multi-track timeline editor surface.
|
|
2
|
-
// Controlled/presentational components over the cwip/timeline engine: they
|
|
3
|
-
// translate pixels to seconds and report INTENT (select/move/trim/scrub); the
|
|
4
|
-
// owner applies cwip ops (clamping, ripple, snapping) and passes state back
|
|
5
|
-
// down. Reusable for any lane-based editor (video NLE, audio arrangement,
|
|
6
|
-
// schedule lanes) — the cursedshell video-editor plugin is the reference user.
|
|
7
|
-
export { ClipView } from './ClipView';
|
|
8
|
-
export { Playhead } from './Playhead';
|
|
9
|
-
export { TimelineSurface } from './TimelineSurface';
|
|
10
|
-
export { TimeRuler } from './TimeRuler';
|
|
11
|
-
export { TRACK_LANE_HEIGHT_PX, TrackLane } from './TrackLane';
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/timeline/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,2EAA2E;AAC3E,8EAA8E;AAC9E,4EAA4E;AAC5E,0EAA0E;AAC1E,+EAA+E;AAE/E,OAAO,EAAE,QAAQ,EAAqC,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,eAAe,EAA6B,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAuB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAuB,MAAM,aAAa,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type { ContentKey, KeyMode } from './crypto';
|
|
2
|
-
export { cryptBlobStream, derivePasswordSetKey, deriveServerSetKey, generateContentKey, generateUserSalt, openMeta, sealMeta, unwrapContentKey, wrapContentKey, } from './crypto';
|
|
3
|
-
export { createMemoryPrivateIndex, type PrivateIndex, type PrivateIndexRow, type PrivateItem, toPublic, } from './index-store';
|
|
4
|
-
export { type CorsResolver, type MountPrivateOptions, mountPrivateRoutes, } from './mountPrivateRoutes';
|
|
5
|
-
export { type PrivateBlobResult, type PrivateProcessOptions, type PrivateProcessResult, processPrivateBlob, processPrivateVideo, } from './pipeline';
|
|
6
|
-
export { createUnlockService, type UnlockGrant, type UnlockPasswordPolicy, type UnlockService, } from './unlock';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/private-media/index.ts"],"names":[],"mappings":"AAQA,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,wBAAwB,EACxB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// cursedbelt/server/private-media — encrypted private media: a multi-password, semi-deniable
|
|
2
|
-
// layer over server/storage. Bytes are AES-128-encrypted HLS (fast, edge-cacheable, client-
|
|
3
|
-
// decrypted); the per-item content key is wrapped under a set key that is either server-held
|
|
4
|
-
// (standard, recoverable) or password-derived (deniable, zero-knowledge). A clear index exposes
|
|
5
|
-
// only size + created-at so users can prune forgotten-password media; title/thumb/notes stay in
|
|
6
|
-
// an encrypted envelope revealed only by the right password. Builds on cwip secretBox (scrypt +
|
|
7
|
-
// AES-GCM) + server/auth (jose) + server/media (the encrypted-HLS pipeline).
|
|
8
|
-
export { cryptBlobStream, derivePasswordSetKey, deriveServerSetKey, generateContentKey, generateUserSalt, openMeta, sealMeta, unwrapContentKey, wrapContentKey, } from './crypto';
|
|
9
|
-
export { createMemoryPrivateIndex, toPublic, } from './index-store';
|
|
10
|
-
export { mountPrivateRoutes, } from './mountPrivateRoutes';
|
|
11
|
-
export { processPrivateBlob, processPrivateVideo, } from './pipeline';
|
|
12
|
-
export { createUnlockService, } from './unlock';
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/private-media/index.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,4FAA4F;AAC5F,6FAA6F;AAC7F,gGAAgG;AAChG,gGAAgG;AAChG,gGAAgG;AAChG,6EAA6E;AAG7E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,wBAAwB,EAIxB,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAIL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,mBAAmB,GAIpB,MAAM,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/seo/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,KAAK,6BAA6B,EAClC,sBAAsB,GACvB,MAAM,0BAA0B,CAAC"}
|
package/dist/server/seo/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// cursedbelt/server/seo — Hono wiring for cwip's SEO core: sitemap.xml/robots.txt
|
|
2
|
-
// routes and a static-HTML head-injection handler. See seo-reusable-plan.md for the
|
|
3
|
-
// wider architecture (visibility model, delivery targets, cursedshell aggregation).
|
|
4
|
-
export { mountSeoRoutes } from './mountSeoRoutes';
|
|
5
|
-
export { serveHeadInjectedIndex, } from './serveHeadInjectedIndex';
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/seo/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,oFAAoF;AACpF,oFAAoF;AACpF,OAAO,EAAwB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAEL,sBAAsB,GACvB,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SeoPolicy } from 'cwip/seo';
|
|
2
|
-
import type { Hono } from 'hono';
|
|
3
|
-
export interface MountSeoOptions {
|
|
4
|
-
sitemapPath?: string;
|
|
5
|
-
robotsPath?: string;
|
|
6
|
-
cacheControl?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const mountSeoRoutes: (app: Hono, policy: SeoPolicy, options?: MountSeoOptions) => void;
|
|
9
|
-
//# sourceMappingURL=mountSeoRoutes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mountSeoRoutes.d.ts","sourceRoot":"","sources":["../../../src/server/seo/mountSeoRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,WAAW,eAAe;IAG9B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD,eAAO,MAAM,cAAc,GACzB,KAAK,IAAI,EACT,QAAQ,SAAS,EACjB,UAAS,eAAoB,KAC5B,IAcF,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { buildRobots, buildSitemap } from 'cwip/seo';
|
|
2
|
-
// Registers GET /sitemap.xml and GET /robots.txt from a SeoPolicy. These serve raw
|
|
3
|
-
// text bytes, so — per cursedbelt STANDARDS.md §5 — they are registered DIRECTLY
|
|
4
|
-
// with `app.get`, never through `buildRoutes`: routing them through the ctgr
|
|
5
|
-
// GET-tunnel would base64url-encode the response body instead of serving it as-is.
|
|
6
|
-
export const mountSeoRoutes = (app, policy, options = {}) => {
|
|
7
|
-
const sitemapPath = options.sitemapPath ?? '/sitemap.xml';
|
|
8
|
-
const robotsPath = options.robotsPath ?? '/robots.txt';
|
|
9
|
-
const cacheControl = options.cacheControl ?? 'public, max-age=3600';
|
|
10
|
-
app.get(sitemapPath, (c) => {
|
|
11
|
-
c.header('Cache-Control', cacheControl);
|
|
12
|
-
return c.body(buildSitemap(policy), 200, { 'Content-Type': 'application/xml' });
|
|
13
|
-
});
|
|
14
|
-
app.get(robotsPath, (c) => {
|
|
15
|
-
c.header('Cache-Control', cacheControl);
|
|
16
|
-
return c.body(buildRobots(policy, { sitemapPath }), 200, { 'Content-Type': 'text/plain' });
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=mountSeoRoutes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mountSeoRoutes.js","sourceRoot":"","sources":["../../../src/server/seo/mountSeoRoutes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAarD,mFAAmF;AACnF,iFAAiF;AACjF,6EAA6E;AAC7E,mFAAmF;AACnF,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,GAAS,EACT,MAAiB,EACjB,UAA2B,EAAE,EACvB,EAAE;IACR,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,cAAc,CAAC;IAC1D,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,aAAa,CAAC;IACvD,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,sBAAsB,CAAC;IAEpE,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;QACzB,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;QACxC,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;QACxB,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;QACxC,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { HeadModel } from 'cwip/seo';
|
|
2
|
-
import type { Context } from 'hono';
|
|
3
|
-
export interface ServeHeadInjectedIndexOptions {
|
|
4
|
-
html: string | (() => string | Promise<string>);
|
|
5
|
-
resolve: (path: string) => HeadModel | undefined;
|
|
6
|
-
stripBase?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const serveHeadInjectedIndex: (opts: ServeHeadInjectedIndexOptions) => (c: Context) => Promise<Response>;
|
|
9
|
-
//# sourceMappingURL=serveHeadInjectedIndex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serveHeadInjectedIndex.d.ts","sourceRoot":"","sources":["../../../src/server/seo/serveHeadInjectedIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,WAAW,6BAA6B;IAG5C,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAGhD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC;IAIjD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAQD,eAAO,MAAM,sBAAsB,GAAI,MAAM,6BAA6B,MAG1D,GAAG,OAAO,sBASzB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { injectHead, renderHead, stripBaseTitleAndDescription } from 'cwip/seo';
|
|
2
|
-
// Builds a Hono handler that serves `opts.html` with a per-route HeadModel spliced
|
|
3
|
-
// into <head> via cwip's `injectHead`/`renderHead` — a pure string transform, so it
|
|
4
|
-
// runs anywhere Bun does (this repo's Hono/Bun.serve host). An HTMLRewriter-based
|
|
5
|
-
// streaming variant for Cloudflare Workers/Pages Functions can reuse the exact same
|
|
6
|
-
// `renderHead` output later; that seam is intentionally left for a future target
|
|
7
|
-
// rather than built here (see seo-reusable-plan.md §4/§6).
|
|
8
|
-
export const serveHeadInjectedIndex = (opts) => {
|
|
9
|
-
const stripBase = opts.stripBase ?? true;
|
|
10
|
-
return async (c) => {
|
|
11
|
-
const html = typeof opts.html === 'function' ? await opts.html() : opts.html;
|
|
12
|
-
const model = opts.resolve(c.req.path);
|
|
13
|
-
if (!model)
|
|
14
|
-
return c.html(html);
|
|
15
|
-
const shell = stripBase ? stripBaseTitleAndDescription(html) : html;
|
|
16
|
-
const headHtml = renderHead(model, { marker: true, indent: ' ' });
|
|
17
|
-
return c.html(injectHead(shell, headHtml));
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=serveHeadInjectedIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serveHeadInjectedIndex.js","sourceRoot":"","sources":["../../../src/server/seo/serveHeadInjectedIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAgBhF,mFAAmF;AACnF,oFAAoF;AACpF,kFAAkF;AAClF,oFAAoF;AACpF,iFAAiF;AACjF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAmC,EAAE,EAAE;IAC5E,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;IAEzC,OAAO,KAAK,EAAE,CAAU,EAAE,EAAE;QAC1B,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC7E,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK;YAAE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhC,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACpE,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACrE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/upload.d.ts
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/** True for iPhone HEIC/HEIF images — the server converts these to JPEG. */
|
|
2
|
-
export declare function isHeicFile(file: File): boolean;
|
|
3
|
-
export interface UploadConstraints {
|
|
4
|
-
/** Allowed MIME types (exact match or glob prefix, e.g. 'image/*'). If omitted, any type. */
|
|
5
|
-
accept?: string[];
|
|
6
|
-
/** Maximum file size in bytes. If omitted, no cap. */
|
|
7
|
-
maxBytes?: number;
|
|
8
|
-
}
|
|
9
|
-
export type ValidationError = {
|
|
10
|
-
kind: 'type';
|
|
11
|
-
file: string;
|
|
12
|
-
mime: string;
|
|
13
|
-
accept: string[];
|
|
14
|
-
} | {
|
|
15
|
-
kind: 'size';
|
|
16
|
-
file: string;
|
|
17
|
-
bytes: number;
|
|
18
|
-
maxBytes: number;
|
|
19
|
-
};
|
|
20
|
-
export type ValidationResult = {
|
|
21
|
-
ok: true;
|
|
22
|
-
} | {
|
|
23
|
-
ok: false;
|
|
24
|
-
error: ValidationError;
|
|
25
|
-
};
|
|
26
|
-
export declare function validateFile(file: File, constraints: UploadConstraints): ValidationResult;
|
|
27
|
-
export declare function formatValidationError(error: ValidationError): string;
|
|
28
|
-
export type UploadProgress = {
|
|
29
|
-
phase: 'validating';
|
|
30
|
-
} | {
|
|
31
|
-
phase: 'uploading';
|
|
32
|
-
loaded: number;
|
|
33
|
-
total: number;
|
|
34
|
-
} | {
|
|
35
|
-
phase: 'chunking';
|
|
36
|
-
chunk: number;
|
|
37
|
-
total: number;
|
|
38
|
-
} | {
|
|
39
|
-
phase: 'done';
|
|
40
|
-
} | {
|
|
41
|
-
phase: 'error';
|
|
42
|
-
message: string;
|
|
43
|
-
};
|
|
44
|
-
/** Subset of the server FileRecord that upload consumers care about. */
|
|
45
|
-
export interface UploadedFile {
|
|
46
|
-
id: string;
|
|
47
|
-
name: string;
|
|
48
|
-
mime: string;
|
|
49
|
-
size: number;
|
|
50
|
-
fileType: string;
|
|
51
|
-
tags: string[];
|
|
52
|
-
processingStatus: string;
|
|
53
|
-
/** True when the server accepted a HEIC/HEIF file for conversion. */
|
|
54
|
-
heicConverted?: boolean;
|
|
55
|
-
}
|
|
56
|
-
export type UploadResult = {
|
|
57
|
-
ok: true;
|
|
58
|
-
file: UploadedFile;
|
|
59
|
-
} | {
|
|
60
|
-
ok: false;
|
|
61
|
-
error: string;
|
|
62
|
-
validationError?: ValidationError;
|
|
63
|
-
};
|
|
64
|
-
/** Minimal transport interface the pipeline requires — satisfied by FileUploadClient. */
|
|
65
|
-
export interface UploadTransport {
|
|
66
|
-
uploadAuto(file: File, opts?: {
|
|
67
|
-
tags?: string[];
|
|
68
|
-
}): Promise<{
|
|
69
|
-
ok: true;
|
|
70
|
-
file?: {
|
|
71
|
-
id: string;
|
|
72
|
-
name: string;
|
|
73
|
-
mime: string;
|
|
74
|
-
size: number;
|
|
75
|
-
fileType: string;
|
|
76
|
-
tags: string[];
|
|
77
|
-
processingStatus: string;
|
|
78
|
-
};
|
|
79
|
-
} | {
|
|
80
|
-
ok: false;
|
|
81
|
-
error: string;
|
|
82
|
-
}>;
|
|
83
|
-
upload(file: File | Blob, opts?: {
|
|
84
|
-
name?: string;
|
|
85
|
-
tags?: string[];
|
|
86
|
-
}): Promise<{
|
|
87
|
-
ok: true;
|
|
88
|
-
file?: {
|
|
89
|
-
id: string;
|
|
90
|
-
name: string;
|
|
91
|
-
mime: string;
|
|
92
|
-
size: number;
|
|
93
|
-
fileType: string;
|
|
94
|
-
tags: string[];
|
|
95
|
-
processingStatus: string;
|
|
96
|
-
};
|
|
97
|
-
} | {
|
|
98
|
-
ok: false;
|
|
99
|
-
error: string;
|
|
100
|
-
}>;
|
|
101
|
-
}
|
|
102
|
-
export interface UploadPipelineOptions {
|
|
103
|
-
transport: UploadTransport;
|
|
104
|
-
constraints?: UploadConstraints;
|
|
105
|
-
tags?: string[];
|
|
106
|
-
onProgress?: (progress: UploadProgress) => void;
|
|
107
|
-
}
|
|
108
|
-
export declare function uploadFile(file: File, opts: UploadPipelineOptions): Promise<UploadResult>;
|
|
109
|
-
/** Upload multiple files sequentially, stopping on the first error. */
|
|
110
|
-
export declare function uploadFiles(files: File[], opts: UploadPipelineOptions): Promise<{
|
|
111
|
-
results: UploadResult[];
|
|
112
|
-
firstError: string | null;
|
|
113
|
-
}>;
|
|
114
|
-
export interface DropZoneHandlers {
|
|
115
|
-
onDragOver: (e: DragEvent) => void;
|
|
116
|
-
onDragLeave: (e: DragEvent) => void;
|
|
117
|
-
onDrop: (e: DragEvent) => void;
|
|
118
|
-
}
|
|
119
|
-
export interface DropZoneOptions {
|
|
120
|
-
/** Invoked with accepted files dropped onto the zone. */
|
|
121
|
-
onFiles: (files: File[]) => void;
|
|
122
|
-
/** Invoked when a drag enters the zone (for visual feedback). */
|
|
123
|
-
onEnter?: () => void;
|
|
124
|
-
/** Invoked when a drag leaves or is dropped (for visual feedback). */
|
|
125
|
-
onLeave?: () => void;
|
|
126
|
-
/** Optionally filter dropped items by MIME — mismatched files are silently excluded. */
|
|
127
|
-
accept?: string[];
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Returns plain event handler objects that wire a DOM element as a drop zone.
|
|
131
|
-
* Attach them with addEventListener or pass to a React component's onDrag* props.
|
|
132
|
-
*
|
|
133
|
-
* @example
|
|
134
|
-
* const { onDragOver, onDragLeave, onDrop } = createDropZoneHandlers({ onFiles });
|
|
135
|
-
* el.addEventListener('dragover', onDragOver);
|
|
136
|
-
* el.addEventListener('dragleave', onDragLeave);
|
|
137
|
-
* el.addEventListener('drop', onDrop);
|
|
138
|
-
*/
|
|
139
|
-
export declare function createDropZoneHandlers(opts: DropZoneOptions): DropZoneHandlers;
|
|
140
|
-
/**
|
|
141
|
-
* Mount a drop zone on `el`, returning an unmount function.
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* const unmount = mountDropZone(containerEl, { onFiles, accept: ['image/*'] });
|
|
145
|
-
* // later: unmount();
|
|
146
|
-
*/
|
|
147
|
-
export declare function mountDropZone(el: HTMLElement, opts: DropZoneOptions): () => void;
|
|
148
|
-
//# sourceMappingURL=upload.d.ts.map
|
package/dist/upload.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../src/upload.ts"],"names":[],"mappings":"AAcA,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAK9C;AAID,MAAM,WAAW,iBAAiB;IAChC,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;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AC,CA+C/F;AAED,uEAAuE;AACvE,wBAAsB,WAAW,CAC/B,KAAK,EAAE,IAAI,EAAE,EACb,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC;IAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAQjE;AAID,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACjC,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB,CA0B9E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,GAAG,MAAM,IAAI,CAUhF"}
|
package/dist/upload.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
// cursedbelt/upload — framework-agnostic upload primitive
|
|
2
|
-
//
|
|
3
|
-
// Sits above the transport (fileUploadClient) and below the UI layer. Provides:
|
|
4
|
-
// • Client-side validation (MIME type + byte size)
|
|
5
|
-
// • Progress events during upload
|
|
6
|
-
// • Drag-and-drop drop-zone wiring (pure DOM, no React)
|
|
7
|
-
// • HEIC/HEIF mobile-photo detection (conversion is server-side)
|
|
8
|
-
// • Typed UploadResult contract consumed by MediaUploadControl and app plugins
|
|
9
|
-
//
|
|
10
|
-
// Consumers that want the raw transport client import createFileUploadClient from
|
|
11
|
-
// 'cursedbelt/react/media'; this module layers validation + progress on top.
|
|
12
|
-
// ── MIME / HEIC ──────────────────────────────────────────────────────────────
|
|
13
|
-
/** True for iPhone HEIC/HEIF images — the server converts these to JPEG. */
|
|
14
|
-
export function isHeicFile(file) {
|
|
15
|
-
const mime = file.type.toLowerCase();
|
|
16
|
-
if (mime === 'image/heic' || mime === 'image/heif')
|
|
17
|
-
return true;
|
|
18
|
-
const name = file.name.toLowerCase();
|
|
19
|
-
return name.endsWith('.heic') || name.endsWith('.heif');
|
|
20
|
-
}
|
|
21
|
-
function mimeMatches(mime, pattern) {
|
|
22
|
-
if (pattern === mime)
|
|
23
|
-
return true;
|
|
24
|
-
if (pattern.endsWith('/*')) {
|
|
25
|
-
return mime.startsWith(pattern.slice(0, -1));
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
export function validateFile(file, constraints) {
|
|
30
|
-
if (constraints.accept?.length) {
|
|
31
|
-
const mime = file.type || 'application/octet-stream';
|
|
32
|
-
const ok = constraints.accept.some((p) => mimeMatches(mime, p));
|
|
33
|
-
if (!ok)
|
|
34
|
-
return {
|
|
35
|
-
ok: false,
|
|
36
|
-
error: { kind: 'type', file: file.name, mime, accept: constraints.accept },
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
if (constraints.maxBytes !== undefined && file.size > constraints.maxBytes) {
|
|
40
|
-
return {
|
|
41
|
-
ok: false,
|
|
42
|
-
error: { kind: 'size', file: file.name, bytes: file.size, maxBytes: constraints.maxBytes },
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return { ok: true };
|
|
46
|
-
}
|
|
47
|
-
export function formatValidationError(error) {
|
|
48
|
-
if (error.kind === 'type') {
|
|
49
|
-
return `"${error.file}" is not an accepted file type (${error.mime}). Accepted: ${error.accept.join(', ')}.`;
|
|
50
|
-
}
|
|
51
|
-
return `"${error.file}" is too large (${(error.bytes / 1024 / 1024).toFixed(1)} MB). Max: ${(error.maxBytes / 1024 / 1024).toFixed(1)} MB.`;
|
|
52
|
-
}
|
|
53
|
-
export async function uploadFile(file, opts) {
|
|
54
|
-
const { transport, constraints = {}, tags, onProgress } = opts;
|
|
55
|
-
const emit = (p) => {
|
|
56
|
-
onProgress?.(p);
|
|
57
|
-
};
|
|
58
|
-
emit({ phase: 'validating' });
|
|
59
|
-
const validation = validateFile(file, constraints);
|
|
60
|
-
if (!validation.ok) {
|
|
61
|
-
const msg = formatValidationError(validation.error);
|
|
62
|
-
emit({ phase: 'error', message: msg });
|
|
63
|
-
return { ok: false, error: msg, validationError: validation.error };
|
|
64
|
-
}
|
|
65
|
-
emit({ phase: 'uploading', loaded: 0, total: file.size });
|
|
66
|
-
const heic = isHeicFile(file);
|
|
67
|
-
const res = await transport.uploadAuto(file, { tags }).catch((e) => ({
|
|
68
|
-
ok: false,
|
|
69
|
-
error: e instanceof Error ? e.message : 'upload failed',
|
|
70
|
-
}));
|
|
71
|
-
if (!res.ok) {
|
|
72
|
-
emit({ phase: 'error', message: res.error });
|
|
73
|
-
return { ok: false, error: res.error };
|
|
74
|
-
}
|
|
75
|
-
const f = res.file;
|
|
76
|
-
if (!f) {
|
|
77
|
-
emit({ phase: 'error', message: 'upload succeeded but no file record returned' });
|
|
78
|
-
return { ok: false, error: 'upload succeeded but no file record returned' };
|
|
79
|
-
}
|
|
80
|
-
emit({ phase: 'done' });
|
|
81
|
-
return {
|
|
82
|
-
ok: true,
|
|
83
|
-
file: {
|
|
84
|
-
id: f.id,
|
|
85
|
-
name: f.name,
|
|
86
|
-
mime: f.mime,
|
|
87
|
-
size: f.size,
|
|
88
|
-
fileType: f.fileType,
|
|
89
|
-
tags: f.tags,
|
|
90
|
-
processingStatus: f.processingStatus,
|
|
91
|
-
heicConverted: heic,
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
/** Upload multiple files sequentially, stopping on the first error. */
|
|
96
|
-
export async function uploadFiles(files, opts) {
|
|
97
|
-
const results = [];
|
|
98
|
-
for (const file of files) {
|
|
99
|
-
const result = await uploadFile(file, opts);
|
|
100
|
-
results.push(result);
|
|
101
|
-
if (!result.ok)
|
|
102
|
-
return { results, firstError: result.error };
|
|
103
|
-
}
|
|
104
|
-
return { results, firstError: null };
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Returns plain event handler objects that wire a DOM element as a drop zone.
|
|
108
|
-
* Attach them with addEventListener or pass to a React component's onDrag* props.
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* const { onDragOver, onDragLeave, onDrop } = createDropZoneHandlers({ onFiles });
|
|
112
|
-
* el.addEventListener('dragover', onDragOver);
|
|
113
|
-
* el.addEventListener('dragleave', onDragLeave);
|
|
114
|
-
* el.addEventListener('drop', onDrop);
|
|
115
|
-
*/
|
|
116
|
-
export function createDropZoneHandlers(opts) {
|
|
117
|
-
const { onFiles, onEnter, onLeave, accept } = opts;
|
|
118
|
-
const onDragOver = (e) => {
|
|
119
|
-
e.preventDefault();
|
|
120
|
-
onEnter?.();
|
|
121
|
-
};
|
|
122
|
-
const onDragLeave = (e) => {
|
|
123
|
-
e.preventDefault();
|
|
124
|
-
onLeave?.();
|
|
125
|
-
};
|
|
126
|
-
const onDrop = (e) => {
|
|
127
|
-
e.preventDefault();
|
|
128
|
-
onLeave?.();
|
|
129
|
-
const items = e.dataTransfer?.files;
|
|
130
|
-
if (!items?.length)
|
|
131
|
-
return;
|
|
132
|
-
let files = Array.from(items);
|
|
133
|
-
if (accept?.length) {
|
|
134
|
-
files = files.filter((f) => accept.some((p) => mimeMatches(f.type || '', p)));
|
|
135
|
-
}
|
|
136
|
-
if (files.length)
|
|
137
|
-
onFiles(files);
|
|
138
|
-
};
|
|
139
|
-
return { onDragOver, onDragLeave, onDrop };
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Mount a drop zone on `el`, returning an unmount function.
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* const unmount = mountDropZone(containerEl, { onFiles, accept: ['image/*'] });
|
|
146
|
-
* // later: unmount();
|
|
147
|
-
*/
|
|
148
|
-
export function mountDropZone(el, opts) {
|
|
149
|
-
const { onDragOver, onDragLeave, onDrop } = createDropZoneHandlers(opts);
|
|
150
|
-
el.addEventListener('dragover', onDragOver);
|
|
151
|
-
el.addEventListener('dragleave', onDragLeave);
|
|
152
|
-
el.addEventListener('drop', onDrop);
|
|
153
|
-
return () => {
|
|
154
|
-
el.removeEventListener('dragover', onDragOver);
|
|
155
|
-
el.removeEventListener('dragleave', onDragLeave);
|
|
156
|
-
el.removeEventListener('drop', onDrop);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
//# sourceMappingURL=upload.js.map
|
package/dist/upload.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../src/upload.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE;AACF,gFAAgF;AAChF,qDAAqD;AACrD,oCAAoC;AACpC,0DAA0D;AAC1D,mEAAmE;AACnE,iFAAiF;AACjF,EAAE;AACF,kFAAkF;AAClF,6EAA6E;AAE7E,gFAAgF;AAEhF,4EAA4E;AAC5E,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IACrC,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,YAAY;QAAE,OAAO,IAAI,CAAC;IAChE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IACrC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC1D,CAAC;AAiBD,SAAS,WAAW,CAAC,IAAY,EAAE,O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CAAC,CAAC;QAC9B,IAAI,MAAM,EAAE,MAAM,EAAE,CAAC;YACnB,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAChF,CAAC;QACD,IAAI,KAAK,CAAC,MAAM;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,EAAe,EAAE,IAAqB;IAClE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACzE,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC5C,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC9C,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,GAAG,EAAE;QACV,EAAE,CAAC,mBAAmB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC/C,EAAE,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACjD,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `cursedbelt/verify/runtime` — V7: verify-mode boot, the probe suite, and the
|
|
3
|
-
* PID jail that guarantees a run leaves nothing behind (04 §2 V7, §5.7).
|
|
4
|
-
*
|
|
5
|
-
* Server-side only (Bun + Hono); the static V0–V6 compiler in `cursedbelt/verify`
|
|
6
|
-
* has no runtime dependencies and runs anywhere.
|
|
7
|
-
*/
|
|
8
|
-
export { type CliOptions, type CliResult, type CorpusFailure, parseArgs, runCli, runCorpus, writeArtifacts, } from './cli';
|
|
9
|
-
export { type HostProbeOptions, probeHostCapabilities } from './hostCapabilities';
|
|
10
|
-
export { createFakeSpawn, createVerifyContext, createVerifyGuard, createVerifyExec, createVerifyJobBroker, createVerifyCognitiveDriver, createVerifyStorage, createVerifyTelemetry, VERIFY_COMMANDS, type VerifyContext, type VerifyContextOptions, type VerifyGuard, } from './verifyContext';
|
|
11
|
-
export { createVerifyAssetService, createVerifyDevService, createVerifyGuardService, createVerifyKnowledgeService, createVerifySystemService, PRIVATE_ITEM_IDS, PUBLIC_ITEM_IDS, } from './verifyServices';
|
|
12
|
-
export { CORE_PROBES, crossTabLockProbe, deepLinkTenantProbe, eventLoopGuardProbe, execJailProbe, injectionGuardProbe, instanceIsolationProbe, integrityTamperProbe, lastGoodProbe, layoutProbe, lifecycleProbe, type Probe, type ProbeContext, privateModeProbe, rbacProbe, reconnectProbe, routeSurfaceProbe, securityHeaderProbe, wireSmokeProbe, } from './probes';
|
|
13
|
-
export { isPortBound, ProcessJail, runJailed, type SweepReport, type TrackedChild } from './processJail';
|
|
14
|
-
export { type ProbeRunResult, type RunProbesOptions, runVerifyProbes, VERIFY_TIMEOUT_MS } from './runner';
|
|
15
|
-
export { createVerifyServer, type Role, type VerifyClaims, type VerifyServer, type VerifyServerOptions } from './verifyServer';
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/verify/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,SAAS,EACT,MAAM,EACN,SAAS,EACT,cAAc,GACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,cAAc,EACd,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,KAAK,IAAI,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `cursedbelt/verify/runtime` — V7: verify-mode boot, the probe suite, and the
|
|
3
|
-
* PID jail that guarantees a run leaves nothing behind (04 §2 V7, §5.7).
|
|
4
|
-
*
|
|
5
|
-
* Server-side only (Bun + Hono); the static V0–V6 compiler in `cursedbelt/verify`
|
|
6
|
-
* has no runtime dependencies and runs anywhere.
|
|
7
|
-
*/
|
|
8
|
-
export { parseArgs, runCli, runCorpus, writeArtifacts, } from './cli';
|
|
9
|
-
export { probeHostCapabilities } from './hostCapabilities';
|
|
10
|
-
export { createFakeSpawn, createVerifyContext, createVerifyGuard, createVerifyExec, createVerifyJobBroker, createVerifyCognitiveDriver, createVerifyStorage, createVerifyTelemetry, VERIFY_COMMANDS, } from './verifyContext';
|
|
11
|
-
export { createVerifyAssetService, createVerifyDevService, createVerifyGuardService, createVerifyKnowledgeService, createVerifySystemService, PRIVATE_ITEM_IDS, PUBLIC_ITEM_IDS, } from './verifyServices';
|
|
12
|
-
export { CORE_PROBES, crossTabLockProbe, deepLinkTenantProbe, eventLoopGuardProbe, execJailProbe, injectionGuardProbe, instanceIsolationProbe, integrityTamperProbe, lastGoodProbe, layoutProbe, lifecycleProbe, privateModeProbe, rbacProbe, reconnectProbe, routeSurfaceProbe, securityHeaderProbe, wireSmokeProbe, } from './probes';
|
|
13
|
-
export { isPortBound, ProcessJail, runJailed } from './processJail';
|
|
14
|
-
export { runVerifyProbes, VERIFY_TIMEOUT_MS } from './runner';
|
|
15
|
-
export { createVerifyServer } from './verifyServer';
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/verify/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAIL,SAAS,EACT,MAAM,EACN,SAAS,EACT,cAAc,GACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAyB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,GAIhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,cAAc,EAGd,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAuC,MAAM,eAAe,CAAC;AACzG,OAAO,EAA8C,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAA6E,MAAM,gBAAgB,CAAC"}
|
package/scripts/demoCheck.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typechecks the kitchen-sink demo (`demo/`) as part of cursedbelt's own gate — the
|
|
3
|
-
* demo is the component proof surface an e2e suite drives, so its tsc debt must not
|
|
4
|
-
* be able to silently regrow (cbux-71).
|
|
5
|
-
*
|
|
6
|
-
* `demo/` is intentionally NOT a root workspace member (see demo/package.json's
|
|
7
|
-
* `cursedbelt` dependency: a relative `file:..` — worktree-safe, resolves to
|
|
8
|
-
* WHICHEVER checkout this script runs from, never the primary). That means it has
|
|
9
|
-
* its own `node_modules`/`bun.lock`, so a completely fresh clone/worktree needs one
|
|
10
|
-
* `bun install` here before `tsc` can resolve anything. Only pay for that install
|
|
11
|
-
* when it's actually missing: a demo install pulls cursedbelt's full dependency
|
|
12
|
-
* tree (400+ packages, individually file-symlinked — see the `file:` link note in
|
|
13
|
-
* demo/package.json) and reliably takes 60–120s even when nothing changed, so
|
|
14
|
-
* re-running it on every gate invocation would make `bun run done` unusable.
|
|
15
|
-
* `bun run setup` (repo root) also installs this proactively so a fresh worktree's
|
|
16
|
-
* FIRST gate run isn't the one paying that cost.
|
|
17
|
-
*/
|
|
18
|
-
import { existsSync } from "node:fs";
|
|
19
|
-
import { resolve } from "node:path";
|
|
20
|
-
|
|
21
|
-
const demoDir = resolve(import.meta.dir, "..", "demo");
|
|
22
|
-
|
|
23
|
-
async function run(cmd: string[], cwd: string): Promise<number> {
|
|
24
|
-
const proc = Bun.spawn(cmd, { cwd, stdout: "inherit", stderr: "inherit" });
|
|
25
|
-
return await proc.exited;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (!existsSync(resolve(demoDir, "node_modules", "cursedbelt"))) {
|
|
29
|
-
console.log("• demo: node_modules missing/stale — installing…");
|
|
30
|
-
const installExit = await run(["bun", "install"], demoDir);
|
|
31
|
-
if (installExit !== 0) {
|
|
32
|
-
console.error("✗ demo install failed — see output above.");
|
|
33
|
-
process.exit(installExit);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const tscExit = await run(["bunx", "tsc", "--noEmit", "-p", "tsconfig.json"], demoDir);
|
|
38
|
-
if (tscExit !== 0) {
|
|
39
|
-
console.error("✗ demo typecheck failed — see output above.");
|
|
40
|
-
process.exit(tscExit);
|
|
41
|
-
}
|
|
42
|
-
console.log("✓ demo typecheck clean");
|