@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 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/YouTubePlugin.tsx", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/blueprint-definition/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { ActivationEvent, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { Annotation } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { AttentionEvents } from '@dxos/plugin-attention';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\n\nimport { YouTubeBlueprint } from './blueprints';\nimport { AppGraphBuilder, BlueprintDefinition, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { Channel, Video } from './types';\n\nexport const YouTubePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({\n activatesOn: ActivationEvent.allOf(AppActivationEvents.SetupAppGraph, AttentionEvents.AttentionReady),\n activate: AppGraphBuilder,\n }),\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addMetadataModule({\n metadata: [\n {\n id: Channel.YouTubeChannel.typename,\n metadata: {\n label: (object: Channel.YouTubeChannel) => object.name ?? object.channelUrl ?? object.channelId ?? 'YouTube',\n icon: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).hue ?? 'white',\n blueprints: [YouTubeBlueprint.key],\n inputSchema: Channel.CreateYouTubeChannelSchema,\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = Channel.make(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n })) satisfies CreateObject,\n },\n },\n {\n id: Video.YouTubeVideo.typename,\n metadata: {\n label: (object: Video.YouTubeVideo) => object.title,\n icon: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).hue ?? 'white',\n },\n },\n ],\n }),\n AppPlugin.addSchemaModule({\n schema: [Channel.YouTubeChannel, Video.YouTubeVideo],\n }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\nimport { Channel, Video } from './types';\n\nexport const translations = [\n {\n 'en-US': {\n [Channel.YouTubeChannel.typename]: {\n 'typename label': 'YouTube Channel',\n 'typename label_zero': 'YouTube Channels',\n 'typename label_one': 'YouTube Channel',\n 'typename label_other': 'YouTube Channels',\n 'object name placeholder': 'New YouTube channel',\n 'add object label': 'Add YouTube channel',\n 'rename object label': 'Rename YouTube channel',\n 'delete object label': 'Delete YouTube channel',\n 'object deleted label': 'YouTube channel deleted',\n },\n [Video.YouTubeVideo.typename]: {\n 'typename label': 'Video',\n 'typename label_zero': 'Videos',\n 'typename label_one': 'Video',\n 'typename label_other': 'Videos',\n 'object name placeholder': 'New video',\n 'add object label': 'Add video',\n 'rename object label': 'Rename video',\n 'delete object label': 'Delete video',\n 'object deleted label': 'Video deleted',\n },\n [meta.id]: {\n 'plugin name': 'YouTube',\n 'channel label': 'YouTube Channel',\n 'video label': 'Video',\n 'sync channel label': 'Sync channel',\n 'sync channel error title': 'Failed to sync channel',\n 'clear synced videos label': 'Clear synced videos',\n 'clear synced videos error title': 'Failed to clear synced videos',\n 'close label': 'Close',\n 'new channel label': 'New YouTube Channel',\n 'empty channel message': 'No videos synced yet',\n 'no video message': 'Select a video to view it',\n\n 'channel account label': 'Account',\n 'channel account placeholder': 'Select account...',\n 'channel sync label': 'Channel Sync',\n\n 'enable background sync label': 'Enable background sync',\n 'enabling background sync label': 'Enabling...',\n 'disable background sync label': 'Disable background sync',\n 'view trigger label': 'View trigger',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,iBAAiBC,cAAc;AACxC,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,uBAAuB;AAEhC,SAASC,sBAAsB;;;ACT/B,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,sBAAsBC,YAAWC,KAAK,uBAAuB,MAAM,OAAO,qCAAA,CAAA;;;ACFvF,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACGlE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,gBAAQC,eAAeC,QAAQ,GAAG;QACjC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BA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H,KAAAA;AAC5B,iBAAO,OAAOI,UAAUC,OAAOC,eAAeC,WAAW;YACvDxB;YACAyB,QAAQP,QAAQO;YAChBC,QAAQ;YACRC,cAAcT,QAAQS;UACxB,CAAA;QACF,CAAA;MACJ;IACF;IACA;MACEhC,IAAIiC,cAAMC,aAAa/B;MACvBJ,UAAU;QACRK,OAAO,CAACC,WAA+BA,OAAO8B;QAC9C1B,MAAMC,WAAWC,eAAeC,IAAIqB,cAAMC,YAAY,EAAElD,KAAY6B,iBAAU,EAAEJ;QAChFK,SAASJ,WAAWC,eAAeC,IAAIqB,cAAMC,YAAY,EAAElD,KAAY6B,iBAAU,EAAEE,OAAO;MAC5F;IACF;;AAEJ,CAAA,GACA9B,UAAUmD,gBAAgB;EACxBC,QAAQ;IAACpC,gBAAQC;IAAgB+B,cAAMC;;AACzC,CAAA,GACAjD,UAAUqD,iBAAiB;EAAE5C,UAAU6C;AAAa,CAAA,GACpDtD,UAAUuD,sBAAsB;EAAEC;AAAa,CAAA,GAC/C5D,OAAO4C,IAAI;",
6
- "names": ["Effect", "Option", "ActivationEvent", "Plugin", "AppActivationEvents", "AppPlugin", "Annotation", "Operation", "AttentionEvents", "SpaceOperation", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "BlueprintDefinition", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "Channel", "YouTubeChannel", "typename", "Video", "YouTubeVideo", "meta", "id", "YouTubePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activatesOn", "ActivationEvent", "allOf", "AppActivationEvents", "SetupAppGraph", "AttentionEvents", "AttentionReady", "activate", "AppGraphBuilder", "addBlueprintDefinitionModule", "BlueprintDefinition", "addMetadataModule", "metadata", "id", "Channel", "YouTubeChannel", "typename", "label", "object", "name", "channelUrl", "channelId", "icon", "Annotation", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "blueprints", "YouTubeBlueprint", "key", "inputSchema", "CreateYouTubeChannelSchema", "createObject", "props", "options", "gen", "make", "Operation", "invoke", "SpaceOperation", "AddObject", "target", "hidden", "targetNodeId", "Video", "YouTubeVideo", "title", "addSchemaModule", "schema", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations"]
3
+ "sources": ["../../../src/meta.ts", "../../../src/operations/index.ts", "../../../src/YouTubePlugin.tsx", "../../../src/translations.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", "//\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", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { ActivationEvent, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { Annotation } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { AttentionEvents } from '@dxos/plugin-attention/types';\nimport { ClientEvents } from '@dxos/plugin-client/types';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\n\nimport { YouTubeBlueprint } from '#blueprints';\nimport { meta } from '#meta';\nimport { translations } from './translations';\nimport { Channel, Video } from '#types';\n\nimport { AppGraphBuilder, BlueprintDefinition, Migrations, ReactSurface } from '#capabilities';\n\nexport const YouTubePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({\n activatesOn: ActivationEvent.allOf(AppActivationEvents.SetupAppGraph, AttentionEvents.AttentionReady),\n activate: AppGraphBuilder,\n }),\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addMetadataModule({\n metadata: [\n {\n id: Channel.YouTubeChannel.typename,\n metadata: {\n label: (object: Channel.YouTubeChannel) => object.name ?? object.channelUrl ?? object.channelId ?? 'YouTube',\n icon: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Channel.YouTubeChannel).pipe(Option.getOrThrow).hue ?? 'white',\n blueprints: [YouTubeBlueprint.key],\n inputSchema: Channel.CreateYouTubeChannelSchema,\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = Channel.make(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n })) satisfies CreateObject,\n },\n },\n {\n id: Video.YouTubeVideo.typename,\n metadata: {\n label: (object: Video.YouTubeVideo) => object.title,\n icon: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Video.YouTubeVideo).pipe(Option.getOrThrow).hue ?? 'white',\n },\n },\n ],\n }),\n AppPlugin.addSchemaModule({\n schema: [Channel.YouTubeChannel, Video.YouTubeVideo],\n }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: ClientEvents.SetupMigration,\n activate: Migrations,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\nimport { Channel, Video } from '#types';\n\nexport const translations = [\n {\n 'en-US': {\n [Channel.YouTubeChannel.typename]: {\n 'typename.label': 'YouTube Channel',\n 'typename.label_zero': 'YouTube Channels',\n 'typename.label_one': 'YouTube Channel',\n 'typename.label_other': 'YouTube Channels',\n 'object-name.placeholder': 'New YouTube channel',\n 'add-object.label': 'Add YouTube channel',\n 'rename-object.label': 'Rename YouTube channel',\n 'delete-object.label': 'Delete YouTube channel',\n 'object-deleted.label': 'YouTube channel deleted',\n },\n [Video.YouTubeVideo.typename]: {\n 'typename.label': 'Video',\n 'typename.label_zero': 'Videos',\n 'typename.label_one': 'Video',\n 'typename.label_other': 'Videos',\n 'object-name.placeholder': 'New video',\n 'add-object.label': 'Add video',\n 'rename-object.label': 'Rename video',\n 'delete-object.label': 'Delete video',\n 'object-deleted.label': 'Video deleted',\n },\n [meta.id]: {\n 'plugin.name': 'YouTube',\n 'channel.label': 'YouTube Channel',\n 'video.label': 'Video',\n 'sync-channel.label': 'Sync channel',\n 'sync-channel-error.title': 'Failed to sync channel',\n 'clear-synced-videos.label': 'Clear synced videos',\n 'clear-synced-videos-error.title': 'Failed to clear synced videos',\n 'close.label': 'Close',\n 'new-channel.label': 'New YouTube Channel',\n 'empty-channel.message': 'No videos synced yet',\n 'no-video.message': 'Select a video to view it',\n\n 'channel-account.label': 'Account',\n 'channel-account.placeholder': 'Select account...',\n 'channel-sync.label': 'Channel Sync',\n\n 'enable-background-sync.label': 'Enable background sync',\n 'enabling-background-sync.label': 'Enabling...',\n 'disable-background-sync.label': 'Disable background sync',\n 'view-trigger.label': 'View trigger',\n },\n },\n },\n] as const satisfies Resource[];\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;;;ACdA,SAASC,2BAA2B;AAK7B,IAAMC,kBAAkBC,oBAAoBC,KACjD,MAAM,OAAO,oCAAA,GACb,MAAM,OAAO,qBAAA,CAAA;;;ACPf,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC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", "icon", "iconHue", "source", "tags", "OperationHandlerSet", "YouTubeHandlers", "OperationHandlerSet", "lazy", "Effect", "Option", "ActivationEvent", "Plugin", "AppActivationEvents", "AppPlugin", "Annotation", "Operation", "AttentionEvents", "ClientEvents", "SpaceOperation", "YouTubeBlueprint", "meta", "meta", "Channel", "Video", "translations", "Channel", "YouTubeChannel", "typename", "Video", "YouTubeVideo", "meta", "id", "Channel", "Video", "AppGraphBuilder", "BlueprintDefinition", "Migrations", "ReactSurface", "YouTubePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activatesOn", "ActivationEvent", "allOf", "AppActivationEvents", "SetupAppGraph", "AttentionEvents", "AttentionReady", "activate", "AppGraphBuilder", "addBlueprintDefinitionModule", "BlueprintDefinition", "addMetadataModule", "metadata", "id", "Channel", "YouTubeChannel", "typename", "label", "object", "name", "channelUrl", "channelId", "icon", "Annotation", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "blueprints", "YouTubeBlueprint", "key", "inputSchema", "CreateYouTubeChannelSchema", "createObject", "props", "options", "gen", "make", "Operation", "invoke", "SpaceOperation", "AddObject", "target", "hidden", "targetNodeId", "Video", "YouTubeVideo", "title", "addSchemaModule", "schema", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "ClientEvents", "SetupMigration", "Migrations"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":1822,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/operations/services/google-credentials.ts":{"bytes":8745,"imports":[{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/types.ts":{"bytes":23707,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/api.ts":{"bytes":17186,"imports":[{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"../../services/google-credentials"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/youtube/index.ts":{"bytes":562,"imports":[{"path":"src/operations/apis/youtube/api.ts","kind":"import-statement","original":"./api"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/index.ts":{"bytes":540,"imports":[{"path":"src/operations/apis/youtube/index.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"},"src/types/types.ts":{"bytes":814,"imports":[],"format":"esm"},"src/types/Channel.ts":{"bytes":8955,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Video.ts":{"bytes":7281,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":749,"imports":[{"path":"src/types/types.ts","kind":"import-statement","original":"./types"},{"path":"src/types/Channel.ts","kind":"import-statement","original":"./Channel"},{"path":"src/types/Video.ts","kind":"import-statement","original":"./Video"}],"format":"esm"},"src/operations/definitions.ts":{"bytes":7475,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/operations/clear-synced-videos.ts":{"bytes":6185,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/transcript.ts":{"bytes":5127,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"format":"esm"},"src/operations/sync.ts":{"bytes":38146,"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"./services/google-credentials"},{"path":"src/operations/transcript.ts","kind":"import-statement","original":"./transcript"}],"format":"esm"},"src/operations/index.ts":{"bytes":1261,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/clear-synced-videos.ts","kind":"dynamic-import","original":"./clear-synced-videos"},{"path":"src/operations/sync.ts","kind":"dynamic-import","original":"./sync"}],"format":"esm"},"src/blueprints/youtube.ts":{"bytes":5249,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/operations/index.ts","kind":"import-statement","original":"../operations"}],"format":"esm"},"src/blueprints/index.ts":{"bytes":648,"imports":[{"path":"src/blueprints/youtube.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"},"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytes":23196,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-atom","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-automation","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"src/operations/index.ts","kind":"import-statement","original":"../../operations"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/app-graph-builder/index.ts":{"bytes":953,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"}],"format":"esm"},"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytes":1998,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"../../blueprints"}],"format":"esm"},"src/capabilities/blueprint-definition/index.ts":{"bytes":987,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/blueprint-definition/blueprint-definition.ts","kind":"dynamic-import","original":"./blueprint-definition"}],"format":"esm"},"src/containers/ChannelArticle/ChannelArticle.tsx":{"bytes":14202,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/types/Video.ts","kind":"import-statement","original":"../../types/Video"}],"format":"esm"},"src/containers/ChannelArticle/index.ts":{"bytes":686,"imports":[{"path":"src/containers/ChannelArticle/ChannelArticle.tsx","kind":"import-statement","original":"./ChannelArticle"}],"format":"esm"},"src/containers/ChannelSettings/ChannelSettings.tsx":{"bytes":4207,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/containers/ChannelSettings/index.ts":{"bytes":698,"imports":[{"path":"src/containers/ChannelSettings/ChannelSettings.tsx","kind":"import-statement","original":"./ChannelSettings"}],"format":"esm"},"src/containers/VideoArticle/VideoArticle.tsx":{"bytes":12805,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/containers/VideoArticle/index.ts":{"bytes":666,"imports":[{"path":"src/containers/VideoArticle/VideoArticle.tsx","kind":"import-statement","original":"./VideoArticle"}],"format":"esm"},"src/containers/VideoCard/VideoCard.tsx":{"bytes":10588,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/containers/VideoCard/index.ts":{"bytes":634,"imports":[{"path":"src/containers/VideoCard/VideoCard.tsx","kind":"import-statement","original":"./VideoCard"}],"format":"esm"},"src/containers/index.ts":{"bytes":2391,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/ChannelArticle/index.ts","kind":"dynamic-import","original":"./ChannelArticle"},{"path":"src/containers/ChannelSettings/index.ts","kind":"dynamic-import","original":"./ChannelSettings"},{"path":"src/containers/VideoArticle/index.ts","kind":"dynamic-import","original":"./VideoArticle"},{"path":"src/containers/VideoCard/index.ts","kind":"dynamic-import","original":"./VideoCard"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":7794,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"src/containers/index.ts","kind":"import-statement","original":"../../containers"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":919,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":725,"imports":[{"path":"src/capabilities/app-graph-builder/index.ts","kind":"import-statement","original":"./app-graph-builder"},{"path":"src/capabilities/blueprint-definition/index.ts","kind":"import-statement","original":"./blueprint-definition"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":6863,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/YouTubePlugin.tsx":{"bytes":10192,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"./blueprints"},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/index.ts":{"bytes":657,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/operations/index.ts","kind":"import-statement","original":"./operations"},{"path":"src/YouTubePlugin.tsx","kind":"import-statement","original":"./YouTubePlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2397},"dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ChannelSettings/index.ts","inputs":{"src/containers/ChannelSettings/ChannelSettings.tsx":{"bytesInOutput":1382},"src/containers/ChannelSettings/index.ts":{"bytesInOutput":47}},"bytes":1662},"dist/lib/browser/VideoArticle-FC4A6E7B.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6962},"dist/lib/browser/VideoArticle-FC4A6E7B.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/VideoArticle/index.ts","inputs":{"src/containers/VideoArticle/VideoArticle.tsx":{"bytesInOutput":4050},"src/containers/VideoArticle/index.ts":{"bytesInOutput":41}},"bytes":4309},"dist/lib/browser/VideoCard-CCPXDCB7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5661},"dist/lib/browser/VideoCard-CCPXDCB7.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/VideoCard/index.ts","inputs":{"src/containers/VideoCard/VideoCard.tsx":{"bytesInOutput":3323},"src/containers/VideoCard/index.ts":{"bytesInOutput":35}},"bytes":3561},"dist/lib/browser/react-surface-EDA5VYDC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5118},"dist/lib/browser/react-surface-EDA5VYDC.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DFRSBBSO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/ChannelArticle-CDQR4BBY.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/VideoArticle-FC4A6E7B.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/VideoCard-CCPXDCB7.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":1709},"src/containers/index.ts":{"bytesInOutput":314}},"bytes":2448},"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9377},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DFRSBBSO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-MUE22YUM.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-Z3DGTMKC.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-C26XKDK2.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-P67QEKBQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/app-graph-builder-MJY6A6SN.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/blueprint-definition-FRYUYJ22.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-EDA5VYDC.mjs","kind":"dynamic-import"}],"exports":["ClearSyncedVideos","Sync","YouTube","YouTubeHandlers","YouTubePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/YouTubePlugin.tsx":{"bytesInOutput":2226},"src/capabilities/app-graph-builder/index.ts":{"bytesInOutput":158},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/blueprint-definition/index.ts":{"bytesInOutput":185},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/translations.ts":{"bytesInOutput":2000}},"bytes":5535},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MUE22YUM.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-Z3DGTMKC.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-C26XKDK2.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-P67QEKBQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["YouTubeBlueprint"],"entryPoint":"src/blueprints/index.ts","inputs":{},"bytes":336},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Channel","Video","YouTubeOperation"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":290},"dist/lib/browser/clear-synced-videos-EVMJIZPD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3107},"dist/lib/browser/clear-synced-videos-EVMJIZPD.mjs":{"imports":[{"path":"dist/lib/browser/chunk-P67QEKBQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/clear-synced-videos.ts","inputs":{"src/operations/clear-synced-videos.ts":{"bytesInOutput":1565}},"bytes":1896},"dist/lib/browser/sync-423Q4BDD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21313},"dist/lib/browser/sync-423Q4BDD.mjs":{"imports":[{"path":"dist/lib/browser/chunk-C26XKDK2.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-P67QEKBQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"exports":["default"],"entryPoint":"src/operations/sync.ts","inputs":{"src/operations/sync.ts":{"bytesInOutput":9926},"src/operations/transcript.ts":{"bytesInOutput":1130}},"bytes":11468},"dist/lib/browser/app-graph-builder-MJY6A6SN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10620},"dist/lib/browser/app-graph-builder-MJY6A6SN.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DFRSBBSO.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-Z3DGTMKC.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-C26XKDK2.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-P67QEKBQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-atom","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-automation","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytesInOutput":6262}},"bytes":6726},"dist/lib/browser/chunk-DFRSBBSO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":872},"dist/lib/browser/chunk-DFRSBBSO.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":420}},"bytes":499},"dist/lib/browser/blueprint-definition-FRYUYJ22.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1045},"dist/lib/browser/blueprint-definition-FRYUYJ22.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MUE22YUM.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-Z3DGTMKC.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-C26XKDK2.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-P67QEKBQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/blueprint-definition/blueprint-definition.ts","inputs":{"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytesInOutput":355}},"bytes":778},"dist/lib/browser/chunk-MUE22YUM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2485},"dist/lib/browser/chunk-MUE22YUM.mjs":{"imports":[{"path":"dist/lib/browser/chunk-P67QEKBQ.mjs","kind":"import-statement"},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["youtube_default"],"inputs":{"src/blueprints/youtube.ts":{"bytesInOutput":1568},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":1741},"dist/lib/browser/chunk-Z3DGTMKC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":591},"dist/lib/browser/chunk-Z3DGTMKC.mjs":{"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"dist/lib/browser/clear-synced-videos-EVMJIZPD.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/sync-423Q4BDD.mjs","kind":"dynamic-import"}],"exports":["YouTubeHandlers"],"inputs":{"src/operations/index.ts":{"bytesInOutput":192}},"bytes":294},"dist/lib/browser/chunk-C26XKDK2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24537},"dist/lib/browser/chunk-C26XKDK2.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["GoogleCredentials","youtube_exports"],"inputs":{"src/operations/services/google-credentials.ts":{"bytesInOutput":2085},"src/operations/apis/youtube/index.ts":{"bytesInOutput":911},"src/operations/apis/youtube/api.ts":{"bytesInOutput":3652},"src/operations/apis/youtube/types.ts":{"bytesInOutput":5083},"src/operations/apis/index.ts":{"bytesInOutput":0}},"bytes":12088},"dist/lib/browser/chunk-P67QEKBQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3627},"dist/lib/browser/chunk-P67QEKBQ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GFRR4TTX.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true}],"exports":["ClearSyncedVideos","Sync"],"inputs":{"src/operations/definitions.ts":{"bytesInOutput":1995}},"bytes":2228},"dist/lib/browser/chunk-GFRR4TTX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4897},"dist/lib/browser/chunk-GFRR4TTX.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"exports":["Channel_exports","YouTubeOperation"],"inputs":{"src/types/types.ts":{"bytesInOutput":27},"src/types/index.ts":{"bytesInOutput":0},"src/types/Channel.ts":{"bytesInOutput":2204}},"bytes":2425},"dist/lib/browser/ChannelArticle-CDQR4BBY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7695},"dist/lib/browser/ChannelArticle-CDQR4BBY.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YMDT37TA.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ChannelArticle/index.ts","inputs":{"src/containers/ChannelArticle/ChannelArticle.tsx":{"bytesInOutput":4038},"src/containers/ChannelArticle/index.ts":{"bytesInOutput":45}},"bytes":4366},"dist/lib/browser/chunk-YMDT37TA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3451},"dist/lib/browser/chunk-YMDT37TA.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["Video_exports","YouTubeVideo"],"inputs":{"src/types/Video.ts":{"bytesInOutput":1792}},"bytes":1955},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1814,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/operations/services/google-credentials.ts":{"bytes":8737,"imports":[{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/types.ts":{"bytes":23699,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/operations/apis/youtube/api.ts":{"bytes":17178,"imports":[{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"../../services/google-credentials"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/youtube/index.ts":{"bytes":554,"imports":[{"path":"src/operations/apis/youtube/api.ts","kind":"import-statement","original":"./api"},{"path":"src/operations/apis/youtube/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/apis/index.ts":{"bytes":532,"imports":[{"path":"src/operations/apis/youtube/index.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"},"src/types/types.ts":{"bytes":806,"imports":[],"format":"esm"},"src/types/Channel.ts":{"bytes":10872,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Video.ts":{"bytes":10281,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":741,"imports":[{"path":"src/types/types.ts","kind":"import-statement","original":"./types"},{"path":"src/types/Channel.ts","kind":"import-statement","original":"./Channel"},{"path":"src/types/Video.ts","kind":"import-statement","original":"./Video"}],"format":"esm"},"src/operations/definitions.ts":{"bytes":7467,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/operations/clear-synced-videos.ts":{"bytes":6177,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/transcript.ts":{"bytes":5119,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"format":"esm"},"src/operations/sync.ts":{"bytes":38138,"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/services/google-credentials.ts","kind":"import-statement","original":"./services/google-credentials"},{"path":"src/operations/transcript.ts","kind":"import-statement","original":"./transcript"}],"format":"esm"},"src/operations/index.ts":{"bytes":1253,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/apis/index.ts","kind":"import-statement","original":"./apis"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/clear-synced-videos.ts","kind":"dynamic-import","original":"./clear-synced-videos"},{"path":"src/operations/sync.ts","kind":"dynamic-import","original":"./sync"}],"format":"esm"},"src/translations.ts":{"bytes":6853,"imports":[{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/YouTubePlugin.tsx":{"bytes":10818,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"#blueprints","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"#types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":649,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/operations/index.ts","kind":"import-statement","original":"./operations"},{"path":"src/YouTubePlugin.tsx","kind":"import-statement","original":"./YouTubePlugin"}],"format":"esm"},"src/blueprints/youtube.ts":{"bytes":5235,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"format":"esm"},"src/blueprints/index.ts":{"bytes":640,"imports":[{"path":"src/blueprints/youtube.ts","kind":"import-statement","original":"./youtube"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10111},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-5N5SWF3I.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-SWWE4LUJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"dist/lib/browser/clear-synced-videos-PIKJZET3.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/sync-II7O2LPG.mjs","kind":"dynamic-import"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"#blueprints","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true}],"exports":["ClearSyncedVideos","Sync","YouTube","YouTubeHandlers","YouTubePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":420},"src/index.ts":{"bytesInOutput":0},"src/operations/index.ts":{"bytesInOutput":192},"src/YouTubePlugin.tsx":{"bytesInOutput":2558},"src/translations.ts":{"bytesInOutput":2065}},"bytes":5692},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2537},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"exports":["YouTubeBlueprint"],"entryPoint":"src/blueprints/index.ts","inputs":{"src/blueprints/youtube.ts":{"bytesInOutput":1623},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":1770},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Channel","Video","YouTubeOperation"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":250},"dist/lib/browser/clear-synced-videos-PIKJZET3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3106},"dist/lib/browser/clear-synced-videos-PIKJZET3.mjs":{"imports":[{"path":"dist/lib/browser/chunk-SWWE4LUJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/clear-synced-videos.ts","inputs":{"src/operations/clear-synced-videos.ts":{"bytesInOutput":1557}},"bytes":1857},"dist/lib/browser/sync-II7O2LPG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21312},"dist/lib/browser/sync-II7O2LPG.mjs":{"imports":[{"path":"dist/lib/browser/chunk-5N5SWF3I.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-SWWE4LUJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"youtube-caption-extractor","kind":"dynamic-import","external":true}],"exports":["default"],"entryPoint":"src/operations/sync.ts","inputs":{"src/operations/sync.ts":{"bytesInOutput":9918},"src/operations/transcript.ts":{"bytesInOutput":1122}},"bytes":11421},"dist/lib/browser/chunk-5N5SWF3I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24537},"dist/lib/browser/chunk-5N5SWF3I.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClientRequest","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["GoogleCredentials","youtube_exports"],"inputs":{"src/operations/services/google-credentials.ts":{"bytesInOutput":2077},"src/operations/apis/youtube/index.ts":{"bytesInOutput":911},"src/operations/apis/youtube/api.ts":{"bytesInOutput":3644},"src/operations/apis/youtube/types.ts":{"bytesInOutput":5083},"src/operations/apis/index.ts":{"bytesInOutput":0}},"bytes":12072},"dist/lib/browser/chunk-SWWE4LUJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3625},"dist/lib/browser/chunk-SWWE4LUJ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GTIWG45H.mjs","kind":"import-statement"},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true}],"exports":["ClearSyncedVideos","Sync"],"inputs":{"src/operations/definitions.ts":{"bytesInOutput":1995}},"bytes":2189},"dist/lib/browser/chunk-GTIWG45H.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10631},"dist/lib/browser/chunk-GTIWG45H.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["Channel_exports","Video_exports","YouTubeOperation"],"inputs":{"src/types/types.ts":{"bytesInOutput":27},"src/types/index.ts":{"bytesInOutput":0},"src/types/Channel.ts":{"bytesInOutput":2681},"src/types/Video.ts":{"bytesInOutput":2653}},"bytes":5595},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
@@ -1,14 +1,13 @@
1
1
  import {
2
2
  GoogleCredentials,
3
3
  youtube_exports
4
- } from "./chunk-C26XKDK2.mjs";
4
+ } from "./chunk-5N5SWF3I.mjs";
5
5
  import {
6
6
  Sync
7
- } from "./chunk-P67QEKBQ.mjs";
8
- import "./chunk-GFRR4TTX.mjs";
7
+ } from "./chunk-SWWE4LUJ.mjs";
9
8
  import {
10
9
  Video_exports
11
- } from "./chunk-YMDT37TA.mjs";
10
+ } from "./chunk-GTIWG45H.mjs";
12
11
  import "./chunk-J5LGTIGS.mjs";
13
12
 
14
13
  // src/operations/sync.ts
@@ -27,7 +26,7 @@ import { Operation } from "@dxos/operation";
27
26
  // src/operations/transcript.ts
28
27
  import * as Effect from "effect/Effect";
29
28
  import { log } from "@dxos/log";
30
- var __dxlog_file = "/Users/mykola/dev/dxos/packages/plugins/plugin-youtube/src/operations/transcript.ts";
29
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-youtube/src/operations/transcript.ts";
31
30
  var fetchTranscript = (videoId, lang) => Effect.tryPromise({
32
31
  try: async () => {
33
32
  const { getSubtitles } = await import("youtube-caption-extractor");
@@ -64,7 +63,7 @@ var fetchTranscript = (videoId, lang) => Effect.tryPromise({
64
63
  }).pipe(Effect.catchAll(() => Effect.succeed(void 0)), Effect.timeout("30 seconds"), Effect.catchAll(() => Effect.succeed(void 0)));
65
64
 
66
65
  // src/operations/sync.ts
67
- var __dxlog_file2 = "/Users/mykola/dev/dxos/packages/plugins/plugin-youtube/src/operations/sync.ts";
66
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-youtube/src/operations/sync.ts";
68
67
  var handler = Sync.pipe(Operation.withHandler(({ channel: channelRef, restrictedMode = false, includeTranscripts = true }) => Effect2.gen(function* () {
69
68
  log2("syncing youtube channel", {
70
69
  channel: channelRef.dxn.toString(),
@@ -357,4 +356,4 @@ var sync_default = handler;
357
356
  export {
358
357
  sync_default as default
359
358
  };
360
- //# sourceMappingURL=sync-423Q4BDD.mjs.map
359
+ //# sourceMappingURL=sync-II7O2LPG.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/sync.ts", "../../../src/operations/transcript.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as Chunk from 'effect/Chunk';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Layer from 'effect/Layer';\nimport * as Option from 'effect/Option';\nimport * as Predicate from 'effect/Predicate';\nimport * as Stream from 'effect/Stream';\n\nimport { Database, Feed, Filter, Obj, Ref } from '@dxos/echo';\nimport { log } from '@dxos/log';\nimport { Operation } from '@dxos/operation';\n\nimport { Channel, Video } from '../types';\n\nimport { YouTube } from './apis';\nimport { Sync } from './definitions';\nimport { GoogleCredentials } from './services/google-credentials';\nimport { fetchTranscript } from './transcript';\n\nconst handler: Operation.WithHandler<typeof Sync> = Sync.pipe(\n Operation.withHandler(({ channel: channelRef, restrictedMode = false, includeTranscripts = true }) =>\n Effect.gen(function* () {\n log('syncing youtube channel', { channel: channelRef.dxn.toString(), restrictedMode, includeTranscripts });\n const channel = yield* Database.load(channelRef);\n\n const channelUrl =\n (channel as Channel.YouTubeChannel).channelUrl ?? (channel as Channel.YouTubeChannel).channelId;\n if (!channelUrl) {\n return yield* Effect.fail(new Error('No channel URL or ID configured'));\n }\n\n const channelInfo = extractChannelInfo(channelUrl);\n log('extracted channel info', channelInfo);\n\n const { channelId, channelTitle, uploadsPlaylistId } = yield* getUploadsPlaylistId(channelInfo);\n log('found channel', { channelId, channelTitle, uploadsPlaylistId });\n\n Obj.change(channel as Channel.YouTubeChannel, (channelObj) => {\n channelObj.channelId = channelId;\n if (!channelObj.name) {\n channelObj.name = channelTitle;\n }\n });\n\n // Get the feed and query for existing videos.\n const feed = yield* Database.load((channel as Channel.YouTubeChannel).feed as Ref.Ref<Feed.Feed>);\n const existingVideos = yield* Feed.runQuery(feed, Filter.type(Video.YouTubeVideo));\n const existingVideoIds = new Set(existingVideos.map((video: Video.YouTubeVideo) => video.videoId));\n log('existing videos', { count: existingVideoIds.size });\n\n const newVideosCount = yield* streamVideosToFeed(\n uploadsPlaylistId,\n feed,\n existingVideoIds,\n restrictedMode,\n includeTranscripts,\n );\n\n Obj.change(channel as Channel.YouTubeChannel, (channelObj) => {\n channelObj.lastSyncedAt = new Date().toISOString();\n });\n\n log('sync complete', { newVideos: newVideosCount, channelTitle });\n return {\n newVideos: newVideosCount,\n channelTitle,\n };\n }).pipe(Effect.provide(Layer.mergeAll(FetchHttpClient.layer, GoogleCredentials.fromChannelRef(channelRef)))),\n ),\n);\n\nconst STREAMING_CONFIG = {\n /** Videos per page from YouTube API. */\n maxResults: 50,\n /** Parallel transcript fetches. */\n transcriptFetchConcurrency: 3,\n /** In-flight video buffer. */\n bufferSize: 10,\n /** Videos per feed append. */\n feedBatchSize: 10,\n /** Max videos in restricted mode. */\n restrictedMax: 20,\n} as const;\n\n/**\n * Extracts channel ID from various YouTube URL formats.\n */\nconst extractChannelInfo = (\n urlOrHandle: string,\n): { type: 'id'; value: string } | { type: 'handle'; value: string } | { type: 'url'; value: string } => {\n const trimmed = urlOrHandle.trim();\n\n if (trimmed.startsWith('@')) {\n return { type: 'handle', value: trimmed.slice(1) };\n }\n\n if (trimmed.startsWith('UC') && trimmed.length === 24) {\n return { type: 'id', value: trimmed };\n }\n\n try {\n const url = new URL(trimmed);\n const pathname = url.pathname;\n\n if (pathname.startsWith('/channel/')) {\n const channelId = pathname.split('/')[2];\n if (channelId) {\n return { type: 'id', value: channelId };\n }\n }\n\n if (pathname.startsWith('/@')) {\n return { type: 'handle', value: pathname.slice(2) };\n }\n\n if (pathname.startsWith('/c/') || pathname.startsWith('/user/')) {\n const name = pathname.split('/')[2];\n if (name) {\n return { type: 'handle', value: name };\n }\n }\n } catch {\n if (/^[a-zA-Z0-9_-]+$/.test(trimmed)) {\n return { type: 'handle', value: trimmed };\n }\n }\n\n return { type: 'url', value: trimmed };\n};\n\n/**\n * Gets the uploads playlist ID for a channel.\n */\nconst getUploadsPlaylistId = Effect.fn(function* (channelInfo: { type: string; value: string }) {\n let channelResponse;\n\n if (channelInfo.type === 'id') {\n channelResponse = yield* YouTube.getChannel(channelInfo.value);\n } else {\n channelResponse = yield* YouTube.getChannelByHandle(channelInfo.value);\n }\n\n const channel = channelResponse.items[0];\n if (!channel) {\n return yield* Effect.fail(new Error(`Channel not found: ${channelInfo.value}`));\n }\n\n const uploadsPlaylistId = channel.contentDetails?.relatedPlaylists?.uploads;\n if (!uploadsPlaylistId) {\n return yield* Effect.fail(new Error(`No uploads playlist found for channel: ${channelInfo.value}`));\n }\n\n return {\n channelId: channel.id,\n channelTitle: channel.snippet?.title ?? '',\n uploadsPlaylistId,\n };\n});\n\n/**\n * Fetches videos from an uploads playlist, returning them from newest to oldest.\n */\nconst fetchPlaylistVideos = (uploadsPlaylistId: string, maxVideos?: number) => {\n let videoCount = 0;\n\n return Stream.unfoldChunkEffect({ pageToken: Option.none<string>(), done: false }, (state) =>\n Effect.gen(function* () {\n if (state.done || (maxVideos && videoCount >= maxVideos)) {\n return Option.none();\n }\n\n const response = yield* YouTube.listPlaylistItems(\n uploadsPlaylistId,\n STREAMING_CONFIG.maxResults,\n Option.getOrUndefined(state.pageToken),\n );\n\n const videoIds = response.items\n .map((item) => item.snippet?.resourceId?.videoId)\n .filter((id): id is string => Boolean(id));\n\n log('fetched playlist items', {\n count: videoIds.length,\n pageToken: Option.getOrUndefined(state.pageToken),\n hasMore: Boolean(response.nextPageToken),\n });\n\n videoCount += videoIds.length;\n\n const nextState = {\n pageToken: Option.fromNullable(response.nextPageToken),\n done: !response.nextPageToken || (maxVideos !== undefined && videoCount >= maxVideos),\n };\n\n return Option.some([Chunk.fromIterable(videoIds), nextState]);\n }),\n );\n};\n\ntype TranscriptData = { segments: Video.TranscriptSegment[]; fullText: string };\n\n/**\n * Maps YouTube API video item to YouTubeVideo data.\n */\nconst mapVideoData = (\n item: YouTube.VideoItem,\n transcript: TranscriptData | undefined,\n includeTranscripts: boolean,\n): Omit<Video.YouTubeVideo, 'id' | '~@dxos/echo/Kind'> => {\n const hasTranscript = Boolean(transcript?.fullText?.trim());\n return {\n title: item.snippet?.title ?? 'Untitled',\n videoId: item.id,\n description: item.snippet?.description,\n url: `https://www.youtube.com/watch?v=${item.id}`,\n thumbnailUrl:\n item.snippet?.thumbnails?.high?.url ??\n item.snippet?.thumbnails?.medium?.url ??\n item.snippet?.thumbnails?.default?.url,\n channelTitle: item.snippet?.channelTitle,\n publishedAt: item.snippet?.publishedAt ?? new Date().toISOString(),\n duration: item.contentDetails?.duration,\n viewCount: item.statistics?.viewCount ? parseInt(item.statistics.viewCount, 10) : undefined,\n likeCount: item.statistics?.likeCount ? parseInt(item.statistics.likeCount, 10) : undefined,\n transcript: transcript && hasTranscript ? transcript.fullText : undefined,\n transcriptSegments: transcript && hasTranscript ? transcript.segments : undefined,\n transcriptFetched: includeTranscripts ? hasTranscript : false,\n };\n};\n\n/**\n * Stream videos with transcripts into a DXOS feed.\n */\nconst streamVideosToFeed = Effect.fn(function* (\n uploadsPlaylistId: string,\n feed: Feed.Feed,\n existingVideoIds: Set<string>,\n restricted: boolean,\n includeTranscripts: boolean,\n) {\n const count = yield* Function.pipe(\n fetchPlaylistVideos(uploadsPlaylistId, restricted ? STREAMING_CONFIG.restrictedMax : undefined),\n Stream.filter((videoId) => {\n const isDuplicate = existingVideoIds.has(videoId);\n if (isDuplicate) {\n log('skipping duplicate video', { videoId });\n }\n return !isDuplicate;\n }),\n restricted ? Stream.take(STREAMING_CONFIG.restrictedMax) : Function.identity,\n Stream.grouped(10),\n Stream.flatMap(\n (videoIdChunk) =>\n Effect.gen(function* () {\n const videoIds = Chunk.toArray(videoIdChunk);\n log('fetching video details', { count: videoIds.length });\n\n const response = yield* YouTube.getVideoDetails(videoIds);\n return response.items;\n }),\n { concurrency: 1 },\n ),\n Stream.flatMap((items) => Stream.fromIterable(items)),\n Stream.flatMap(\n (item) =>\n Effect.gen(function* () {\n let transcript: TranscriptData | undefined;\n\n if (includeTranscripts) {\n log('fetching transcript', { videoId: item.id });\n const result = yield* fetchTranscript(item.id);\n if (result) {\n transcript = result;\n log('transcript fetched', { videoId: item.id, length: transcript.fullText.length });\n } else {\n log('no transcript available', { videoId: item.id });\n }\n }\n\n return mapVideoData(item, transcript, includeTranscripts);\n }),\n {\n concurrency: STREAMING_CONFIG.transcriptFetchConcurrency,\n bufferSize: STREAMING_CONFIG.bufferSize,\n },\n ),\n Stream.filter(Predicate.isNotNullable),\n Stream.grouped(STREAMING_CONFIG.feedBatchSize),\n Stream.mapEffect((batch) =>\n Effect.gen(function* () {\n const videos = Chunk.toArray(batch);\n log('appending batch to feed', { count: videos.length });\n const videoObjects = videos.map((video) => Obj.make(Video.YouTubeVideo, video));\n yield* Feed.append(feed, videoObjects);\n return videos.length;\n }),\n ),\n Stream.runFold(0, (acc, batchCount) => acc + batchCount),\n );\n\n return count;\n});\n\nexport default handler;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { log } from '@dxos/log';\n\nimport type { TranscriptSegment } from '../types/Video';\n\nexport type TranscriptResult = {\n segments: TranscriptSegment[];\n fullText: string;\n};\n\n/**\n * Fetches captions for a YouTube video using youtube-caption-extractor.\n * Works in both browser and Node/edge environments.\n */\nexport const fetchTranscript = (videoId: string, lang?: string): Effect.Effect<TranscriptResult | undefined> =>\n Effect.tryPromise({\n try: async () => {\n const { getSubtitles } = await import('youtube-caption-extractor');\n const subtitles = await getSubtitles({ videoID: videoId, lang: lang ?? 'en' });\n\n if (!subtitles || subtitles.length === 0) {\n return undefined;\n }\n\n const segments: TranscriptSegment[] = subtitles.map((sub) => ({\n text: sub.text,\n offset: parseFloat(sub.start),\n duration: parseFloat(sub.dur),\n }));\n\n const fullText = segments.map((segment) => segment.text).join(' ');\n return { segments, fullText };\n },\n catch: (error) => {\n log('failed to fetch transcript', { videoId, error });\n return undefined;\n },\n }).pipe(\n Effect.catchAll(() => Effect.succeed(undefined)),\n Effect.timeout('30 seconds'),\n Effect.catchAll(() => Effect.succeed(undefined)),\n );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAIA,YAAYA,qBAAqB;AACjC,YAAYC,WAAW;AACvB,YAAYC,aAAY;AACxB,YAAYC,cAAc;AAC1B,YAAYC,WAAW;AACvB,YAAYC,YAAY;AACxB,YAAYC,eAAe;AAC3B,YAAYC,YAAY;AAExB,SAASC,UAAUC,MAAMC,QAAQC,WAAgB;AACjD,SAASC,OAAAA,YAAW;AACpB,SAASC,iBAAiB;;;ACX1B,YAAYC,YAAY;AAExB,SAASC,WAAW;;AAab,IAAMC,kBAAkB,CAACC,SAAiBC,SACxCC,kBAAW;EAChBC,KAAK,YAAA;AACH,UAAM,EAAEC,aAAY,IAAK,MAAM,OAAO,2BAAA;AACtC,UAAMC,YAAY,MAAMD,aAAa;MAAEE,SAASN;MAASC,MAAMA,QAAQ;IAAK,CAAA;AAE5E,QAAI,CAACI,aAAaA,UAAUE,WAAW,GAAG;AACxC,aAAOC;IACT;AAEA,UAAMC,WAAgCJ,UAAUK,IAAI,CAACC,SAAS;MAC5DC,MAAMD,IAAIC;MACVC,QAAQC,WAAWH,IAAII,KAAK;MAC5BC,UAAUF,WAAWH,IAAIM,GAAG;IAC9B,EAAA;AAEA,UAAMC,WAAWT,SAASC,IAAI,CAACS,YAAYA,QAAQP,IAAI,EAAEQ,KAAK,GAAA;AAC9D,WAAO;MAAEX;MAAUS;IAAS;EAC9B;EACAG,OAAO,CAACC,UAAAA;AACNxB,QAAI,8BAA8B;MAAE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ttpClient", "Chunk", "Effect", "Function", "Layer", "Option", "Predicate", "Stream", "Database", "Feed", "Filter", "Obj", "log", "Operation", "Effect", "log", "fetchTranscript", "videoId", "lang", "tryPromise", "try", "getSubtitles", "subtitles", "videoID", "length", "undefined", "segments", "map", "sub", "text", "offset", "parseFloat", "start", "duration", "dur", "fullText", "segment", "join", "catch", "error", "pipe", "catchAll", "succeed", "timeout", "handler", "Sync", "pipe", "Operation", "withHandler", "channel", "channelRef", "restrictedMode", "includeTranscripts", "gen", "log", "dxn", "toString", "Database", "load", "channelUrl", "channelId", "fail", "Error", "channelInfo", "extractChannelInfo", "channelTitle", "uploadsPlaylistId", "getUploadsPlaylistId", "Obj", "change", "channelObj", "name", "feed", "existingVideos", "Feed", "runQuery", "Filter", "type", "Video", "YouTubeVideo", "existingVideoIds", "Set", "map", "video", "videoId", "count", "size", "newVideosCount", "streamVideosToFeed", "lastSyncedAt", "Date", "toISOString", "newVideos", "provide", "mergeAll", "layer", "GoogleCredentials", "fromChannelRef", "STREAMING_CONFIG", "maxResults", "transcriptFetchConcurrency", "bufferSize", "feedBatchSize", "restrictedMax", "urlOrHandle", "trimmed", "trim", "startsWith", "value", "slice", "length", "url", "URL", "pathname", "split", "test", "fn", "channelResponse", "YouTube", "getChannel", "getChannelByHandle", "items", "contentDetails", "relatedPlaylists", "uploads", "id", "snippet", "title", "fetchPlaylistVideos", "maxVideos", "videoCount", "unfoldChunkEffect", "pageToken", "none", "done", "state", "response", "listPlaylistItems", "getOrUndefined", "videoIds", "item", "resourceId", "filter", "Boolean", "hasMore", "nextPageToken", "nextState", "fromNullable", "undefined", "some", "fromIterable", "mapVideoData", "transcript", "hasTranscript", "fullText", "description", "thumbnailUrl", "thumbnails", "high", "medium", "default", "publishedAt", "duration", "viewCount", "statistics", "parseInt", "likeCount", "transcriptSegments", "segments", "transcriptFetched", "restricted", "isDuplicate", "has", "take", "identity", "grouped", "flatMap", "videoIdChunk", "toArray", "getVideoDetails", "concurrency", "result", "fetchTranscript", "isNotNullable", "mapEffect", "batch", "videos", "videoObjects", "make", "append", "runFold", "acc", "batchCount"]
7
7
  }
@@ -1,10 +1,8 @@
1
1
  import {
2
2
  Channel_exports,
3
+ Video_exports,
3
4
  YouTubeOperation
4
- } from "../chunk-GFRR4TTX.mjs";
5
- import {
6
- Video_exports
7
- } from "../chunk-YMDT37TA.mjs";
5
+ } from "../chunk-GTIWG45H.mjs";
8
6
  import "../chunk-J5LGTIGS.mjs";
9
7
  export {
10
8
  Channel_exports as Channel,
@@ -1,13 +1,54 @@
1
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
2
  import "../chunk-HSLMI22Q.mjs";
3
+
4
+ // src/blueprints/youtube.ts
5
+ import { Blueprint, Template } from "@dxos/blueprints";
6
+ import { trim } from "@dxos/util";
7
+ import { ClearSyncedVideos, Sync } from "#operations";
8
+ var BLUEPRINT_KEY = "dxos.org/blueprint/youtube";
9
+ var make = () => Blueprint.make({
10
+ key: BLUEPRINT_KEY,
11
+ name: "YouTube",
12
+ tools: Blueprint.toolDefinitions({
13
+ operations: [
14
+ Sync,
15
+ ClearSyncedVideos
16
+ ],
17
+ tools: []
18
+ }),
19
+ instructions: Template.make({
20
+ source: trim`
21
+ You manage YouTube channel subscriptions and video content.
22
+
23
+ # Summary formatting:
24
+ - Format summaries as markdown documents without extra comments.
25
+ - Use markdown formatting for headings and bullet points.
26
+ - Format video summaries as lists with key points.
27
+
28
+ # References
29
+ - Use references to objects in the form of:
30
+ @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M
31
+ - References are rendered as rich content in the response to the user.
32
+
33
+ # Video Analysis
34
+ When analyzing videos:
35
+ - Summarize the key topics and themes.
36
+ - Extract important quotes or statements.
37
+ - Identify action items or recommendations.
38
+ - Note any timestamps for important sections.
39
+
40
+ # Transcript Usage
41
+ - Videos may include transcripts that can be used for deeper analysis.
42
+ - When summarizing content, reference the transcript for accuracy.
43
+ - Transcripts include timestamps that can help locate specific content.
44
+ `
45
+ })
46
+ });
47
+ var blueprint = {
48
+ key: BLUEPRINT_KEY,
49
+ make
50
+ };
51
+ var youtube_default = blueprint;
11
52
  export {
12
53
  youtube_default as YouTubeBlueprint
13
54
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
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;AAErB,SAASC,mBAAmBC,YAAY;AAExC,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", "ClearSyncedVideos", "Sync", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "tools", "toolDefinitions", "operations", "Sync", "ClearSyncedVideos", "instructions", "Template", "source", "trim", "blueprint"]
7
7
  }
@@ -10,7 +10,7 @@ import * as Layer from "effect/Layer";
10
10
  import { Database } from "@dxos/echo";
11
11
  import { CredentialsService } from "@dxos/functions";
12
12
  import { log } from "@dxos/log";
13
- var __dxlog_file = "/Users/mykola/dev/dxos/packages/plugins/plugin-youtube/src/operations/services/google-credentials.ts";
13
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-youtube/src/operations/services/google-credentials.ts";
14
14
  var makeService = (cachedToken) => ({
15
15
  get: () => cachedToken ? Effect.succeed(cachedToken) : Effect.map(CredentialsService.getCredential({
16
16
  service: "google.com"
@@ -262,7 +262,7 @@ var CaptionsListResponse = Schema.Struct({
262
262
  });
263
263
 
264
264
  // src/operations/apis/youtube/api.ts
265
- var __dxlog_file2 = "/Users/mykola/dev/dxos/packages/plugins/plugin-youtube/src/operations/apis/youtube/api.ts";
265
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-youtube/src/operations/apis/youtube/api.ts";
266
266
  var API_URL = "https://www.googleapis.com/youtube/v3";
267
267
  var createUrl = (parts, params) => {
268
268
  const url = new URL(parts.filter(Boolean).join("/"));
@@ -353,4 +353,4 @@ export {
353
353
  GoogleCredentials,
354
354
  youtube_exports
355
355
  };
356
- //# sourceMappingURL=chunk-JM5SBBP5.mjs.map
356
+ //# sourceMappingURL=chunk-BVKMXV2G.mjs.map
@@ -1,10 +1,8 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
- Channel_exports
4
- } from "./chunk-6BUJ2DQX.mjs";
5
- import {
3
+ Channel_exports,
6
4
  Video_exports
7
- } from "./chunk-CZSLL3XQ.mjs";
5
+ } from "./chunk-YOE54ALJ.mjs";
8
6
 
9
7
  // src/operations/definitions.ts
10
8
  import { Operation } from "@dxos/operation";
@@ -70,4 +68,4 @@ export {
70
68
  Sync,
71
69
  ClearSyncedVideos
72
70
  };
73
- //# sourceMappingURL=chunk-JSGRZMG3.mjs.map
71
+ //# sourceMappingURL=chunk-RL46XZ2D.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/definitions.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Operation } from '@dxos/operation';\nimport * as Schema from 'effect/Schema';\n\nimport { Database, Feed, Ref } from '@dxos/echo';\nimport { CredentialsService } from '@dxos/functions';\n\nimport { Channel, Video } from '../types';\n\nexport const Sync = Operation.make({\n meta: {\n key: 'dxos.org/function/youtube/sync',\n name: 'Sync YouTube Channel',\n description: 'Sync videos from a YouTube channel to the feed.',\n },\n input: Schema.Struct({\n channel: Ref.Ref(Channel.YouTubeChannel).annotations({\n description: 'Reference to the YouTube channel to sync videos from.',\n }),\n restrictedMode: Schema.Boolean.pipe(\n Schema.annotations({\n description:\n 'Use restricted mode to limit to max 20 videos. Reduces API calls. Useful for testing or quick syncs.',\n }),\n Schema.optional,\n ),\n includeTranscripts: Schema.Boolean.pipe(\n Schema.annotations({\n description:\n 'Whether to fetch transcripts: Data API when your account can manage the video, otherwise watch-page captions (browser uses a public CORS proxy for YouTube fetches).',\n }),\n Schema.optional,\n ),\n }),\n output: Schema.Struct({\n newVideos: Schema.Number,\n channelTitle: Schema.String.pipe(Schema.optional),\n }),\n types: [Channel.YouTubeChannel, Video.YouTubeVideo],\n services: [Database.Service, Feed.Service, CredentialsService],\n});\n\nexport const ClearSyncedVideos = Operation.make({\n meta: {\n key: 'dxos.org/function/youtube/clear-synced-videos',\n name: 'Clear Synced YouTube Videos',\n description: 'Remove all synced videos from the channel by replacing its feed with a new empty feed.',\n },\n input: Schema.Struct({\n channel: Ref.Ref(Channel.YouTubeChannel).annotations({\n description: 'Reference to the YouTube channel whose synced videos should be cleared.',\n }),\n }),\n output: Schema.Struct({\n removedVideos: Schema.Number,\n }),\n types: [Channel.YouTubeChannel, Video.YouTubeVideo],\n services: [Database.Service, Feed.Service],\n});\n"],
5
- "mappings": ";;;;;;;;;AAIA,SAASA,iBAAiB;AAC1B,YAAYC,YAAY;AAExB,SAASC,UAAUC,MAAMC,WAAW;AACpC,SAASC,0BAA0B;AAI5B,IAAMC,OAAOC,UAAUC,KAAK;EACjCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,SAASC,IAAIA,IAAIC,gBAAQC,cAAc,EAAEC,YAAY;MACnDP,aAAa;IACf,CAAA;IACAQ,gBAAuBC,eAAQC,KACtBH,mBAAY;MACjBP,aACE;IACJ,CAAA,GACOW,eAAQ;IAEjBC,oBAA2BH,eAAQC,KAC1BH,mBAAY;MACjBP,aACE;IACJ,CAAA,GACOW,eAAQ;EAEnB,CAAA;EACAE,QAAeX,cAAO;IACpBY,WAAkBC;IA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C,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,SAASC,IAAIA,IAAIC,gBAAQC,cAAc,EAAEC,YAAY;MACnDP,aAAa;IACf,CAAA;EACF,CAAA;EACAa,QAAeX,cAAO;IACpByB,eAAsBZ;EACxB,CAAA;EACAG,OAAO;IAACb,gBAAQC;IAAgBa,cAAMC;;EACtCC,UAAU;IAACC,SAASC;IAASC,KAAKD;;AACpC,CAAA;",
6
6
  "names": ["Operation", "Schema", "Database", "Feed", "Ref", "CredentialsService", "Sync", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "channel", "Ref", "Channel", "YouTubeChannel", "annotations", "restrictedMode", "Boolean", "pipe", "optional", "includeTranscripts", "output", "newVideos", "Number", "channelTitle", "String", "types", "Video", "YouTubeVideo", "services", "Database", "Service", "Feed", "CredentialsService", "ClearSyncedVideos", "removedVideos"]
7
7
  }