@dxos/plugin-magazine 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +105 -0
- package/PLUGIN.mdl +653 -0
- package/dist/lib/neutral/FeedArticle-PEWCFFSP.mjs +90 -0
- package/dist/lib/neutral/FeedArticle-PEWCFFSP.mjs.map +7 -0
- package/dist/lib/neutral/FeedProperties-EIO7IZOA.mjs +97 -0
- package/dist/lib/neutral/FeedProperties-EIO7IZOA.mjs.map +7 -0
- package/dist/lib/neutral/MagazineArticle-DEUTR23F.mjs +325 -0
- package/dist/lib/neutral/MagazineArticle-DEUTR23F.mjs.map +7 -0
- package/dist/lib/neutral/MagazinePlugin.mjs +62 -0
- package/dist/lib/neutral/MagazinePlugin.mjs.map +7 -0
- package/dist/lib/neutral/MagazinePlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/MagazinePlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/PostArticle-RERHXPXC.mjs +230 -0
- package/dist/lib/neutral/PostArticle-RERHXPXC.mjs.map +7 -0
- package/dist/lib/neutral/PostCard-VDGN7BBA.mjs +60 -0
- package/dist/lib/neutral/PostCard-VDGN7BBA.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-JDPRBVHL.mjs +121 -0
- package/dist/lib/neutral/app-graph-builder-JDPRBVHL.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +21 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-3K4AQKBZ.mjs +12 -0
- package/dist/lib/neutral/chunk-3K4AQKBZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-AFPBWBTK.mjs +591 -0
- package/dist/lib/neutral/chunk-AFPBWBTK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-APQRTYT3.mjs +57 -0
- package/dist/lib/neutral/chunk-APQRTYT3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GU725ZF4.mjs +11 -0
- package/dist/lib/neutral/chunk-GU725ZF4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JFPR6OV4.mjs +60 -0
- package/dist/lib/neutral/chunk-JFPR6OV4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KTYLUOUG.mjs +36 -0
- package/dist/lib/neutral/chunk-KTYLUOUG.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MBPX7RPI.mjs +14 -0
- package/dist/lib/neutral/chunk-MBPX7RPI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MJ2AY2CK.mjs +8 -0
- package/dist/lib/neutral/chunk-MJ2AY2CK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-OYCDRSWB.mjs +624 -0
- package/dist/lib/neutral/chunk-OYCDRSWB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SAWKLGJU.mjs +28 -0
- package/dist/lib/neutral/chunk-SAWKLGJU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XCNCK47N.mjs +15 -0
- package/dist/lib/neutral/chunk-XCNCK47N.mjs.map +7 -0
- package/dist/lib/neutral/clear-magazine-KNY4OWY4.mjs +59 -0
- package/dist/lib/neutral/clear-magazine-KNY4OWY4.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +338 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +17 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-SYZMRR4H.mjs +98 -0
- package/dist/lib/neutral/create-object-SYZMRR4H.mjs.map +7 -0
- package/dist/lib/neutral/curate-magazine-MA6OLK2X.mjs +184 -0
- package/dist/lib/neutral/curate-magazine-MA6OLK2X.mjs.map +7 -0
- package/dist/lib/neutral/fetch-article-content-CZO6D3QD.mjs +31 -0
- package/dist/lib/neutral/fetch-article-content-CZO6D3QD.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/load-post-content-XGL6VFF6.mjs +65 -0
- package/dist/lib/neutral/load-post-content-XGL6VFF6.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/navigation-resolver-IN4OMCDR.mjs +18 -0
- package/dist/lib/neutral/navigation-resolver-IN4OMCDR.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-JE3743BU.mjs +8 -0
- package/dist/lib/neutral/operation-handler-JE3743BU.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/plugin.workerd.mjs +16 -0
- package/dist/lib/neutral/plugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-TZESAMG2.mjs +60 -0
- package/dist/lib/neutral/react-surface-TZESAMG2.mjs.map +7 -0
- package/dist/lib/neutral/routine-templates-A2XTJOZO.mjs +52 -0
- package/dist/lib/neutral/routine-templates-A2XTJOZO.mjs.map +7 -0
- package/dist/lib/neutral/skill-definition-3KLMUEC5.mjs +8 -0
- package/dist/lib/neutral/skill-definition-3KLMUEC5.mjs.map +7 -0
- package/dist/lib/neutral/skills/index.mjs +46 -0
- package/dist/lib/neutral/skills/index.mjs.map +7 -0
- package/dist/lib/neutral/sync-feed-UZX2XHSQ.mjs +99 -0
- package/dist/lib/neutral/sync-feed-UZX2XHSQ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +81 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/MagazinePlugin.d.ts +4 -0
- package/dist/types/src/MagazinePlugin.d.ts.map +1 -0
- package/dist/types/src/MagazinePlugin.test.d.ts +2 -0
- package/dist/types/src/MagazinePlugin.test.d.ts.map +1 -0
- package/dist/types/src/MagazinePlugin.workerd.d.ts +4 -0
- package/dist/types/src/MagazinePlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/atoms/atoms.test.d.ts +2 -0
- package/dist/types/src/atoms/atoms.test.d.ts.map +1 -0
- package/dist/types/src/atoms/index.d.ts +7 -0
- package/dist/types/src/atoms/index.d.ts.map +1 -0
- package/dist/types/src/atoms/magazine-posts.d.ts +16 -0
- package/dist/types/src/atoms/magazine-posts.d.ts.map +1 -0
- package/dist/types/src/atoms/post-content.d.ts +7 -0
- package/dist/types/src/atoms/post-content.d.ts.map +1 -0
- package/dist/types/src/atoms/post-curation.d.ts +16 -0
- package/dist/types/src/atoms/post-curation.d.ts.map +1 -0
- package/dist/types/src/atoms/post-display.d.ts +22 -0
- package/dist/types/src/atoms/post-display.d.ts.map +1 -0
- package/dist/types/src/atoms/post-read.d.ts +14 -0
- package/dist/types/src/atoms/post-read.d.ts.map +1 -0
- package/dist/types/src/atoms/post-tags.d.ts +16 -0
- package/dist/types/src/atoms/post-tags.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +5 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/routine-templates.d.ts +5 -0
- package/dist/types/src/capabilities/routine-templates.d.ts.map +1 -0
- package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
- package/dist/types/src/components/PostContent/PostContent.d.ts +30 -0
- package/dist/types/src/components/PostContent/PostContent.d.ts.map +1 -0
- package/dist/types/src/components/PostContent/PostContent.test.d.ts +2 -0
- package/dist/types/src/components/PostContent/PostContent.test.d.ts.map +1 -0
- package/dist/types/src/components/PostContent/index.d.ts +2 -0
- package/dist/types/src/components/PostContent/index.d.ts.map +1 -0
- package/dist/types/src/components/PostStack/PostStack.d.ts +17 -0
- package/dist/types/src/components/PostStack/PostStack.d.ts.map +1 -0
- package/dist/types/src/components/PostStack/PostStack.stories.d.ts +10 -0
- package/dist/types/src/components/PostStack/PostStack.stories.d.ts.map +1 -0
- package/dist/types/src/components/PostStack/index.d.ts +2 -0
- package/dist/types/src/components/PostStack/index.d.ts.map +1 -0
- package/dist/types/src/components/SubscriptionStack/SubscriptionStack.d.ts +23 -0
- package/dist/types/src/components/SubscriptionStack/SubscriptionStack.d.ts.map +1 -0
- package/dist/types/src/components/SubscriptionStack/SubscriptionStack.stories.d.ts +8 -0
- package/dist/types/src/components/SubscriptionStack/SubscriptionStack.stories.d.ts.map +1 -0
- package/dist/types/src/components/SubscriptionStack/index.d.ts +2 -0
- package/dist/types/src/components/SubscriptionStack/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +4 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/containers/FeedArticle/FeedArticle.d.ts +6 -0
- package/dist/types/src/containers/FeedArticle/FeedArticle.d.ts.map +1 -0
- package/dist/types/src/containers/FeedArticle/FeedArticle.stories.d.ts +12 -0
- package/dist/types/src/containers/FeedArticle/FeedArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/FeedArticle/FeedToolbar.d.ts +10 -0
- package/dist/types/src/containers/FeedArticle/FeedToolbar.d.ts.map +1 -0
- package/dist/types/src/containers/FeedArticle/index.d.ts +2 -0
- package/dist/types/src/containers/FeedArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/FeedProperties/FeedProperties.d.ts +6 -0
- package/dist/types/src/containers/FeedProperties/FeedProperties.d.ts.map +1 -0
- package/dist/types/src/containers/FeedProperties/index.d.ts +2 -0
- package/dist/types/src/containers/FeedProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/MagazineArticle/MagazineArticle.d.ts +6 -0
- package/dist/types/src/containers/MagazineArticle/MagazineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/MagazineArticle/MagazineArticle.stories.d.ts +9 -0
- package/dist/types/src/containers/MagazineArticle/MagazineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/MagazineArticle/MagazineTile.d.ts +11 -0
- package/dist/types/src/containers/MagazineArticle/MagazineTile.d.ts.map +1 -0
- package/dist/types/src/containers/MagazineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/MagazineArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/MagazineArticle/useToolbar.d.ts +18 -0
- package/dist/types/src/containers/MagazineArticle/useToolbar.d.ts.map +1 -0
- package/dist/types/src/containers/PostArticle/PostArticle.d.ts +6 -0
- package/dist/types/src/containers/PostArticle/PostArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PostArticle/PostArticle.stories.d.ts +8 -0
- package/dist/types/src/containers/PostArticle/PostArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PostArticle/PostToolbar.d.ts +19 -0
- package/dist/types/src/containers/PostArticle/PostToolbar.d.ts.map +1 -0
- package/dist/types/src/containers/PostArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PostArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PostCard/PostCard.d.ts +11 -0
- package/dist/types/src/containers/PostCard/PostCard.d.ts.map +1 -0
- package/dist/types/src/containers/PostCard/index.d.ts +2 -0
- package/dist/types/src/containers/PostCard/index.d.ts.map +1 -0
- package/dist/types/src/containers/SubscriptionsArticle/SubscriptionsArticle.d.ts +5 -0
- package/dist/types/src/containers/SubscriptionsArticle/SubscriptionsArticle.d.ts.map +1 -0
- package/dist/types/src/containers/SubscriptionsArticle/SubscriptionsArticle.stories.d.ts +8 -0
- package/dist/types/src/containers/SubscriptionsArticle/SubscriptionsArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SubscriptionsArticle/index.d.ts +2 -0
- package/dist/types/src/containers/SubscriptionsArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +33 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/operations/clear-magazine.d.ts +10 -0
- package/dist/types/src/operations/clear-magazine.d.ts.map +1 -0
- package/dist/types/src/operations/curate-magazine.d.ts +25 -0
- package/dist/types/src/operations/curate-magazine.d.ts.map +1 -0
- package/dist/types/src/operations/curate-magazine.skill.test.d.ts +2 -0
- package/dist/types/src/operations/curate-magazine.skill.test.d.ts.map +1 -0
- package/dist/types/src/operations/curate-magazine.test.d.ts +2 -0
- package/dist/types/src/operations/curate-magazine.test.d.ts.map +1 -0
- package/dist/types/src/operations/extraction/article.d.ts +37 -0
- package/dist/types/src/operations/extraction/article.d.ts.map +1 -0
- package/dist/types/src/operations/extraction/article.test.d.ts +2 -0
- package/dist/types/src/operations/extraction/article.test.d.ts.map +1 -0
- package/dist/types/src/operations/extraction/index.d.ts +2 -0
- package/dist/types/src/operations/extraction/index.d.ts.map +1 -0
- package/dist/types/src/operations/fetch-article-content.d.ts +5 -0
- package/dist/types/src/operations/fetch-article-content.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/load-post-content.d.ts +8 -0
- package/dist/types/src/operations/load-post-content.d.ts.map +1 -0
- package/dist/types/src/operations/sources/article.d.ts +24 -0
- package/dist/types/src/operations/sources/article.d.ts.map +1 -0
- package/dist/types/src/operations/sources/cors.d.ts +12 -0
- package/dist/types/src/operations/sources/cors.d.ts.map +1 -0
- package/dist/types/src/operations/sources/feed-fetcher.d.ts +22 -0
- package/dist/types/src/operations/sources/feed-fetcher.d.ts.map +1 -0
- package/dist/types/src/operations/sources/feed-fetcher.test.d.ts +2 -0
- package/dist/types/src/operations/sources/feed-fetcher.test.d.ts.map +1 -0
- package/dist/types/src/operations/sources/http.d.ts +9 -0
- package/dist/types/src/operations/sources/http.d.ts.map +1 -0
- package/dist/types/src/operations/sources/index.d.ts +6 -0
- package/dist/types/src/operations/sources/index.d.ts.map +1 -0
- package/dist/types/src/operations/sources/rss.d.ts +4 -0
- package/dist/types/src/operations/sources/rss.d.ts.map +1 -0
- package/dist/types/src/operations/sources/rss.test.d.ts +2 -0
- package/dist/types/src/operations/sources/rss.test.d.ts.map +1 -0
- package/dist/types/src/operations/sources/standard-site.d.ts +33 -0
- package/dist/types/src/operations/sources/standard-site.d.ts.map +1 -0
- package/dist/types/src/operations/sync-feed.d.ts +5 -0
- package/dist/types/src/operations/sync-feed.d.ts.map +1 -0
- package/dist/types/src/operations/sync-feed.test.d.ts +2 -0
- package/dist/types/src/operations/sync-feed.test.d.ts.map +1 -0
- package/dist/types/src/operations/util.d.ts +25 -0
- package/dist/types/src/operations/util.d.ts.map +1 -0
- package/dist/types/src/operations/util.test.d.ts +2 -0
- package/dist/types/src/operations/util.test.d.ts.map +1 -0
- package/dist/types/src/paths.d.ts +3 -0
- package/dist/types/src/paths.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/plugin.workerd.d.ts +3 -0
- package/dist/types/src/plugin.workerd.d.ts.map +1 -0
- package/dist/types/src/skills/index.d.ts +2 -0
- package/dist/types/src/skills/index.d.ts.map +1 -0
- package/dist/types/src/skills/magazine-skill.d.ts +4 -0
- package/dist/types/src/skills/magazine-skill.d.ts.map +1 -0
- package/dist/types/src/stories/ArticleExtractor.stories.d.ts +267 -0
- package/dist/types/src/stories/ArticleExtractor.stories.d.ts.map +1 -0
- package/dist/types/src/stories/MagazineCurate.stories.d.ts +32 -0
- package/dist/types/src/stories/MagazineCurate.stories.d.ts.map +1 -0
- package/dist/types/src/stories/theregister-fixture.test.d.ts +2 -0
- package/dist/types/src/stories/theregister-fixture.test.d.ts.map +1 -0
- package/dist/types/src/templates/magazine-curation.d.ts +7 -0
- package/dist/types/src/templates/magazine-curation.d.ts.map +1 -0
- package/dist/types/src/testing/builder.d.ts +28 -0
- package/dist/types/src/testing/builder.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +247 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/CreateSubscription.d.ts +29 -0
- package/dist/types/src/types/CreateSubscription.d.ts.map +1 -0
- package/dist/types/src/types/FeedOperation.d.ts +52 -0
- package/dist/types/src/types/FeedOperation.d.ts.map +1 -0
- package/dist/types/src/types/Magazine.d.ts +87 -0
- package/dist/types/src/types/Magazine.d.ts.map +1 -0
- package/dist/types/src/types/Magazine.test.d.ts +2 -0
- package/dist/types/src/types/Magazine.test.d.ts.map +1 -0
- package/dist/types/src/types/Subscription.d.ts +144 -0
- package/dist/types/src/types/Subscription.d.ts.map +1 -0
- package/dist/types/src/types/Subscription.test.d.ts +2 -0
- package/dist/types/src/types/Subscription.test.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +5 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/util/date.d.ts +8 -0
- package/dist/types/src/util/date.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +4 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/post-content.d.ts +14 -0
- package/dist/types/src/util/post-content.d.ts.map +1 -0
- package/dist/types/src/util/text.d.ts +18 -0
- package/dist/types/src/util/text.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dx.config.ts +48 -0
- package/package.json +164 -0
- package/src/MagazinePlugin.test.ts +36 -0
- package/src/MagazinePlugin.tsx +61 -0
- package/src/MagazinePlugin.workerd.ts +31 -0
- package/src/atoms/atoms.test.ts +323 -0
- package/src/atoms/index.ts +10 -0
- package/src/atoms/magazine-posts.ts +70 -0
- package/src/atoms/post-content.ts +34 -0
- package/src/atoms/post-curation.ts +36 -0
- package/src/atoms/post-display.ts +59 -0
- package/src/atoms/post-read.ts +40 -0
- package/src/atoms/post-tags.ts +66 -0
- package/src/capabilities/app-graph-builder.ts +125 -0
- package/src/capabilities/create-object.ts +127 -0
- package/src/capabilities/index.ts +17 -0
- package/src/capabilities/navigation-resolver.ts +21 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +53 -0
- package/src/capabilities/routine-templates.ts +16 -0
- package/src/capabilities/skill-definition.ts +14 -0
- package/src/components/PostContent/PostContent.test.ts +81 -0
- package/src/components/PostContent/PostContent.tsx +111 -0
- package/src/components/PostContent/index.ts +5 -0
- package/src/components/PostStack/PostStack.stories.tsx +39 -0
- package/src/components/PostStack/PostStack.tsx +151 -0
- package/src/components/PostStack/index.ts +5 -0
- package/src/components/SubscriptionStack/SubscriptionStack.stories.tsx +52 -0
- package/src/components/SubscriptionStack/SubscriptionStack.tsx +161 -0
- package/src/components/SubscriptionStack/index.ts +5 -0
- package/src/components/index.ts +7 -0
- package/src/containers/FeedArticle/FeedArticle.stories.tsx +102 -0
- package/src/containers/FeedArticle/FeedArticle.tsx +68 -0
- package/src/containers/FeedArticle/FeedToolbar.tsx +47 -0
- package/src/containers/FeedArticle/index.ts +5 -0
- package/src/containers/FeedProperties/FeedProperties.tsx +107 -0
- package/src/containers/FeedProperties/index.ts +5 -0
- package/src/containers/MagazineArticle/MagazineArticle.stories.tsx +244 -0
- package/src/containers/MagazineArticle/MagazineArticle.tsx +146 -0
- package/src/containers/MagazineArticle/MagazineTile.tsx +88 -0
- package/src/containers/MagazineArticle/index.ts +5 -0
- package/src/containers/MagazineArticle/useToolbar.tsx +145 -0
- package/src/containers/PostArticle/PostArticle.stories.tsx +117 -0
- package/src/containers/PostArticle/PostArticle.tsx +140 -0
- package/src/containers/PostArticle/PostToolbar.tsx +120 -0
- package/src/containers/PostArticle/index.ts +5 -0
- package/src/containers/PostCard/PostCard.tsx +70 -0
- package/src/containers/PostCard/index.ts +5 -0
- package/src/containers/SubscriptionsArticle/SubscriptionsArticle.stories.tsx +80 -0
- package/src/containers/SubscriptionsArticle/SubscriptionsArticle.tsx +99 -0
- package/src/containers/SubscriptionsArticle/index.ts +5 -0
- package/src/containers/index.ts +11 -0
- package/src/index.ts +6 -0
- package/src/meta.ts +9 -0
- package/src/operations/clear-magazine.ts +83 -0
- package/src/operations/curate-magazine.skill.conversations.json +1 -0
- package/src/operations/curate-magazine.skill.test.ts +167 -0
- package/src/operations/curate-magazine.test.ts +91 -0
- package/src/operations/curate-magazine.ts +178 -0
- package/src/operations/extraction/article.test.ts +154 -0
- package/src/operations/extraction/article.ts +270 -0
- package/src/operations/extraction/index.ts +5 -0
- package/src/operations/fetch-article-content.ts +27 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/load-post-content.ts +76 -0
- package/src/operations/sources/article.ts +122 -0
- package/src/operations/sources/cors.ts +19 -0
- package/src/operations/sources/feed-fetcher.test.ts +200 -0
- package/src/operations/sources/feed-fetcher.ts +26 -0
- package/src/operations/sources/http.ts +42 -0
- package/src/operations/sources/index.ts +9 -0
- package/src/operations/sources/rss.test.ts +201 -0
- package/src/operations/sources/rss.ts +138 -0
- package/src/operations/sources/standard-site.ts +381 -0
- package/src/operations/sources/testing/feed.xml +477 -0
- package/src/operations/sync-feed.test.ts +146 -0
- package/src/operations/sync-feed.ts +140 -0
- package/src/operations/util.test.ts +67 -0
- package/src/operations/util.ts +65 -0
- package/src/paths.ts +14 -0
- package/src/plugin.ts +11 -0
- package/src/plugin.workerd.ts +6 -0
- package/src/skills/index.ts +5 -0
- package/src/skills/magazine-skill.ts +45 -0
- package/src/stories/ArticleExtractor.stories.tsx +204 -0
- package/src/stories/MagazineCurate.stories.tsx +217 -0
- package/src/stories/fixtures/theregister-ai.xml +45 -0
- package/src/stories/theregister-fixture.test.ts +35 -0
- package/src/templates/magazine-curation.ts +47 -0
- package/src/testing/builder.ts +77 -0
- package/src/testing/index.ts +5 -0
- package/src/translations.ts +81 -0
- package/src/types/CreateSubscription.ts +61 -0
- package/src/types/FeedOperation.ts +134 -0
- package/src/types/Magazine.test.ts +69 -0
- package/src/types/Magazine.ts +214 -0
- package/src/types/Subscription.test.ts +171 -0
- package/src/types/Subscription.ts +366 -0
- package/src/types/index.ts +8 -0
- package/src/util/date.ts +27 -0
- package/src/util/index.ts +7 -0
- package/src/util/post-content.ts +19 -0
- package/src/util/text.ts +98 -0
- package/src/vite-env.d.ts +10 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Magazine, Subscription } from '#types';
|
|
2
|
+
/** Generates an array of random posts. */
|
|
3
|
+
export declare const generatePosts: (count: number) => Subscription.Post[];
|
|
4
|
+
/** Generates a random subscription feed. */
|
|
5
|
+
export declare const generateFeed: (props?: Partial<{
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}>) => Subscription.Subscription;
|
|
10
|
+
/**
|
|
11
|
+
* Generates a Post. Note: per-Post state (snippet, imageUrl, readAt) is no
|
|
12
|
+
* longer on the Post itself — it lives on the source Subscription's or
|
|
13
|
+
* Magazine's `postState` map. The caller is responsible for seeding those if
|
|
14
|
+
* the story / test needs them. The `read` / `imageUrl` params are kept on
|
|
15
|
+
* the signature for back-compat call sites; they are currently no-ops and
|
|
16
|
+
* will be wired through state-seeding helpers in a follow-up.
|
|
17
|
+
*/
|
|
18
|
+
export declare const generateCuratedPost: (_props?: {
|
|
19
|
+
imageUrl?: string;
|
|
20
|
+
read?: boolean;
|
|
21
|
+
}) => Subscription.Post;
|
|
22
|
+
/** Generates a Magazine with the given curated posts. Feeds default to empty. */
|
|
23
|
+
export declare const generateMagazine: (props?: Partial<{
|
|
24
|
+
name: string;
|
|
25
|
+
feeds: Subscription.Subscription[];
|
|
26
|
+
posts: Subscription.Post[];
|
|
27
|
+
}>) => Magazine.Magazine;
|
|
28
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../src/testing/builder.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEhD,0CAA0C;AAC1C,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,YAAY,CAAC,IAAI,EAgB9D,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,YAAY,WAChB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,KACjE,YAAY,CAAC,YAKZ,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,YAAY;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,KAAQ,YAAY,CAAC,IAarG,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,WACpB,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,YAAY,CAAC,YAAY,EAAE,CAAC;IACnC,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;CAC5B,CAAC,KACD,QAAQ,CAAC,QAMX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
export declare const translations: [{
|
|
2
|
+
readonly 'en-US': {
|
|
3
|
+
readonly "@dxos/react-ui-form": {
|
|
4
|
+
readonly 'ref-editor.placeholder': "Type '@' to add a reference, or enter a value";
|
|
5
|
+
readonly 'ref-editor-auto.placeholder': 'Search by name, or enter a value';
|
|
6
|
+
readonly 'fields.label': 'Fields';
|
|
7
|
+
readonly 'hidden-fields.label': 'Hidden Fields';
|
|
8
|
+
readonly 'empty-readonly-ref-field.label': '(none)';
|
|
9
|
+
readonly 'field-property.label': 'Property';
|
|
10
|
+
readonly 'field-property.placeholder': 'Property name';
|
|
11
|
+
readonly 'field-format.label': 'Type';
|
|
12
|
+
readonly 'field-path.label': 'Field path';
|
|
13
|
+
readonly 'remove-item.button': 'Delete item';
|
|
14
|
+
readonly 'add-item.button': 'Add item';
|
|
15
|
+
readonly 'add-property-button.label': 'Add property';
|
|
16
|
+
readonly 'boolean-input-true.value': 'Yes';
|
|
17
|
+
readonly 'boolean-input-false.value': 'No';
|
|
18
|
+
readonly 'show-field.label': 'Show field';
|
|
19
|
+
readonly 'hide-field.label': 'Hide field';
|
|
20
|
+
readonly 'expand-fields.label': 'Expand';
|
|
21
|
+
readonly 'collapse-fields.label': 'Collapse';
|
|
22
|
+
readonly 'delete-field.label': 'Delete field';
|
|
23
|
+
readonly 'create-option.label': 'Create';
|
|
24
|
+
readonly 'add-tag.label': 'Add tag';
|
|
25
|
+
readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
|
|
26
|
+
readonly 'ref-field.placeholder': 'Select\u2026';
|
|
27
|
+
readonly 'ref-field.placeholder_one': 'Select\u2026';
|
|
28
|
+
readonly 'ref-field.placeholder_other': 'Select items\u2026';
|
|
29
|
+
readonly 'example.placeholder': 'Example';
|
|
30
|
+
readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
|
|
31
|
+
readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
|
|
32
|
+
readonly 'cancel-button.label': 'Cancel';
|
|
33
|
+
readonly 'save-button.label': 'Save';
|
|
34
|
+
readonly 'create-text.label': 'Create text';
|
|
35
|
+
readonly 'format.boolean.label': 'Boolean';
|
|
36
|
+
readonly 'format.currency.label': 'Currency';
|
|
37
|
+
readonly 'format.date.label': 'Date';
|
|
38
|
+
readonly 'format.date-time.label': 'DateTime';
|
|
39
|
+
readonly 'format.did.label': 'DID';
|
|
40
|
+
readonly 'format.duration.label': 'Duration';
|
|
41
|
+
readonly 'format.dxn.label': 'DXN';
|
|
42
|
+
readonly 'format.email.label': 'Email';
|
|
43
|
+
readonly 'format.formula.label': 'Formula';
|
|
44
|
+
readonly 'format.hostname.label': 'Hostname';
|
|
45
|
+
readonly 'format.integer.label': 'Integer';
|
|
46
|
+
readonly 'format.json.label': 'JSON';
|
|
47
|
+
readonly 'format.lnglat.label': 'Geopoint';
|
|
48
|
+
readonly 'format.markdown.label': 'Markdown';
|
|
49
|
+
readonly 'format.percent.label': 'Percent';
|
|
50
|
+
readonly 'format.ref.label': 'Reference';
|
|
51
|
+
readonly 'format.regex.label': 'RegExp';
|
|
52
|
+
readonly 'format.string.label': 'String';
|
|
53
|
+
readonly 'format.single-select.label': 'Select';
|
|
54
|
+
readonly 'format.multi-select.label': 'Multi-select';
|
|
55
|
+
readonly 'format.text.label': 'Long text';
|
|
56
|
+
readonly 'format.time.label': 'Time';
|
|
57
|
+
readonly 'format.timestamp.label': 'Timestamp';
|
|
58
|
+
readonly 'format.user.label': 'User';
|
|
59
|
+
readonly 'format.number.label': 'Number';
|
|
60
|
+
readonly 'format.uri.label': 'URI';
|
|
61
|
+
readonly 'format.url.label': 'URL';
|
|
62
|
+
readonly 'format.uuid.label': 'UUID';
|
|
63
|
+
readonly 'latitude.label': 'Latitude';
|
|
64
|
+
readonly 'longitude.label': 'Longitude';
|
|
65
|
+
readonly 'select-option.label': 'Label';
|
|
66
|
+
readonly 'select-option-label.placeholder': 'Option label';
|
|
67
|
+
readonly 'select-option-delete.button': 'Delete';
|
|
68
|
+
readonly 'select-option-add.button': 'Add option';
|
|
69
|
+
readonly 'system-schema.title': 'System type';
|
|
70
|
+
readonly 'system-schema.description': 'System type: cannot add or remove fields.';
|
|
71
|
+
readonly 'remove.button': 'Delete';
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}, {
|
|
75
|
+
readonly 'en-US': {
|
|
76
|
+
readonly [x: string]: {
|
|
77
|
+
readonly 'typename.label': 'Feed';
|
|
78
|
+
readonly 'typename.label_zero': 'Feeds';
|
|
79
|
+
readonly 'typename.label_one': 'Feed';
|
|
80
|
+
readonly 'typename.label_other': 'Feeds';
|
|
81
|
+
readonly 'object-name.placeholder': 'New feed';
|
|
82
|
+
readonly 'add-object.label': 'Add feed';
|
|
83
|
+
readonly 'rename-object.label': 'Rename feed';
|
|
84
|
+
readonly 'delete-object.label': 'Delete feed';
|
|
85
|
+
readonly 'object-deleted.label': 'Feed deleted';
|
|
86
|
+
readonly 'plugin.name'?: undefined;
|
|
87
|
+
readonly 'empty-feed.message'?: undefined;
|
|
88
|
+
readonly 'feed-companion.label'?: undefined;
|
|
89
|
+
readonly 'sync-feed.label'?: undefined;
|
|
90
|
+
readonly 'sync-feed-error.title'?: undefined;
|
|
91
|
+
readonly 'feed-sync.label'?: undefined;
|
|
92
|
+
readonly 'view-trigger.label'?: undefined;
|
|
93
|
+
readonly 'add-feed.label'?: undefined;
|
|
94
|
+
readonly 'curate.label'?: undefined;
|
|
95
|
+
readonly 'clear-magazine.label'?: undefined;
|
|
96
|
+
readonly 'refreshing-magazine.label'?: undefined;
|
|
97
|
+
readonly 'no-feeds.label'?: undefined;
|
|
98
|
+
readonly 'empty-magazine.message'?: undefined;
|
|
99
|
+
readonly 'curate-error.message'?: undefined;
|
|
100
|
+
readonly 'clear-error.message'?: undefined;
|
|
101
|
+
readonly 'refresh-content-error.message'?: undefined;
|
|
102
|
+
readonly 'post-companion.label'?: undefined;
|
|
103
|
+
readonly 'post-title.placeholder'?: undefined;
|
|
104
|
+
readonly 'open-original.label'?: undefined;
|
|
105
|
+
readonly 'mark-unread.label'?: undefined;
|
|
106
|
+
readonly 'refresh-content.label'?: undefined;
|
|
107
|
+
readonly 'refresh-content-pending.label'?: undefined;
|
|
108
|
+
readonly 'archive-post.label'?: undefined;
|
|
109
|
+
readonly 'unarchive-post.label'?: undefined;
|
|
110
|
+
readonly 'star-post.label'?: undefined;
|
|
111
|
+
readonly 'unstar-post.label'?: undefined;
|
|
112
|
+
readonly 'sort-by-date.label'?: undefined;
|
|
113
|
+
readonly 'sort-by-rank.label'?: undefined;
|
|
114
|
+
readonly 'view-filter.label'?: undefined;
|
|
115
|
+
readonly 'show-archived.label'?: undefined;
|
|
116
|
+
readonly 'only-starred.label'?: undefined;
|
|
117
|
+
readonly 'close.label'?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
readonly 'typename.label': 'Post';
|
|
120
|
+
readonly 'typename.label_zero': 'Posts';
|
|
121
|
+
readonly 'typename.label_one': 'Post';
|
|
122
|
+
readonly 'typename.label_other': 'Posts';
|
|
123
|
+
readonly 'post-title.placeholder': 'Untitled';
|
|
124
|
+
readonly 'object-name.placeholder'?: undefined;
|
|
125
|
+
readonly 'add-object.label'?: undefined;
|
|
126
|
+
readonly 'rename-object.label'?: undefined;
|
|
127
|
+
readonly 'delete-object.label'?: undefined;
|
|
128
|
+
readonly 'object-deleted.label'?: undefined;
|
|
129
|
+
readonly 'plugin.name'?: undefined;
|
|
130
|
+
readonly 'empty-feed.message'?: undefined;
|
|
131
|
+
readonly 'feed-companion.label'?: undefined;
|
|
132
|
+
readonly 'sync-feed.label'?: undefined;
|
|
133
|
+
readonly 'sync-feed-error.title'?: undefined;
|
|
134
|
+
readonly 'feed-sync.label'?: undefined;
|
|
135
|
+
readonly 'view-trigger.label'?: undefined;
|
|
136
|
+
readonly 'add-feed.label'?: undefined;
|
|
137
|
+
readonly 'curate.label'?: undefined;
|
|
138
|
+
readonly 'clear-magazine.label'?: undefined;
|
|
139
|
+
readonly 'refreshing-magazine.label'?: undefined;
|
|
140
|
+
readonly 'no-feeds.label'?: undefined;
|
|
141
|
+
readonly 'empty-magazine.message'?: undefined;
|
|
142
|
+
readonly 'curate-error.message'?: undefined;
|
|
143
|
+
readonly 'clear-error.message'?: undefined;
|
|
144
|
+
readonly 'refresh-content-error.message'?: undefined;
|
|
145
|
+
readonly 'post-companion.label'?: undefined;
|
|
146
|
+
readonly 'open-original.label'?: undefined;
|
|
147
|
+
readonly 'mark-unread.label'?: undefined;
|
|
148
|
+
readonly 'refresh-content.label'?: undefined;
|
|
149
|
+
readonly 'refresh-content-pending.label'?: undefined;
|
|
150
|
+
readonly 'archive-post.label'?: undefined;
|
|
151
|
+
readonly 'unarchive-post.label'?: undefined;
|
|
152
|
+
readonly 'star-post.label'?: undefined;
|
|
153
|
+
readonly 'unstar-post.label'?: undefined;
|
|
154
|
+
readonly 'sort-by-date.label'?: undefined;
|
|
155
|
+
readonly 'sort-by-rank.label'?: undefined;
|
|
156
|
+
readonly 'view-filter.label'?: undefined;
|
|
157
|
+
readonly 'show-archived.label'?: undefined;
|
|
158
|
+
readonly 'only-starred.label'?: undefined;
|
|
159
|
+
readonly 'close.label'?: undefined;
|
|
160
|
+
} | {
|
|
161
|
+
readonly 'typename.label': 'Magazine';
|
|
162
|
+
readonly 'typename.label_zero': 'Magazines';
|
|
163
|
+
readonly 'typename.label_one': 'Magazine';
|
|
164
|
+
readonly 'typename.label_other': 'Magazines';
|
|
165
|
+
readonly 'object-name.placeholder': 'New magazine';
|
|
166
|
+
readonly 'add-object.label': 'Add magazine';
|
|
167
|
+
readonly 'rename-object.label': 'Rename magazine';
|
|
168
|
+
readonly 'delete-object.label': 'Delete magazine';
|
|
169
|
+
readonly 'object-deleted.label': 'Magazine deleted';
|
|
170
|
+
readonly 'plugin.name'?: undefined;
|
|
171
|
+
readonly 'empty-feed.message'?: undefined;
|
|
172
|
+
readonly 'feed-companion.label'?: undefined;
|
|
173
|
+
readonly 'sync-feed.label'?: undefined;
|
|
174
|
+
readonly 'sync-feed-error.title'?: undefined;
|
|
175
|
+
readonly 'feed-sync.label'?: undefined;
|
|
176
|
+
readonly 'view-trigger.label'?: undefined;
|
|
177
|
+
readonly 'add-feed.label'?: undefined;
|
|
178
|
+
readonly 'curate.label'?: undefined;
|
|
179
|
+
readonly 'clear-magazine.label'?: undefined;
|
|
180
|
+
readonly 'refreshing-magazine.label'?: undefined;
|
|
181
|
+
readonly 'no-feeds.label'?: undefined;
|
|
182
|
+
readonly 'empty-magazine.message'?: undefined;
|
|
183
|
+
readonly 'curate-error.message'?: undefined;
|
|
184
|
+
readonly 'clear-error.message'?: undefined;
|
|
185
|
+
readonly 'refresh-content-error.message'?: undefined;
|
|
186
|
+
readonly 'post-companion.label'?: undefined;
|
|
187
|
+
readonly 'post-title.placeholder'?: undefined;
|
|
188
|
+
readonly 'open-original.label'?: undefined;
|
|
189
|
+
readonly 'mark-unread.label'?: undefined;
|
|
190
|
+
readonly 'refresh-content.label'?: undefined;
|
|
191
|
+
readonly 'refresh-content-pending.label'?: undefined;
|
|
192
|
+
readonly 'archive-post.label'?: undefined;
|
|
193
|
+
readonly 'unarchive-post.label'?: undefined;
|
|
194
|
+
readonly 'star-post.label'?: undefined;
|
|
195
|
+
readonly 'unstar-post.label'?: undefined;
|
|
196
|
+
readonly 'sort-by-date.label'?: undefined;
|
|
197
|
+
readonly 'sort-by-rank.label'?: undefined;
|
|
198
|
+
readonly 'view-filter.label'?: undefined;
|
|
199
|
+
readonly 'show-archived.label'?: undefined;
|
|
200
|
+
readonly 'only-starred.label'?: undefined;
|
|
201
|
+
readonly 'close.label'?: undefined;
|
|
202
|
+
} | {
|
|
203
|
+
readonly 'typename.label'?: undefined;
|
|
204
|
+
readonly 'typename.label_zero'?: undefined;
|
|
205
|
+
readonly 'typename.label_one'?: undefined;
|
|
206
|
+
readonly 'typename.label_other'?: undefined;
|
|
207
|
+
readonly 'object-name.placeholder'?: undefined;
|
|
208
|
+
readonly 'add-object.label'?: undefined;
|
|
209
|
+
readonly 'rename-object.label'?: undefined;
|
|
210
|
+
readonly 'delete-object.label'?: undefined;
|
|
211
|
+
readonly 'object-deleted.label'?: undefined;
|
|
212
|
+
readonly 'plugin.name': 'Feed';
|
|
213
|
+
readonly 'empty-feed.message': 'No posts yet';
|
|
214
|
+
readonly 'feed-companion.label': 'Feed';
|
|
215
|
+
readonly 'sync-feed.label': 'Sync feed';
|
|
216
|
+
readonly 'sync-feed-error.title': 'Failed to sync feed';
|
|
217
|
+
readonly 'feed-sync.label': 'Feed Sync';
|
|
218
|
+
readonly 'view-trigger.label': 'View trigger';
|
|
219
|
+
readonly 'add-feed.label': 'Add feed';
|
|
220
|
+
readonly 'curate.label': 'Curate';
|
|
221
|
+
readonly 'clear-magazine.label': 'Clear (preserves starred)';
|
|
222
|
+
readonly 'refreshing-magazine.label': 'Refreshing magazine...';
|
|
223
|
+
readonly 'no-feeds.label': 'Add at least one feed first';
|
|
224
|
+
readonly 'empty-magazine.message': 'No articles yet.';
|
|
225
|
+
readonly 'curate-error.message': 'Failed to curate magazine.';
|
|
226
|
+
readonly 'clear-error.message': 'Failed to clear magazine.';
|
|
227
|
+
readonly 'refresh-content-error.message': 'Failed to refresh content.';
|
|
228
|
+
readonly 'post-companion.label': 'Post';
|
|
229
|
+
readonly 'post-title.placeholder': 'Untitled';
|
|
230
|
+
readonly 'open-original.label': 'Open original';
|
|
231
|
+
readonly 'mark-unread.label': 'Mark as unread';
|
|
232
|
+
readonly 'refresh-content.label': 'Refresh content';
|
|
233
|
+
readonly 'refresh-content-pending.label': 'Refreshing\u2026';
|
|
234
|
+
readonly 'archive-post.label': 'Archive';
|
|
235
|
+
readonly 'unarchive-post.label': 'Unarchive';
|
|
236
|
+
readonly 'star-post.label': 'Star';
|
|
237
|
+
readonly 'unstar-post.label': 'Unstar';
|
|
238
|
+
readonly 'sort-by-date.label': 'Sort by date';
|
|
239
|
+
readonly 'sort-by-rank.label': 'Sort by rank';
|
|
240
|
+
readonly 'view-filter.label': 'Filter posts';
|
|
241
|
+
readonly 'show-archived.label': 'Show archived';
|
|
242
|
+
readonly 'only-starred.label': 'Show starred only';
|
|
243
|
+
readonly 'close.label': 'Close';
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
}];
|
|
247
|
+
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAKC,MAAM;4CACD,OAAO;2CACR,MAAM;6CACJ,OAAO;gDACJ,UAAU;yCACjB,UAAU;4CACP,aAAa;4CACb,aAAa;6CACZ,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAGpB,MAAM;4CACD,OAAO;2CACR,MAAM;6CACJ,OAAO;+CACL,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAGlB,UAAU;4CACL,WAAW;2CACZ,UAAU;6CACR,WAAW;gDACR,cAAc;yCACrB,cAAc;4CACX,iBAAiB;4CACjB,iBAAiB;6CAChB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAG3B,MAAM;2CACC,cAAc;6CACZ,MAAM;wCACX,WAAW;8CACL,qBAAqB;wCAC3B,WAAW;2CACR,cAAc;uCAClB,UAAU;qCACZ,QAAQ;6CACA,2BAA2B;kDACtB,wBAAwB;uCACnC,6BAA6B;+CACrB,kBAAkB;6CACpB,4BAA4B;4CAC7B,2BAA2B;sDACjB,4BAA4B;6CACrC,MAAM;+CACJ,UAAU;4CACb,eAAe;0CACjB,gBAAgB;8CACZ,iBAAiB;sDACT,kBAAa;2CACxB,SAAS;6CACP,WAAW;wCAChB,MAAM;0CACJ,QAAQ;2CACP,cAAc;2CACd,cAAc;0CACf,cAAc;4CACZ,eAAe;2CAChB,mBAAmB;oCAC1B,OAAO;;;EAIC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import * as Subscription from './Subscription';
|
|
3
|
+
export declare const HandleSchema: Schema.filter<typeof Schema.String>;
|
|
4
|
+
export declare const isHandle: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is string;
|
|
5
|
+
export declare const isUrl: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is string;
|
|
6
|
+
export declare const StandardSiteCreateBase: Schema.Struct<{
|
|
7
|
+
type: Schema.Literal<["standard-site"]>;
|
|
8
|
+
handle: Schema.refine<string, typeof Schema.String>;
|
|
9
|
+
publication: Schema.SchemaClass<string, string, never>;
|
|
10
|
+
}>;
|
|
11
|
+
export type StandardSiteValues = Schema.Schema.Type<typeof StandardSiteCreateBase>;
|
|
12
|
+
export declare const RssCreateBase: Schema.Struct<{
|
|
13
|
+
type: Schema.Literal<["rss"]>;
|
|
14
|
+
url: Schema.refine<string, typeof Schema.String>;
|
|
15
|
+
name: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
16
|
+
}>;
|
|
17
|
+
export type RssValues = Schema.Schema.Type<typeof RssCreateBase>;
|
|
18
|
+
export type CreateSubscriptionInput = {
|
|
19
|
+
type: 'standard-site';
|
|
20
|
+
handle: string;
|
|
21
|
+
publication: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'rss';
|
|
24
|
+
url: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
};
|
|
27
|
+
/** Normalizes a create-form union member into the stored {@link Subscription.Subscription} fields. */
|
|
28
|
+
export declare const makeSubscriptionFromCreate: (input: CreateSubscriptionInput) => Subscription.Subscription;
|
|
29
|
+
//# sourceMappingURL=CreateSubscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateSubscription.d.ts","sourceRoot":"","sources":["../../../../src/types/CreateSubscription.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAK/C,eAAO,MAAM,YAAY,qCAExB,CAAC;AAEF,eAAO,MAAM,QAAQ,iGAA0B,CAAC;AAChD,eAAO,MAAM,KAAK,iGAAwB,CAAC;AAO3C,eAAO,MAAM,sBAAsB;;;;EAKjC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEnF,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAC;AAIjE,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhD,sGAAsG;AACtG,eAAO,MAAM,0BAA0B,UAAW,uBAAuB,KAAG,YAAY,CAAC,YASxF,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Operation } from '@dxos/compute';
|
|
2
|
+
import { Database, Registry } from '@dxos/echo';
|
|
3
|
+
import * as Magazine from './Magazine';
|
|
4
|
+
import * as Subscription from './Subscription';
|
|
5
|
+
/** Fetches an RSS/Atom feed and appends new posts to the backing ECHO feed. */
|
|
6
|
+
export declare const SyncFeed: Operation.Definition<{
|
|
7
|
+
readonly feed: import("@dxos/echo/internal").Ref<Subscription.Subscription & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>;
|
|
8
|
+
}, void, Database.Service>;
|
|
9
|
+
/**
|
|
10
|
+
* Fetches a Post's article page over HTTP and returns extracted plain text plus
|
|
11
|
+
* any image URLs found. Read-only; does not mutate the Post. Agent-facing tool
|
|
12
|
+
* (the surviving curation tool: the agent may call it to read a candidate's full
|
|
13
|
+
* text when title + description are insufficient to judge relevance).
|
|
14
|
+
*/
|
|
15
|
+
export declare const FetchArticleContent: Operation.Definition<{
|
|
16
|
+
readonly post: import("@dxos/echo/internal").Ref<Subscription.Post & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>;
|
|
17
|
+
}, {
|
|
18
|
+
readonly text: string;
|
|
19
|
+
readonly imageUrls: readonly string[];
|
|
20
|
+
}, Database.Service>;
|
|
21
|
+
/**
|
|
22
|
+
* Fetches a Post's article page over HTTP and writes the extracted plain text
|
|
23
|
+
* and hero image URL to the source Subscription's content feed. Per-Post read/star/archive
|
|
24
|
+
* state on the Subscription is keyed by Post entity id.
|
|
25
|
+
* (the Post itself is an immutable queue item). Idempotent — skips if
|
|
26
|
+
* `content` is already set or the Post has no link. Used by the reader view
|
|
27
|
+
* to populate the full article on first open.
|
|
28
|
+
*/
|
|
29
|
+
export declare const LoadPostContent: Operation.Definition<{
|
|
30
|
+
readonly post: import("@dxos/echo/internal").Ref<Subscription.Post & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>;
|
|
31
|
+
readonly force?: boolean | undefined;
|
|
32
|
+
}, void, never>;
|
|
33
|
+
/**
|
|
34
|
+
* End-to-end magazine curation: syncs all referenced feeds (in parallel), then runs an in-memory
|
|
35
|
+
* routine (the magazine's topic instructions + the registry-resolved Magazine skill) through the
|
|
36
|
+
* agent to select matching posts, adds the selected posts mechanically, and finally enforces each
|
|
37
|
+
* feed's `keep` bound. Drives the MagazineArticle Curate button; schedulable via triggers.
|
|
38
|
+
*/
|
|
39
|
+
export declare const CurateMagazine: Operation.Definition<{
|
|
40
|
+
readonly magazine: import("@dxos/echo/internal").Ref<Magazine.Magazine & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>;
|
|
41
|
+
}, {
|
|
42
|
+
readonly synced: number;
|
|
43
|
+
readonly curated: number;
|
|
44
|
+
}, Registry.Service | Database.Service>;
|
|
45
|
+
/**
|
|
46
|
+
* Clears a Magazine's curated posts, preserving any that are starred. Drives the MagazineArticle
|
|
47
|
+
* Clear button.
|
|
48
|
+
*/
|
|
49
|
+
export declare const ClearMagazine: Operation.Definition<{
|
|
50
|
+
readonly magazine: import("@dxos/echo/internal").Ref<Magazine.Magazine & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>;
|
|
51
|
+
}, void, Database.Service>;
|
|
52
|
+
//# sourceMappingURL=FeedOperation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeedOperation.d.ts","sourceRoot":"","sources":["../../../../src/types/FeedOperation.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAY,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI1D,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAI/C,+EAA+E;AAC/E,eAAO,MAAM,QAAQ;;0BAYK,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;oBAmB9B,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;eAkB1B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;;;uCAmBD,CAAC;AAE3B;;;GAGG;AACH,eAAO,MAAM,aAAa;;0BAcA,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Instructions } from '@dxos/compute';
|
|
3
|
+
import { Obj, Ref, Type } from '@dxos/echo';
|
|
4
|
+
import { type EntityId } from '@dxos/keys';
|
|
5
|
+
import { StateMap } from '@dxos/schema';
|
|
6
|
+
import * as Subscription from './Subscription';
|
|
7
|
+
export declare const SKILL_KEY = "org.dxos.skill.magazine";
|
|
8
|
+
/**
|
|
9
|
+
* Default editorial methodology seeded into a Magazine's curation Routine. Describes WHAT to curate
|
|
10
|
+
* (selection, dedup, snippet, hero image). The HOW (candidate input shape, tool usage, output
|
|
11
|
+
* contract) lives in the Magazine skill, not here.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_INSTRUCTIONS: string;
|
|
14
|
+
/** Per-Post magazine-scoped curation state, keyed by Post id. */
|
|
15
|
+
export declare const PostState: Schema.Struct<{
|
|
16
|
+
/** Agent-assigned relevance within this magazine (lower = more relevant). */
|
|
17
|
+
rank: Schema.optional<typeof Schema.Number>;
|
|
18
|
+
/** Agent-written concise snippet summarising the article in the context of this magazine's topic. */
|
|
19
|
+
snippet: Schema.optional<typeof Schema.String>;
|
|
20
|
+
/** Agent-selected hero image URL for this post in this magazine. */
|
|
21
|
+
imageUrl: Schema.optional<typeof Schema.String>;
|
|
22
|
+
}>;
|
|
23
|
+
export type PostState = Schema.Schema.Type<typeof PostState>;
|
|
24
|
+
/**
|
|
25
|
+
* Structured output contract of the curation Routine: the Posts the agent selected, each with
|
|
26
|
+
* agent-generated display values. Declared as the Routine's `output` ({@link make}) so the agent's
|
|
27
|
+
* `completeJob` carries this payload (a Void/Unknown default would silently drop it); {@link
|
|
28
|
+
* CurateMagazine} decodes the Routine result against the same schema.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CurationOutput: Schema.Struct<{
|
|
31
|
+
posts: Schema.Array$<Schema.Struct<{
|
|
32
|
+
id: import("@dxos/keys").EntityIdClass;
|
|
33
|
+
/** Concise 1-2 sentence snippet summarising why this article is relevant to the magazine topic. */
|
|
34
|
+
snippet: Schema.optional<typeof Schema.String>;
|
|
35
|
+
/** Best image URL found for this article (from the post or fetched content). */
|
|
36
|
+
imageUrl: Schema.optional<typeof Schema.String>;
|
|
37
|
+
}>>;
|
|
38
|
+
}>;
|
|
39
|
+
declare const Magazine_base: Type.ObjClass<Magazine, {
|
|
40
|
+
readonly name?: string | undefined;
|
|
41
|
+
readonly feeds: readonly import("@dxos/echo/internal").Ref<Subscription.Subscription & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[];
|
|
42
|
+
readonly posts: readonly import("@dxos/echo/internal").Ref<Subscription.Post & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[];
|
|
43
|
+
readonly instructions?: import("@dxos/echo/internal").Ref<Instructions.Instructions & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
44
|
+
readonly postState: import("@dxos/echo/internal").Ref<StateMap.StateMap & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
45
|
+
readonly keep?: number | undefined;
|
|
46
|
+
}, {}>;
|
|
47
|
+
/**
|
|
48
|
+
* An agent-curated collection of articles drawn from one or more Feeds.
|
|
49
|
+
* Curation is driven by a {@link Routine.Routine} created with the magazine ({@link make}): its
|
|
50
|
+
* instructions hold the editorial brief and it references the Magazine skill (the tool/output
|
|
51
|
+
* contract). {@link CurateMagazine} runs the Routine to select matching Posts.
|
|
52
|
+
*/
|
|
53
|
+
export declare class Magazine extends Magazine_base {
|
|
54
|
+
}
|
|
55
|
+
/** Checks if a value is a Magazine object. */
|
|
56
|
+
export declare const instanceOf: (value: unknown) => value is Magazine;
|
|
57
|
+
export type MakeProps = Omit<Obj.MakeProps<typeof Magazine>, 'feeds' | 'posts' | 'instructions' | 'postState'> & {
|
|
58
|
+
feeds?: Ref.Ref<Subscription.Subscription>[];
|
|
59
|
+
posts?: Ref.Ref<Subscription.Post>[];
|
|
60
|
+
/** Editorial brief seeded into the curation Routine's instructions (composed with the default methodology). */
|
|
61
|
+
instructions?: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Creates a Magazine plus its curation Routine and per-Post state map as hidden children (all
|
|
65
|
+
* cascade-deleted with the magazine). The Routine holds the editorial brief (its instructions,
|
|
66
|
+
* seeded from {@link composeInstructions}) and references the Magazine skill by its registry DXN;
|
|
67
|
+
* {@link CurateMagazine} runs it and the agent resolves the skill at run time.
|
|
68
|
+
*/
|
|
69
|
+
export declare const make: (props?: MakeProps) => Magazine;
|
|
70
|
+
/** Composes Routine instructions from the default editorial methodology and an optional topic focus. */
|
|
71
|
+
export declare const composeInstructions: (topic?: string) => string;
|
|
72
|
+
/** Schema for the create-magazine dialog form. */
|
|
73
|
+
export declare const CreateMagazineSchema: Schema.Struct<{
|
|
74
|
+
name: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
75
|
+
feeds: Schema.Array$<Ref.RefSchema<Subscription.Subscription & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>>;
|
|
76
|
+
instructions: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
77
|
+
}>;
|
|
78
|
+
/** Agent-assigned relevance of a Post within a Magazine, or undefined. */
|
|
79
|
+
export declare const getRank: (magazine: Magazine | undefined, postId: EntityId) => number | undefined;
|
|
80
|
+
/** Returns the full magazine-scoped {@link PostState} for a Post, or an empty record. */
|
|
81
|
+
export declare const getPostState: (magazine: Magazine | undefined, postId: EntityId) => Partial<PostState>;
|
|
82
|
+
/** Merges partial state into a Post's magazine-scoped {@link PostState}. */
|
|
83
|
+
export declare const patchPostState: (magazine: Magazine, postId: EntityId, state: Partial<PostState>) => void;
|
|
84
|
+
/** Sets the magazine-scoped rank for a Post. */
|
|
85
|
+
export declare const setRank: (magazine: Magazine, postId: EntityId, rank: number) => void;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=Magazine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Magazine.d.ts","sourceRoot":"","sources":["../../../../src/types/Magazine.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAC;AACpD,OAAO,EAAmB,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,SAAS,4BAA4B,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAahC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,SAAS;IACpB,6EAA6E;;IAE7E,qGAAqG;;IAErG,oEAAoE;;EAEpE,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;QAIrB,mGAAmG;;QAEnG,gFAAgF;;;EAIpF,CAAC;;;;;;;;;AAEH;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,aAsC7B;CAAG;AAEJ,8CAA8C;AAC9C,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,KAAK,IAAI,QAA2C,CAAC;AAEjG,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,WAAW,CAAC,GAAG;IAC/G,KAAK,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC;IAC7C,KAAK,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IACrC,+GAA+G;IAC/G,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,IAAI,WAAW,SAAS,KAAQ,QA8B5C,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,MAGpD,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,oBAAoB;;;;EAe/B,CAAC;AAMH,0EAA0E;AAC1E,eAAO,MAAM,OAAO,aAAc,QAAQ,GAAG,SAAS,UAAU,QAAQ,KAAG,MAAM,GAAG,SAGnF,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,YAAY,aAAc,QAAQ,GAAG,SAAS,UAAU,QAAQ,KAAG,OAAO,CAAC,SAAS,CAGhG,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,cAAc,aAAc,QAAQ,UAAU,QAAQ,SAAS,OAAO,CAAC,SAAS,CAAC,KAAG,IAKhG,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,OAAO,aAAc,QAAQ,UAAU,QAAQ,QAAQ,MAAM,KAAG,IACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Magazine.test.d.ts","sourceRoot":"","sources":["../../../../src/types/Magazine.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { type Space } from '@dxos/client/echo';
|
|
3
|
+
import { Database, Feed, Obj, Query, Type } from '@dxos/echo';
|
|
4
|
+
import { type EntityId } from '@dxos/keys';
|
|
5
|
+
import { StateMap, TagIndex } from '@dxos/schema';
|
|
6
|
+
/** Subscription protocol type. */
|
|
7
|
+
export declare const FeedType: Schema.Literal<["standard-site", "rss", "bluesky"]>;
|
|
8
|
+
export type FeedType = Schema.Schema.Type<typeof FeedType>;
|
|
9
|
+
/**
|
|
10
|
+
* System per-Post flags (starred/archived) modelled as space-wide {@link Tag} objects (resolved via
|
|
11
|
+
* `Tag.findOrCreate` on first use). Each entry is a single source of truth carrying its foreign
|
|
12
|
+
* `key` plus display `label`/`hue`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SYSTEM_TAGS: {
|
|
15
|
+
readonly starred: {
|
|
16
|
+
readonly key: {
|
|
17
|
+
readonly source: 'org.dxos.plugin.magazine';
|
|
18
|
+
readonly id: 'starred';
|
|
19
|
+
};
|
|
20
|
+
readonly label: 'Starred';
|
|
21
|
+
readonly hue: 'amber';
|
|
22
|
+
};
|
|
23
|
+
readonly archived: {
|
|
24
|
+
readonly key: {
|
|
25
|
+
readonly source: 'org.dxos.plugin.magazine';
|
|
26
|
+
readonly id: 'archived';
|
|
27
|
+
};
|
|
28
|
+
readonly label: 'Archived';
|
|
29
|
+
readonly hue: 'neutral';
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/** A system per-Post flag modelled as a tag. */
|
|
33
|
+
export type SystemTag = keyof typeof SYSTEM_TAGS;
|
|
34
|
+
/** Per-Post mutable state stored on the Subscription (shared across magazines), keyed by Post id. */
|
|
35
|
+
export declare const PostState: Schema.Struct<{
|
|
36
|
+
/** ISO 8601 timestamp when first opened. */
|
|
37
|
+
readAt: Schema.optional<typeof Schema.String>;
|
|
38
|
+
}>;
|
|
39
|
+
export type PostState = Schema.Schema.Type<typeof PostState>;
|
|
40
|
+
/**
|
|
41
|
+
* Default upper bound on the number of (non-starred) Posts retained when
|
|
42
|
+
* syncing a {@link Subscription} or curating a Magazine. Applied when the object
|
|
43
|
+
* has no explicit `keep` value.
|
|
44
|
+
*/
|
|
45
|
+
export declare const DEFAULT_KEEP = 10;
|
|
46
|
+
declare const Subscription_base: Type.ObjClass<Subscription, {
|
|
47
|
+
readonly name?: string | undefined;
|
|
48
|
+
readonly url?: string | undefined;
|
|
49
|
+
readonly type?: "bluesky" | "rss" | "standard-site" | undefined;
|
|
50
|
+
readonly description?: string | undefined;
|
|
51
|
+
readonly link?: string | undefined;
|
|
52
|
+
readonly iconUrl?: string | undefined;
|
|
53
|
+
readonly keep?: number | undefined;
|
|
54
|
+
readonly cursor?: string | undefined;
|
|
55
|
+
readonly feed: import("@dxos/echo/internal").Ref<Feed.Feed & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
56
|
+
readonly contentFeed?: import("@dxos/echo/internal").Ref<Feed.Feed & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
57
|
+
readonly postState: import("@dxos/echo/internal").Ref<StateMap.StateMap & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
58
|
+
readonly tags: import("@dxos/echo/internal").Ref<TagIndex.TagIndex & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
59
|
+
}, {}>;
|
|
60
|
+
/**
|
|
61
|
+
* Subscription feed schema: an RSS/Atom/AT Protocol subscription.
|
|
62
|
+
*/
|
|
63
|
+
export declare class Subscription extends Subscription_base {
|
|
64
|
+
}
|
|
65
|
+
/** Checks if a value is a Subscription.Subscription object. */
|
|
66
|
+
export declare const instanceOf: (value: unknown) => value is Subscription;
|
|
67
|
+
/** Creates a Subscription.Subscription with backing ECHO feeds for posts and fetched content. */
|
|
68
|
+
export declare const makeSubscription: (props?: Omit<Obj.MakeProps<typeof Subscription>, 'feed' | 'contentFeed' | 'postState' | 'tags'>) => Subscription;
|
|
69
|
+
declare const Post_base: Type.ObjClass<Post, {
|
|
70
|
+
readonly source?: import("@dxos/echo/internal").Ref<Subscription & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
71
|
+
readonly title?: string | undefined;
|
|
72
|
+
readonly link?: string | undefined;
|
|
73
|
+
readonly description?: string | undefined;
|
|
74
|
+
readonly content?: string | undefined;
|
|
75
|
+
readonly author?: string | undefined;
|
|
76
|
+
readonly published?: string | undefined;
|
|
77
|
+
readonly guid?: string | undefined;
|
|
78
|
+
}, {}>;
|
|
79
|
+
/**
|
|
80
|
+
* A single post/entry within a subscription feed.
|
|
81
|
+
*
|
|
82
|
+
* Immutable feed-entry: every field below is set at sync time by the protocol
|
|
83
|
+
* fetcher and never written to again. Mutable state (read, archived, starred,
|
|
84
|
+
* fetched content, hero image) lives on
|
|
85
|
+
* {@link Subscription.Subscription.postState} keyed by Post id; curation
|
|
86
|
+
* outputs (snippet, rank) live on `Magazine.postState`.
|
|
87
|
+
*/
|
|
88
|
+
export declare class Post extends Post_base {
|
|
89
|
+
}
|
|
90
|
+
/** Creates a Subscription.Post object. */
|
|
91
|
+
export declare const makePost: (props?: Obj.MakeProps<typeof Post>) => Post;
|
|
92
|
+
declare const PostContent_base: Type.ObjClass<PostContent, {
|
|
93
|
+
readonly post: import("@dxos/echo/internal").Ref<Post & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
|
|
94
|
+
readonly text: string;
|
|
95
|
+
readonly snippet?: string | undefined;
|
|
96
|
+
readonly imageUrl?: string | undefined;
|
|
97
|
+
readonly fetchedAt: string;
|
|
98
|
+
}, {}>;
|
|
99
|
+
/**
|
|
100
|
+
* An entry in a Subscription's {@link Subscription.contentFeed} queue: the
|
|
101
|
+
* fetched body of a Post, linked back to the queue Post in the parallel `feed`
|
|
102
|
+
* queue via {@link post}.
|
|
103
|
+
*
|
|
104
|
+
* Lives in a queue (not on `Subscription.postState`) because fetched bodies
|
|
105
|
+
* can be many KB; storing them inline would inflate the Subscription document
|
|
106
|
+
* unboundedly and force every reader to download every body. The queue is
|
|
107
|
+
* lazily replicated and append-only — a natural fit for immutable content.
|
|
108
|
+
*/
|
|
109
|
+
export declare class PostContent extends PostContent_base {
|
|
110
|
+
}
|
|
111
|
+
/** ISO timestamp the Post was first opened, or undefined. */
|
|
112
|
+
export declare const getReadAt: (subscription: Subscription | Obj.Snapshot<Subscription> | undefined, postId: EntityId) => string | undefined;
|
|
113
|
+
/** Sets/clears the Post's read marker. */
|
|
114
|
+
export declare const setReadAt: (subscription: Subscription, postId: EntityId, value: string | undefined) => void;
|
|
115
|
+
/** Resolves the uri of an existing system Tag without creating one; `undefined` when absent. Async. */
|
|
116
|
+
export declare const findSystemTagUri: (db: Pick<Database.Database, 'query'>, which: SystemTag) => Promise<string | undefined>;
|
|
117
|
+
/** Whether a Post carries the given (resolved) tag uri on its Subscription. Pure. */
|
|
118
|
+
export declare const hasTag: (subscription: Subscription | Obj.Snapshot<Subscription> | undefined, postId: EntityId, tagUri: string | undefined) => boolean;
|
|
119
|
+
/** Sets/clears a system tag (`starred`/`archived`) on a Post (find-or-creates the Tag object). Async. */
|
|
120
|
+
export declare const setTag: (subscription: Subscription, postId: EntityId, db: Pick<Database.Database, 'query' | 'add'>, which: SystemTag, value: boolean) => Promise<void>;
|
|
121
|
+
/** Resolves a Post's source Subscription synchronously if its `source` ref is loaded, else undefined. */
|
|
122
|
+
export declare const getPostSubscription: (post: Post) => Subscription | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Query for {@link PostContent} entries referencing a Post via the reverse-ref index.
|
|
125
|
+
* Scoped to the Subscription's post and content feeds.
|
|
126
|
+
*/
|
|
127
|
+
export declare const queryPostContentForPost: (subscription: Subscription | Obj.Snapshot<Subscription>, post: Post | Obj.Snapshot<Post>) => Query.Any | undefined;
|
|
128
|
+
/** Pick the newest PostContent when multiple entries reference the same Post. */
|
|
129
|
+
export declare const pickLatestPostContent: (entries: readonly PostContent[]) => PostContent | undefined;
|
|
130
|
+
/** Looks up PostContent for a Post (newest wins); undefined if absent. */
|
|
131
|
+
export declare const findPostContent: (subscription: Subscription | Obj.Snapshot<Subscription>, post: Post | Obj.Snapshot<Post>) => Promise<PostContent | undefined>;
|
|
132
|
+
/**
|
|
133
|
+
* Appends a {@link PostContent} entry (body + refined snippet/imageUrl) to a Subscription's
|
|
134
|
+
* `contentFeed`, lazily creating the feed on first use.
|
|
135
|
+
*/
|
|
136
|
+
export declare const appendPostContent: (space: Pick<Space, 'db'>, subscription: Subscription, entry: {
|
|
137
|
+
post: Post | Obj.Snapshot<Post>;
|
|
138
|
+
text: string;
|
|
139
|
+
snippet?: string;
|
|
140
|
+
imageUrl?: string;
|
|
141
|
+
fetchedAt?: string;
|
|
142
|
+
}) => Promise<void>;
|
|
143
|
+
export {};
|
|
144
|
+
//# sourceMappingURL=Subscription.d.ts.map
|