@dxos/plugin-transformer 0.8.4-main.422d1c7879 → 0.8.4-main.43cb759274
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/LICENSE +102 -5
- package/PLUGIN.mdl +326 -0
- package/README.md +1 -1
- package/dist/lib/neutral/TransformerPlugin.mjs +38 -0
- package/dist/lib/neutral/TransformerPlugin.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SFEKXMAC.mjs +36 -0
- package/dist/lib/neutral/chunk-SFEKXMAC.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +136 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +339 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +7 -0
- package/dist/lib/neutral/plugin.mjs +11 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +15 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/types/src/TransformerPlugin.d.ts +1 -0
- package/dist/types/src/TransformerPlugin.d.ts.map +1 -1
- package/dist/types/src/TransformerPlugin.test.d.ts +2 -0
- package/dist/types/src/TransformerPlugin.test.d.ts.map +1 -0
- package/dist/types/src/components/Voice/Voice.d.ts.map +1 -1
- package/dist/types/src/components/Voice/Voice.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioStream.d.ts.map +1 -1
- package/dist/types/src/hooks/usePipeline.d.ts +1 -1
- package/dist/types/src/hooks/usePipeline.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing/node-pipeline.d.ts +1 -1
- package/dist/types/src/testing/node-pipeline.d.ts.map +1 -1
- package/dist/types/src/testing/pipeline.d.ts.map +1 -1
- package/dist/types/src/testing/web-pipeline.d.ts +1 -1
- package/dist/types/src/testing/web-pipeline.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -3
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +58 -40
- package/src/TransformerPlugin.test.ts +25 -0
- package/src/TransformerPlugin.tsx +9 -2
- package/src/index.ts +0 -2
- package/src/meta.ts +21 -6
- package/src/plugin.ts +9 -0
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/index.mjs +0 -54
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/types/index.mjs +0 -1
- package/dist/lib/node-esm/index.mjs +0 -56
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/types/index.mjs +0 -2
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transformer",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.43cb759274",
|
|
4
4
|
"description": "Client transformer",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,73 +8,91 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
|
-
"#components":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
"#components": {
|
|
17
|
+
"source": "./src/components/index.ts",
|
|
18
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#hooks": {
|
|
22
|
+
"source": "./src/hooks/index.ts",
|
|
23
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#meta": {
|
|
27
|
+
"source": "./src/meta.ts",
|
|
28
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#plugin": {
|
|
32
|
+
"source": "./src/TransformerPlugin.tsx",
|
|
33
|
+
"types": "./dist/types/src/TransformerPlugin.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/TransformerPlugin.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#translations": {
|
|
37
|
+
"source": "./src/translations.ts",
|
|
38
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
40
|
+
}
|
|
20
41
|
},
|
|
21
42
|
"exports": {
|
|
22
43
|
".": {
|
|
23
44
|
"source": "./src/index.ts",
|
|
24
45
|
"types": "./dist/types/src/index.d.ts",
|
|
25
|
-
"
|
|
26
|
-
|
|
46
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
49
|
+
"./plugin": {
|
|
50
|
+
"source": "./src/plugin.ts",
|
|
51
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
52
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
27
53
|
},
|
|
28
|
-
"./
|
|
29
|
-
"source": "./src/
|
|
30
|
-
"types": "./dist/types/src/
|
|
31
|
-
"
|
|
32
|
-
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
54
|
+
"./translations": {
|
|
55
|
+
"source": "./src/translations.ts",
|
|
56
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
57
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
33
58
|
}
|
|
34
59
|
},
|
|
35
60
|
"types": "dist/types/src/index.d.ts",
|
|
36
61
|
"files": [
|
|
37
62
|
"dist",
|
|
38
|
-
"src"
|
|
63
|
+
"src",
|
|
64
|
+
"PLUGIN.mdl"
|
|
39
65
|
],
|
|
40
66
|
"dependencies": {
|
|
41
67
|
"@huggingface/transformers": "^3.8.1",
|
|
42
|
-
"
|
|
43
|
-
"effect": "3.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/app-framework": "0.8.4-main.422d1c7879",
|
|
52
|
-
"@dxos/plugin-client": "0.8.4-main.422d1c7879",
|
|
53
|
-
"@dxos/plugin-graph": "0.8.4-main.422d1c7879",
|
|
54
|
-
"@dxos/react-ui-attention": "0.8.4-main.422d1c7879",
|
|
55
|
-
"@dxos/react-client": "0.8.4-main.422d1c7879",
|
|
56
|
-
"@dxos/react-ui-stack": "0.8.4-main.422d1c7879",
|
|
57
|
-
"@dxos/util": "0.8.4-main.422d1c7879",
|
|
58
|
-
"@dxos/plugin-space": "0.8.4-main.422d1c7879"
|
|
68
|
+
"@xenova/transformers": "^2.17.2",
|
|
69
|
+
"effect": "3.21.2",
|
|
70
|
+
"@dxos/app-framework": "0.8.4-main.43cb759274",
|
|
71
|
+
"@dxos/app-toolkit": "0.8.4-main.43cb759274",
|
|
72
|
+
"@dxos/keys": "0.8.4-main.43cb759274",
|
|
73
|
+
"@dxos/invariant": "0.8.4-main.43cb759274",
|
|
74
|
+
"@dxos/log": "0.8.4-main.43cb759274",
|
|
75
|
+
"@dxos/util": "0.8.4-main.43cb759274",
|
|
76
|
+
"@dxos/plugin-client": "0.8.4-main.43cb759274"
|
|
59
77
|
},
|
|
60
78
|
"devDependencies": {
|
|
61
79
|
"@types/react": "~19.2.7",
|
|
62
80
|
"@types/react-dom": "~19.2.3",
|
|
63
|
-
"@xenova/transformers": "^2.17.2",
|
|
64
81
|
"react": "~19.2.3",
|
|
65
82
|
"react-dom": "~19.2.3",
|
|
66
|
-
"vite": "^
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
83
|
+
"vite": "^8.0.14",
|
|
84
|
+
"@dxos/plugin-testing": "0.8.4-main.43cb759274",
|
|
85
|
+
"@dxos/random": "0.8.4-main.43cb759274",
|
|
86
|
+
"@dxos/react-ui": "0.8.4-main.43cb759274",
|
|
87
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274",
|
|
88
|
+
"@dxos/storybook-utils": "0.8.4-main.43cb759274"
|
|
71
89
|
},
|
|
72
90
|
"peerDependencies": {
|
|
73
|
-
"effect": "3.
|
|
91
|
+
"effect": "3.21.2",
|
|
74
92
|
"react": "~19.2.3",
|
|
75
93
|
"react-dom": "~19.2.3",
|
|
76
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
77
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
94
|
+
"@dxos/react-ui": "0.8.4-main.43cb759274",
|
|
95
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274"
|
|
78
96
|
},
|
|
79
97
|
"publishConfig": {
|
|
80
98
|
"access": "public"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { TransformerPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('TransformerPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), TransformerPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Modules expected to be active after a normal startup.
|
|
23
|
+
expect(harness.manager.getActive()).toContain(moduleId('schema'));
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -7,16 +7,23 @@ import { AppPlugin } from '@dxos/app-toolkit';
|
|
|
7
7
|
|
|
8
8
|
// import { IntentResolver } from './capabilities';
|
|
9
9
|
import { meta } from '#meta';
|
|
10
|
+
import { translations } from '#translations';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
13
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
12
14
|
|
|
13
15
|
export const TransformerPlugin = Plugin.define(meta).pipe(
|
|
14
|
-
AppPlugin.addSchemaModule({ schema: []
|
|
16
|
+
AppPlugin.addSchemaModule({ schema: [] }),
|
|
15
17
|
AppPlugin.addTranslationsModule({ translations }),
|
|
16
18
|
// Plugin.addModule({
|
|
17
19
|
// id: 'intent-resolver',
|
|
18
20
|
// activatesOn: Events.SetupIntentResolver,
|
|
19
21
|
// activate: IntentResolver,
|
|
20
22
|
// }),
|
|
23
|
+
AppPlugin.addPluginAssetModule({
|
|
24
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
25
|
+
}),
|
|
21
26
|
Plugin.make,
|
|
22
27
|
);
|
|
28
|
+
|
|
29
|
+
export default TransformerPlugin;
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -2,17 +2,32 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { DXN } from '@dxos/keys';
|
|
6
7
|
import { trim } from '@dxos/util';
|
|
7
8
|
|
|
8
|
-
export const meta
|
|
9
|
-
|
|
9
|
+
export const meta = Plugin.makeMeta({
|
|
10
|
+
key: DXN.make('org.dxos.plugin.transformer'),
|
|
10
11
|
name: 'Transformer',
|
|
12
|
+
author: 'DXOS',
|
|
13
|
+
spec: 'PLUGIN.mdl',
|
|
11
14
|
description: trim`
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
Browser-based machine learning plugin that runs Hugging Face Transformers.js models
|
|
16
|
+
entirely in-browser via WebAssembly and WebGPU — no server-side inference required.
|
|
17
|
+
|
|
18
|
+
Provides automatic speech recognition through a Whisper pipeline hook (usePipeline)
|
|
19
|
+
and a microphone capture hook (useAudioStream) that buffers 16 kHz mono audio into
|
|
20
|
+
2-second chunks before forwarding them to the model.
|
|
21
|
+
|
|
22
|
+
Exposes a Voice component that wires the two hooks together to deliver live
|
|
23
|
+
transcription, accumulating the running transcript in local state and rendering
|
|
24
|
+
a debug panel with model status, GPU info, and audio level visualisation.
|
|
25
|
+
|
|
26
|
+
Includes a RAG embedding pipeline base class for retrieval-augmented generation
|
|
27
|
+
experiments, with cosine similarity ranking for selecting the most relevant
|
|
28
|
+
knowledge-base contexts before text generation.
|
|
14
29
|
`,
|
|
15
30
|
icon: 'ph--cpu--regular',
|
|
16
31
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transformer',
|
|
17
32
|
tags: ['labs'],
|
|
18
|
-
};
|
|
33
|
+
});
|
package/src/plugin.ts
ADDED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { trim } from "@dxos/util";
|
|
3
|
-
var meta = {
|
|
4
|
-
id: "org.dxos.plugin.transformer",
|
|
5
|
-
name: "Transformer",
|
|
6
|
-
description: trim`
|
|
7
|
-
Execute local machine learning transformers and AI models directly in your browser.
|
|
8
|
-
Run embeddings, classifications, and other ML tasks without server dependencies.
|
|
9
|
-
`,
|
|
10
|
-
icon: "ph--cpu--regular",
|
|
11
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transformer",
|
|
12
|
-
tags: [
|
|
13
|
-
"labs"
|
|
14
|
-
]
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// src/TransformerPlugin.tsx
|
|
18
|
-
import { Plugin } from "@dxos/app-framework";
|
|
19
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
20
|
-
import { meta as meta3 } from "#meta";
|
|
21
|
-
|
|
22
|
-
// src/translations.ts
|
|
23
|
-
import { meta as meta2 } from "#meta";
|
|
24
|
-
var translations = [
|
|
25
|
-
{
|
|
26
|
-
"en-US": {
|
|
27
|
-
[meta2.id]: {
|
|
28
|
-
"plugin.name": "Transformers"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
// src/TransformerPlugin.tsx
|
|
35
|
-
var TransformerPlugin = Plugin.define(meta3).pipe(
|
|
36
|
-
AppPlugin.addSchemaModule({
|
|
37
|
-
schema: [],
|
|
38
|
-
id: "schema"
|
|
39
|
-
}),
|
|
40
|
-
AppPlugin.addTranslationsModule({
|
|
41
|
-
translations
|
|
42
|
-
}),
|
|
43
|
-
// Plugin.addModule({
|
|
44
|
-
// id: 'intent-resolver',
|
|
45
|
-
// activatesOn: Events.SetupIntentResolver,
|
|
46
|
-
// activate: IntentResolver,
|
|
47
|
-
// }),
|
|
48
|
-
Plugin.make
|
|
49
|
-
);
|
|
50
|
-
export {
|
|
51
|
-
TransformerPlugin,
|
|
52
|
-
meta
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts", "../../../src/TransformerPlugin.tsx", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.transformer',\n name: 'Transformer',\n description: trim`\n Execute local machine learning transformers and AI models directly in your browser.\n Run embeddings, classifications, and other ML tasks without server dependencies.\n `,\n icon: 'ph--cpu--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transformer',\n tags: ['labs'],\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\n// import { IntentResolver } from './capabilities';\nimport { meta } from '#meta';\n\nimport { translations } from './translations';\n\nexport const TransformerPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSchemaModule({ schema: [], id: 'schema' }),\n AppPlugin.addTranslationsModule({ translations }),\n // Plugin.addModule({\n // id: 'intent-resolver',\n // activatesOn: Events.SetupIntentResolver,\n // activate: IntentResolver,\n // }),\n Plugin.make,\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Transformers',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;;;ACbA,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAG1B,SAASC,QAAAA,aAAY;;;ACFrB,SAASC,QAAAA,aAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,MAAKC,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;;;ADHK,IAAMC,oBAAoBC,OAAOC,OAAOC,KAAAA,EAAMC;EACnDC,UAAUC,gBAAgB;IAAEC,QAAQ,CAAA;IAAIC,IAAI;EAAS,CAAA;EACrDH,UAAUI,sBAAsB;IAAEC;EAAa,CAAA;;;;;;EAM/CT,OAAOU;AAAI;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "source", "tags", "Plugin", "AppPlugin", "meta", "meta", "translations", "meta", "id", "TransformerPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addSchemaModule", "schema", "id", "addTranslationsModule", "translations", "make"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":1859,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/translations.ts":{"bytes":1134,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/TransformerPlugin.tsx":{"bytes":2383,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":567,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/TransformerPlugin.tsx","kind":"import-statement","original":"./TransformerPlugin"}],"format":"esm"},"src/types/index.ts":{"bytes":380,"imports":[],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2419},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["TransformerPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":451},"src/index.ts":{"bytesInOutput":0},"src/TransformerPlugin.tsx":{"bytesInOutput":472},"src/translations.ts":{"bytesInOutput":158}},"bytes":1255},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/types/index.ts","inputs":{"src/types/index.ts":{"bytesInOutput":0}},"bytes":35}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/meta.ts
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = {
|
|
6
|
-
id: "org.dxos.plugin.transformer",
|
|
7
|
-
name: "Transformer",
|
|
8
|
-
description: trim`
|
|
9
|
-
Execute local machine learning transformers and AI models directly in your browser.
|
|
10
|
-
Run embeddings, classifications, and other ML tasks without server dependencies.
|
|
11
|
-
`,
|
|
12
|
-
icon: "ph--cpu--regular",
|
|
13
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transformer",
|
|
14
|
-
tags: [
|
|
15
|
-
"labs"
|
|
16
|
-
]
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// src/TransformerPlugin.tsx
|
|
20
|
-
import { Plugin } from "@dxos/app-framework";
|
|
21
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
22
|
-
import { meta as meta3 } from "#meta";
|
|
23
|
-
|
|
24
|
-
// src/translations.ts
|
|
25
|
-
import { meta as meta2 } from "#meta";
|
|
26
|
-
var translations = [
|
|
27
|
-
{
|
|
28
|
-
"en-US": {
|
|
29
|
-
[meta2.id]: {
|
|
30
|
-
"plugin.name": "Transformers"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
// src/TransformerPlugin.tsx
|
|
37
|
-
var TransformerPlugin = Plugin.define(meta3).pipe(
|
|
38
|
-
AppPlugin.addSchemaModule({
|
|
39
|
-
schema: [],
|
|
40
|
-
id: "schema"
|
|
41
|
-
}),
|
|
42
|
-
AppPlugin.addTranslationsModule({
|
|
43
|
-
translations
|
|
44
|
-
}),
|
|
45
|
-
// Plugin.addModule({
|
|
46
|
-
// id: 'intent-resolver',
|
|
47
|
-
// activatesOn: Events.SetupIntentResolver,
|
|
48
|
-
// activate: IntentResolver,
|
|
49
|
-
// }),
|
|
50
|
-
Plugin.make
|
|
51
|
-
);
|
|
52
|
-
export {
|
|
53
|
-
TransformerPlugin,
|
|
54
|
-
meta
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts", "../../../src/TransformerPlugin.tsx", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.transformer',\n name: 'Transformer',\n description: trim`\n Execute local machine learning transformers and AI models directly in your browser.\n Run embeddings, classifications, and other ML tasks without server dependencies.\n `,\n icon: 'ph--cpu--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transformer',\n tags: ['labs'],\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\n// import { IntentResolver } from './capabilities';\nimport { meta } from '#meta';\n\nimport { translations } from './translations';\n\nexport const TransformerPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSchemaModule({ schema: [], id: 'schema' }),\n AppPlugin.addTranslationsModule({ translations }),\n // Plugin.addModule({\n // id: 'intent-resolver',\n // activatesOn: Events.SetupIntentResolver,\n // activate: IntentResolver,\n // }),\n Plugin.make,\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Transformers',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;;;ACbA,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAG1B,SAASC,QAAAA,aAAY;;;ACFrB,SAASC,QAAAA,aAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,MAAKC,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;;;ADHK,IAAMC,oBAAoBC,OAAOC,OAAOC,KAAAA,EAAMC;EACnDC,UAAUC,gBAAgB;IAAEC,QAAQ,CAAA;IAAIC,IAAI;EAAS,CAAA;EACrDH,UAAUI,sBAAsB;IAAEC;EAAa,CAAA;;;;;;EAM/CT,OAAOU;AAAI;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "source", "tags", "Plugin", "AppPlugin", "meta", "meta", "translations", "meta", "id", "TransformerPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addSchemaModule", "schema", "id", "addTranslationsModule", "translations", "make"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":1859,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/translations.ts":{"bytes":1134,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/TransformerPlugin.tsx":{"bytes":2383,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":567,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/TransformerPlugin.tsx","kind":"import-statement","original":"./TransformerPlugin"}],"format":"esm"},"src/types/index.ts":{"bytes":380,"imports":[],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2421},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["TransformerPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":451},"src/index.ts":{"bytesInOutput":0},"src/TransformerPlugin.tsx":{"bytesInOutput":472},"src/translations.ts":{"bytesInOutput":158}},"bytes":1348},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/types/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/types/index.ts","inputs":{"src/types/index.ts":{"bytesInOutput":0}},"bytes":127}}}
|
|
File without changes
|
|
File without changes
|