@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
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.bcb3aa67d6",
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.bcb3aa67d6",
65
+ "@dxos/app-toolkit": "0.8.4-main.bcb3aa67d6",
66
+ "@dxos/async": "0.8.4-main.bcb3aa67d6",
67
+ "@dxos/client": "0.8.4-main.bcb3aa67d6",
68
+ "@dxos/echo-atom": "0.8.4-main.bcb3aa67d6",
69
+ "@dxos/debug": "0.8.4-main.bcb3aa67d6",
70
+ "@dxos/echo": "0.8.4-main.bcb3aa67d6",
71
+ "@dxos/echo-db": "0.8.4-main.bcb3aa67d6",
72
+ "@dxos/errors": "0.8.4-main.bcb3aa67d6",
73
+ "@dxos/effect": "0.8.4-main.bcb3aa67d6",
74
+ "@dxos/invariant": "0.8.4-main.bcb3aa67d6",
75
+ "@dxos/functions": "0.8.4-main.bcb3aa67d6",
76
+ "@dxos/blueprints": "0.8.4-main.bcb3aa67d6",
77
+ "@dxos/log": "0.8.4-main.bcb3aa67d6",
78
+ "@dxos/operation": "0.8.4-main.bcb3aa67d6",
79
+ "@dxos/plugin-automation": "0.8.4-main.bcb3aa67d6",
80
+ "@dxos/plugin-attention": "0.8.4-main.bcb3aa67d6",
81
+ "@dxos/plugin-deck": "0.8.4-main.bcb3aa67d6",
82
+ "@dxos/plugin-client": "0.8.4-main.bcb3aa67d6",
83
+ "@dxos/plugin-graph": "0.8.4-main.bcb3aa67d6",
84
+ "@dxos/react-client": "0.8.4-main.bcb3aa67d6",
85
+ "@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
86
+ "@dxos/react-ui-attention": "0.8.4-main.bcb3aa67d6",
87
+ "@dxos/plugin-space": "0.8.4-main.bcb3aa67d6",
88
+ "@dxos/react-ui-stack": "0.8.4-main.bcb3aa67d6",
89
+ "@dxos/schema": "0.8.4-main.bcb3aa67d6",
90
+ "@dxos/types": "0.8.4-main.bcb3aa67d6",
91
+ "@dxos/keys": "0.8.4-main.bcb3aa67d6",
92
+ "@dxos/util": "0.8.4-main.bcb3aa67d6"
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/plugin-theme": "0.8.4-main.bcb3aa67d6",
101
+ "@dxos/protocols": "0.8.4-main.bcb3aa67d6",
102
+ "@dxos/random": "0.8.4-main.bcb3aa67d6",
103
+ "@dxos/config": "0.8.4-main.bcb3aa67d6",
104
+ "@dxos/storybook-utils": "0.8.4-main.bcb3aa67d6",
105
+ "@dxos/ui-theme": "0.8.4-main.bcb3aa67d6",
106
+ "@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
107
+ "@dxos/plugin-testing": "0.8.4-main.bcb3aa67d6"
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/ui-theme": "0.8.4-main.bcb3aa67d6",
116
+ "@dxos/react-ui": "0.8.4-main.bcb3aa67d6"
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';
12
+ import { AttentionEvents } from '@dxos/plugin-attention/types';
13
+ import { ClientEvents } from '@dxos/plugin-client/types';
13
14
  import { type CreateObject } from '@dxos/plugin-space/types';
14
15
  import { SpaceOperation } from '@dxos/plugin-space/operations';
15
16
 
16
- import { YouTubeBlueprint } from './blueprints';
17
- import { AppGraphBuilder, BlueprintDefinition, ReactSurface } from './capabilities';
18
- import { meta } from './meta';
17
+ import { YouTubeBlueprint } from '#blueprints';
18
+ import { meta } from '#meta';
19
19
  import { translations } from './translations';
