@dxos/plugin-transformer 0.8.4-main.c4373fc → 0.8.4-main.d05673bc65
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 +21 -19
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +21 -19
- 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/DebugInfo.d.ts.map +1 -0
- package/dist/types/src/components/Voice/Voice.d.ts.map +1 -0
- package/dist/types/src/components/Voice/Voice.stories.d.ts.map +1 -0
- package/dist/types/src/components/Voice/index.d.ts +3 -0
- package/dist/types/src/components/Voice/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -33
- package/src/TransformerPlugin.tsx +9 -21
- package/src/components/{DebugInfo.tsx → Voice/DebugInfo.tsx} +3 -3
- package/src/components/{Voice.stories.tsx → Voice/Voice.stories.tsx} +2 -2
- package/src/components/{Voice.tsx → Voice/Voice.tsx} +1 -1
- package/src/components/Voice/index.ts +6 -0
- package/src/components/index.ts +5 -0
- package/src/meta.ts +8 -4
- package/dist/types/src/components/DebugInfo.d.ts.map +0 -1
- package/dist/types/src/components/Voice.d.ts.map +0 -1
- package/dist/types/src/components/Voice.stories.d.ts.map +0 -1
- /package/dist/types/src/components/{DebugInfo.d.ts → Voice/DebugInfo.d.ts} +0 -0
- /package/dist/types/src/components/{Voice.d.ts → Voice/Voice.d.ts} +0 -0
- /package/dist/types/src/components/{Voice.stories.d.ts → Voice/Voice.stories.d.ts} +0 -0
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.d05673bc65",
|
|
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,
|
|
@@ -35,44 +39,43 @@
|
|
|
35
39
|
"src"
|
|
36
40
|
],
|
|
37
41
|
"dependencies": {
|
|
38
|
-
"@huggingface/transformers": "^3.
|
|
39
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
40
|
-
"@preact/signals-core": "^1.12.1",
|
|
42
|
+
"@huggingface/transformers": "^3.8.1",
|
|
41
43
|
"date-fns": "^3.3.1",
|
|
42
|
-
"effect": "3.
|
|
43
|
-
"@dxos/app-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/invariant": "0.8.4-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/plugin-
|
|
51
|
-
"@dxos/plugin-
|
|
52
|
-
"@dxos/plugin-
|
|
53
|
-
"@dxos/react-client": "0.8.4-main.
|
|
54
|
-
"@dxos/react-ui-attention": "0.8.4-main.
|
|
55
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
56
|
-
"@dxos/util": "0.8.4-main.
|
|
44
|
+
"effect": "3.19.16",
|
|
45
|
+
"@dxos/app-toolkit": "0.8.4-main.d05673bc65",
|
|
46
|
+
"@dxos/async": "0.8.4-main.d05673bc65",
|
|
47
|
+
"@dxos/echo": "0.8.4-main.d05673bc65",
|
|
48
|
+
"@dxos/display-name": "0.8.4-main.d05673bc65",
|
|
49
|
+
"@dxos/invariant": "0.8.4-main.d05673bc65",
|
|
50
|
+
"@dxos/log": "0.8.4-main.d05673bc65",
|
|
51
|
+
"@dxos/app-framework": "0.8.4-main.d05673bc65",
|
|
52
|
+
"@dxos/plugin-graph": "0.8.4-main.d05673bc65",
|
|
53
|
+
"@dxos/plugin-space": "0.8.4-main.d05673bc65",
|
|
54
|
+
"@dxos/plugin-client": "0.8.4-main.d05673bc65",
|
|
55
|
+
"@dxos/react-client": "0.8.4-main.d05673bc65",
|
|
56
|
+
"@dxos/react-ui-attention": "0.8.4-main.d05673bc65",
|
|
57
|
+
"@dxos/react-ui-stack": "0.8.4-main.d05673bc65",
|
|
58
|
+
"@dxos/util": "0.8.4-main.d05673bc65",
|
|
59
|
+
"@dxos/operation": "0.8.4-main.d05673bc65"
|
|
57
60
|
},
|
|
58
61
|
"devDependencies": {
|
|
59
|
-
"@types/react": "~19.2.
|
|
60
|
-
"@types/react-dom": "~19.2.
|
|
62
|
+
"@types/react": "~19.2.7",
|
|
63
|
+
"@types/react-dom": "~19.2.3",
|
|
61
64
|
"@xenova/transformers": "^2.17.2",
|
|
62
|
-
"react": "~19.2.
|
|
63
|
-
"react-dom": "~19.2.
|
|
64
|
-
"vite": "7.1.
|
|
65
|
-
"@dxos/random": "0.8.4-main.
|
|
66
|
-
"@dxos/react-ui
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
65
|
+
"react": "~19.2.3",
|
|
66
|
+
"react-dom": "~19.2.3",
|
|
67
|
+
"vite": "^7.1.11",
|
|
68
|
+
"@dxos/random": "0.8.4-main.d05673bc65",
|
|
69
|
+
"@dxos/react-ui": "0.8.4-main.d05673bc65",
|
|
70
|
+
"@dxos/storybook-utils": "0.8.4-main.d05673bc65",
|
|
71
|
+
"@dxos/ui-theme": "0.8.4-main.d05673bc65"
|
|
69
72
|
},
|
|
70
73
|
"peerDependencies": {
|
|
71
|
-
"effect": "
|
|
72
|
-
"react": "
|
|
73
|
-
"react-dom": "
|
|
74
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
75
|
-
"@dxos/
|
|
74
|
+
"effect": "3.19.16",
|
|
75
|
+
"react": "~19.2.3",
|
|
76
|
+
"react-dom": "~19.2.3",
|
|
77
|
+
"@dxos/react-ui": "0.8.4-main.d05673bc65",
|
|
78
|
+
"@dxos/ui-theme": "0.8.4-main.d05673bc65"
|
|
76
79
|
},
|
|
77
80
|
"publishConfig": {
|
|
78
81
|
"access": "public"
|
|
@@ -2,32 +2,20 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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`,
|
|
12
|
+
export const TransformerPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addSchemaModule({ schema: [], id: 'schema' }),
|
|
14
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
15
|
+
// Plugin.addModule({
|
|
16
|
+
// id: 'intent-resolver',
|
|
30
17
|
// activatesOn: Events.SetupIntentResolver,
|
|
31
18
|
// activate: IntentResolver,
|
|
32
19
|
// }),
|
|
33
|
-
|
|
20
|
+
Plugin.make,
|
|
21
|
+
);
|
|
@@ -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 w-48 h-5 bg-gray-200 rounded relative'>
|
|
48
|
+
<div className='mt-2 w-48 h-5 bg-gray-200 rounded-sm relative'>
|
|
49
49
|
<div
|
|
50
|
-
className='h-full bg-green-500 transition-all duration-100 rounded'
|
|
50
|
+
className='h-full bg-green-500 transition-all duration-100 rounded-sm'
|
|
51
51
|
style={{ width: `${(audioLevel / 255) * 100}%` }}
|
|
52
52
|
/>
|
|
53
53
|
</div>
|
|
@@ -67,7 +67,7 @@ export const DebugInfo: FC<Partial<DebugInfoProps>> = ({
|
|
|
67
67
|
{transcription && (
|
|
68
68
|
<div className='mt-4'>
|
|
69
69
|
<strong>Transcription:</strong>
|
|
70
|
-
<p className='mt-2 p-4 bg-gray-100 rounded whitespace-pre-wrap'>{transcription}</p>
|
|
70
|
+
<p className='mt-2 p-4 bg-gray-100 rounded-sm whitespace-pre-wrap'>{transcription}</p>
|
|
71
71
|
</div>
|
|
72
72
|
)}
|
|
73
73
|
</div>
|
|
@@ -9,9 +9,9 @@ import { withTheme } from '@dxos/react-ui/testing';
|
|
|
9
9
|
import { Voice } from './Voice';
|
|
10
10
|
|
|
11
11
|
const meta = {
|
|
12
|
-
title: 'plugins/plugin-transformer/Voice',
|
|
12
|
+
title: 'plugins/plugin-transformer/components/Voice',
|
|
13
13
|
component: Voice,
|
|
14
|
-
decorators: [withTheme],
|
|
14
|
+
decorators: [withTheme()],
|
|
15
15
|
parameters: {
|
|
16
16
|
layout: 'centered',
|
|
17
17
|
},
|
|
@@ -6,7 +6,7 @@ import React, { useCallback, useEffect, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { log } from '@dxos/log';
|
|
8
8
|
|
|
9
|
-
import { useAudioStream, usePipeline } from '
|
|
9
|
+
import { useAudioStream, usePipeline } from '../../hooks';
|
|
10
10
|
|
|
11
11
|
import { DebugInfo } from './DebugInfo';
|
|
12
12
|
|
package/src/meta.ts
CHANGED
|
@@ -2,12 +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 meta:
|
|
8
|
-
id: 'dxos.
|
|
8
|
+
export const meta: Plugin.Meta = {
|
|
9
|
+
id: 'org.dxos.plugin.transformer',
|
|
9
10
|
name: 'Transformer',
|
|
10
|
-
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
|
+
`,
|
|
11
15
|
icon: 'ph--cpu--regular',
|
|
12
16
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transformer',
|
|
13
17
|
tags: ['labs'],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DebugInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/DebugInfo.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,CA4DjD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Voice.d.ts","sourceRoot":"","sources":["../../../../src/components/Voice.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAQhE,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,0BAAkD,UAAU,sBA4FjF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Voice.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Voice.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,IAAI;;;;;;;CAOoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|