@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.
Files changed (129) hide show
  1. package/dist/lib/browser/blueprints/index.mjs +49 -8
  2. package/dist/lib/browser/blueprints/index.mjs.map +4 -4
  3. package/dist/lib/browser/{chunk-C26XKDK2.mjs → chunk-5N5SWF3I.mjs} +3 -3
  4. package/dist/lib/browser/chunk-GTIWG45H.mjs +157 -0
  5. package/dist/lib/browser/chunk-GTIWG45H.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-P67QEKBQ.mjs → chunk-SWWE4LUJ.mjs} +3 -5
  7. package/dist/lib/browser/{chunk-P67QEKBQ.mjs.map → chunk-SWWE4LUJ.mjs.map} +1 -1
  8. package/dist/lib/browser/{clear-synced-videos-EVMJIZPD.mjs → clear-synced-videos-PIKJZET3.mjs} +4 -5
  9. package/dist/lib/{node-esm/clear-synced-videos-5UCH6XHL.mjs.map → browser/clear-synced-videos-PIKJZET3.mjs.map} +1 -1
  10. package/dist/lib/browser/index.mjs +86 -81
  11. package/dist/lib/browser/index.mjs.map +4 -4
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/browser/{sync-423Q4BDD.mjs → sync-II7O2LPG.mjs} +6 -7
  14. package/dist/lib/{node-esm/sync-CEF5DX2J.mjs.map → browser/sync-II7O2LPG.mjs.map} +1 -1
  15. package/dist/lib/browser/types/index.mjs +2 -4
  16. package/dist/lib/node-esm/blueprints/index.mjs +49 -8
  17. package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
  18. package/dist/lib/node-esm/{chunk-JM5SBBP5.mjs → chunk-BVKMXV2G.mjs} +3 -3
  19. package/dist/lib/node-esm/{chunk-JSGRZMG3.mjs → chunk-RL46XZ2D.mjs} +3 -5
  20. package/dist/lib/node-esm/{chunk-JSGRZMG3.mjs.map → chunk-RL46XZ2D.mjs.map} +1 -1
  21. package/dist/lib/node-esm/chunk-YOE54ALJ.mjs +158 -0
  22. package/dist/lib/node-esm/chunk-YOE54ALJ.mjs.map +7 -0
  23. package/dist/lib/node-esm/{clear-synced-videos-5UCH6XHL.mjs → clear-synced-videos-Q3MZO2CD.mjs} +4 -5
  24. package/dist/lib/node-esm/index.mjs +86 -81
  25. package/dist/lib/node-esm/index.mjs.map +4 -4
  26. package/dist/lib/node-esm/meta.json +1 -1
  27. package/dist/lib/node-esm/{sync-CEF5DX2J.mjs → sync-BEXQNNSH.mjs} +6 -7
  28. package/dist/lib/node-esm/types/index.mjs +2 -4
  29. package/dist/types/src/YouTubePlugin.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  32. package/dist/types/src/capabilities/index.d.ts +5 -3
  33. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  34. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  35. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  36. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  37. package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts +2 -7
  38. package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts.map +1 -1
  39. package/dist/types/src/containers/VideoCard/VideoCard.d.ts +2 -2
  40. package/dist/types/src/containers/VideoCard/VideoCard.d.ts.map +1 -1
  41. package/dist/types/src/operations/definitions.d.ts +6 -2
  42. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  43. package/dist/types/src/translations.d.ts +38 -38
  44. package/dist/types/src/translations.d.ts.map +1 -1
  45. package/dist/types/src/types/Channel.d.ts +28 -3
  46. package/dist/types/src/types/Channel.d.ts.map +1 -1
  47. package/dist/types/src/types/Video.d.ts +22 -0
  48. package/dist/types/src/types/Video.d.ts.map +1 -1
  49. package/dist/types/tsconfig.tsbuildinfo +1 -1
  50. package/package.json +48 -40
  51. package/src/YouTubePlugin.tsx +11 -5
  52. package/src/blueprints/youtube.ts +1 -1
  53. package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +19 -22
  54. package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +1 -1
  55. package/src/capabilities/index.ts +7 -4
  56. package/src/capabilities/migrations.ts +35 -0
  57. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +4 -4
  58. package/src/containers/VideoArticle/VideoArticle.tsx +2 -7
  59. package/src/containers/VideoCard/VideoCard.tsx +2 -2
  60. package/src/translations.ts +38 -38
  61. package/src/types/Channel.ts +18 -1
  62. package/src/types/Video.ts +25 -1
  63. package/dist/lib/browser/ChannelArticle-CDQR4BBY.mjs +0 -90
  64. package/dist/lib/browser/ChannelArticle-CDQR4BBY.mjs.map +0 -7
  65. package/dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs +0 -28
  66. package/dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs.map +0 -7
  67. package/dist/lib/browser/VideoArticle-FC4A6E7B.mjs +0 -76
  68. package/dist/lib/browser/VideoArticle-FC4A6E7B.mjs.map +0 -7
  69. package/dist/lib/browser/VideoCard-CCPXDCB7.mjs +0 -64
  70. package/dist/lib/browser/VideoCard-CCPXDCB7.mjs.map +0 -7
  71. package/dist/lib/browser/app-graph-builder-MJY6A6SN.mjs +0 -195
  72. package/dist/lib/browser/app-graph-builder-MJY6A6SN.mjs.map +0 -7
  73. package/dist/lib/browser/blueprint-definition-FRYUYJ22.mjs +0 -22
  74. package/dist/lib/browser/blueprint-definition-FRYUYJ22.mjs.map +0 -7
  75. package/dist/lib/browser/chunk-DFRSBBSO.mjs +0 -21
  76. package/dist/lib/browser/chunk-DFRSBBSO.mjs.map +0 -7
  77. package/dist/lib/browser/chunk-GFRR4TTX.mjs +0 -72
  78. package/dist/lib/browser/chunk-GFRR4TTX.mjs.map +0 -7
  79. package/dist/lib/browser/chunk-MUE22YUM.mjs +0 -57
  80. package/dist/lib/browser/chunk-MUE22YUM.mjs.map +0 -7
  81. package/dist/lib/browser/chunk-YMDT37TA.mjs +0 -62
  82. package/dist/lib/browser/chunk-YMDT37TA.mjs.map +0 -7
  83. package/dist/lib/browser/chunk-Z3DGTMKC.mjs +0 -8
  84. package/dist/lib/browser/chunk-Z3DGTMKC.mjs.map +0 -7
  85. package/dist/lib/browser/react-surface-EDA5VYDC.mjs +0 -77
  86. package/dist/lib/browser/react-surface-EDA5VYDC.mjs.map +0 -7
  87. package/dist/lib/node-esm/ChannelArticle-GQ64BO7V.mjs +0 -91
  88. package/dist/lib/node-esm/ChannelArticle-GQ64BO7V.mjs.map +0 -7
  89. package/dist/lib/node-esm/ChannelSettings-DM2HWNKO.mjs +0 -29
  90. package/dist/lib/node-esm/ChannelSettings-DM2HWNKO.mjs.map +0 -7
  91. package/dist/lib/node-esm/VideoArticle-WLTWZO3K.mjs +0 -77
  92. package/dist/lib/node-esm/VideoArticle-WLTWZO3K.mjs.map +0 -7
  93. package/dist/lib/node-esm/VideoCard-FOWQZK75.mjs +0 -65
  94. package/dist/lib/node-esm/VideoCard-FOWQZK75.mjs.map +0 -7
  95. package/dist/lib/node-esm/app-graph-builder-IU5TBAXN.mjs +0 -196
  96. package/dist/lib/node-esm/app-graph-builder-IU5TBAXN.mjs.map +0 -7
  97. package/dist/lib/node-esm/blueprint-definition-W264MZ3D.mjs +0 -23
  98. package/dist/lib/node-esm/blueprint-definition-W264MZ3D.mjs.map +0 -7
  99. package/dist/lib/node-esm/chunk-5KNC2JMP.mjs +0 -58
  100. package/dist/lib/node-esm/chunk-5KNC2JMP.mjs.map +0 -7
  101. package/dist/lib/node-esm/chunk-6BUJ2DQX.mjs +0 -73
  102. package/dist/lib/node-esm/chunk-6BUJ2DQX.mjs.map +0 -7
  103. package/dist/lib/node-esm/chunk-CX6MV3QM.mjs +0 -23
  104. package/dist/lib/node-esm/chunk-CX6MV3QM.mjs.map +0 -7
  105. package/dist/lib/node-esm/chunk-CZSLL3XQ.mjs +0 -63
  106. package/dist/lib/node-esm/chunk-CZSLL3XQ.mjs.map +0 -7
  107. package/dist/lib/node-esm/chunk-M4S6BE47.mjs +0 -10
  108. package/dist/lib/node-esm/chunk-M4S6BE47.mjs.map +0 -7
  109. package/dist/lib/node-esm/react-surface-5DJAQPHJ.mjs +0 -78
  110. package/dist/lib/node-esm/react-surface-5DJAQPHJ.mjs.map +0 -7
  111. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  112. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  113. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  114. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  115. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
  116. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  117. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  118. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  119. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  120. package/src/capabilities/app-graph-builder/index.ts +0 -7
  121. package/src/capabilities/blueprint-definition/index.ts +0 -7
  122. package/src/capabilities/react-surface/index.ts +0 -7
  123. /package/dist/lib/browser/{chunk-C26XKDK2.mjs.map → chunk-5N5SWF3I.mjs.map} +0 -0
  124. /package/dist/lib/node-esm/{chunk-JM5SBBP5.mjs.map → chunk-BVKMXV2G.mjs.map} +0 -0
  125. /package/dist/lib/{browser/clear-synced-videos-EVMJIZPD.mjs.map → node-esm/clear-synced-videos-Q3MZO2CD.mjs.map} +0 -0
  126. /package/dist/lib/{browser/sync-423Q4BDD.mjs.map → node-esm/sync-BEXQNNSH.mjs.map} +0 -0
  127. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  128. /package/dist/types/src/capabilities/{blueprint-definition/blueprint-definition.d.ts → blueprint-definition.d.ts} +0 -0
  129. /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/ChannelArticle/ChannelArticle.tsx", "../../../src/containers/ChannelArticle/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { type Feed, Obj, Query } from '@dxos/echo';\nimport { Filter, useObject, useQuery } from '@dxos/react-client/echo';\nimport { Icon, Panel } from '@dxos/react-ui';\n\nimport * as Channel from '../../types/Channel';\nimport * as Video from '../../types/Video';\n\nexport type ChannelArticleProps = {\n subject: Channel.YouTubeChannel;\n attendableId?: string;\n};\n\nexport const ChannelArticle = ({ subject: channel }: ChannelArticleProps) => {\n useObject(channel);\n const feed = channel.feed?.target as Feed.Feed | undefined;\n const db = Obj.getDatabase(channel);\n const videos = useQuery(\n db,\n feed ? Query.select(Filter.type(Video.YouTubeVideo)).from(feed) : Query.select(Filter.nothing()),\n ) as Video.YouTubeVideo[];\n\n const sortedVideos = useMemo(\n () =>\n [...videos].sort(\n (videoA, videoB) => new Date(videoB.publishedAt).getTime() - new Date(videoA.publishedAt).getTime(),\n ),\n [videos],\n );\n\n return (\n <Panel.Root>\n <Panel.Content className='overflow-auto'>\n <div className='flex flex-col gap-4 p-4'>\n <div className='flex items-center justify-between'>\n <div className='flex items-center gap-2'>\n <Icon icon='ph--youtube-logo--regular' size={6} />\n <h2 className='text-lg font-semibold'>{channel.name ?? 'YouTube Channel'}</h2>\n </div>\n {channel.lastSyncedAt && (\n <span className='text-xs text-description'>\n Last synced: {new Date(channel.lastSyncedAt).toLocaleString()}\n </span>\n )}\n </div>\n\n {channel.channelUrl && (\n <div className='text-sm text-description'>\n <a\n href={\n channel.channelUrl.startsWith('http')\n ? channel.channelUrl\n : `https://www.youtube.com/@${channel.channelUrl}`\n }\n target='_blank'\n rel='noopener noreferrer'\n className='hover:underline'\n >\n {channel.channelUrl}\n </a>\n </div>\n )}\n\n <div className='flex flex-col gap-2'>\n <h3 className='text-md font-medium'>Videos ({sortedVideos.length})</h3>\n <div className='grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4'>\n {sortedVideos.map((video) => (\n <div key={video.videoId} className='flex flex-col gap-2 p-2 rounded hover:bg-surface-hover'>\n {video.thumbnailUrl ? (\n <a\n href={video.url}\n target='_blank'\n rel='noopener noreferrer'\n className='relative aspect-video group'\n >\n <img src={video.thumbnailUrl} alt={video.title} className='h-full w-full object-cover rounded' />\n <div className='absolute inset-0 flex items-center justify-center bg-black/0 group-hover:bg-black/30 rounded transition-colors'>\n <div className='opacity-0 group-hover:opacity-100 bg-red-600 text-white rounded-full p-2 transition-opacity'>\n <Icon icon='ph--play--fill' size={4} />\n </div>\n </div>\n </a>\n ) : (\n <div className='aspect-video bg-surface-hover rounded flex items-center justify-center'>\n <Icon icon='ph--video--regular' size={8} />\n </div>\n )}\n <div className='flex flex-col gap-1'>\n <span className='font-medium line-clamp-2' title={video.title}>\n {video.title}\n </span>\n <span className='text-xs text-description'>\n {new Date(video.publishedAt).toLocaleDateString()}\n {video.transcript && ' • Transcript available'}\n </span>\n </div>\n </div>\n ))}\n {sortedVideos.length === 0 && (\n <div className='col-span-full text-sm text-description p-4 text-center'>\n No videos synced yet. Sync the channel to fetch videos.\n </div>\n )}\n </div>\n </div>\n </div>\n </Panel.Content>\n </Panel.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ChannelArticle } from './ChannelArticle';\n\nexport default ChannelArticle;\n"],
5
- "mappings": ";;;;;;AAIA,OAAOA,SAASC,eAAe;AAE/B,SAAoBC,KAAKC,aAAa;AACtC,SAASC,QAAQC,WAAWC,gBAAgB;AAC5C,SAASC,MAAMC,aAAa;AAUrB,IAAMC,iBAAiB,CAAC,EAAEC,SAASC,QAAO,MAAuB;AACtEC,YAAUD,OAAAA;AACV,QAAME,OAAOF,QAAQE,MAAMC;AAC3B,QAAMC,KAAKC,IAAIC,YAAYN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,OAAAA;IAAIkB,KAAKD,MAAME;IAASpB,WAAU;KAChCkB,MAAMG,eACL,sBAAA,cAACV,KAAAA;IACCC,MAAMM,MAAMI;IACZ9C,QAAO;IACPsC,KAAI;IACJd,WAAU;KAEV,sBAAA,cAACuB,OAAAA;IAAIC,KAAKN,MAAMG;IAAcI,KAAKP,MAAMQ;IAAO1B,WAAU;MAC1D,sBAAA,cAACC,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACC,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACE,MAAAA;IAAKC,MAAK;IAAiBC,MAAM;UAKxC,sBAAA,cAACH,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACE,MAAAA;IAAKC,MAAK;IAAqBC,MAAM;OAG1C,sBAAA,cAACH,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACQ,QAAAA;IAAKR,WAAU;IAA2B0B,OAAOR,MAAMQ;KACrDR,MAAMQ,KAAK,GAEd,sBAAA,cAAClB,QAAAA;IAAKR,WAAU;KACb,IAAIN,KAAKwB,MAAMvB,WAAW,EAAEgC,mBAAkB,GAC9CT,MAAMU,cAAc,8BAAA,CAAA,CAAA,CAAA,GAK5BvC,aAAa2B,WAAW,KACvB,sBAAA,cAACf,OAAAA;IAAID,WAAU;KAAyD,yDAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAUxF;;;AC5GA,IAAA,yBAAe6B;",
6
- "names": ["React", "useMemo", "Obj", "Query", "Filter", "useObject", "useQuery", "Icon", "Panel", "ChannelArticle", "subject", "channel", "useObject", "feed", "target", "db", "Obj", "getDatabase", "videos", "useQuery", "Query", "select", "Filter", "type", "YouTubeVideo", "from", "nothing", "sortedVideos", "useMemo", "sort", "videoA", "videoB", "Date", "publishedAt", "getTime", "Panel", "Root", "Content", "className", "div", "Icon", "icon", "size", "h2", "name", "lastSyncedAt", "span", "toLocaleString", "channelUrl", "a", "href", "startsWith", "rel", "h3", "length", "map", "video", "key", "videoId", "thumbnailUrl", "url", "img", "src", "alt", "title", "toLocaleDateString", "transcript", "ChannelArticle"]
7
- }
@@ -1,28 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/containers/ChannelSettings/ChannelSettings.tsx
4
- import React from "react";
5
- var ChannelSettings = ({ subject: channel }) => {
6
- return /* @__PURE__ */ React.createElement("div", {
7
- className: "flex flex-col gap-4 p-4"
8
- }, /* @__PURE__ */ React.createElement("h3", {
9
- className: "text-md font-medium"
10
- }, "Channel Settings"), /* @__PURE__ */ React.createElement("div", {
11
- className: "flex flex-col gap-2 text-sm"
12
- }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", {
13
- className: "text-description"
14
- }, "Name:"), " ", /* @__PURE__ */ React.createElement("span", null, channel.name ?? "Not set")), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", {
15
- className: "text-description"
16
- }, "Channel URL:"), " ", /* @__PURE__ */ React.createElement("span", null, channel.channelUrl ?? "Not set")), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", {
17
- className: "text-description"
18
- }, "Channel ID:"), " ", /* @__PURE__ */ React.createElement("span", null, channel.channelId ?? "Not set")), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", {
19
- className: "text-description"
20
- }, "Last Synced:"), " ", /* @__PURE__ */ React.createElement("span", null, channel.lastSyncedAt ? new Date(channel.lastSyncedAt).toLocaleString() : "Never"))));
21
- };
22
-
23
- // src/containers/ChannelSettings/index.ts
24
- var ChannelSettings_default = ChannelSettings;
25
- export {
26
- ChannelSettings_default as default
27
- };
28
- //# sourceMappingURL=ChannelSettings-ZYUNW3VS.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/containers/ChannelSettings/ChannelSettings.tsx", "../../../src/containers/ChannelSettings/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport * as Channel from '../../types/Channel';\n\nexport type ChannelSettingsProps = {\n subject: Channel.YouTubeChannel;\n};\n\nexport const ChannelSettings = ({ subject: channel }: ChannelSettingsProps) => {\n return (\n <div className='flex flex-col gap-4 p-4'>\n <h3 className='text-md font-medium'>Channel Settings</h3>\n <div className='flex flex-col gap-2 text-sm'>\n <div>\n <span className='text-description'>Name:</span> <span>{channel.name ?? 'Not set'}</span>\n </div>\n <div>\n <span className='text-description'>Channel URL:</span> <span>{channel.channelUrl ?? 'Not set'}</span>\n </div>\n <div>\n <span className='text-description'>Channel ID:</span> <span>{channel.channelId ?? 'Not set'}</span>\n </div>\n <div>\n <span className='text-description'>Last Synced:</span>{' '}\n <span>{channel.lastSyncedAt ? new Date(channel.lastSyncedAt).toLocaleString() : 'Never'}</span>\n </div>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ChannelSettings } from './ChannelSettings';\n\nexport default ChannelSettings;\n"],
5
- "mappings": ";;;AAIA,OAAOA,WAAW;AAQX,IAAMC,kBAAkB,CAAC,EAAEC,SAASC,QAAO,MAAwB;AACxE,SACE,sBAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACC,MAAAA;IAAGD,WAAU;KAAsB,kBAAA,GACpC,sBAAA,cAACD,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACD,OAAAA,MACC,sBAAA,cAACG,QAAAA;IAAKF,WAAU;KAAmB,OAAA,GAAY,KAAC,sBAAA,cAACE,QAAAA,MAAMJ,QAAQK,QAAQ,SAAA,CAAA,GAEzE,sBAAA,cAACJ,OAAAA,MACC,sBAAA,cAACG,QAAAA;IAAKF,WAAU;KAAmB,cAAA,GAAmB,KAAC,sBAAA,cAACE,QAAAA,MAAMJ,QAAQM,cAAc,SAAA,CAAA,GAEtF,sBAAA,cAACL,OAAAA,MACC,sBAAA,cAACG,QAAAA;IAAKF,WAAU;KAAmB,aAAA,GAAkB,KAAC,sBAAA,cAACE,QAAAA,MAAMJ,QAAQO,aAAa,SAAA,CAAA,GAEpF,sBAAA,cAACN,OAAAA,MACC,sBAAA,cAACG,QAAAA;IAAKF,WAAU;KAAmB,cAAA,GAAoB,KACvD,sBAAA,cAACE,QAAAA,MAAMJ,QAAQQ,eAAe,IAAIC,KAAKT,QAAQQ,YAAY,EAAEE,eAAc,IAAK,OAAA,CAAA,CAAA,CAAA;AAK1F;;;AC3BA,IAAA,0BAAeC;",
6
- "names": ["React", "ChannelSettings", "subject", "channel", "div", "className", "h3", "span", "name", "channelUrl", "channelId", "lastSyncedAt", "Date", "toLocaleString", "ChannelSettings"]
7
- }
@@ -1,76 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/containers/VideoArticle/VideoArticle.tsx
4
- import React, { useState } from "react";
5
- import { Icon, Panel } from "@dxos/react-ui";
6
- var VideoArticle = ({ subject: video, role }) => {
7
- const [showPlayer, setShowPlayer] = useState(false);
8
- const publishedDate = new Date(video.publishedAt).toLocaleDateString();
9
- const hasTranscript = Boolean(video.transcript);
10
- const embedUrl = `https://www.youtube.com/embed/${video.videoId}`;
11
- return /* @__PURE__ */ React.createElement(Panel.Root, null, /* @__PURE__ */ React.createElement(Panel.Content, {
12
- className: role === "section" ? "overflow-auto" : ""
13
- }, /* @__PURE__ */ React.createElement("div", {
14
- className: "flex flex-col gap-4 p-4 max-w-4xl"
15
- }, /* @__PURE__ */ React.createElement("div", {
16
- className: "flex flex-col gap-2"
17
- }, /* @__PURE__ */ React.createElement("h2", {
18
- className: "text-lg font-semibold"
19
- }, video.title), /* @__PURE__ */ React.createElement("div", {
20
- className: "flex items-center gap-2 text-sm text-description"
21
- }, /* @__PURE__ */ React.createElement("span", null, video.channelTitle), /* @__PURE__ */ React.createElement("span", null, "\u2022"), /* @__PURE__ */ React.createElement("span", null, publishedDate), video.viewCount !== void 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", null, "\u2022"), /* @__PURE__ */ React.createElement("span", null, video.viewCount.toLocaleString(), " views")), video.likeCount !== void 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", null, "\u2022"), /* @__PURE__ */ React.createElement("span", null, video.likeCount.toLocaleString(), " likes")))), /* @__PURE__ */ React.createElement("div", {
22
- className: "aspect-video w-full max-w-2xl"
23
- }, showPlayer ? /* @__PURE__ */ React.createElement("iframe", {
24
- src: embedUrl,
25
- title: video.title,
26
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
27
- allowFullScreen: true,
28
- className: "h-full w-full rounded-lg"
29
- }) : /* @__PURE__ */ React.createElement("button", {
30
- type: "button",
31
- onClick: () => setShowPlayer(true),
32
- className: "relative h-full w-full group cursor-pointer"
33
- }, video.thumbnailUrl ? /* @__PURE__ */ React.createElement("img", {
34
- src: video.thumbnailUrl,
35
- alt: video.title,
36
- className: "h-full w-full object-cover rounded-lg"
37
- }) : /* @__PURE__ */ React.createElement("div", {
38
- className: "h-full w-full bg-surface-hover rounded-lg flex items-center justify-center"
39
- }, /* @__PURE__ */ React.createElement(Icon, {
40
- icon: "ph--play--fill",
41
- size: 12
42
- })), /* @__PURE__ */ React.createElement("div", {
43
- className: "absolute inset-0 flex items-center justify-center bg-black/30 group-hover:bg-black/50 rounded-lg transition-colors"
44
- }, /* @__PURE__ */ React.createElement("div", {
45
- className: "bg-red-600 text-white rounded-full p-4 group-hover:scale-110 transition-transform"
46
- }, /* @__PURE__ */ React.createElement(Icon, {
47
- icon: "ph--play--fill",
48
- size: 8
49
- }))))), video.description && /* @__PURE__ */ React.createElement("div", {
50
- className: "max-w-2xl"
51
- }, /* @__PURE__ */ React.createElement("h3", {
52
- className: "text-md font-medium mb-2"
53
- }, "Description"), /* @__PURE__ */ React.createElement("p", {
54
- className: "whitespace-pre-wrap text-sm"
55
- }, video.description)), hasTranscript && /* @__PURE__ */ React.createElement("div", {
56
- className: "max-w-2xl"
57
- }, /* @__PURE__ */ React.createElement("h3", {
58
- className: "text-md font-medium mb-2"
59
- }, "Transcript"), /* @__PURE__ */ React.createElement("div", {
60
- className: "bg-surface-input p-4 rounded-lg max-h-96 overflow-auto"
61
- }, /* @__PURE__ */ React.createElement("p", {
62
- className: "whitespace-pre-wrap text-sm"
63
- }, video.transcript))), /* @__PURE__ */ React.createElement("a", {
64
- href: video.url,
65
- target: "_blank",
66
- rel: "noopener noreferrer",
67
- className: "inline-flex items-center gap-2 text-sm text-primary hover:underline"
68
- }, "Watch on YouTube \u2192"))));
69
- };
70
-
71
- // src/containers/VideoArticle/index.ts
72
- var VideoArticle_default = VideoArticle;
73
- export {
74
- VideoArticle_default as default
75
- };
76
- //# sourceMappingURL=VideoArticle-FC4A6E7B.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/containers/VideoArticle/VideoArticle.tsx", "../../../src/containers/VideoArticle/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { Icon, Panel } from '@dxos/react-ui';\n\nimport * as Channel from '../../types/Channel';\nimport * as Video from '../../types/Video';\n\nexport type VideoArticleProps = {\n role: string | string[];\n subject: Video.YouTubeVideo;\n channel: Channel.YouTubeChannel;\n attendableId?: string;\n};\n\nexport const VideoArticle = ({ subject: video, role }: VideoArticleProps) => {\n const [showPlayer, setShowPlayer] = useState(false);\n const publishedDate = new Date(video.publishedAt).toLocaleDateString();\n const hasTranscript = Boolean(video.transcript);\n const embedUrl = `https://www.youtube.com/embed/${video.videoId}`;\n\n return (\n <Panel.Root>\n <Panel.Content className={role === 'section' ? 'overflow-auto' : ''}>\n <div className='flex flex-col gap-4 p-4 max-w-4xl'>\n <div className='flex flex-col gap-2'>\n <h2 className='text-lg font-semibold'>{video.title}</h2>\n <div className='flex items-center gap-2 text-sm text-description'>\n <span>{video.channelTitle}</span>\n <span>•</span>\n <span>{publishedDate}</span>\n {video.viewCount !== undefined && (\n <>\n <span>•</span>\n <span>{video.viewCount.toLocaleString()} views</span>\n </>\n )}\n {video.likeCount !== undefined && (\n <>\n <span>•</span>\n <span>{video.likeCount.toLocaleString()} likes</span>\n </>\n )}\n </div>\n </div>\n\n <div className='aspect-video w-full max-w-2xl'>\n {showPlayer ? (\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-lg'\n />\n ) : (\n <button\n type='button'\n onClick={() => setShowPlayer(true)}\n className='relative h-full 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-lg' />\n ) : (\n <div className='h-full w-full bg-surface-hover rounded-lg 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-lg transition-colors'>\n <div className='bg-red-600 text-white rounded-full p-4 group-hover:scale-110 transition-transform'>\n <Icon icon='ph--play--fill' size={8} />\n </div>\n </div>\n </button>\n )}\n </div>\n\n {video.description && (\n <div className='max-w-2xl'>\n <h3 className='text-md font-medium mb-2'>Description</h3>\n <p className='whitespace-pre-wrap text-sm'>{video.description}</p>\n </div>\n )}\n\n {hasTranscript && (\n <div className='max-w-2xl'>\n <h3 className='text-md font-medium mb-2'>Transcript</h3>\n <div className='bg-surface-input p-4 rounded-lg max-h-96 overflow-auto'>\n <p className='whitespace-pre-wrap text-sm'>{video.transcript}</p>\n </div>\n </div>\n )}\n\n <a\n href={video.url}\n target='_blank'\n rel='noopener noreferrer'\n className='inline-flex items-center gap-2 text-sm text-primary hover:underline'\n >\n Watch on YouTube →\n </a>\n </div>\n </Panel.Content>\n </Panel.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { VideoArticle } from './VideoArticle';\n\nexport default VideoArticle;\n"],
5
- "mappings": ";;;AAIA,OAAOA,SAASC,gBAAgB;AAEhC,SAASC,MAAMC,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9B,cAAc,IAAA;IAC7Bc,WAAU;KAETjB,MAAMkC,eACL,sBAAA,cAACC,OAAAA;IAAIP,KAAK5B,MAAMkC;IAAcE,KAAKpC,MAAMoB;IAAOH,WAAU;OAE1D,sBAAA,cAACC,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACoB,MAAAA;IAAKC,MAAK;IAAiBC,MAAM;OAGtC,sBAAA,cAACrB,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACC,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACoB,MAAAA;IAAKC,MAAK;IAAiBC,MAAM;UAO3CvC,MAAMwC,eACL,sBAAA,cAACtB,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACwB,MAAAA;IAAGxB,WAAU;KAA2B,aAAA,GACzC,sBAAA,cAACyB,KAAAA;IAAEzB,WAAU;KAA+BjB,MAAMwC,WAAW,CAAA,GAIhE/B,iBACC,sBAAA,cAACS,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACwB,MAAAA;IAAGxB,WAAU;KAA2B,YAAA,GACzC,sBAAA,cAACC,OAAAA;IAAID,WAAU;KACb,sBAAA,cAACyB,KAAAA;IAAEzB,WAAU;KAA+BjB,MAAMW,UAAU,CAAA,CAAA,GAKlE,sBAAA,cAACgC,KAAAA;IACCC,MAAM5C,MAAM6C;IACZC,QAAO;IACPC,KAAI;IACJ9B,WAAU;KACX,yBAAA,CAAA,CAAA,CAAA;AAOX;;;ACtGA,IAAA,uBAAe+B;",
6
- "names": ["React", "useState", "Icon", "Panel", "VideoArticle", "subject", "video", "role", "showPlayer", "setShowPlayer", "useState", "publishedDate", "Date", "publishedAt", "toLocaleDateString", "hasTranscript", "Boolean", "transcript", "embedUrl", "videoId", "Panel", "Root", "Content", "className", "div", "h2", "title", "span", "channelTitle", "viewCount", "undefined", "toLocaleString", "likeCount", "iframe", "src", "allow", "allowFullScreen", "button", "type", "onClick", "thumbnailUrl", "img", "alt", "Icon", "icon", "size", "description", "h3", "p", "a", "href", "url", "target", "rel", "VideoArticle"]
7
- }
@@ -1,64 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/containers/VideoCard/VideoCard.tsx
4
- import React, { useState } from "react";
5
- import { Card, Icon } from "@dxos/react-ui";
6
- var VideoCard = ({ subject: video }) => {
7
- const [showPlayer, setShowPlayer] = useState(false);
8
- const publishedDate = new Date(video.publishedAt).toLocaleDateString();
9
- const hasTranscript = Boolean(video.transcript);
10
- const embedUrl = `https://www.youtube.com/embed/${video.videoId}?autoplay=1`;
11
- return /* @__PURE__ */ React.createElement(Card.Content, null, showPlayer ? /* @__PURE__ */ React.createElement("div", {
12
- className: "aspect-video w-full"
13
- }, /* @__PURE__ */ React.createElement("iframe", {
14
- src: embedUrl,
15
- title: video.title,
16
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
17
- allowFullScreen: true,
18
- className: "h-full w-full rounded"
19
- })) : /* @__PURE__ */ React.createElement("button", {
20
- type: "button",
21
- onClick: () => setShowPlayer(true),
22
- className: "relative aspect-video w-full group cursor-pointer"
23
- }, video.thumbnailUrl ? /* @__PURE__ */ React.createElement("img", {
24
- src: video.thumbnailUrl,
25
- alt: video.title,
26
- className: "h-full w-full object-cover rounded"
27
- }) : /* @__PURE__ */ React.createElement("div", {
28
- className: "h-full w-full bg-surface-hover rounded flex items-center justify-center"
29
- }, /* @__PURE__ */ React.createElement(Icon, {
30
- icon: "ph--play--fill",
31
- size: 12
32
- })), /* @__PURE__ */ React.createElement("div", {
33
- className: "absolute inset-0 flex items-center justify-center bg-black/30 group-hover:bg-black/50 rounded transition-colors"
34
- }, /* @__PURE__ */ React.createElement("div", {
35
- className: "bg-red-600 text-white rounded-full p-3 group-hover:scale-110 transition-transform"
36
- }, /* @__PURE__ */ React.createElement(Icon, {
37
- icon: "ph--play--fill",
38
- size: 6
39
- })))), /* @__PURE__ */ React.createElement(Card.Toolbar, null, /* @__PURE__ */ React.createElement(Card.IconBlock, null, /* @__PURE__ */ React.createElement(Icon, {
40
- icon: "ph--youtube-logo--regular",
41
- size: 5
42
- })), /* @__PURE__ */ React.createElement("div", {
43
- className: "flex gap-3 items-center justify-between col-span-2"
44
- }, /* @__PURE__ */ React.createElement("span", {
45
- className: "grow truncate font-medium"
46
- }, video.title), /* @__PURE__ */ React.createElement("span", {
47
- className: "text-xs text-description text-right whitespace-nowrap pe-2"
48
- }, publishedDate))), /* @__PURE__ */ React.createElement(Card.Row, null, /* @__PURE__ */ React.createElement("span", {
49
- className: "text-xs text-description"
50
- }, video.channelTitle)), video.description && /* @__PURE__ */ React.createElement(Card.Row, null, /* @__PURE__ */ React.createElement(Card.Text, {
51
- variant: "description"
52
- }, video.description.slice(0, 150), "...")), /* @__PURE__ */ React.createElement(Card.Row, null, /* @__PURE__ */ React.createElement("div", {
53
- className: "flex gap-2 items-center text-xs text-description"
54
- }, video.viewCount !== void 0 && /* @__PURE__ */ React.createElement("span", null, video.viewCount.toLocaleString(), " views"), hasTranscript && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", null, "\u2022"), /* @__PURE__ */ React.createElement("span", {
55
- className: "text-green-600"
56
- }, "Transcript available")))));
57
- };
58
-
59
- // src/containers/VideoCard/index.ts
60
- var VideoCard_default = VideoCard;
61
- export {
62
- VideoCard_default as default
63
- };
64
- //# sourceMappingURL=VideoCard-CCPXDCB7.mjs.map
@@ -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};\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ACxD,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,195 +0,0 @@
1
- import {
2
- meta
3
- } from "./chunk-DFRSBBSO.mjs";
4
- import "./chunk-Z3DGTMKC.mjs";
5
- import "./chunk-C26XKDK2.mjs";
6
- import {
7
- ClearSyncedVideos,
8
- Sync
9
- } from "./chunk-P67QEKBQ.mjs";
10
- import {
11
- Channel_exports
12
- } from "./chunk-GFRR4TTX.mjs";
13
- import "./chunk-YMDT37TA.mjs";
14
- import "./chunk-J5LGTIGS.mjs";
15
-
16
- // src/capabilities/app-graph-builder/app-graph-builder.ts
17
- import { Atom } from "@effect-atom/atom-react";
18
- import * as Effect from "effect/Effect";
19
- import * as Option from "effect/Option";
20
- import { Capability } from "@dxos/app-framework";
21
- import { AppCapabilities, companionSegment, LayoutOperation } from "@dxos/app-toolkit";
22
- import { Filter, Obj, Query, Ref } from "@dxos/echo";
23
- import { AtomQuery, AtomRef } from "@dxos/echo-atom";
24
- import { invariant } from "@dxos/invariant";
25
- import { log } from "@dxos/log";
26
- import { Operation } from "@dxos/operation";
27
- import { AttentionCapabilities } from "@dxos/plugin-attention";
28
- import { AutomationCapabilities, invokeFunctionWithTracing } from "@dxos/plugin-automation";
29
- import { PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
30
- import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
31
- var __dxlog_file = "/Users/mykola/dev/dxos/packages/plugins/plugin-youtube/src/capabilities/app-graph-builder/app-graph-builder.ts";
32
- var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
33
- const selectionManager = yield* Capability.get(AttentionCapabilities.Selection);
34
- const selectedId = Atom.family((nodeId) => Atom.make((get) => {
35
- const state = get(selectionManager.state);
36
- const selection = state.selections[nodeId];
37
- return selection?.mode === "single" ? selection.id : void 0;
38
- }));
39
- const whenYouTubeChannel = NodeMatcher.whenEchoType(Channel_exports.YouTubeChannel);
40
- const extensions = yield* Effect.all([
41
- GraphBuilder.createExtension({
42
- id: `${meta.id}.channel-video`,
43
- match: (node) => Channel_exports.instanceOf(node.data) ? Option.some({
44
- channel: node.data,
45
- nodeId: node.id
46
- }) : Option.none(),
47
- connector: (matched, get) => {
48
- const channel = matched.channel;
49
- const db = Obj.getDatabase(channel);
50
- const feed = channel.feed ? get(AtomRef.make(channel.feed)) : void 0;
51
- if (!db || !feed) {
52
- return Effect.succeed([]);
53
- }
54
- const videoId = get(selectedId(matched.nodeId));
55
- const video = get(AtomQuery.make(db, Query.select(videoId ? Filter.id(videoId) : Filter.nothing()).from(feed)))[0];
56
- return Effect.succeed([
57
- {
58
- id: companionSegment("video"),
59
- type: PLANK_COMPANION_TYPE,
60
- data: video ?? "video",
61
- properties: {
62
- label: [
63
- "video label",
64
- {
65
- ns: meta.id
66
- }
67
- ],
68
- icon: "ph--play--regular",
69
- disposition: "hidden"
70
- }
71
- }
72
- ]);
73
- }
74
- }),
75
- GraphBuilder.createExtension({
76
- id: `${meta.id}.sync-channel`,
77
- match: whenYouTubeChannel,
78
- actions: (channel) => Effect.succeed([
79
- {
80
- id: "sync",
81
- data: Effect.fnUntraced(function* () {
82
- const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
83
- const db = Obj.getDatabase(channel);
84
- invariant(db, void 0, {
85
- F: __dxlog_file,
86
- L: 83,
87
- S: this,
88
- A: [
89
- "db",
90
- ""
91
- ]
92
- });
93
- const runtime = computeRuntime.getRuntime(db.spaceId);
94
- yield* Effect.tryPromise(() => runtime.runPromise(invokeFunctionWithTracing(Sync, {
95
- channel: Ref.make(channel)
96
- }))).pipe(Effect.catchAll((error) => {
97
- log.catch(error, void 0, {
98
- F: __dxlog_file,
99
- L: 93,
100
- S: this,
101
- C: (f, a) => f(...a)
102
- });
103
- return Operation.invoke(LayoutOperation.AddToast, {
104
- id: `${meta.id}.sync-channel-error`,
105
- icon: "ph--warning--regular",
106
- duration: 5e3,
107
- title: [
108
- "sync channel error title",
109
- {
110
- ns: meta.id
111
- }
112
- ],
113
- closeLabel: [
114
- "close label",
115
- {
116
- ns: meta.id
117
- }
118
- ]
119
- });
120
- }));
121
- }),
122
- properties: {
123
- label: [
124
- "sync channel label",
125
- {
126
- ns: meta.id
127
- }
128
- ],
129
- icon: "ph--arrows-clockwise--regular",
130
- disposition: "list-item"
131
- }
132
- },
133
- {
134
- id: "clear-synced-videos",
135
- data: Effect.fnUntraced(function* () {
136
- const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
137
- const db = Obj.getDatabase(channel);
138
- invariant(db, void 0, {
139
- F: __dxlog_file,
140
- L: 115,
141
- S: this,
142
- A: [
143
- "db",
144
- ""
145
- ]
146
- });
147
- const runtime = computeRuntime.getRuntime(db.spaceId);
148
- yield* Effect.tryPromise(() => runtime.runPromise(invokeFunctionWithTracing(ClearSyncedVideos, {
149
- channel: Ref.make(channel)
150
- }))).pipe(Effect.catchAll((error) => {
151
- log.catch(error, void 0, {
152
- F: __dxlog_file,
153
- L: 125,
154
- S: this,
155
- C: (f, a) => f(...a)
156
- });
157
- return Operation.invoke(LayoutOperation.AddToast, {
158
- id: `${meta.id}.clear-synced-videos-error`,
159
- icon: "ph--warning--regular",
160
- duration: 5e3,
161
- title: [
162
- "clear synced videos error title",
163
- {
164
- ns: meta.id
165
- }
166
- ],
167
- closeLabel: [
168
- "close label",
169
- {
170
- ns: meta.id
171
- }
172
- ]
173
- });
174
- }));
175
- }),
176
- properties: {
177
- label: [
178
- "clear synced videos label",
179
- {
180
- ns: meta.id
181
- }
182
- ],
183
- icon: "ph--trash--regular",
184
- disposition: "list-item"
185
- }
186
- }
187
- ])
188
- })
189
- ]);
190
- return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
191
- }));
192
- export {
193
- app_graph_builder_default as default
194
- };
195
- //# sourceMappingURL=app-graph-builder-MJY6A6SN.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": ";;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AACrB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,kBAAkBC,u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7B,KAAKX;cAAG;;YAC5CyC,MAAM;YACNC,aAAa;UACf;QACF;QACA;UACE1C,IAAI;UACJe,MAAa7B,kBAAW,aAAA;AACtB,kBAAM0D,iBAAiB,OAAO5D,WAAWI,IAAIyD,uBAAuBC,cAAc;AAClF,kBAAMzB,KAAKC,IAAIC,YAAYN,OAAAA;AAC3B8B,sBAAU1B,IAAAA,QAAAA;;;;;;;;;AACV,kBAAM2B,UAAUJ,eAAeK,WAAW5B,GAAG6B,OAAO;AACpD,mBAAcC,kBAAW,MACvBH,QAAQI,WACNC,0BAA0Be,mBAAmB;cAC3CnD,SAASsC,IAAI5D,KAAKsB,OAAAA;YACpB,CAAA,CAAA,CAAA,EAEFuC,KACOC,gBAAS,CAACC,UAAAA;AACfC,kBAAIC,MAAMF,OAAAA,QAAAA;;;;;;AACV,qBAAOG,UAAUC,OAAOC,gBAAgBC,UAAU;gBAChDhE,IAAI,GAAGW,KAAKX,EAAE;gBACdyC,MAAM;gBACNwB,UAAU;gBACVC,OAAO;kBAAC;kBAAmC;oBAAE1B,IAAI7B,KAAKX;kBAAG;;gBACzDmE,YAAY;kBAAC;kBAAe;oBAAE3B,IAAI7B,KAAKX;kBAAG;;cAC5C,CAAA;YACF,CAAA,CAAA;UAEJ,CAAA;UACAsC,YAAY;YACVC,OAAO;cAAC;cAA6B;gBAAEC,IAAI7B,KAAKX;cAAG;;YACnDyC,MAAM;YACNC,aAAa;UACf;QACF;OACD;IACL,CAAA;GACD;AAED,SAAO1D,WAAWqF,YAAYC,gBAAgBC,iBAAiBhE,UAAAA;AACjE,CAAA,CAAA;",
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,22 +0,0 @@
1
- import {
2
- youtube_default
3
- } from "./chunk-MUE22YUM.mjs";
4
- import "./chunk-Z3DGTMKC.mjs";
5
- import "./chunk-C26XKDK2.mjs";
6
- import "./chunk-P67QEKBQ.mjs";
7
- import "./chunk-GFRR4TTX.mjs";
8
- import "./chunk-YMDT37TA.mjs";
9
- import "./chunk-J5LGTIGS.mjs";
10
-
11
- // src/capabilities/blueprint-definition/blueprint-definition.ts
12
- import * as Effect from "effect/Effect";
13
- import { Capability } from "@dxos/app-framework";
14
- import { AppCapabilities } from "@dxos/app-toolkit";
15
- var blueprintDefinition = Capability.makeModule(() => Effect.succeed([
16
- Capability.contributes(AppCapabilities.BlueprintDefinition, youtube_default)
17
- ]));
18
- var blueprint_definition_default = blueprintDefinition;
19
- export {
20
- blueprint_definition_default as default
21
- };
22
- //# sourceMappingURL=blueprint-definition-FRYUYJ22.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,21 +0,0 @@
1
- // src/meta.ts
2
- import { trim } from "@dxos/util";
3
- var meta = {
4
- id: "org.dxos.plugin.youtube",
5
- name: "YouTube",
6
- description: trim`
7
- YouTube channel subscription and video feed management.
8
- Sync videos from channels and access transcripts for analysis.
9
- `,
10
- icon: "ph--youtube-logo--regular",
11
- iconHue: "red",
12
- source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-youtube",
13
- tags: [
14
- "labs"
15
- ]
16
- };
17
-
18
- export {
19
- meta
20
- };
21
- //# sourceMappingURL=chunk-DFRSBBSO.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,72 +0,0 @@
1
- import {
2
- __export
3
- } from "./chunk-J5LGTIGS.mjs";
4
-
5
- // src/types/types.ts
6
- var YouTubeOperation = {};
7
-
8
- // src/types/Channel.ts
9
- var Channel_exports = {};
10
- __export(Channel_exports, {
11
- CreateYouTubeChannelSchema: () => CreateYouTubeChannelSchema,
12
- YouTubeChannel: () => YouTubeChannel,
13
- instanceOf: () => instanceOf,
14
- make: () => make
15
- });
16
- import * as Schema from "effect/Schema";
17
- import { Annotation, Feed, Obj, Ref, Type } from "@dxos/echo";
18
- import { FormInputAnnotation } from "@dxos/echo/internal";
19
- import { FeedAnnotation } from "@dxos/schema";
20
- import { AccessToken } from "@dxos/types";
21
- var YouTubeChannel = Schema.Struct({
22
- /** Display name for the channel. */
23
- name: Schema.String.pipe(Schema.optional),
24
- /** YouTube channel ID (e.g., UC...). */
25
- channelId: Schema.String.pipe(Schema.optional),
26
- /** YouTube channel URL or handle. */
27
- channelUrl: Schema.String.pipe(Schema.optional),
28
- /** Feed containing YouTubeVideo objects. */
29
- feed: Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)),
30
- /** Last sync timestamp. */
31
- lastSyncedAt: Schema.String.pipe(FormInputAnnotation.set(false), Schema.optional),
32
- /** Google API credentials for fetching channel data. */
33
- accessToken: Schema.optional(Ref.Ref(AccessToken.AccessToken).annotations({
34
- title: "Account",
35
- description: "Google account credentials for syncing this YouTube channel."
36
- }))
37
- }).pipe(Type.object({
38
- typename: "org.dxos.type.youtube-channel",
39
- version: "0.1.0"
40
- }), Annotation.IconAnnotation.set({
41
- icon: "ph--youtube-logo--regular",
42
- hue: "red"
43
- }), FeedAnnotation.set(true));
44
- var instanceOf = (value) => Obj.instanceOf(YouTubeChannel, value);
45
- var CreateYouTubeChannelSchema = Schema.Struct({
46
- name: Schema.optional(Schema.String.annotations({
47
- title: "Name"
48
- })),
49
- channelUrl: Schema.optional(Schema.String.annotations({
50
- title: "Channel URL",
51
- description: "YouTube channel URL, handle (e.g., @channelname), or channel ID."
52
- })),
53
- accessToken: Schema.optional(Ref.Ref(AccessToken.AccessToken).annotations({
54
- title: "Account",
55
- description: "Google account credentials for syncing this YouTube channel."
56
- }))
57
- });
58
- var make = (props = {}) => {
59
- const feed = Feed.make();
60
- const channel = Obj.make(YouTubeChannel, {
61
- feed: Ref.make(feed),
62
- ...props
63
- });
64
- Obj.setParent(feed, channel);
65
- return channel;
66
- };
67
-
68
- export {
69
- YouTubeOperation,
70
- Channel_exports
71
- };
72
- //# sourceMappingURL=chunk-GFRR4TTX.mjs.map