@dxos/plugin-youtube 0.8.3 → 0.8.4-main.74a063c4e0

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 (156) 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-FEQD5TPI.mjs} +4 -4
  4. package/dist/lib/browser/{chunk-C26XKDK2.mjs.map → chunk-FEQD5TPI.mjs.map} +2 -2
  5. package/dist/lib/browser/{chunk-P67QEKBQ.mjs → chunk-GIRFSTHR.mjs} +6 -8
  6. package/dist/lib/browser/chunk-GIRFSTHR.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-GTIWG45H.mjs +157 -0
  8. package/dist/lib/browser/chunk-GTIWG45H.mjs.map +7 -0
  9. package/dist/lib/browser/{clear-synced-videos-EVMJIZPD.mjs → clear-synced-videos-NZIWAVGL.mjs} +7 -8
  10. package/dist/lib/browser/clear-synced-videos-NZIWAVGL.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +86 -81
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{sync-423Q4BDD.mjs → sync-T34US6NO.mjs} +18 -19
  15. package/dist/lib/browser/sync-T34US6NO.mjs.map +7 -0
  16. package/dist/lib/browser/types/index.mjs +2 -4
  17. package/dist/lib/node-esm/blueprints/index.mjs +49 -8
  18. package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
  19. package/dist/lib/node-esm/{chunk-JSGRZMG3.mjs → chunk-A3SKNJFU.mjs} +6 -8
  20. package/dist/lib/node-esm/chunk-A3SKNJFU.mjs.map +7 -0
  21. package/dist/lib/node-esm/{chunk-JM5SBBP5.mjs → chunk-Q3TVMR5B.mjs} +4 -4
  22. package/dist/lib/node-esm/{chunk-JM5SBBP5.mjs.map → chunk-Q3TVMR5B.mjs.map} +2 -2
  23. package/dist/lib/node-esm/chunk-YOE54ALJ.mjs +158 -0
  24. package/dist/lib/node-esm/chunk-YOE54ALJ.mjs.map +7 -0
  25. package/dist/lib/node-esm/{clear-synced-videos-5UCH6XHL.mjs → clear-synced-videos-ZX7KBPGS.mjs} +7 -8
  26. package/dist/lib/{browser/clear-synced-videos-EVMJIZPD.mjs.map → node-esm/clear-synced-videos-ZX7KBPGS.mjs.map} +2 -2
  27. package/dist/lib/node-esm/index.mjs +86 -81
  28. package/dist/lib/node-esm/index.mjs.map +4 -4
  29. package/dist/lib/node-esm/meta.json +1 -1
  30. package/dist/lib/node-esm/{sync-CEF5DX2J.mjs → sync-RQYQ5LII.mjs} +18 -19
  31. package/dist/lib/node-esm/sync-RQYQ5LII.mjs.map +7 -0
  32. package/dist/lib/node-esm/types/index.mjs +2 -4
  33. package/dist/types/src/YouTubePlugin.d.ts.map +1 -1
  34. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  35. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  36. package/dist/types/src/capabilities/index.d.ts +5 -3
  37. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  39. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  40. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  41. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +1 -1
  42. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -1
  43. package/dist/types/src/containers/ChannelArticle/index.d.ts +1 -2
  44. package/dist/types/src/containers/ChannelArticle/index.d.ts.map +1 -1
  45. package/dist/types/src/containers/ChannelSettings/index.d.ts +1 -2
  46. package/dist/types/src/containers/ChannelSettings/index.d.ts.map +1 -1
  47. package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts +2 -7
  48. package/dist/types/src/containers/VideoArticle/VideoArticle.d.ts.map +1 -1
  49. package/dist/types/src/containers/VideoArticle/index.d.ts +1 -2
  50. package/dist/types/src/containers/VideoArticle/index.d.ts.map +1 -1
  51. package/dist/types/src/containers/VideoCard/VideoCard.d.ts +2 -2
  52. package/dist/types/src/containers/VideoCard/VideoCard.d.ts.map +1 -1
  53. package/dist/types/src/containers/VideoCard/index.d.ts +1 -2
  54. package/dist/types/src/containers/VideoCard/index.d.ts.map +1 -1
  55. package/dist/types/src/operations/apis/youtube/api.d.ts.map +1 -1
  56. package/dist/types/src/operations/clear-synced-videos.d.ts.map +1 -1
  57. package/dist/types/src/operations/definitions.d.ts +9 -5
  58. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  59. package/dist/types/src/operations/sync.d.ts.map +1 -1
  60. package/dist/types/src/translations.d.ts +38 -38
  61. package/dist/types/src/translations.d.ts.map +1 -1
  62. package/dist/types/src/types/Channel.d.ts +28 -3
  63. package/dist/types/src/types/Channel.d.ts.map +1 -1
  64. package/dist/types/src/types/Video.d.ts +22 -0
  65. package/dist/types/src/types/Video.d.ts.map +1 -1
  66. package/dist/types/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +48 -40
  68. package/src/YouTubePlugin.tsx +12 -6
  69. package/src/blueprints/youtube.ts +1 -1
  70. package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +29 -33
  71. package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +1 -1
  72. package/src/capabilities/index.ts +7 -4
  73. package/src/capabilities/migrations.ts +35 -0
  74. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +16 -18
  75. package/src/containers/ChannelArticle/ChannelArticle.tsx +1 -1
  76. package/src/containers/ChannelArticle/index.ts +1 -3
  77. package/src/containers/ChannelSettings/index.ts +1 -3
  78. package/src/containers/VideoArticle/VideoArticle.tsx +2 -7
  79. package/src/containers/VideoArticle/index.ts +1 -3
  80. package/src/containers/VideoCard/VideoCard.tsx +2 -2
  81. package/src/containers/VideoCard/index.ts +1 -3
  82. package/src/operations/apis/youtube/api.ts +0 -1
  83. package/src/operations/clear-synced-videos.ts +0 -1
  84. package/src/operations/definitions.ts +3 -3
  85. package/src/operations/sync.ts +0 -1
  86. package/src/translations.ts +38 -38
  87. package/src/types/Channel.ts +18 -1
  88. package/src/types/Video.ts +25 -1
  89. package/dist/lib/browser/ChannelArticle-CDQR4BBY.mjs +0 -90
  90. package/dist/lib/browser/ChannelArticle-CDQR4BBY.mjs.map +0 -7
  91. package/dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs +0 -28
  92. package/dist/lib/browser/ChannelSettings-ZYUNW3VS.mjs.map +0 -7
  93. package/dist/lib/browser/VideoArticle-FC4A6E7B.mjs +0 -76
  94. package/dist/lib/browser/VideoArticle-FC4A6E7B.mjs.map +0 -7
  95. package/dist/lib/browser/VideoCard-CCPXDCB7.mjs +0 -64
  96. package/dist/lib/browser/VideoCard-CCPXDCB7.mjs.map +0 -7
  97. package/dist/lib/browser/app-graph-builder-MJY6A6SN.mjs +0 -195
  98. package/dist/lib/browser/app-graph-builder-MJY6A6SN.mjs.map +0 -7
  99. package/dist/lib/browser/blueprint-definition-FRYUYJ22.mjs +0 -22
  100. package/dist/lib/browser/blueprint-definition-FRYUYJ22.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-DFRSBBSO.mjs +0 -21
  102. package/dist/lib/browser/chunk-DFRSBBSO.mjs.map +0 -7
  103. package/dist/lib/browser/chunk-GFRR4TTX.mjs +0 -72
  104. package/dist/lib/browser/chunk-GFRR4TTX.mjs.map +0 -7
  105. package/dist/lib/browser/chunk-MUE22YUM.mjs +0 -57
  106. package/dist/lib/browser/chunk-MUE22YUM.mjs.map +0 -7
  107. package/dist/lib/browser/chunk-P67QEKBQ.mjs.map +0 -7
  108. package/dist/lib/browser/chunk-YMDT37TA.mjs +0 -62
  109. package/dist/lib/browser/chunk-YMDT37TA.mjs.map +0 -7
  110. package/dist/lib/browser/chunk-Z3DGTMKC.mjs +0 -8
  111. package/dist/lib/browser/chunk-Z3DGTMKC.mjs.map +0 -7
  112. package/dist/lib/browser/react-surface-EDA5VYDC.mjs +0 -77
  113. package/dist/lib/browser/react-surface-EDA5VYDC.mjs.map +0 -7
  114. package/dist/lib/browser/sync-423Q4BDD.mjs.map +0 -7
  115. package/dist/lib/node-esm/ChannelArticle-GQ64BO7V.mjs +0 -91
  116. package/dist/lib/node-esm/ChannelArticle-GQ64BO7V.mjs.map +0 -7
  117. package/dist/lib/node-esm/ChannelSettings-DM2HWNKO.mjs +0 -29
  118. package/dist/lib/node-esm/ChannelSettings-DM2HWNKO.mjs.map +0 -7
  119. package/dist/lib/node-esm/VideoArticle-WLTWZO3K.mjs +0 -77
  120. package/dist/lib/node-esm/VideoArticle-WLTWZO3K.mjs.map +0 -7
  121. package/dist/lib/node-esm/VideoCard-FOWQZK75.mjs +0 -65
  122. package/dist/lib/node-esm/VideoCard-FOWQZK75.mjs.map +0 -7
  123. package/dist/lib/node-esm/app-graph-builder-IU5TBAXN.mjs +0 -196
  124. package/dist/lib/node-esm/app-graph-builder-IU5TBAXN.mjs.map +0 -7
  125. package/dist/lib/node-esm/blueprint-definition-W264MZ3D.mjs +0 -23
  126. package/dist/lib/node-esm/blueprint-definition-W264MZ3D.mjs.map +0 -7
  127. package/dist/lib/node-esm/chunk-5KNC2JMP.mjs +0 -58
  128. package/dist/lib/node-esm/chunk-5KNC2JMP.mjs.map +0 -7
  129. package/dist/lib/node-esm/chunk-6BUJ2DQX.mjs +0 -73
  130. package/dist/lib/node-esm/chunk-6BUJ2DQX.mjs.map +0 -7
  131. package/dist/lib/node-esm/chunk-CX6MV3QM.mjs +0 -23
  132. package/dist/lib/node-esm/chunk-CX6MV3QM.mjs.map +0 -7
  133. package/dist/lib/node-esm/chunk-CZSLL3XQ.mjs +0 -63
  134. package/dist/lib/node-esm/chunk-CZSLL3XQ.mjs.map +0 -7
  135. package/dist/lib/node-esm/chunk-JSGRZMG3.mjs.map +0 -7
  136. package/dist/lib/node-esm/chunk-M4S6BE47.mjs +0 -10
  137. package/dist/lib/node-esm/chunk-M4S6BE47.mjs.map +0 -7
  138. package/dist/lib/node-esm/clear-synced-videos-5UCH6XHL.mjs.map +0 -7
  139. package/dist/lib/node-esm/react-surface-5DJAQPHJ.mjs +0 -78
  140. package/dist/lib/node-esm/react-surface-5DJAQPHJ.mjs.map +0 -7
  141. package/dist/lib/node-esm/sync-CEF5DX2J.mjs.map +0 -7
  142. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  143. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  144. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  145. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  146. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
  147. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  148. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  149. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  150. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  151. package/src/capabilities/app-graph-builder/index.ts +0 -7
  152. package/src/capabilities/blueprint-definition/index.ts +0 -7
  153. package/src/capabilities/react-surface/index.ts +0 -7
  154. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  155. /package/dist/types/src/capabilities/{blueprint-definition/blueprint-definition.d.ts → blueprint-definition.d.ts} +0 -0
  156. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-youtube",