20
- import { Channel, Video } from './types';
20
+ import { Channel, Video } from '#types';
21
+
22
+ import { AppGraphBuilder, BlueprintDefinition, Migrations, ReactSurface } from '#capabilities';
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,21 @@ 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
+ import { linkedSegment } from '@dxos/react-ui-attention';
11
12
  import { type Feed, Filter, Obj, Query, Ref } from '@dxos/echo';
12
13
  import { AtomQuery, AtomRef } from '@dxos/echo-atom';
13
14
  import { invariant } from '@dxos/invariant';
14
15
  import { log } from '@dxos/log';
15
16
  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';
17
+ import { AttentionCapabilities } from '@dxos/plugin-attention/types';
18
+ import { invokeFunctionWithTracing } from '@dxos/plugin-automation/hooks';
19
+ import { AutomationCapabilities } from '@dxos/plugin-automation/types';
19
20
  import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
20
21
 
21
- import { ClearSyncedVideos, Sync } from '../../operations';
22
- import { meta } from '../../meta';
23
- import { Channel, Video } from '../../types';
22
+ import { ClearSyncedVideos, Sync } from '#operations';
23
+ import { meta } from '#meta';
24
+ import { Channel, Video } from '#types';
24
25
 
25
26
  export default Capability.makeModule(
26
27
  Effect.fnUntraced(function* () {
@@ -56,16 +57,12 @@ export default Capability.makeModule(
56
57
  ),
57
58
  )[0];
58
59
  return Effect.succeed([
59
- {
60
- id: companionSegment('video'),
61
- type: PLANK_COMPANION_TYPE,
60
+ AppNode.makeCompanion({
61
+ id: linkedSegment('video'),
62
+ label: ['video.label', { ns: meta.id }],
63
+ icon: 'ph--play--regular',
62
64
  data: video ?? 'video',
63
- properties: {
64
- label: ['video label', { ns: meta.id }],
65
- icon: 'ph--play--regular',
66
- disposition: 'hidden',
67
- },
68
- },
65
+ }),
69
66
  ]);
70
67
  },
71
68
  }),
@@ -95,14 +92,14 @@ export default Capability.makeModule(
95
92
  id: `${meta.id}.sync-channel-error`,
96
93
  icon: 'ph--warning--regular',
97
94
  duration: 5_000,
98
- title: ['sync channel error title', { ns: meta.id }],
99
- closeLabel: ['close label', { ns: meta.id }],
95
+ title: ['sync-channel-error.title', { ns: meta.id }],
96
+ closeLabel: ['close.label', { ns: meta.id }],
100
97
  });
101
98
  }),
102
99
  );
103
100
  }),
104
101
  properties: {
105
- label: ['sync channel label', { ns: meta.id }],
102
+ label: ['sync-channel.label', { ns: meta.id }],
106
103
  icon: 'ph--arrows-clockwise--regular',
107
104
  disposition: 'list-item',
108
105
  },
@@ -127,14 +124,14 @@ export default Capability.makeModule(
127
124
  id: `${meta.id}.clear-synced-videos-error`,
128
125
  icon: 'ph--warning--regular',
129
126
  duration: 5_000,
130
- title: ['clear synced videos error title', { ns: meta.id }],
131
- closeLabel: ['close label', { ns: meta.id }],
127
+ title: ['clear-synced-videos-error.title', { ns: meta.id }],
128
+ closeLabel: ['close.label', { ns: meta.id }],
132
129
  });
133
130
  }),
134
131
  );
135
132
  }),
136
133
  properties: {
137
- label: ['clear synced videos label', { ns: meta.id }],
134
+ label: ['clear-synced-videos.label', { ns: meta.id }],
138
135
  icon: 'ph--trash--regular',
139
136
  disposition: 'list-item',
140
137
  },
