@dxos/plugin-youtube 0.8.3 → 0.8.4-main.bcb3aa67d6
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/lib/browser/blueprints/index.mjs +49 -8
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/{chunk-C26XKDK2.mjs → chunk-5N5SWF3I.mjs} +3 -3
- package/dist/lib/browser/chunk-GTIWG45H.mjs +157 -0
- package/dist/lib/browser/chunk-GTIWG45H.mjs.map +7 -0
- package/dist/lib/browser/{chunk-P67QEKBQ.mjs → chunk-SWWE4LUJ.mjs} +3 -5
- package/dist/lib/browser/{chunk-P67QEKBQ.mjs.map → chunk-SWWE4LUJ.mjs.map} +1 -1
- package/dist/lib/browser/{clear-synced-videos-EVMJIZPD.mjs → clear-synced-videos-PIKJZET3.mjs} +4 -5
- package/dist/lib/{node-esm/clear-synced-videos-5UCH6XHL.mjs.map → browser/clear-synced-videos-PIKJZET3.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +86 -81
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{sync-423Q4BDD.mjs → sync-II7O2LPG.mjs} +6 -7
- package/dist/lib/{node-esm/sync-CEF5DX2J.mjs.map → browser/sync-II7O2LPG.mjs.map} +1 -1
- package/dist/lib/browser/types/index.mjs +2 -4
- package/dist/lib/node-esm/blueprints/index.mjs +49 -8
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/{chunk-JM5SBBP5.mjs → chunk-BVKMXV2G.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-JSGRZMG3.mjs → chunk-RL46XZ2D.mjs} +3 -5
- package/dist/lib/node-esm/{chunk-JSGRZMG3.mjs.map → chunk-RL46XZ2D.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-YOE54ALJ.mjs +158 -0
- package/dist/lib/node-esm/chunk-YOE54ALJ.mjs.map +7 -0
- package/dist/lib/node-esm/{clear-synced-videos-5UCH6XHL.mjs → clear-synced-videos-Q3MZO2CD.mjs} +4 -5
- package/dist/lib/node-esm/index.mjs +86 -81
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{sync-CEF5DX2J.mjs → sync-BEXQNNSH.mjs} +6 -7
- package/dist/lib/node-esm/types/index.mjs +2 -4
- package/dist/types/src/YouTubePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts +2 -7
- package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts.map +1 -1
- package/dist/types/src/containers/VideoCard/VideoCard.d.ts +2 -2
- package/dist/types/src/containers/VideoCard/VideoCard.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +6 -2
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +38 -38
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +28 -3
- package/dist/types/src/types/Channel.d.ts.map +1 -1
- package/dist/types/src/types/Video.d.ts +22 -0
- package/dist/types/src/types/Video.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -40
- package/src/YouTubePlugin.tsx +11 -5
- package/src/blueprints/youtube.ts +1 -1
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +19 -22
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +1 -1
- package/src/capabilities/index.ts +7 -4
- package/src/capabilities/migrations.ts +35 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +4 -4
- package/src/containers/VideoArticle/VideoArticle.tsx +2 -7
- package/src/containers/VideoCard/VideoCard.tsx +2 -2
- package/src/translations.ts +38 -38
- package/src/types/Channel.ts +18 -1
- package/src/types/Video.ts +25 -1
- package/dist/lib/browser/ChannelArticle-CDQR4BBY.mjs +0 -90
- package/dist/lib/browser/ChannelArticle-CDQR4BBY.mjs.map +0 -7
- package/dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs +0 -28
- package/dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs.map +0 -7
- package/dist/lib/browser/VideoArticle-FC4A6E7B.mjs +0 -76
- package/dist/lib/browser/VideoArticle-FC4A6E7B.mjs.map +0 -7
- package/dist/lib/browser/VideoCard-CCPXDCB7.mjs +0 -64
- package/dist/lib/browser/VideoCard-CCPXDCB7.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-MJY6A6SN.mjs +0 -195
- package/dist/lib/browser/app-graph-builder-MJY6A6SN.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-FRYUYJ22.mjs +0 -22
- package/dist/lib/browser/blueprint-definition-FRYUYJ22.mjs.map +0 -7
- package/dist/lib/browser/chunk-DFRSBBSO.mjs +0 -21
- package/dist/lib/browser/chunk-DFRSBBSO.mjs.map +0 -7
- package/dist/lib/browser/chunk-GFRR4TTX.mjs +0 -72
- package/dist/lib/browser/chunk-GFRR4TTX.mjs.map +0 -7
- package/dist/lib/browser/chunk-MUE22YUM.mjs +0 -57
- package/dist/lib/browser/chunk-MUE22YUM.mjs.map +0 -7
- package/dist/lib/browser/chunk-YMDT37TA.mjs +0 -62
- package/dist/lib/browser/chunk-YMDT37TA.mjs.map +0 -7
- package/dist/lib/browser/chunk-Z3DGTMKC.mjs +0 -8
- package/dist/lib/browser/chunk-Z3DGTMKC.mjs.map +0 -7
- package/dist/lib/browser/react-surface-EDA5VYDC.mjs +0 -77
- package/dist/lib/browser/react-surface-EDA5VYDC.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelArticle-GQ64BO7V.mjs +0 -91
- package/dist/lib/node-esm/ChannelArticle-GQ64BO7V.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelSettings-DM2HWNKO.mjs +0 -29
- package/dist/lib/node-esm/ChannelSettings-DM2HWNKO.mjs.map +0 -7
- package/dist/lib/node-esm/VideoArticle-WLTWZO3K.mjs +0 -77
- package/dist/lib/node-esm/VideoArticle-WLTWZO3K.mjs.map +0 -7
- package/dist/lib/node-esm/VideoCard-FOWQZK75.mjs +0 -65
- package/dist/lib/node-esm/VideoCard-FOWQZK75.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-IU5TBAXN.mjs +0 -196
- package/dist/lib/node-esm/app-graph-builder-IU5TBAXN.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-W264MZ3D.mjs +0 -23
- package/dist/lib/node-esm/blueprint-definition-W264MZ3D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5KNC2JMP.mjs +0 -58
- package/dist/lib/node-esm/chunk-5KNC2JMP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6BUJ2DQX.mjs +0 -73
- package/dist/lib/node-esm/chunk-6BUJ2DQX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CX6MV3QM.mjs +0 -23
- package/dist/lib/node-esm/chunk-CX6MV3QM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CZSLL3XQ.mjs +0 -63
- package/dist/lib/node-esm/chunk-CZSLL3XQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-M4S6BE47.mjs +0 -10
- package/dist/lib/node-esm/chunk-M4S6BE47.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-5DJAQPHJ.mjs +0 -78
- package/dist/lib/node-esm/react-surface-5DJAQPHJ.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- /package/dist/lib/browser/{chunk-C26XKDK2.mjs.map → chunk-5N5SWF3I.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-JM5SBBP5.mjs.map → chunk-BVKMXV2G.mjs.map} +0 -0
- /package/dist/lib/{browser/clear-synced-videos-EVMJIZPD.mjs.map → node-esm/clear-synced-videos-Q3MZO2CD.mjs.map} +0 -0
- /package/dist/lib/{browser/sync-423Q4BDD.mjs.map → node-esm/sync-BEXQNNSH.mjs.map} +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{blueprint-definition/blueprint-definition.d.ts → blueprint-definition.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/VideoCard/VideoCard.tsx", "../../../src/containers/VideoCard/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Card, Icon } from '@dxos/react-ui';\n\nimport * as Video from '../../types/Video';\n\nexport type VideoCardProps = SurfaceComponentProps<Video.YouTubeVideo>;\n\n/**\n * YouTube video card with embedded player.\n */\nexport const VideoCard = ({ subject: video }: VideoCardProps) => {\n const [showPlayer, setShowPlayer] = useState(false);\n const publishedDate = new Date(video.publishedAt).toLocaleDateString();\n const hasTranscript = Boolean(video.transcript);\n\n const embedUrl = `https://www.youtube.com/embed/${video.videoId}?autoplay=1`;\n\n return (\n <Card.Content>\n {showPlayer ? (\n <div className='aspect-video w-full'>\n <iframe\n src={embedUrl}\n title={video.title}\n allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture'\n allowFullScreen\n className='h-full w-full rounded'\n />\n </div>\n ) : (\n <button\n type='button'\n onClick={() => setShowPlayer(true)}\n className='relative aspect-video w-full group cursor-pointer'\n >\n {video.thumbnailUrl ? (\n <img src={video.thumbnailUrl} alt={video.title} className='h-full w-full object-cover rounded' />\n ) : (\n <div className='h-full w-full bg-surface-hover rounded flex items-center justify-center'>\n <Icon icon='ph--play--fill' size={12} />\n </div>\n )}\n <div className='absolute inset-0 flex items-center justify-center bg-black/30 group-hover:bg-black/50 rounded transition-colors'>\n <div className='bg-red-600 text-white rounded-full p-3 group-hover:scale-110 transition-transform'>\n <Icon icon='ph--play--fill' size={6} />\n </div>\n </div>\n </button>\n )}\n <Card.Toolbar>\n <Card.IconBlock>\n <Icon icon='ph--youtube-logo--regular' size={5} />\n </Card.IconBlock>\n <div className='flex gap-3 items-center justify-between col-span-2'>\n <span className='grow truncate font-medium'>{video.title}</span>\n <span className='text-xs text-description text-right whitespace-nowrap pe-2'>{publishedDate}</span>\n </div>\n </Card.Toolbar>\n <Card.Row>\n <span className='text-xs text-description'>{video.channelTitle}</span>\n </Card.Row>\n {video.description && (\n <Card.Row>\n <Card.Text variant='description'>{video.description.slice(0, 150)}...</Card.Text>\n </Card.Row>\n )}\n <Card.Row>\n <div className='flex gap-2 items-center text-xs text-description'>\n {video.viewCount !== undefined && <span>{video.viewCount.toLocaleString()} views</span>}\n {hasTranscript && (\n <>\n <span>•</span>\n <span className='text-green-600'>Transcript available</span>\n </>\n )}\n </div>\n </Card.Row>\n </Card.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { VideoCard } from './VideoCard';\n\nexport default VideoCard;\n"],
|
|
5
|
-
"mappings": ";;;;AAIA,OAAOA,SAASC,gBAAgB;AAGhC,SAASC,MAAMC,YAAY;AASpB,IAAMC,YAAY,CAAC,EAAEC,SAASC,MAAK,MAAkB;AAC1D,QAAM,CAACC,YAAYC,aAAAA,IAAiBC,SAAS,KAAA;AAC7C,QAAMC,gBAAgB,IAAIC,KAAKL,MAAMM,WAAW,EAAEC,mBAAkB;AACpE,QAAMC,gBAAgBC,QAAQT,MAAMU,UAAU;AAE9C,QAAMC,WAAW,iCAAiCX,MAAMY,OAAO;AAE/D,SACE,sBAAA,cAACC,KAAKC,SAAO,MACVb,aACC,sBAAA,cAACc,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACC,UAAAA;IACCC,KAAKP;IACLQ,OAAOnB,MAAMmB;IACbC,OAAM;IACNC,iBAAAA;IACAL,WAAU;QAId,sBAAA,cAACM,UAAAA;IACCC,MAAK;IACLC,SAAS,MAAMtB,cAAc,IAAA;IAC7Bc,WAAU;KAEThB,MAAMyB,eACL,sBAAA,cAACC,OAAAA;IAAIR,KAAKlB,MAAMyB;IAAcE,KAAK3B,MAAMmB;IAAOH,WAAU;OAE1D,sBAAA,cAACD,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACY,MAAAA;IAAKC,MAAK;IAAiBC,MAAM;OAGtC,sBAAA,cAACf,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACD,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACY,MAAAA;IAAKC,MAAK;IAAiBC,MAAM;SAK1C,sBAAA,cAACjB,KAAKkB,SAAO,MACX,sBAAA,cAAClB,KAAKmB,WAAS,MACb,sBAAA,cAACJ,MAAAA;IAAKC,MAAK;IAA4BC,MAAM;OAE/C,sBAAA,cAACf,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACiB,QAAAA;IAAKjB,WAAU;KAA6BhB,MAAMmB,KAAK,GACxD,sBAAA,cAACc,QAAAA;IAAKjB,WAAU;KAA8DZ,aAAAA,CAAAA,CAAAA,GAGlF,sBAAA,cAACS,KAAKqB,KAAG,MACP,sBAAA,cAACD,QAAAA;IAAKjB,WAAU;KAA4BhB,MAAMmC,YAAY,CAAA,GAE/DnC,MAAMoC,eACL,sBAAA,cAACvB,KAAKqB,KAAG,MACP,sBAAA,cAACrB,KAAKwB,MAAI;IAACC,SAAQ;KAAetC,MAAMoC,YAAYG,MAAM,GAAG,GAAA,GAAK,KAAA,CAAA,GAGtE,sBAAA,cAAC1B,KAAKqB,KAAG,MACP,sBAAA,cAACnB,OAAAA;IAAIC,WAAU;KACZhB,MAAMwC,cAAcC,UAAa,sBAAA,cAACR,QAAAA,MAAMjC,MAAMwC,UAAUE,eAAc,GAAG,QAAA,GACzElC,iBACC,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAACyB,QAAAA,MAAK,QAAA,GACN,sBAAA,cAACA,QAAAA;IAAKjB,WAAU;KAAiB,sBAAA,CAAA,CAAA,CAAA,CAAA;AAO/C;;;AC/EA,IAAA,oBAAe2B;",
|
|
6
|
-
"names": ["React", "useState", "Card", "Icon", "VideoCard", "subject", "video", "showPlayer", "setShowPlayer", "useState", "publishedDate", "Date", "publishedAt", "toLocaleDateString", "hasTranscript", "Boolean", "transcript", "embedUrl", "videoId", "Card", "Content", "div", "className", "iframe", "src", "title", "allow", "allowFullScreen", "button", "type", "onClick", "thumbnailUrl", "img", "alt", "Icon", "icon", "size", "Toolbar", "IconBlock", "span", "Row", "channelTitle", "description", "Text", "variant", "slice", "viewCount", "undefined", "toLocaleString", "VideoCard"]
|
|
7
|
-
}
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-CX6MV3QM.mjs";
|
|
5
|
-
import "./chunk-M4S6BE47.mjs";
|
|
6
|
-
import "./chunk-JM5SBBP5.mjs";
|
|
7
|
-
import {
|
|
8
|
-
ClearSyncedVideos,
|
|
9
|
-
Sync
|
|
10
|
-
} from "./chunk-JSGRZMG3.mjs";
|
|
11
|
-
import {
|
|
12
|
-
Channel_exports
|
|
13
|
-
} from "./chunk-6BUJ2DQX.mjs";
|
|
14
|
-
import "./chunk-CZSLL3XQ.mjs";
|
|
15
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
16
|
-
|
|
17
|
-
// src/capabilities/app-graph-builder/app-graph-builder.ts
|
|
18
|
-
import { Atom } from "@effect-atom/atom-react";
|
|
19
|
-
import * as Effect from "effect/Effect";
|
|
20
|
-
import * as Option from "effect/Option";
|
|
21
|
-
import { Capability } from "@dxos/app-framework";
|
|
22
|
-
import { AppCapabilities, companionSegment, LayoutOperation } from "@dxos/app-toolkit";
|
|
23
|
-
import { Filter, Obj, Query, Ref } from "@dxos/echo";
|
|
24
|
-
import { AtomQuery, AtomRef } from "@dxos/echo-atom";
|
|
25
|
-
import { invariant } from "@dxos/invariant";
|
|
26
|
-
import { log } from "@dxos/log";
|
|
27
|
-
import { Operation } from "@dxos/operation";
|
|
28
|
-
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
29
|
-
import { AutomationCapabilities, invokeFunctionWithTracing } from "@dxos/plugin-automation";
|
|
30
|
-
import { PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
|
|
31
|
-
import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
|
|
32
|
-
var __dxlog_file = "/Users/mykola/dev/dxos/packages/plugins/plugin-youtube/src/capabilities/app-graph-builder/app-graph-builder.ts";
|
|
33
|
-
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
34
|
-
const selectionManager = yield* Capability.get(AttentionCapabilities.Selection);
|
|
35
|
-
const selectedId = Atom.family((nodeId) => Atom.make((get) => {
|
|
36
|
-
const state = get(selectionManager.state);
|
|
37
|
-
const selection = state.selections[nodeId];
|
|
38
|
-
return selection?.mode === "single" ? selection.id : void 0;
|
|
39
|
-
}));
|
|
40
|
-
const whenYouTubeChannel = NodeMatcher.whenEchoType(Channel_exports.YouTubeChannel);
|
|
41
|
-
const extensions = yield* Effect.all([
|
|
42
|
-
GraphBuilder.createExtension({
|
|
43
|
-
id: `${meta.id}.channel-video`,
|
|
44
|
-
match: (node) => Channel_exports.instanceOf(node.data) ? Option.some({
|
|
45
|
-
channel: node.data,
|
|
46
|
-
nodeId: node.id
|
|
47
|
-
}) : Option.none(),
|
|
48
|
-
connector: (matched, get) => {
|
|
49
|
-
const channel = matched.channel;
|
|
50
|
-
const db = Obj.getDatabase(channel);
|
|
51
|
-
const feed = channel.feed ? get(AtomRef.make(channel.feed)) : void 0;
|
|
52
|
-
if (!db || !feed) {
|
|
53
|
-
return Effect.succeed([]);
|
|
54
|
-
}
|
|
55
|
-
const videoId = get(selectedId(matched.nodeId));
|
|
56
|
-
const video = get(AtomQuery.make(db, Query.select(videoId ? Filter.id(videoId) : Filter.nothing()).from(feed)))[0];
|
|
57
|
-
return Effect.succeed([
|
|
58
|
-
{
|
|
59
|
-
id: companionSegment("video"),
|
|
60
|
-
type: PLANK_COMPANION_TYPE,
|
|
61
|
-
data: video ?? "video",
|
|
62
|
-
properties: {
|
|
63
|
-
label: [
|
|
64
|
-
"video label",
|
|
65
|
-
{
|
|
66
|
-
ns: meta.id
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
icon: "ph--play--regular",
|
|
70
|
-
disposition: "hidden"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
]);
|
|
74
|
-
}
|
|
75
|
-
}),
|
|
76
|
-
GraphBuilder.createExtension({
|
|
77
|
-
id: `${meta.id}.sync-channel`,
|
|
78
|
-
match: whenYouTubeChannel,
|
|
79
|
-
actions: (channel) => Effect.succeed([
|
|
80
|
-
{
|
|
81
|
-
id: "sync",
|
|
82
|
-
data: Effect.fnUntraced(function* () {
|
|
83
|
-
const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
84
|
-
const db = Obj.getDatabase(channel);
|
|
85
|
-
invariant(db, void 0, {
|
|
86
|
-
F: __dxlog_file,
|
|
87
|
-
L: 83,
|
|
88
|
-
S: this,
|
|
89
|
-
A: [
|
|
90
|
-
"db",
|
|
91
|
-
""
|
|
92
|
-
]
|
|
93
|
-
});
|
|
94
|
-
const runtime = computeRuntime.getRuntime(db.spaceId);
|
|
95
|
-
yield* Effect.tryPromise(() => runtime.runPromise(invokeFunctionWithTracing(Sync, {
|
|
96
|
-
channel: Ref.make(channel)
|
|
97
|
-
}))).pipe(Effect.catchAll((error) => {
|
|
98
|
-
log.catch(error, void 0, {
|
|
99
|
-
F: __dxlog_file,
|
|
100
|
-
L: 93,
|
|
101
|
-
S: this,
|
|
102
|
-
C: (f, a) => f(...a)
|
|
103
|
-
});
|
|
104
|
-
return Operation.invoke(LayoutOperation.AddToast, {
|
|
105
|
-
id: `${meta.id}.sync-channel-error`,
|
|
106
|
-
icon: "ph--warning--regular",
|
|
107
|
-
duration: 5e3,
|
|
108
|
-
title: [
|
|
109
|
-
"sync channel error title",
|
|
110
|
-
{
|
|
111
|
-
ns: meta.id
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
closeLabel: [
|
|
115
|
-
"close label",
|
|
116
|
-
{
|
|
117
|
-
ns: meta.id
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
});
|
|
121
|
-
}));
|
|
122
|
-
}),
|
|
123
|
-
properties: {
|
|
124
|
-
label: [
|
|
125
|
-
"sync channel label",
|
|
126
|
-
{
|
|
127
|
-
ns: meta.id
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
icon: "ph--arrows-clockwise--regular",
|
|
131
|
-
disposition: "list-item"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: "clear-synced-videos",
|
|
136
|
-
data: Effect.fnUntraced(function* () {
|
|
137
|
-
const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
|
|
138
|
-
const db = Obj.getDatabase(channel);
|
|
139
|
-
invariant(db, void 0, {
|
|
140
|
-
F: __dxlog_file,
|
|
141
|
-
L: 115,
|
|
142
|
-
S: this,
|
|
143
|
-
A: [
|
|
144
|
-
"db",
|
|
145
|
-
""
|
|
146
|
-
]
|
|
147
|
-
});
|
|
148
|
-
const runtime = computeRuntime.getRuntime(db.spaceId);
|
|
149
|
-
yield* Effect.tryPromise(() => runtime.runPromise(invokeFunctionWithTracing(ClearSyncedVideos, {
|
|
150
|
-
channel: Ref.make(channel)
|
|
151
|
-
}))).pipe(Effect.catchAll((error) => {
|
|
152
|
-
log.catch(error, void 0, {
|
|
153
|
-
F: __dxlog_file,
|
|
154
|
-
L: 125,
|
|
155
|
-
S: this,
|
|
156
|
-
C: (f, a) => f(...a)
|
|
157
|
-
});
|
|
158
|
-
return Operation.invoke(LayoutOperation.AddToast, {
|
|
159
|
-
id: `${meta.id}.clear-synced-videos-error`,
|
|
160
|
-
icon: "ph--warning--regular",
|
|
161
|
-
duration: 5e3,
|
|
162
|
-
title: [
|
|
163
|
-
"clear synced videos error title",
|
|
164
|
-
{
|
|
165
|
-
ns: meta.id
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
closeLabel: [
|
|
169
|
-
"close label",
|
|
170
|
-
{
|
|
171
|
-
ns: meta.id
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
});
|
|
175
|
-
}));
|
|
176
|
-
}),
|
|
177
|
-
properties: {
|
|
178
|
-
label: [
|
|
179
|
-
"clear synced videos label",
|
|
180
|
-
{
|
|
181
|
-
ns: meta.id
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
icon: "ph--trash--regular",
|
|
185
|
-
disposition: "list-item"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
])
|
|
189
|
-
})
|
|
190
|
-
]);
|
|
191
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
192
|
-
}));
|
|
193
|
-
export {
|
|
194
|
-
app_graph_builder_default as default
|
|
195
|
-
};
|
|
196
|
-
//# sourceMappingURL=app-graph-builder-IU5TBAXN.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, companionSegment, LayoutOperation } from '@dxos/app-toolkit';\nimport { type Feed, Filter, Obj, Query, Ref } from '@dxos/echo';\nimport { AtomQuery, AtomRef } from '@dxos/echo-atom';\nimport { invariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\nimport { Operation } from '@dxos/operation';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { AutomationCapabilities, invokeFunctionWithTracing } from '@dxos/plugin-automation';\nimport { PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\n\nimport { ClearSyncedVideos, Sync } from '../../operations';\nimport { meta } from '../../meta';\nimport { Channel, Video } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const selectionManager = yield* Capability.get(AttentionCapabilities.Selection);\n const selectedId = Atom.family((nodeId: string) =>\n Atom.make((get) => {\n const state = get(selectionManager.state);\n const selection = state.selections[nodeId];\n return selection?.mode === 'single' ? selection.id : undefined;\n }),\n );\n\n const whenYouTubeChannel = NodeMatcher.whenEchoType(Channel.YouTubeChannel);\n\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: `${meta.id}.channel-video`,\n match: (node) =>\n Channel.instanceOf(node.data) ? Option.some({ channel: node.data, nodeId: node.id }) : Option.none(),\n connector: (matched, get) => {\n const channel = matched.channel;\n const db = Obj.getDatabase(channel);\n const feed = channel.feed ? (get(AtomRef.make(channel.feed)) as Feed.Feed | undefined) : undefined;\n if (!db || !feed) {\n return Effect.succeed([]);\n }\n\n const videoId = get(selectedId(matched.nodeId));\n const video = get(\n AtomQuery.make<Video.YouTubeVideo>(\n db,\n Query.select(videoId ? Filter.id(videoId) : Filter.nothing()).from(feed),\n ),\n )[0];\n return Effect.succeed([\n {\n id: companionSegment('video'),\n type: PLANK_COMPANION_TYPE,\n data: video ?? 'video',\n properties: {\n label: ['video label', { ns: meta.id }],\n icon: 'ph--play--regular',\n disposition: 'hidden',\n },\n },\n ]);\n },\n }),\n\n GraphBuilder.createExtension({\n id: `${meta.id}.sync-channel`,\n match: whenYouTubeChannel,\n actions: (channel) =>\n Effect.succeed([\n {\n id: 'sync',\n data: Effect.fnUntraced(function* () {\n const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);\n const db = Obj.getDatabase(channel);\n invariant(db);\n const runtime = computeRuntime.getRuntime(db.spaceId);\n yield* Effect.tryPromise(() =>\n runtime.runPromise(\n invokeFunctionWithTracing(Sync, {\n channel: Ref.make(channel),\n }),\n ),\n ).pipe(\n Effect.catchAll((error) => {\n log.catch(error);\n return Operation.invoke(LayoutOperation.AddToast, {\n id: `${meta.id}.sync-channel-error`,\n icon: 'ph--warning--regular',\n duration: 5_000,\n title: ['sync channel error title', { ns: meta.id }],\n closeLabel: ['close label', { ns: meta.id }],\n });\n }),\n );\n }),\n properties: {\n label: ['sync channel label', { ns: meta.id }],\n icon: 'ph--arrows-clockwise--regular',\n disposition: 'list-item',\n },\n },\n {\n id: 'clear-synced-videos',\n data: Effect.fnUntraced(function* () {\n const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);\n const db = Obj.getDatabase(channel);\n invariant(db);\n const runtime = computeRuntime.getRuntime(db.spaceId);\n yield* Effect.tryPromise(() =>\n runtime.runPromise(\n invokeFunctionWithTracing(ClearSyncedVideos, {\n channel: Ref.make(channel),\n }),\n ),\n ).pipe(\n Effect.catchAll((error) => {\n log.catch(error);\n return Operation.invoke(LayoutOperation.AddToast, {\n id: `${meta.id}.clear-synced-videos-error`,\n icon: 'ph--warning--regular',\n duration: 5_000,\n title: ['clear synced videos error title', { ns: meta.id }],\n closeLabel: ['close label', { ns: meta.id }],\n });\n }),\n );\n }),\n properties: {\n label: ['clear synced videos label', { ns: meta.id }],\n icon: 'ph--trash--regular',\n disposition: 'list-item',\n },\n },\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["Atom", "Effect", "Option", "Capability", "AppCapabilities", "companionSegment", "LayoutOperation", "Filter", "Obj", "Query", "Ref", "AtomQuery", "AtomRef", "invariant", "log", "Operation", "AttentionCapabilities", "AutomationCapabilities", "invokeFunctionWithTracing", "PLANK_COMPANION_TYPE", "GraphBuilder", "NodeMatcher", "Capability", "makeModule", "fnUntraced", "selectionManager", "get", "AttentionCapabilities", "Selection", "selectedId", "Atom", "family", "nodeId", "make", "state", "selection", "selections", "mode", "id", "undefined", "whenYouTubeChannel", "NodeMatcher", "whenEchoType", "Channel", "YouTubeChannel", "extensions", "all", "GraphBuilder", "createExtension", "meta", "match", "node", "instanceOf", "data", "some", "channel", "none", "connector", "matched", "db", "Obj", "getDatabase", "feed", "AtomRef", "succeed", "videoId", "video", "AtomQuery", "Query", "select", "Filter", "nothing", "from", "companionSegment", "type", "PLANK_COMPANION_TYPE", "properties", "label", "ns", "icon", "disposition", "actions", "computeRuntime", "AutomationCapabilities", "ComputeRuntime", "invariant", "runtime", "getRuntime", "spaceId", "tryPromise", "runPromise", "invokeFunctionWithTracing", "Sync", "Ref", "pipe", "catchAll", "error", "log", "catch", "Operation", "invoke", "LayoutOperation", "AddToast", "duration", "title", "closeLabel", "ClearSyncedVideos", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
youtube_default
|
|
4
|
-
} from "./chunk-5KNC2JMP.mjs";
|
|
5
|
-
import "./chunk-M4S6BE47.mjs";
|
|
6
|
-
import "./chunk-JM5SBBP5.mjs";
|
|
7
|
-
import "./chunk-JSGRZMG3.mjs";
|
|
8
|
-
import "./chunk-6BUJ2DQX.mjs";
|
|
9
|
-
import "./chunk-CZSLL3XQ.mjs";
|
|
10
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
11
|
-
|
|
12
|
-
// src/capabilities/blueprint-definition/blueprint-definition.ts
|
|
13
|
-
import * as Effect from "effect/Effect";
|
|
14
|
-
import { Capability } from "@dxos/app-framework";
|
|
15
|
-
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
16
|
-
var blueprintDefinition = Capability.makeModule(() => Effect.succeed([
|
|
17
|
-
Capability.contributes(AppCapabilities.BlueprintDefinition, youtube_default)
|
|
18
|
-
]));
|
|
19
|
-
var blueprint_definition_default = blueprintDefinition;
|
|
20
|
-
export {
|
|
21
|
-
blueprint_definition_default as default
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=blueprint-definition-W264MZ3D.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/blueprint-definition/blueprint-definition.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\nimport { YouTubeBlueprint } from '../../blueprints';\n\nconst blueprintDefinition = Capability.makeModule<\n [],\n Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]\n>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, YouTubeBlueprint)]));\n\nexport default blueprintDefinition;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAIhC,IAAMC,sBAAsBC,WAAWC,WAGrC,MAAaC,eAAQ;EAACF,WAAWG,YAAYC,gBAAgBC,qBAAqBC,eAAAA;CAAkB,CAAA;AAEtG,IAAA,+BAAeP;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "blueprintDefinition", "Capability", "makeModule", "succeed", "contributes", "AppCapabilities", "BlueprintDefinition", "YouTubeBlueprint"]
|
|
7
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ClearSyncedVideos,
|
|
4
|
-
Sync
|
|
5
|
-
} from "./chunk-JSGRZMG3.mjs";
|
|
6
|
-
|
|
7
|
-
// src/blueprints/youtube.ts
|
|
8
|
-
import { Blueprint, Template } from "@dxos/blueprints";
|
|
9
|
-
import { trim } from "@dxos/util";
|
|
10
|
-
var BLUEPRINT_KEY = "dxos.org/blueprint/youtube";
|
|
11
|
-
var make = () => Blueprint.make({
|
|
12
|
-
key: BLUEPRINT_KEY,
|
|
13
|
-
name: "YouTube",
|
|
14
|
-
tools: Blueprint.toolDefinitions({
|
|
15
|
-
operations: [
|
|
16
|
-
Sync,
|
|
17
|
-
ClearSyncedVideos
|
|
18
|
-
],
|
|
19
|
-
tools: []
|
|
20
|
-
}),
|
|
21
|
-
instructions: Template.make({
|
|
22
|
-
source: trim`
|
|
23
|
-
You manage YouTube channel subscriptions and video content.
|
|
24
|
-
|
|
25
|
-
# Summary formatting:
|
|
26
|
-
- Format summaries as markdown documents without extra comments.
|
|
27
|
-
- Use markdown formatting for headings and bullet points.
|
|
28
|
-
- Format video summaries as lists with key points.
|
|
29
|
-
|
|
30
|
-
# References
|
|
31
|
-
- Use references to objects in the form of:
|
|
32
|
-
@dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M
|
|
33
|
-
- References are rendered as rich content in the response to the user.
|
|
34
|
-
|
|
35
|
-
# Video Analysis
|
|
36
|
-
When analyzing videos:
|
|
37
|
-
- Summarize the key topics and themes.
|
|
38
|
-
- Extract important quotes or statements.
|
|
39
|
-
- Identify action items or recommendations.
|
|
40
|
-
- Note any timestamps for important sections.
|
|
41
|
-
|
|
42
|
-
# Transcript Usage
|
|
43
|
-
- Videos may include transcripts that can be used for deeper analysis.
|
|
44
|
-
- When summarizing content, reference the transcript for accuracy.
|
|
45
|
-
- Transcripts include timestamps that can help locate specific content.
|
|
46
|
-
`
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
var blueprint = {
|
|
50
|
-
key: BLUEPRINT_KEY,
|
|
51
|
-
make
|
|
52
|
-
};
|
|
53
|
-
var youtube_default = blueprint;
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
youtube_default
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=chunk-5KNC2JMP.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/blueprints/youtube.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { trim } from '@dxos/util';\n\nimport { ClearSyncedVideos, Sync } from '../operations';\n\nconst BLUEPRINT_KEY = 'dxos.org/blueprint/youtube';\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'YouTube',\n tools: Blueprint.toolDefinitions({ operations: [Sync, ClearSyncedVideos], tools: [] }),\n instructions: Template.make({\n source: trim`\n You manage YouTube channel subscriptions and video content.\n\n # Summary formatting:\n - Format summaries as markdown documents without extra comments.\n - Use markdown formatting for headings and bullet points.\n - Format video summaries as lists with key points.\n\n # References\n - Use references to objects in the form of:\n @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M\n - References are rendered as rich content in the response to the user.\n\n # Video Analysis\n When analyzing videos:\n - Summarize the key topics and themes.\n - Extract important quotes or statements.\n - Identify action items or recommendations.\n - Note any timestamps for important sections.\n\n # Transcript Usage\n - Videos may include transcripts that can be used for deeper analysis.\n - When summarizing content, reference the transcript for accuracy.\n - Transcripts include timestamps that can help locate specific content.\n `,\n }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAKA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;AAIrB,IAAMC,gBAAgB;AAEtB,IAAMC,OAAO,MACXC,UAAUD,KAAK;EACbE,KAAKH;EACLI,MAAM;EACNC,OAAOH,UAAUI,gBAAgB;IAAEC,YAAY;MAACC;MAAMC;;IAAoBJ,OAAO,CAAA;EAAG,CAAA;EACpFK,cAAcC,SAASV,KAAK;IAC1BW,QAAQC;;;;;;;;;;;;;;;;;;;;;;;;;EAyBV,CAAA;AACF,CAAA;AAEF,IAAMC,YAAiD;EACrDX,KAAKH;EACLC;AACF;AAEA,IAAA,kBAAea;",
|
|
6
|
-
"names": ["Blueprint", "Template", "trim", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "tools", "toolDefinitions", "operations", "Sync", "ClearSyncedVideos", "instructions", "Template", "source", "trim", "blueprint"]
|
|
7
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
__export
|
|
4
|
-
} from "./chunk-HSLMI22Q.mjs";
|
|
5
|
-
|
|
6
|
-
// src/types/types.ts
|
|
7
|
-
var YouTubeOperation = {};
|
|
8
|
-
|
|
9
|
-
// src/types/Channel.ts
|
|
10
|
-
var Channel_exports = {};
|
|
11
|
-
__export(Channel_exports, {
|
|
12
|
-
CreateYouTubeChannelSchema: () => CreateYouTubeChannelSchema,
|
|
13
|
-
YouTubeChannel: () => YouTubeChannel,
|
|
14
|
-
instanceOf: () => instanceOf,
|
|
15
|
-
make: () => make
|
|
16
|
-
});
|
|
17
|
-
import * as Schema from "effect/Schema";
|
|
18
|
-
import { Annotation, Feed, Obj, Ref, Type } from "@dxos/echo";
|
|
19
|
-
import { FormInputAnnotation } from "@dxos/echo/internal";
|
|
20
|
-
import { FeedAnnotation } from "@dxos/schema";
|
|
21
|
-
import { AccessToken } from "@dxos/types";
|
|
22
|
-
var YouTubeChannel = Schema.Struct({
|
|
23
|
-
/** Display name for the channel. */
|
|
24
|
-
name: Schema.String.pipe(Schema.optional),
|
|
25
|
-
/** YouTube channel ID (e.g., UC...). */
|
|
26
|
-
channelId: Schema.String.pipe(Schema.optional),
|
|
27
|
-
/** YouTube channel URL or handle. */
|
|
28
|
-
channelUrl: Schema.String.pipe(Schema.optional),
|
|
29
|
-
/** Feed containing YouTubeVideo objects. */
|
|
30
|
-
feed: Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)),
|
|
31
|
-
/** Last sync timestamp. */
|
|
32
|
-
lastSyncedAt: Schema.String.pipe(FormInputAnnotation.set(false), Schema.optional),
|
|
33
|
-
/** Google API credentials for fetching channel data. */
|
|
34
|
-
accessToken: Schema.optional(Ref.Ref(AccessToken.AccessToken).annotations({
|
|
35
|
-
title: "Account",
|
|
36
|
-
description: "Google account credentials for syncing this YouTube channel."
|
|
37
|
-
}))
|
|
38
|
-
}).pipe(Type.object({
|
|
39
|
-
typename: "org.dxos.type.youtube-channel",
|
|
40
|
-
version: "0.1.0"
|
|
41
|
-
}), Annotation.IconAnnotation.set({
|
|
42
|
-
icon: "ph--youtube-logo--regular",
|
|
43
|
-
hue: "red"
|
|
44
|
-
}), FeedAnnotation.set(true));
|
|
45
|
-
var instanceOf = (value) => Obj.instanceOf(YouTubeChannel, value);
|
|
46
|
-
var CreateYouTubeChannelSchema = Schema.Struct({
|
|
47
|
-
name: Schema.optional(Schema.String.annotations({
|
|
48
|
-
title: "Name"
|
|
49
|
-
})),
|
|
50
|
-
channelUrl: Schema.optional(Schema.String.annotations({
|
|
51
|
-
title: "Channel URL",
|
|
52
|
-
description: "YouTube channel URL, handle (e.g., @channelname), or channel ID."
|
|
53
|
-
})),
|
|
54
|
-
accessToken: Schema.optional(Ref.Ref(AccessToken.AccessToken).annotations({
|
|
55
|
-
title: "Account",
|
|
56
|
-
description: "Google account credentials for syncing this YouTube channel."
|
|
57
|
-
}))
|
|
58
|
-
});
|
|
59
|
-
var make = (props = {}) => {
|
|
60
|
-
const feed = Feed.make();
|
|
61
|
-
const channel = Obj.make(YouTubeChannel, {
|
|
62
|
-
feed: Ref.make(feed),
|
|
63
|
-
...props
|
|
64
|
-
});
|
|
65
|
-
Obj.setParent(feed, channel);
|
|
66
|
-
return channel;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export {
|
|
70
|
-
YouTubeOperation,
|
|
71
|
-
Channel_exports
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=chunk-6BUJ2DQX.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/types.ts", "../../../src/types/Channel.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\n/**\n * YouTube plugin operations (placeholder for future expansion).\n */\nexport const YouTubeOperation = {\n // Operations will be defined here when needed.\n} as const;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Feed, Obj, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation } from '@dxos/echo/internal';\nimport { FeedAnnotation } from '@dxos/schema';\nimport { AccessToken } from '@dxos/types';\n\n// @import-as-namespace\n\n/**\n * YouTubeChannel schema representing a YouTube channel to sync videos from.\n */\nexport const YouTubeChannel = Schema.Struct({\n /** Display name for the channel. */\n name: Schema.String.pipe(Schema.optional),\n /** YouTube channel ID (e.g., UC...). */\n channelId: Schema.String.pipe(Schema.optional),\n /** YouTube channel URL or handle. */\n channelUrl: Schema.String.pipe(Schema.optional),\n /** Feed containing YouTubeVideo objects. */\n feed: Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)),\n /** Last sync timestamp. */\n lastSyncedAt: Schema.String.pipe(FormInputAnnotation.set(false), Schema.optional),\n /** Google API credentials for fetching channel data. */\n accessToken: Schema.optional(\n Ref.Ref(AccessToken.AccessToken).annotations({\n title: 'Account',\n description: 'Google account credentials for syncing this YouTube channel.',\n }),\n ),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.youtube-channel',\n version: '0.1.0',\n }),\n Annotation.IconAnnotation.set({\n icon: 'ph--youtube-logo--regular',\n hue: 'red',\n }),\n FeedAnnotation.set(true),\n);\n\nexport interface YouTubeChannel extends Schema.Schema.Type<typeof YouTubeChannel> {}\n\n/** Checks if a value is a YouTubeChannel object. */\nexport const instanceOf = (value: unknown): value is YouTubeChannel => Obj.instanceOf(YouTubeChannel, value);\n\nexport const CreateYouTubeChannelSchema = Schema.Struct({\n name: Schema.optional(Schema.String.annotations({ title: 'Name' })),\n channelUrl: Schema.optional(\n Schema.String.annotations({\n title: 'Channel URL',\n description: 'YouTube channel URL, handle (e.g., @channelname), or channel ID.',\n }),\n ),\n accessToken: Schema.optional(\n Ref.Ref(AccessToken.AccessToken).annotations({\n title: 'Account',\n description: 'Google account credentials for syncing this YouTube channel.',\n }),\n ),\n});\nexport interface CreateYouTubeChannelSchema extends Schema.Schema.Type<typeof CreateYouTubeChannelSchema> {}\n\ntype YouTubeChannelProps = Omit<Obj.MakeProps<typeof YouTubeChannel>, 'feed' | 'lastSyncedAt'>;\n\n/** Creates a YouTubeChannel object with a backing feed. */\nexport const make = (props: YouTubeChannelProps = {}) => {\n const feed = Feed.make();\n const channel = Obj.make(YouTubeChannel, {\n feed: Ref.make(feed),\n ...props,\n });\n Obj.setParent(feed, channel);\n return channel;\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAOO,IAAMA,mBAAmB,CAEhC;;;ACTA;;;;;;;AAIA,YAAYC,YAAY;AAExB,SAASC,YAAYC,MAAMC,KAAKC,KAAKC,YAAY;AACjD,SAASC,2BAA2B;AACpC,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAOrB,IAAMC,iBAAwBC,cAAO;;EAE1CC,MAAaC,cAAOC,KAAYC,eAAQ;;EAExCC,WAAkBH,cAAOC,KAAYC,eAAQ;;EAE7CE,YAAmBJ,cAAOC,KAAYC,eAAQ;;EAE9CG,MAAMC,IAAIA,IAAIC,KAAKA,IAAI,EAAEN,KAAKO,oBAAoBC,IAAI,KAAA,CAAA;;EAEtDC,cAAqBV,cAAOC,KAAKO,oBAAoBC,IAAI,KAAA,GAAeP,eAAQ;;EAEhFS,aAAoBT,gBAClBI,IAAIA,IAAIM,YAAYA,WAAW,EAAEC,YAAY;IAC3CC,OAAO;IACPC,aAAa;EACf,CAAA,CAAA;AAEJ,CAAA,EAAGd,KACDe,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,eAAeZ,IAAI;EAC5Ba,MAAM;EACNC,KAAK;AACP,CAAA,GACAC,eAAef,IAAI,IAAA,CAAA;AAMd,IAAMgB,aAAa,CAACC,UAA4CC,IAAIF,WAAW5B,gBAAgB6B,KAAAA;AAE/F,IAAME,6BAAoC9B,cAAO;EACtDC,MAAaG,gBAAgBF,cAAOa,YAAY;IAAEC,OAAO;EAAO,CAAA,CAAA;EAChEV,YAAmBF,gBACVF,cAAOa,YAAY;IACxBC,OAAO;IACPC,aAAa;EACf,CAAA,CAAA;EAEFJ,aAAoBT,gBAClBI,IAAIA,IAAIM,YAAYA,WAAW,EAAEC,YAAY;IAC3CC,OAAO;IACPC,aAAa;EACf,CAAA,CAAA;AAEJ,CAAA;AAMO,IAAMc,OAAO,CAACC,QAA6B,CAAC,MAAC;AAClD,QAAMzB,OAAOE,KAAKsB,KAAI;AACtB,QAAME,UAAUJ,IAAIE,KAAKhC,gBAAgB;IACvCQ,MAAMC,IAAIuB,KAAKxB,IAAAA;IACf,GAAGyB;EACL,CAAA;AACAH,MAAIK,UAAU3B,MAAM0B,OAAAA;AACpB,SAAOA;AACT;",
|
|
6
|
-
"names": ["YouTubeOperation", "Schema", "Annotation", "Feed", "Obj", "Ref", "Type", "FormInputAnnotation", "FeedAnnotation", "AccessToken", "YouTubeChannel", "Struct", "name", "String", "pipe", "optional", "channelId", "channelUrl", "feed", "Ref", "Feed", "FormInputAnnotation", "set", "lastSyncedAt", "accessToken", "AccessToken", "annotations", "title", "description", "Type", "object", "typename", "version", "Annotation", "IconAnnotation", "icon", "hue", "FeedAnnotation", "instanceOf", "value", "Obj", "CreateYouTubeChannelSchema", "make", "props", "channel", "setParent"]
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/meta.ts
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = {
|
|
6
|
-
id: "org.dxos.plugin.youtube",
|
|
7
|
-
name: "YouTube",
|
|
8
|
-
description: trim`
|
|
9
|
-
YouTube channel subscription and video feed management.
|
|
10
|
-
Sync videos from channels and access transcripts for analysis.
|
|
11
|
-
`,
|
|
12
|
-
icon: "ph--youtube-logo--regular",
|
|
13
|
-
iconHue: "red",
|
|
14
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-youtube",
|
|
15
|
-
tags: [
|
|
16
|
-
"labs"
|
|
17
|
-
]
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
meta
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=chunk-CX6MV3QM.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.youtube',\n name: 'YouTube',\n description: trim`\n YouTube channel subscription and video feed management.\n Sync videos from channels and access transcripts for analysis.\n `,\n icon: 'ph--youtube-logo--regular',\n iconHue: 'red',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-youtube',\n tags: ['labs'],\n};\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;AACT;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags"]
|
|
7
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
__export
|
|
4
|
-
} from "./chunk-HSLMI22Q.mjs";
|
|
5
|
-
|
|
6
|
-
// src/types/Video.ts
|
|
7
|
-
var Video_exports = {};
|
|
8
|
-
__export(Video_exports, {
|
|
9
|
-
TranscriptSegment: () => TranscriptSegment,
|
|
10
|
-
YouTubeVideo: () => YouTubeVideo,
|
|
11
|
-
instanceOf: () => instanceOf
|
|
12
|
-
});
|
|
13
|
-
import * as Schema from "effect/Schema";
|
|
14
|
-
import { Annotation, Obj, Type } from "@dxos/echo";
|
|
15
|
-
var TranscriptSegment = Schema.Struct({
|
|
16
|
-
/** Transcript text. */
|
|
17
|
-
text: Schema.String,
|
|
18
|
-
/** Start time in seconds. */
|
|
19
|
-
offset: Schema.Number,
|
|
20
|
-
/** Duration in seconds. */
|
|
21
|
-
duration: Schema.Number
|
|
22
|
-
});
|
|
23
|
-
var YouTubeVideo = Schema.Struct({
|
|
24
|
-
/** Video title. */
|
|
25
|
-
title: Schema.String,
|
|
26
|
-
/** YouTube video ID. */
|
|
27
|
-
videoId: Schema.String,
|
|
28
|
-
/** Video description. */
|
|
29
|
-
description: Schema.String.pipe(Schema.optional),
|
|
30
|
-
/** Video URL. */
|
|
31
|
-
url: Schema.String,
|
|
32
|
-
/** Thumbnail URL. */
|
|
33
|
-
thumbnailUrl: Schema.String.pipe(Schema.optional),
|
|
34
|
-
/** Channel name. */
|
|
35
|
-
channelTitle: Schema.String.pipe(Schema.optional),
|
|
36
|
-
/** Published date as ISO string. */
|
|
37
|
-
publishedAt: Schema.String,
|
|
38
|
-
/** Video duration in ISO 8601 format (e.g., PT1H30M15S). */
|
|
39
|
-
duration: Schema.String.pipe(Schema.optional),
|
|
40
|
-
/** View count. */
|
|
41
|
-
viewCount: Schema.Number.pipe(Schema.optional),
|
|
42
|
-
/** Like count. */
|
|
43
|
-
likeCount: Schema.Number.pipe(Schema.optional),
|
|
44
|
-
/** Full transcript text. */
|
|
45
|
-
transcript: Schema.String.pipe(Schema.optional),
|
|
46
|
-
/** Transcript segments with timestamps. */
|
|
47
|
-
transcriptSegments: Schema.Array(TranscriptSegment).pipe(Schema.optional),
|
|
48
|
-
/** True when transcript text was successfully loaded; false when disabled or none available. */
|
|
49
|
-
transcriptFetched: Schema.Boolean.pipe(Schema.optional)
|
|
50
|
-
}).pipe(Type.object({
|
|
51
|
-
typename: "org.dxos.type.youtube-video",
|
|
52
|
-
version: "0.1.0"
|
|
53
|
-
}), Annotation.IconAnnotation.set({
|
|
54
|
-
icon: "ph--play--regular",
|
|
55
|
-
hue: "red"
|
|
56
|
-
}));
|
|
57
|
-
var instanceOf = (value) => Obj.instanceOf(YouTubeVideo, value);
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
YouTubeVideo,
|
|
61
|
-
Video_exports
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=chunk-CZSLL3XQ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/Video.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Obj, Type } from '@dxos/echo';\n\n/**\n * Transcript segment from a YouTube video.\n */\nexport const TranscriptSegment = Schema.Struct({\n /** Transcript text. */\n text: Schema.String,\n /** Start time in seconds. */\n offset: Schema.Number,\n /** Duration in seconds. */\n duration: Schema.Number,\n});\n\nexport type TranscriptSegment = Schema.Schema.Type<typeof TranscriptSegment>;\n\n/**\n * YouTubeVideo schema representing a video from a YouTube channel.\n */\nexport const YouTubeVideo = Schema.Struct({\n /** Video title. */\n title: Schema.String,\n /** YouTube video ID. */\n videoId: Schema.String,\n /** Video description. */\n description: Schema.String.pipe(Schema.optional),\n /** Video URL. */\n url: Schema.String,\n /** Thumbnail URL. */\n thumbnailUrl: Schema.String.pipe(Schema.optional),\n /** Channel name. */\n channelTitle: Schema.String.pipe(Schema.optional),\n /** Published date as ISO string. */\n publishedAt: Schema.String,\n /** Video duration in ISO 8601 format (e.g., PT1H30M15S). */\n duration: Schema.String.pipe(Schema.optional),\n /** View count. */\n viewCount: Schema.Number.pipe(Schema.optional),\n /** Like count. */\n likeCount: Schema.Number.pipe(Schema.optional),\n /** Full transcript text. */\n transcript: Schema.String.pipe(Schema.optional),\n /** Transcript segments with timestamps. */\n transcriptSegments: Schema.Array(TranscriptSegment).pipe(Schema.optional),\n /** True when transcript text was successfully loaded; false when disabled or none available. */\n transcriptFetched: Schema.Boolean.pipe(Schema.optional),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.youtube-video',\n version: '0.1.0',\n }),\n Annotation.IconAnnotation.set({\n icon: 'ph--play--regular',\n hue: 'red',\n }),\n);\n\nexport interface YouTubeVideo extends Schema.Schema.Type<typeof YouTubeVideo> {}\n\n/** Checks if a value is a YouTubeVideo object. */\nexport const instanceOf = (value: unknown): value is YouTubeVideo => Obj.instanceOf(YouTubeVideo, value);\n"],
|
|
5
|
-
"mappings": ";;;;;;AAAA;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,YAAY;AAK/B,IAAMC,oBAA2BC,cAAO;;EAE7CC,MAAaC;;EAEbC,QAAeC;;EAEfC,UAAiBD;AACnB,CAAA;AAOO,IAAME,eAAsBN,cAAO;;EAExCO,OAAcL;;EAEdM,SAAgBN;;EAEhBO,aAAoBP,cAAOQ,KAAYC,eAAQ;;EAE/CC,KAAYV;;EAEZW,cAAqBX,cAAOQ,KAAYC,eAAQ;;EAEhDG,cAAqBZ,cAAOQ,KAAYC,eAAQ;;EAEhDI,aAAoBb;;EAEpBG,UAAiBH,cAAOQ,KAAYC,eAAQ;;EAE5CK,WAAkBZ,cAAOM,KAAYC,eAAQ;;EAE7CM,WAAkBb,cAAOM,KAAYC,eAAQ;;EAE7CO,YAAmBhB,cAAOQ,KAAYC,eAAQ;;EAE9CQ,oBAA2BC,aAAMrB,iBAAAA,EAAmBW,KAAYC,eAAQ;;EAExEU,mBAA0BC,eAAQZ,KAAYC,eAAQ;AACxD,CAAA,EAAGD,KACDa,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,eAAeC,IAAI;EAC5BC,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAMK,IAAMC,aAAa,CAACC,UAA0CC,IAAIF,WAAW1B,cAAc2B,KAAAA;",
|
|
6
|
-
"names": ["Schema", "Annotation", "Obj", "Type", "TranscriptSegment", "Struct", "text", "String", "offset", "Number", "duration", "YouTubeVideo", "title", "videoId", "description", "pipe", "optional", "url", "thumbnailUrl", "channelTitle", "publishedAt", "viewCount", "likeCount", "transcript", "transcriptSegments", "Array", "transcriptFetched", "Boolean", "Type", "object", "typename", "version", "Annotation", "IconAnnotation", "set", "icon", "hue", "instanceOf", "value", "Obj"]
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/operations/index.ts
|
|
4
|
-
import { OperationHandlerSet } from "@dxos/operation";
|
|
5
|
-
var YouTubeHandlers = OperationHandlerSet.lazy(() => import("./clear-synced-videos-5UCH6XHL.mjs"), () => import("./sync-CEF5DX2J.mjs"));
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
YouTubeHandlers
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=chunk-M4S6BE47.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport { YouTube } from './apis';\nexport * from './definitions';\n\nexport const YouTubeHandlers = OperationHandlerSet.lazy(\n () => import('./clear-synced-videos'),\n () => import('./sync'),\n);\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,2BAA2B;AAK7B,IAAMC,kBAAkBC,oBAAoBC,KACjD,MAAM,OAAO,oCAAA,GACb,MAAM,OAAO,qBAAA,CAAA;",
|
|
6
|
-
"names": ["OperationHandlerSet", "YouTubeHandlers", "OperationHandlerSet", "lazy"]
|
|
7
|
-
}
|