3
- "version": "0.8.3",
3
+ "version": "0.8.4-main.74a063c4e0",
4
4
  "description": "DXOS YouTube feed plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -12,6 +12,14 @@
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": true,
14
14
  "type": "module",
15
+ "imports": {
16
+ "#blueprints": "./src/blueprints/index.ts",
17
+ "#capabilities": "./src/capabilities/index.ts",
18
+ "#containers": "./src/containers/index.ts",
19
+ "#meta": "./src/meta.ts",
20
+ "#operations": "./src/operations/index.ts",
21
+ "#types": "./src/types/index.ts"
22
+ },
15
23
  "exports": {
16
24
  ".": {
17
25
  "source": "./src/index.ts",
@@ -53,35 +61,35 @@
53
61
  "@radix-ui/react-context": "1.1.1",
54
62
  "effect": "3.20.0",
55
63
  "youtube-caption-extractor": "^1.9.1",
56
- "@dxos/blueprints": "0.8.3",
57
- "@dxos/app-framework": "0.8.3",
58
- "@dxos/app-toolkit": "0.8.3",
59
- "@dxos/async": "0.8.3",
60
- "@dxos/client": "0.8.3",
61
- "@dxos/debug": "0.8.3",
62
- "@dxos/echo-atom": "0.8.3",
63
- "@dxos/echo": "0.8.3",
64
- "@dxos/effect": "0.8.3",
65
- "@dxos/echo-db": "0.8.3",
66
- "@dxos/invariant": "0.8.3",
67
- "@dxos/errors": "0.8.3",
68
- "@dxos/plugin-attention": "0.8.3",
69
- "@dxos/log": "0.8.3",
70
- "@dxos/operation": "0.8.3",
71
- "@dxos/plugin-automation": "0.8.3",
72
- "@dxos/plugin-client": "0.8.3",
73
- "@dxos/functions": "0.8.3",
74
- "@dxos/plugin-graph": "0.8.3",
75
- "@dxos/plugin-space": "0.8.3",
76
- "@dxos/react-ui-attention": "0.8.3",
77
- "@dxos/schema": "0.8.3",
78
- "@dxos/react-ui": "0.8.3",
79
- "@dxos/types": "0.8.3",
80
- "@dxos/react-client": "0.8.3",
81
- "@dxos/keys": "0.8.3",
82
- "@dxos/plugin-deck": "0.8.3",
83
- "@dxos/util": "0.8.3",
84
- "@dxos/react-ui-stack": "0.8.3"
64
+ "@dxos/app-framework": "0.8.4-main.74a063c4e0",
65
+ "@dxos/blueprints": "0.8.4-main.74a063c4e0",
66
+ "@dxos/async": "0.8.4-main.74a063c4e0",
67
+ "@dxos/client": "0.8.4-main.74a063c4e0",
68
+ "@dxos/debug": "0.8.4-main.74a063c4e0",
69
+ "@dxos/echo-atom": "0.8.4-main.74a063c4e0",
70
+ "@dxos/echo": "0.8.4-main.74a063c4e0",
71
+ "@dxos/echo-db": "0.8.4-main.74a063c4e0",
72
+ "@dxos/effect": "0.8.4-main.74a063c4e0",
73
+ "@dxos/functions": "0.8.4-main.74a063c4e0",
74
+ "@dxos/errors": "0.8.4-main.74a063c4e0",
75
+ "@dxos/invariant": "0.8.4-main.74a063c4e0",
76
+ "@dxos/keys": "0.8.4-main.74a063c4e0",
77
+ "@dxos/operation": "0.8.4-main.74a063c4e0",
78
+ "@dxos/log": "0.8.4-main.74a063c4e0",
79
+ "@dxos/plugin-attention": "0.8.4-main.74a063c4e0",
80
+ "@dxos/app-toolkit": "0.8.4-main.74a063c4e0",
81
+ "@dxos/plugin-deck": "0.8.4-main.74a063c4e0",
82
+ "@dxos/plugin-automation": "0.8.4-main.74a063c4e0",
83
+ "@dxos/plugin-graph": "0.8.4-main.74a063c4e0",
84
+ "@dxos/plugin-space": "0.8.4-main.74a063c4e0",
85
+ "@dxos/plugin-client": "0.8.4-main.74a063c4e0",
86
+ "@dxos/react-client": "0.8.4-main.74a063c4e0",
87
+ "@dxos/react-ui": "0.8.4-main.74a063c4e0",
88
+ "@dxos/react-ui-stack": "0.8.4-main.74a063c4e0",
89
+ "@dxos/schema": "0.8.4-main.74a063c4e0",
90
+ "@dxos/react-ui-attention": "0.8.4-main.74a063c4e0",
91
+ "@dxos/util": "0.8.4-main.74a063c4e0",
92
+ "@dxos/types": "0.8.4-main.74a063c4e0"
85
93
  },
86
94
  "devDependencies": {
87
95
  "@types/react": "~19.2.7",
@@ -89,14 +97,14 @@
89
97
  "react": "~19.2.3",
90
98
  "react-dom": "~19.2.3",
91
99
  "vite": "^7.1.11",
92
- "@dxos/plugin-testing": "0.8.3",
93
- "@dxos/plugin-theme": "0.8.3",
94
- "@dxos/protocols": "0.8.3",
95
- "@dxos/config": "0.8.3",
96
- "@dxos/react-ui": "0.8.3",
97
- "@dxos/random": "0.8.3",
98
- "@dxos/storybook-utils": "0.8.3",
99
- "@dxos/ui-theme": "0.8.3"
100
+ "@dxos/config": "0.8.4-main.74a063c4e0",
101
+ "@dxos/protocols": "0.8.4-main.74a063c4e0",
102
+ "@dxos/plugin-testing": "0.8.4-main.74a063c4e0",
103
+ "@dxos/plugin-theme": "0.8.4-main.74a063c4e0",
104
+ "@dxos/random": "0.8.4-main.74a063c4e0",
105
+ "@dxos/react-ui": "0.8.4-main.74a063c4e0",
106
+ "@dxos/storybook-utils": "0.8.4-main.74a063c4e0",
107
+ "@dxos/ui-theme": "0.8.4-main.74a063c4e0"
100
108
  },
101
109
  "peerDependencies": {
102
110
  "@effect-atom/atom-react": "^0.5.0",
@@ -104,8 +112,8 @@
104
112
  "effect": "3.20.0",
105
113
  "react": "~19.2.3",
106
114
  "react-dom": "~19.2.3",
107
- "@dxos/react-ui": "0.8.3",
108
- "@dxos/ui-theme": "0.8.3"
115
+ "@dxos/react-ui": "0.8.4-main.74a063c4e0",
116
+ "@dxos/ui-theme": "0.8.4-main.74a063c4e0"
109
117
  },
110
118
  "publishConfig": {
111
119
  "access": "public"
@@ -9,15 +9,17 @@ import { ActivationEvent, Plugin } from '@dxos/app-framework';
9
9
  import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
10
10
  import { Annotation } from '@dxos/echo';
11
11
  import { Operation } from '@dxos/operation';
12
- import { AttentionEvents } from '@dxos/plugin-attention';
13
- import { type CreateObject } from '@dxos/plugin-space/types';
12
+ import { AttentionEvents } from '@dxos/plugin-attention/types';
13
+ import { ClientEvents } from '@dxos/plugin-client/types';
14
14
  import { SpaceOperation } from '@dxos/plugin-space/operations';
15
+ import { type CreateObject } from '@dxos/plugin-space/types';
16
+
17
+ import { YouTubeBlueprint } from '#blueprints';
18
+ import { AppGraphBuilder, BlueprintDefinition, Migrations, ReactSurface } from '#capabilities';
19
+ import { meta } from '#meta';
20
+ import { Channel, Video } from '#types';
15
21
 
16
- import { YouTubeBlueprint } from './blueprints';
17
- import { AppGraphBuilder, BlueprintDefinition, ReactSurface } from './capabilities';
18
- import { meta } from './meta';
19
22
  import { translations } from './translations';
20
- import { Channel, Video } from './types';
21
23
 
22
24
  export const YouTubePlugin = Plugin.define(meta).pipe(
23
25
  AppPlugin.addAppGraphModule({
@@ -62,5 +64,9 @@ export const YouTubePlugin = Plugin.define(meta).pipe(
62
64
  }),
63
65
  AppPlugin.addSurfaceModule({ activate: ReactSurface }),
64
66
  AppPlugin.addTranslationsModule({ translations }),
67
+ Plugin.addModule({
68
+ activatesOn: ClientEvents.SetupMigration,
69
+ activate: Migrations,
70
+ }),
65
71
  Plugin.make,
66
72
  );
@@ -6,7 +6,7 @@ import { type AppCapabilities } from '@dxos/app-toolkit';
6
6
  import { Blueprint, Template } from '@dxos/blueprints';
7
7
  import { trim } from '@dxos/util';
8
8
 
9
- import { ClearSyncedVideos, Sync } from '../operations';
9
+ import { ClearSyncedVideos, Sync } from '#operations';
10
10
 
11
11
  const BLUEPRINT_KEY = 'dxos.org/blueprint/youtube';
12
12
 
@@ -7,20 +7,20 @@ import * as Effect from 'effect/Effect';
7
7
  import * as Option from 'effect/Option';
8
8
 
9
9
  import { Capability } from '@dxos/app-framework';
10
- import { AppCapabilities, companionSegment, LayoutOperation } from '@dxos/app-toolkit';
10
+ import { AppCapabilities, AppNode, LayoutOperation } from '@dxos/app-toolkit';
11
11
  import { type Feed, Filter, Obj, Query, Ref } from '@dxos/echo';
12
12
  import { AtomQuery, AtomRef } from '@dxos/echo-atom';
13
13
  import { invariant } from '@dxos/invariant';
14
14
  import { log } from '@dxos/log';
15
15
  import { Operation } from '@dxos/operation';
16
- import { AttentionCapabilities } from '@dxos/plugin-attention';
17
- import { AutomationCapabilities, invokeFunctionWithTracing } from '@dxos/plugin-automation';
18
- import { PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
19
- import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
16
+ import { AttentionCapabilities } from '@dxos/plugin-attention/types';
17
+ import { AutomationCapabilities } from '@dxos/plugin-automation/types';
18
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
19
+ import { linkedSegment } from '@dxos/react-ui-attention';
20
20
 
21
- import { ClearSyncedVideos, Sync } from '../../operations';
22
- import { meta } from '../../meta';
23
- import { Channel, Video } from '../../types';
21
+ import { meta } from '#meta';
22
+ import { ClearSyncedVideos, Sync } from '#operations';
23
+ import { Channel, Video } from '#types';
24
24
 
25
25
  export default Capability.makeModule(
26
26
  Effect.fnUntraced(function* () {
@@ -37,7 +37,7 @@ export default Capability.makeModule(
37
37
 
38
38
  const extensions = yield* Effect.all([
39
39
  GraphBuilder.createExtension({
40
- id: `${meta.id}.channel-video`,
40
+ id: 'channel-video',
41
41
  match: (node) =>
42
42
  Channel.instanceOf(node.data) ? Option.some({ channel: node.data, nodeId: node.id }) : Option.none(),
43
43
  connector: (matched, get) => {
@@ -56,26 +56,22 @@ export default Capability.makeModule(
56
56
  ),
57
57
  )[0];
58
58
  return Effect.succeed([
59
- {
60
- id: companionSegment('video'),
61
- type: PLANK_COMPANION_TYPE,
59
+ AppNode.makeCompanion({
60
+ id: linkedSegment('video'),
61
+ label: ['video.label', { ns: meta.id }],
62
+ icon: 'ph--play--regular',
62
63
  data: video ?? 'video',
63
- properties: {
64
- label: ['video label', { ns: meta.id }],
65
- icon: 'ph--play--regular',
66
- disposition: 'hidden',
67
- },
68
- },
64
+ }),
69
65
  ]);
70
66
  },
71
67
  }),
72
68
 
73
69
  GraphBuilder.createExtension({
74
- id: `${meta.id}.sync-channel`,
70
+ id: 'sync-channel',
75
71
  match: whenYouTubeChannel,
76
72
  actions: (channel) =>
77
73
  Effect.succeed([
78
- {
74
+ Node.makeAction({
79
75
  id: 'sync',
80
76
  data: Effect.fnUntraced(function* () {
81
77
  const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
@@ -84,7 +80,7 @@ export default Capability.makeModule(
84
80
  const runtime = computeRuntime.getRuntime(db.spaceId);
85
81
  yield* Effect.tryPromise(() =>
86
82
  runtime.runPromise(
87
- invokeFunctionWithTracing(Sync, {
83
+ Operation.invoke(Sync, {
88
84
  channel: Ref.make(channel),
89
85
  }),
90
86
  ),
@@ -92,22 +88,22 @@ export default Capability.makeModule(
92
88
  Effect.catchAll((error) => {
93
89
  log.catch(error);
94
90
  return Operation.invoke(LayoutOperation.AddToast, {
95
- id: `${meta.id}.sync-channel-error`,
91
+ id: 'sync-channel-error',
96
92
  icon: 'ph--warning--regular',
97
93
  duration: 5_000,
98
- title: ['sync channel error title', { ns: meta.id }],
99
- closeLabel: ['close label', { ns: meta.id }],
94
+ title: ['sync-channel-error.title', { ns: meta.id }],
95
+ closeLabel: ['close.label', { ns: meta.id }],
100
96
  });
101
97
  }),
102
98
  );
103
99
  }),
104
100
  properties: {
105
- label: ['sync channel label', { ns: meta.id }],
101
+ label: ['sync-channel.label', { ns: meta.id }],
106
102
  icon: 'ph--arrows-clockwise--regular',
107
103
  disposition: 'list-item',
108
104
  },
109
- },
110
- {
105
+ }),
106
+ Node.makeAction({
111
107
  id: 'clear-synced-videos',
112
108
  data: Effect.fnUntraced(function* () {
113
109
  const computeRuntime = yield* Capability.get(AutomationCapabilities.ComputeRuntime);
@@ -116,7 +112,7 @@ export default Capability.makeModule(
116
112
  const runtime = computeRuntime.getRuntime(db.spaceId);
117
113
  yield* Effect.tryPromise(() =>
118
114
  runtime.runPromise(
119
- invokeFunctionWithTracing(ClearSyncedVideos, {
115
+ Operation.invoke(ClearSyncedVideos, {
120
116
  channel: Ref.make(channel),
121
117
  }),
122
118
  ),
@@ -124,21 +120,21 @@ export default Capability.makeModule(
124
120
  Effect.catchAll((error) => {
125
121
  log.catch(error);
126
122
  return Operation.invoke(LayoutOperation.AddToast, {
127
- id: `${meta.id}.clear-synced-videos-error`,
123
+ id: 'clear-synced-videos-error',
128
124
  icon: 'ph--warning--regular',
129
125
  duration: 5_000,
130
- title: ['clear synced videos error title', { ns: meta.id }],
131
- closeLabel: ['close label', { ns: meta.id }],
126
+ title: ['clear-synced-videos-error.title', { ns: meta.id }],
127
+ closeLabel: ['close.label', { ns: meta.id }],
132
128
  });
133
129
  }),
134
130
  );
135
131
  }),
136
132
  properties: {
137
- label: ['clear synced videos label', { ns: meta.id }],
133
+ label: ['clear-synced-videos.label', { ns: meta.id }],
138
134
  icon: 'ph--trash--regular',
139
135
  disposition: 'list-item',
140
136
  },
141
- },
137
+ }),
142
138
  ]),
143
139
  }),
144
140
  ]);
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
7
7
  import { Capability } from '@dxos/app-framework';
8
8
  import { AppCapabilities } from '@dxos/app-toolkit';
9
9
 
10
- import { YouTubeBlueprint } from '../../blueprints';
10
+ import { YouTubeBlueprint } from '#blueprints';
11
11
 
12
12
  const blueprintDefinition = Capability.makeModule<
13
13
  [],
@@ -1,7 +1,10 @@
1
1
  //
2
- // Copyright 2024 DXOS.org
2
+ // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './app-graph-builder';
6
- export * from './blueprint-definition';
7
- export * from './react-surface';
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
8
+ export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
9
+ export const Migrations = Capability.lazy('YouTubeMigrations', () => import('./migrations'));
10
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { defineObjectMigration } from '@dxos/client/echo';
9
+ import { ClientCapabilities } from '@dxos/plugin-client/types';
10
+
11
+ import { Channel, Video } from '#types';
12
+
13
+ const identityTransform = async (from: any) => ({ ...from });
14
+ const noopCallback = async () => {};
15
+
16
+ const migrations = [
17
+ defineObjectMigration({
18
+ from: Channel.LegacyYouTubeChannel,
19
+ to: Channel.YouTubeChannel,
20
+ transform: identityTransform,
21
+ onMigration: noopCallback,
22
+ }),
23
+ defineObjectMigration({
24
+ from: Video.LegacyYouTubeVideo,
25
+ to: Video.YouTubeVideo,
26
+ transform: identityTransform,
27
+ onMigration: noopCallback,
28
+ }),
29
+ ];
30
+
31
+ export default Capability.makeModule(
32
+ Effect.fnUntraced(function* () {
33
+ return Capability.contributes(ClientCapabilities.Migration, migrations);
34
+ }),
35
+ );
@@ -7,46 +7,44 @@ import React from 'react';
7
7
 
8
8
  import { Capabilities, Capability } from '@dxos/app-framework';
9
9
  import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
10
11
 
11
- import { ChannelArticle, ChannelSettings, VideoArticle, VideoCard } from '../../containers';
12
- import { meta } from '../../meta';
13
- import { Channel, Video } from '../../types';
12
+ import { ChannelArticle, ChannelSettings, VideoArticle, VideoCard } from '#containers';
13
+ import { Channel, Video } from '#types';
14
14
 
15
15
  export default Capability.makeModule(() =>
16
16
  Effect.succeed(
17
17
  Capability.contributes(Capabilities.ReactSurface, [
18
18
  Surface.create({
19
- id: `${meta.id}.channel`,
19
+ id: 'channel',
20
20
  role: ['article'],
21
- filter: (data): data is { attendableId?: string; subject: Channel.YouTubeChannel } =>
22
- Channel.instanceOf(data.subject),
21
+ filter: AppSurface.objectArticle(Channel.YouTubeChannel),
23
22
  component: ({ data }) => {
24
23
  return <ChannelArticle subject={data.subject} attendableId={data.attendableId} />;
25
24
  },
26
25
  }),
27
26
  Surface.create({
28
- id: `${meta.id}.video`,
27
+ id: 'video',
28
+ // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
29
29
  role: ['article', 'section'],
30
- filter: (
31
- data,
32
- ): data is { attendableId: string; subject: Video.YouTubeVideo; companionTo: Channel.YouTubeChannel } =>
33
- typeof data.attendableId === 'string' &&
34
- Video.instanceOf(data.subject) &&
35
- Channel.instanceOf(data.companionTo),
30
+ filter: AppSurface.and(
31
+ AppSurface.objectArticle(Video.YouTubeVideo),
32
+ AppSurface.companionArticle(Channel.YouTubeChannel),
33
+ ),
36
34
  component: ({ data: { attendableId, companionTo, subject }, role }) => {
37
- return <VideoArticle role={role} subject={subject} channel={companionTo} attendableId={attendableId} />;
35
+ return <VideoArticle role={role} subject={subject} companionTo={companionTo} attendableId={attendableId} />;
38
36
  },
39
37
  }),
40
38
  Surface.create({
41
- id: `${meta.id}.video-card`,
39
+ id: 'video-card',
42
40
  role: 'card--content',
43
- filter: (data): data is { subject: Video.YouTubeVideo } => Video.instanceOf(data?.subject),
41
+ filter: AppSurface.objectCard(Video.YouTubeVideo),
44
42
  component: ({ data: { subject }, role }) => <VideoCard subject={subject} role={role} />,
45
43
  }),
46
44
  Surface.create({
47
- id: `${meta.id}.channel.companion.settings`,
45
+ id: 'channel.companion.settings',
48
46
  role: 'object-settings',
49
- filter: (data): data is { subject: Channel.YouTubeChannel } => Channel.instanceOf(data.subject),
47
+ filter: AppSurface.objectSettings(Channel.YouTubeChannel),
50
48
  component: ({ data }) => <ChannelSettings subject={data.subject} />,
51
49
  }),
52
50
  ]),
@@ -13,7 +13,7 @@ import * as Video from '../../types/Video';
13
13
 
14
14
  export type ChannelArticleProps = {
15
15
  subject: Channel.YouTubeChannel;
16
- attendableId?: string;
16
+ attendableId: string;
17
17
  };
18
18
 
19
19
  export const ChannelArticle = ({ subject: channel }: ChannelArticleProps) => {
@@ -2,6 +2,4 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { ChannelArticle } from './ChannelArticle';
6
-
7
- export default ChannelArticle;
5
+ export { ChannelArticle as default } from './ChannelArticle';
@@ -2,6 +2,4 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { ChannelSettings } from './ChannelSettings';
6
-
7
- export default ChannelSettings;
5
+ export { ChannelSettings as default } from './ChannelSettings';
@@ -4,17 +4,12 @@
4
4
 
5
5
  import React, { useState } from 'react';
6
6
 
7
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
7
8
  import { Icon, Panel } from '@dxos/react-ui';
8
9
 
9
- import * as Channel from '../../types/Channel';
10
10
  import * as Video from '../../types/Video';
11
11
 
12
- export type VideoArticleProps = {
13
- role: string | string[];
14
- subject: Video.YouTubeVideo;
15
- channel: Channel.YouTubeChannel;
16
- attendableId?: string;
17
- };
12
+ export type VideoArticleProps = AppSurface.ObjectArticleProps<Video.YouTubeVideo>;
18
13
 
19
14
  export const VideoArticle = ({ subject: video, role }: VideoArticleProps) => {
20
15
  const [showPlayer, setShowPlayer] = useState(false);
@@ -2,6 +2,4 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { VideoArticle } from './VideoArticle';
6
-
7
- export default VideoArticle;
5
+ export { VideoArticle as default } from './VideoArticle';
@@ -4,12 +4,12 @@
4
4
 
5
5
  import React, { useState } from 'react';
6
6
 
7
- import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
7
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
8
8
  import { Card, Icon } from '@dxos/react-ui';
9
9
 
10
10
  import * as Video from '../../types/Video';
11
11
 
12
- export type VideoCardProps = SurfaceComponentProps<Video.YouTubeVideo>;
12
+ export type VideoCardProps = AppSurface.ObjectCardProps<Video.YouTubeVideo>;
13
13
 
14
14
  /**
15
15
  * YouTube video card with embedded player.
@@ -2,6 +2,4 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { VideoCard } from './VideoCard';
6
-
7
- export default VideoCard;
5
+ export { VideoCard as default } from './VideoCard';
@@ -13,7 +13,6 @@ import { withAuthorization } from '@dxos/functions';
13
13
  import { log } from '@dxos/log';
14
14
 
15
15
  import { GoogleCredentials } from '../../services/google-credentials';
16
-
17
16
  import {
18
17
  ChannelsResponse,
19
18
  ErrorResponse,
@@ -9,7 +9,6 @@ import { log } from '@dxos/log';
9
9
  import { Operation } from '@dxos/operation';
10
10
 
11
11
  import { Channel, Video } from '../types';
12
-
13
12
  import { ClearSyncedVideos } from './definitions';
14
13
 
15
14
  const handler: Operation.WithHandler<typeof ClearSyncedVideos> = ClearSyncedVideos.pipe(
@@ -2,11 +2,11 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Operation } from '@dxos/operation';
6
5
  import * as Schema from 'effect/Schema';
7
6
 
8
7
  import { Database, Feed, Ref } from '@dxos/echo';
9
8
  import { CredentialsService } from '@dxos/functions';
9
+ import { Operation } from '@dxos/operation';
10
10
 
11
11
  import { Channel, Video } from '../types';
12
12
 
@@ -40,7 +40,7 @@ export const Sync = Operation.make({
40
40
  channelTitle: Schema.String.pipe(Schema.optional),
41
41
  }),
42
42
  types: [Channel.YouTubeChannel, Video.YouTubeVideo],
43
- services: [Database.Service, Feed.Service, CredentialsService],
43
+ services: [Database.Service, Feed.FeedService, CredentialsService],
44
44
  });
45
45
 
46
46
  export const ClearSyncedVideos = Operation.make({
@@ -58,5 +58,5 @@ export const ClearSyncedVideos = Operation.make({
58
58
  removedVideos: Schema.Number,
59
59
  }),
60
60
  types: [Channel.YouTubeChannel, Video.YouTubeVideo],
61
- services: [Database.Service, Feed.Service],
61
+ services: [Database.Service, Feed.FeedService],
62
62
  });
@@ -16,7 +16,6 @@ import { log } from '@dxos/log';
16
16
  import { Operation } from '@dxos/operation';
17
17
 
18
18
  import { Channel, Video } from '../types';
19
-
20
19
  import { YouTube } from './apis';
21
20
  import { Sync } from './definitions';
22
21
  import { GoogleCredentials } from './services/google-credentials';