@@ -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
+ );
@@ -8,9 +8,9 @@ import React from 'react';
8
8
  import { Capabilities, Capability } from '@dxos/app-framework';
9
9
  import { Surface } from '@dxos/app-framework/ui';
10
10
 
11
- import { ChannelArticle, ChannelSettings, VideoArticle, VideoCard } from '../../containers';
12
- import { meta } from '../../meta';
13
- import { Channel, Video } from '../../types';
11
+ import { ChannelArticle, ChannelSettings, VideoArticle, VideoCard } from '#containers';
12
+ import { meta } from '#meta';
13
+ import { Channel, Video } from '#types';
14
14
 
15
15
  export default Capability.makeModule(() =>
16
16
  Effect.succeed(
@@ -34,7 +34,7 @@ export default Capability.makeModule(() =>
34
34
  Video.instanceOf(data.subject) &&
35
35
  Channel.instanceOf(data.companionTo),
36
36
  component: ({ data: { attendableId, companionTo, subject }, role }) => {
37
- return <VideoArticle role={role} subject={subject} channel={companionTo} attendableId={attendableId} />;
37
+ return <VideoArticle role={role} subject={subject} companionTo={companionTo} attendableId={attendableId} />;
38
38
  },
39
39
  }),
40
40
  Surface.create({
@@ -4,17 +4,12 @@
4
4
 
5
5
  import React, { useState } from 'react';
6
6
 
7
+ import { type CompanionSurfaceProps } 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 = CompanionSurfaceProps<Video.YouTubeVideo>;
18
13
 
19
14
  export const VideoArticle = ({ subject: video, role }: VideoArticleProps) => {
20
15
  const [showPlayer, setShowPlayer] = useState(false);
@@ -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 ObjectSurfaceProps } 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 = ObjectSurfaceProps<Video.YouTubeVideo>;
13
13
 
14
14
  /**
15
15
  * YouTube video card with embedded player.
@@ -4,55 +4,55 @@
4
4
 
5
5
  import { type Resource } from '@dxos/react-ui';
6
6
 
7
- import { meta } from './meta';
8
- import { Channel, Video } from './types';
7
+ import { meta } from '#meta';
8
+ import { Channel, Video } from '#types';
9
9
 
10
10
  export const translations = [
11
11
  {
12
12
  'en-US': {
13
13
  [Channel.YouTubeChannel.typename]: {
14
- 'typename label': 'YouTube Channel',
15
- 'typename label_zero': 'YouTube Channels',
16
- 'typename label_one': 'YouTube Channel',
17
- 'typename label_other': 'YouTube Channels',
18
- 'object name placeholder': 'New YouTube channel',
19
- 'add object label': 'Add YouTube channel',
20
- 'rename object label': 'Rename YouTube channel',
21
- 'delete object label': 'Delete YouTube channel',
22
- 'object deleted label': 'YouTube channel deleted',
14
+ 'typename.label': 'YouTube Channel',
15
+ 'typename.label_zero': 'YouTube Channels',
16
+ 'typename.label_one': 'YouTube Channel',
17
+ 'typename.label_other': 'YouTube Channels',
18
+ 'object-name.placeholder': 'New YouTube channel',
19
+ 'add-object.label': 'Add YouTube channel',
20
+ 'rename-object.label': 'Rename YouTube channel',
21
+ 'delete-object.label': 'Delete YouTube channel',
22
+ 'object-deleted.label': 'YouTube channel deleted',
23
23
  },
24
24
  [Video.YouTubeVideo.typename]: {
25
- 'typename label': 'Video',
26
- 'typename label_zero': 'Videos',
27
- 'typename label_one': 'Video',
28
- 'typename label_other': 'Videos',
29
- 'object name placeholder': 'New video',
30
- 'add object label': 'Add video',
31
- 'rename object label': 'Rename video',
32
- 'delete object label': 'Delete video',
33
- 'object deleted label': 'Video deleted',
25
+ 'typename.label': 'Video',
26
+ 'typename.label_zero': 'Videos',
27
+ 'typename.label_one': 'Video',
28
+ 'typename.label_other': 'Videos',
29
+ 'object-name.placeholder': 'New video',
30
+ 'add-object.label': 'Add video',
31
+ 'rename-object.label': 'Rename video',
32
+ 'delete-object.label': 'Delete video',
33
+ 'object-deleted.label': 'Video deleted',
34
34
  },
35
35
  [meta.id]: {
36
- 'plugin name': 'YouTube',
37
- 'channel label': 'YouTube Channel',
38
- 'video label': 'Video',
39
- 'sync channel label': 'Sync channel',
40
- 'sync channel error title': 'Failed to sync channel',
41
- 'clear synced videos label': 'Clear synced videos',
42
- 'clear synced videos error title': 'Failed to clear synced videos',
43
- 'close label': 'Close',
44
- 'new channel label': 'New YouTube Channel',
45
- 'empty channel message': 'No videos synced yet',
46
- 'no video message': 'Select a video to view it',
36
+ 'plugin.name': 'YouTube',
37
+ 'channel.label': 'YouTube Channel',
38
+ 'video.label': 'Video',
39
+ 'sync-channel.label': 'Sync channel',
40
+ 'sync-channel-error.title': 'Failed to sync channel',
41
+ 'clear-synced-videos.label': 'Clear synced videos',
42
+ 'clear-synced-videos-error.title': 'Failed to clear synced videos',
43
+ 'close.label': 'Close',
44
+ 'new-channel.label': 'New YouTube Channel',
45
+ 'empty-channel.message': 'No videos synced yet',
46
+ 'no-video.message': 'Select a video to view it',
47
47
 
48
- 'channel account label': 'Account',
49
- 'channel account placeholder': 'Select account...',
50
- 'channel sync label': 'Channel Sync',
48
+ 'channel-account.label': 'Account',
49
+ 'channel-account.placeholder': 'Select account...',
50
+ 'channel-sync.label': 'Channel Sync',
51
51
 
52
- 'enable background sync label': 'Enable background sync',
53
- 'enabling background sync label': 'Enabling...',
54
- 'disable background sync label': 'Disable background sync',
55
- 'view trigger label': 'View trigger',
52
+ 'enable-background-sync.label': 'Enable background sync',
53
+ 'enabling-background-sync.label': 'Enabling...',
54
+ 'disable-background-sync.label': 'Disable background sync',
55
+ 'view-trigger.label': 'View trigger',
56
56
  },
57
57
  },
58
58
  },
@@ -11,6 +11,23 @@ import { AccessToken } from '@dxos/types';
11
11
 
12
12
  // @import-as-namespace
13
13
 
14
+ /** @deprecated Use YouTubeChannel instead. */
15
+ export const LegacyYouTubeChannel = Schema.Struct({
16
+ name: Schema.String.pipe(Schema.optional),
17
+ channelId: Schema.String.pipe(Schema.optional),
18
+ channelUrl: Schema.String.pipe(Schema.optional),
19
+ feed: Ref.Ref(Feed.Feed),
20
+ lastSyncedAt: Schema.String.pipe(Schema.optional),
21
+ accessToken: Schema.optional(Ref.Ref(AccessToken.AccessToken)),
22
+ }).pipe(
23
+ Type.object({
24
+ typename: 'org.dxos.type.youtube-channel',
25
+ version: '0.1.0',
26
+ }),
27
+ );
28
+
29
+ export interface LegacyYouTubeChannel extends Schema.Schema.Type<typeof LegacyYouTubeChannel> {}
30
+
14
31
  /**
15
32
  * YouTubeChannel schema representing a YouTube channel to sync videos from.
16
33
  */
@@ -34,7 +51,7 @@ export const YouTubeChannel = Schema.Struct({
34
51
  ),
35
52
  }).pipe(
36
53
  Type.object({
37
- typename: 'org.dxos.type.youtube-channel',
54
+ typename: 'org.dxos.type.youtubeChannel',
38
55
  version: '0.1.0',
39
56
  }),
40
57
  Annotation.IconAnnotation.set({
@@ -20,6 +20,30 @@ export const TranscriptSegment = Schema.Struct({
20
20
 
21
21
  export type TranscriptSegment = Schema.Schema.Type<typeof TranscriptSegment>;
22
22
 
23
+ /** @deprecated Use YouTubeVideo instead. */
24
+ export const LegacyYouTubeVideo = Schema.Struct({
25
+ title: Schema.String,
26
+ videoId: Schema.String,
27
+ description: Schema.String.pipe(Schema.optional),
28
+ url: Schema.String,
29
+ thumbnailUrl: Schema.String.pipe(Schema.optional),
30
+ channelTitle: Schema.String.pipe(Schema.optional),
31
+ publishedAt: Schema.String,
32
+ duration: Schema.String.pipe(Schema.optional),
33
+ viewCount: Schema.Number.pipe(Schema.optional),
34
+ likeCount: Schema.Number.pipe(Schema.optional),
35
+ transcript: Schema.String.pipe(Schema.optional),
36
+ transcriptSegments: Schema.Array(TranscriptSegment).pipe(Schema.optional),
37
+ transcriptFetched: Schema.Boolean.pipe(Schema.optional),
38
+ }).pipe(
39
+ Type.object({
40
+ typename: 'org.dxos.type.youtube-video',
41
+ version: '0.1.0',
42
+ }),
43
+ );
44
+
45
+ export interface LegacyYouTubeVideo extends Schema.Schema.Type<typeof LegacyYouTubeVideo> {}
46
+
23
47
  /**
24
48
  * YouTubeVideo schema representing a video from a YouTube channel.
25
49
  */
@@ -52,7 +76,7 @@ export const YouTubeVideo = Schema.Struct({
52
76
  transcriptFetched: Schema.Boolean.pipe(Schema.optional),
53
77
  }).pipe(
54
78
  Type.object({
55
- typename: 'org.dxos.type.youtube-video',
79
+ typename: 'org.dxos.type.youtubeVideo',
56
80
  version: '0.1.0',
57
81
  }),
58
82
  Annotation.IconAnnotation.set({
@@ -1,90 +0,0 @@
1
- import {
2
- YouTubeVideo
3
- } from "./chunk-YMDT37TA.mjs";
4
- import "./chunk-J5LGTIGS.mjs";
5
-
6
- // src/containers/ChannelArticle/ChannelArticle.tsx
7
- import React, { useMemo } from "react";
8
- import { Obj, Query } from "@dxos/echo";
9
- import { Filter, useObject, useQuery } from "@dxos/react-client/echo";
10
- import { Icon, Panel } from "@dxos/react-ui";
11
- var ChannelArticle = ({ subject: channel }) => {
12
- useObject(channel);
13
- const feed = channel.feed?.target;
14
- const db = Obj.getDatabase(channel);
15
- const videos = useQuery(db, feed ? Query.select(Filter.type(YouTubeVideo)).from(feed) : Query.select(Filter.nothing()));
16
- const sortedVideos = useMemo(() => [
17
- ...videos
18
- ].sort((videoA, videoB) => new Date(videoB.publishedAt).getTime() - new Date(videoA.publishedAt).getTime()), [
19
- videos
20
- ]);
21
- return /* @__PURE__ */ React.createElement(Panel.Root, null, /* @__PURE__ */ React.createElement(Panel.Content, {
22
- className: "overflow-auto"
23
- }, /* @__PURE__ */ React.createElement("div", {
24
- className: "flex flex-col gap-4 p-4"
25
- }, /* @__PURE__ */ React.createElement("div", {
26
- className: "flex items-center justify-between"
27
- }, /* @__PURE__ */ React.createElement("div", {
28
- className: "flex items-center gap-2"
29
- }, /* @__PURE__ */ React.createElement(Icon, {
30
- icon: "ph--youtube-logo--regular",
31
- size: 6
32
- }), /* @__PURE__ */ React.createElement("h2", {
33
- className: "text-lg font-semibold"
34
- }, channel.name ?? "YouTube Channel")), channel.lastSyncedAt && /* @__PURE__ */ React.createElement("span", {
35
- className: "text-xs text-description"
36
- }, "Last synced: ", new Date(channel.lastSyncedAt).toLocaleString())), channel.channelUrl && /* @__PURE__ */ React.createElement("div", {
37
- className: "text-sm text-description"
38
- }, /* @__PURE__ */ React.createElement("a", {
39
- href: channel.channelUrl.startsWith("http") ? channel.channelUrl : `https://www.youtube.com/@${channel.channelUrl}`,
40
- target: "_blank",
41
- rel: "noopener noreferrer",
42
- className: "hover:underline"
43
- }, channel.channelUrl)), /* @__PURE__ */ React.createElement("div", {
44
- className: "flex flex-col gap-2"
45
- }, /* @__PURE__ */ React.createElement("h3", {
46
- className: "text-md font-medium"
47
- }, "Videos (", sortedVideos.length, ")"), /* @__PURE__ */ React.createElement("div", {
48
- className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
49
- }, sortedVideos.map((video) => /* @__PURE__ */ React.createElement("div", {
50
- key: video.videoId,
51
- className: "flex flex-col gap-2 p-2 rounded hover:bg-surface-hover"
52
- }, video.thumbnailUrl ? /* @__PURE__ */ React.createElement("a", {
53
- href: video.url,
54
- target: "_blank",
55
- rel: "noopener noreferrer",
56
- className: "relative aspect-video group"
57
- }, /* @__PURE__ */ React.createElement("img", {
58
- src: video.thumbnailUrl,
59
- alt: video.title,
60
- className: "h-full w-full object-cover rounded"
61
- }), /* @__PURE__ */ React.createElement("div", {
62
- className: "absolute inset-0 flex items-center justify-center bg-black/0 group-hover:bg-black/30 rounded transition-colors"
63
- }, /* @__PURE__ */ React.createElement("div", {
64
- className: "opacity-0 group-hover:opacity-100 bg-red-600 text-white rounded-full p-2 transition-opacity"
65
- }, /* @__PURE__ */ React.createElement(Icon, {
66
- icon: "ph--play--fill",
67
- size: 4
68
- })))) : /* @__PURE__ */ React.createElement("div", {
69
- className: "aspect-video bg-surface-hover rounded flex items-center justify-center"
70
- }, /* @__PURE__ */ React.createElement(Icon, {
71
- icon: "ph--video--regular",
72
- size: 8
73
- })), /* @__PURE__ */ React.createElement("div", {
74
- className: "flex flex-col gap-1"
75
- }, /* @__PURE__ */ React.createElement("span", {
76
- className: "font-medium line-clamp-2",
77
- title: video.title
78
- }, video.title), /* @__PURE__ */ React.createElement("span", {
79
- className: "text-xs text-description"
80
- }, new Date(video.publishedAt).toLocaleDateString(), video.transcript && " \u2022 Transcript available")))), sortedVideos.length === 0 && /* @__PURE__ */ React.createElement("div", {
81
- className: "col-span-full text-sm text-description p-4 text-center"
82
- }, "No videos synced yet. Sync the channel to fetch videos."))))));
83
- };
84
-
85
- // src/containers/ChannelArticle/index.ts
86
- var ChannelArticle_default = ChannelArticle;
87
- export {
88
- ChannelArticle_default as default
89
- };
90
- //# sourceMappingURL=ChannelArticle-CDQR4BBY.mjs.map