@dxos/plugin-transformer 0.8.4-main.84f28bd → 0.8.4-main.a4bbb77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-transformer",
3
- "version": "0.8.4-main.84f28bd",
3
+ "version": "0.8.4-main.a4bbb77",
4
4
  "description": "Client transformer",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,11 +10,13 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs",
15
16
  "node": "./dist/lib/node-esm/index.mjs"
16
17
  },
17
18
  "./types": {
19
+ "source": "./src/types/index.ts",
18
20
  "types": "./dist/types/src/types/index.d.ts",
19
21
  "browser": "./dist/lib/browser/types/index.mjs",
20
22
  "node": "./dist/lib/node-esm/types/index.mjs"
@@ -35,43 +37,43 @@
35
37
  "dependencies": {
36
38
  "@huggingface/transformers": "^3.3.3",
37
39
  "@preact-signals/safe-react": "^0.9.0",
38
- "@preact/signals-core": "^1.9.0",
40
+ "@preact/signals-core": "^1.12.1",
39
41
  "date-fns": "^3.3.1",
40
- "effect": "3.16.13",
41
- "@dxos/app-framework": "0.8.4-main.84f28bd",
42
- "@dxos/async": "0.8.4-main.84f28bd",
43
- "@dxos/display-name": "0.8.4-main.84f28bd",
44
- "@dxos/echo": "0.8.4-main.84f28bd",
45
- "@dxos/echo-schema": "0.8.4-main.84f28bd",
46
- "@dxos/invariant": "0.8.4-main.84f28bd",
47
- "@dxos/live-object": "0.8.4-main.84f28bd",
48
- "@dxos/plugin-client": "0.8.4-main.84f28bd",
49
- "@dxos/log": "0.8.4-main.84f28bd",
50
- "@dxos/plugin-graph": "0.8.4-main.84f28bd",
51
- "@dxos/plugin-space": "0.8.4-main.84f28bd",
52
- "@dxos/react-client": "0.8.4-main.84f28bd",
53
- "@dxos/react-ui-attention": "0.8.4-main.84f28bd",
54
- "@dxos/react-ui-stack": "0.8.4-main.84f28bd",
55
- "@dxos/util": "0.8.4-main.84f28bd"
42
+ "effect": "3.18.3",
43
+ "@dxos/app-framework": "0.8.4-main.a4bbb77",
44
+ "@dxos/async": "0.8.4-main.a4bbb77",
45
+ "@dxos/display-name": "0.8.4-main.a4bbb77",
46
+ "@dxos/echo": "0.8.4-main.a4bbb77",
47
+ "@dxos/echo-schema": "0.8.4-main.a4bbb77",
48
+ "@dxos/invariant": "0.8.4-main.a4bbb77",
49
+ "@dxos/live-object": "0.8.4-main.a4bbb77",
50
+ "@dxos/log": "0.8.4-main.a4bbb77",
51
+ "@dxos/plugin-client": "0.8.4-main.a4bbb77",
52
+ "@dxos/plugin-graph": "0.8.4-main.a4bbb77",
53
+ "@dxos/react-client": "0.8.4-main.a4bbb77",
54
+ "@dxos/plugin-space": "0.8.4-main.a4bbb77",
55
+ "@dxos/react-ui-attention": "0.8.4-main.a4bbb77",
56
+ "@dxos/react-ui-stack": "0.8.4-main.a4bbb77",
57
+ "@dxos/util": "0.8.4-main.a4bbb77"
56
58
  },
57
59
  "devDependencies": {
58
- "@types/react": "~18.2.0",
59
- "@types/react-dom": "~18.2.0",
60
+ "@types/react": "~19.2.0",
61
+ "@types/react-dom": "~19.2.0",
60
62
  "@xenova/transformers": "^2.17.2",
61
- "react": "~18.2.0",
62
- "react-dom": "~18.2.0",
63
- "vite": "5.4.7",
64
- "@dxos/random": "0.8.4-main.84f28bd",
65
- "@dxos/react-ui": "0.8.4-main.84f28bd",
66
- "@dxos/react-ui-theme": "0.8.4-main.84f28bd",
67
- "@dxos/storybook-utils": "0.8.4-main.84f28bd"
63
+ "react": "~19.2.0",
64
+ "react-dom": "~19.2.0",
65
+ "vite": "7.1.9",
66
+ "@dxos/random": "0.8.4-main.a4bbb77",
67
+ "@dxos/react-ui": "0.8.4-main.a4bbb77",
68
+ "@dxos/react-ui-theme": "0.8.4-main.a4bbb77",
69
+ "@dxos/storybook-utils": "0.8.4-main.a4bbb77"
68
70
  },
69
71
  "peerDependencies": {
70
72
  "effect": "^3.13.3",
71
- "react": "~18.2.0",
72
- "react-dom": "~18.2.0",
73
- "@dxos/react-ui": "0.8.4-main.84f28bd",
74
- "@dxos/react-ui-theme": "0.8.4-main.84f28bd"
73
+ "react": "^19.0.0",
74
+ "react-dom": "^19.0.0",
75
+ "@dxos/react-ui": "0.8.4-main.a4bbb77",
76
+ "@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
75
77
  },
76
78
  "publishConfig": {
77
79
  "access": "public"
@@ -2,33 +2,32 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';
5
+ import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
6
6
  import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
7
7
 
8
8
  // import { IntentResolver } from './capabilities';
9
9
  import { meta } from './meta';
10
10
  import { translations } from './translations';
11
11
 
12
- export const TransformerPlugin = () =>
13
- definePlugin(meta, [
14
- defineModule({
15
- id: `${meta.id}/module/translations`,
16
- activatesOn: Events.SetupTranslations,
17
- activate: () => contributes(Capabilities.Translations, translations),
18
- }),
19
- defineModule({
20
- id: `${meta.id}/module/metadata`,
21
- activatesOn: Events.SetupMetadata,
22
- activate: () => [],
23
- }),
24
- defineModule({
25
- id: `${meta.id}/module/schema`,
26
- activatesOn: ClientEvents.SetupSchema,
27
- activate: () => contributes(ClientCapabilities.Schema, []),
28
- }),
29
- // defineModule({
30
- // id: `${meta.id}/module/intent-resolver`,
31
- // activatesOn: Events.SetupIntentResolver,
32
- // activate: IntentResolver,
33
- // }),
34
- ]);
12
+ export const TransformerPlugin = definePlugin(meta, () => [
13
+ defineModule({
14
+ id: `${meta.id}/module/translations`,
15
+ activatesOn: Events.SetupTranslations,
16
+ activate: () => contributes(Capabilities.Translations, translations),
17
+ }),
18
+ defineModule({
19
+ id: `${meta.id}/module/metadata`,
20
+ activatesOn: Events.SetupMetadata,
21
+ activate: () => [],
22
+ }),
23
+ defineModule({
24
+ id: `${meta.id}/module/schema`,
25
+ activatesOn: ClientEvents.SetupSchema,
26
+ activate: () => contributes(ClientCapabilities.Schema, []),
27
+ }),
28
+ // defineModule({
29
+ // id: `${meta.id}/module/intent-resolver`,
30
+ // activatesOn: Events.SetupIntentResolver,
31
+ // activate: IntentResolver,
32
+ // }),
33
+ ]);
@@ -2,22 +2,20 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
 
7
- import type { Meta, StoryObj } from '@storybook/react-vite';
8
-
9
- import { withLayout, withTheme } from '@dxos/storybook-utils';
7
+ import { withTheme } from '@dxos/react-ui/testing';
10
8
 
11
9
  import { Voice } from './Voice';
12
10
 
13
- const meta: Meta<typeof Voice> = {
11
+ const meta = {
14
12
  title: 'plugins/plugin-transformer/Voice',
15
13
  component: Voice,
16
- decorators: [withTheme, withLayout()],
14
+ decorators: [withTheme],
17
15
  parameters: {
18
16
  layout: 'centered',
19
17
  },
20
- };
18
+ } satisfies Meta<typeof Voice>;
21
19
 
22
20
  export default meta;
23
21
 
@@ -2,13 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import React, { useState, useCallback, useEffect } from 'react';
5
+ import React, { useCallback, useEffect, useState } from 'react';
6
6
 
7
7
  import { log } from '@dxos/log';
8
8
 
9
- import { DebugInfo } from './DebugInfo';
10
9
  import { useAudioStream, usePipeline } from '../hooks';
11
10
 
11
+ import { DebugInfo } from './DebugInfo';
12
+
12
13
  export type VoiceProps = {
13
14
  active?: boolean;
14
15
  debug?: boolean;
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { useState, useRef, useEffect, useCallback } from 'react';
5
+ import { useCallback, useEffect, useRef, useState } from 'react';
6
6
 
7
7
  import { log } from '@dxos/log';
8
8
 
@@ -28,7 +28,7 @@ export const useAudioStream = ({ active, debug, onAudioData }: AudioStreamConfig
28
28
  // TODO(burdon): Convert to class.
29
29
  const audioContextRef = useRef<AudioContext | null>(null);
30
30
  const analyserRef = useRef<AnalyserNode | null>(null);
31
- const animationFrameRef = useRef<number>();
31
+ const animationFrameRef = useRef<number>(undefined);
32
32
  const workletNodeRef = useRef<AudioWorkletNode | null>(null);
33
33
  const isProcessingRef = useRef(false);
34
34
  const mediaStreamRef = useRef<MediaStream | null>(null);
@@ -2,8 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type Pipeline, pipeline, env } from '@xenova/transformers';
6
- import { useState, useRef, useEffect } from 'react';
5
+ import { type Pipeline, env, pipeline } from '@xenova/transformers';
6
+ import { useEffect, useRef, useState } from 'react';
7
7
 
8
8
  import { invariant } from '@dxos/invariant';
9
9
  import { log } from '@dxos/log';
package/src/meta.ts CHANGED
@@ -4,10 +4,8 @@
4
4
 
5
5
  import { type PluginMeta } from '@dxos/app-framework';
6
6
 
7
- export const TRANSFORMER_PLUGIN = 'dxos.org/plugin/transformer';
8
-
9
7
  export const meta: PluginMeta = {
10
- id: TRANSFORMER_PLUGIN,
8
+ id: 'dxos.org/plugin/transformer',
11
9
  name: 'Transformer',
12
10
  description: 'Run local transformers.',
13
11
  icon: 'ph--cpu--regular',