@dxos/plugin-transformer 0.8.4-main.1da679c → 0.8.4-main.21d9917
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/dist/lib/browser/index.mjs +20 -21
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +20 -21
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/TransformerPlugin.d.ts +2 -1
- package/dist/types/src/TransformerPlugin.d.ts.map +1 -1
- package/dist/types/src/components/Voice.stories.d.ts +0 -1
- package/dist/types/src/components/Voice.stories.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -33
- package/src/TransformerPlugin.tsx +11 -25
- package/src/components/DebugInfo.tsx +2 -2
- package/src/components/Voice.stories.tsx +2 -4
- package/src/hooks/useAudioStream.ts +1 -1
- package/src/meta.ts +8 -6
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transformer",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.21d9917",
|
|
4
4
|
"description": "Client transformer",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
@@ -36,44 +40,41 @@
|
|
|
36
40
|
],
|
|
37
41
|
"dependencies": {
|
|
38
42
|
"@huggingface/transformers": "^3.3.3",
|
|
39
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
40
|
-
"@preact/signals-core": "^1.9.0",
|
|
41
43
|
"date-fns": "^3.3.1",
|
|
42
|
-
"effect": "3.
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/plugin-
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/react-
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/util": "0.8.4-main.1da679c"
|
|
44
|
+
"effect": "3.19.11",
|
|
45
|
+
"@dxos/display-name": "0.8.4-main.21d9917",
|
|
46
|
+
"@dxos/app-framework": "0.8.4-main.21d9917",
|
|
47
|
+
"@dxos/async": "0.8.4-main.21d9917",
|
|
48
|
+
"@dxos/echo": "0.8.4-main.21d9917",
|
|
49
|
+
"@dxos/invariant": "0.8.4-main.21d9917",
|
|
50
|
+
"@dxos/log": "0.8.4-main.21d9917",
|
|
51
|
+
"@dxos/plugin-client": "0.8.4-main.21d9917",
|
|
52
|
+
"@dxos/plugin-graph": "0.8.4-main.21d9917",
|
|
53
|
+
"@dxos/react-client": "0.8.4-main.21d9917",
|
|
54
|
+
"@dxos/plugin-space": "0.8.4-main.21d9917",
|
|
55
|
+
"@dxos/react-ui-attention": "0.8.4-main.21d9917",
|
|
56
|
+
"@dxos/operation": "0.8.4-main.21d9917",
|
|
57
|
+
"@dxos/react-ui-stack": "0.8.4-main.21d9917",
|
|
58
|
+
"@dxos/util": "0.8.4-main.21d9917"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
|
-
"@types/react": "~
|
|
61
|
-
"@types/react-dom": "~
|
|
61
|
+
"@types/react": "~19.2.7",
|
|
62
|
+
"@types/react-dom": "~19.2.3",
|
|
62
63
|
"@xenova/transformers": "^2.17.2",
|
|
63
|
-
"react": "~
|
|
64
|
-
"react-dom": "~
|
|
65
|
-
"vite": "7.1.
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
64
|
+
"react": "~19.2.3",
|
|
65
|
+
"react-dom": "~19.2.3",
|
|
66
|
+
"vite": "7.1.9",
|
|
67
|
+
"@dxos/react-ui": "0.8.4-main.21d9917",
|
|
68
|
+
"@dxos/storybook-utils": "0.8.4-main.21d9917",
|
|
69
|
+
"@dxos/ui-theme": "0.8.4-main.21d9917",
|
|
70
|
+
"@dxos/random": "0.8.4-main.21d9917"
|
|
70
71
|
},
|
|
71
72
|
"peerDependencies": {
|
|
72
|
-
"effect": "
|
|
73
|
-
"react": "~
|
|
74
|
-
"react-dom": "~
|
|
75
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
76
|
-
"@dxos/
|
|
73
|
+
"effect": "3.19.11",
|
|
74
|
+
"react": "~19.2.3",
|
|
75
|
+
"react-dom": "~19.2.3",
|
|
76
|
+
"@dxos/react-ui": "0.8.4-main.21d9917",
|
|
77
|
+
"@dxos/ui-theme": "0.8.4-main.21d9917"
|
|
77
78
|
},
|
|
78
79
|
"publishConfig": {
|
|
79
80
|
"access": "public"
|
|
@@ -2,33 +2,19 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
5
|
+
import { Common, Plugin } from '@dxos/app-framework';
|
|
7
6
|
|
|
8
7
|
// import { IntentResolver } from './capabilities';
|
|
9
8
|
import { meta } from './meta';
|
|
10
9
|
import { translations } from './translations';
|
|
11
10
|
|
|
12
|
-
export const TransformerPlugin = ()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
]);
|
|
11
|
+
export const TransformerPlugin = Plugin.define(meta).pipe(
|
|
12
|
+
Common.Plugin.addTranslationsModule({ translations }),
|
|
13
|
+
Common.Plugin.addSchemaModule({ schema: [], id: 'schema' }),
|
|
14
|
+
// Plugin.addModule({
|
|
15
|
+
// id: 'intent-resolver',
|
|
16
|
+
// activatesOn: Events.SetupIntentResolver,
|
|
17
|
+
// activate: IntentResolver,
|
|
18
|
+
// }),
|
|
19
|
+
Plugin.make,
|
|
20
|
+
);
|
|
@@ -45,9 +45,9 @@ export const DebugInfo: FC<Partial<DebugInfoProps>> = ({
|
|
|
45
45
|
<div className='mb-2 text-green-600'>
|
|
46
46
|
<strong>Status:</strong> Microphone is active
|
|
47
47
|
{debug && audioLevel && (
|
|
48
|
-
<div className='mt-2
|
|
48
|
+
<div className='mt-2 is-48 bs-5 bg-gray-200 rounded relative'>
|
|
49
49
|
<div
|
|
50
|
-
className='
|
|
50
|
+
className='bs-full bg-green-500 transition-all duration-100 rounded'
|
|
51
51
|
style={{ width: `${(audioLevel / 255) * 100}%` }}
|
|
52
52
|
/>
|
|
53
53
|
</div>
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
|
|
9
|
-
import {
|
|
7
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
10
8
|
|
|
11
9
|
import { Voice } from './Voice';
|
|
12
10
|
|
|
13
11
|
const meta = {
|
|
14
12
|
title: 'plugins/plugin-transformer/Voice',
|
|
15
13
|
component: Voice,
|
|
16
|
-
decorators: [withTheme
|
|
14
|
+
decorators: [withTheme],
|
|
17
15
|
parameters: {
|
|
18
16
|
layout: 'centered',
|
|
19
17
|
},
|
|
@@ -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);
|
package/src/meta.ts
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
6
7
|
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
export const meta: PluginMeta = {
|
|
10
|
-
id: TRANSFORMER_PLUGIN,
|
|
8
|
+
export const meta: Plugin.Meta = {
|
|
9
|
+
id: 'dxos.org/plugin/transformer',
|
|
11
10
|
name: 'Transformer',
|
|
12
|
-
description:
|
|
11
|
+
description: trim`
|
|
12
|
+
Execute local machine learning transformers and AI models directly in your browser.
|
|
13
|
+
Run embeddings, classifications, and other ML tasks without server dependencies.
|
|
14
|
+
`,
|
|
13
15
|
icon: 'ph--cpu--regular',
|
|
14
16
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transformer',
|
|
15
17
|
tags: ['labs'],
|