@imgly/plugin-ai-text-generation-web 0.1.0-rc.0

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.
@@ -0,0 +1,5 @@
1
+ import { type EditorPlugin } from '@cesdk/cesdk-js';
2
+ import { PluginConfiguration } from './types';
3
+ export { PLUGIN_ID } from './constants';
4
+ declare const _default: (config: PluginConfiguration) => Omit<EditorPlugin, "name" | "version">;
5
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type CreativeEditorSDK from '@cesdk/cesdk-js';
2
+ import { type Provider } from '@imgly/plugin-ai-generation-web';
3
+ export interface PluginConfiguration {
4
+ /**
5
+ * The provider to use for text2text AI generation.
6
+ */
7
+ provider: (context: {
8
+ cesdk: CreativeEditorSDK;
9
+ }) => Promise<Provider<'text', any, any>>;
10
+ /**
11
+ * Render console logs for debugging purposes.
12
+ */
13
+ debug?: boolean;
14
+ }
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "@imgly/plugin-ai-text-generation-web",
3
+ "version": "0.1.0-rc.0",
4
+ "description": "AI text generation plugin for the CE.SDK editor",
5
+ "keywords": ["CE.SDK", "plugin", "AI", "text generation", "llm"],
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/imgly/plugins.git"
9
+ },
10
+ "license": "SEE LICENSE IN LICENSE.md",
11
+ "author": {
12
+ "name": "IMG.LY GmbH",
13
+ "email": "support@img.ly",
14
+ "url": "https://img.ly"
15
+ },
16
+ "bugs": {
17
+ "email": "support@img.ly"
18
+ },
19
+ "source": "./src/index.ts",
20
+ "module": "./dist/index.mjs",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "import": "./dist/index.mjs",
25
+ "types": "./dist/index.d.ts"
26
+ },
27
+ "./anthropic": {
28
+ "import": "./dist/anthropic/index.mjs",
29
+ "types": "./dist/anthropic/index.d.ts"
30
+ }
31
+ },
32
+ "homepage": "https://img.ly/products/creative-sdk",
33
+ "files": ["LICENSE.md", "README.md", "CHANGELOG.md", "dist/", "bin/"],
34
+ "scripts": {
35
+ "start": "npm run watch",
36
+ "clean": "pnpm exec rimraf dist",
37
+ "purge": "pnpm exec rimraf node_modules",
38
+ "build": "pnpm run clean && pnpm _syncPnpm && pnpm exec node scripts/build.mjs",
39
+ "test": "echo No tests",
40
+ "dev": "pnpm --filter \"${npm_package_name}^...\" --parallel run dev:wait && pnpm exec concurrently 'node scripts/watch.mjs' 'pnpm _syncPnpm --watch' --names 'build,sync deps'",
41
+ "dev:wait": "pnpm exec wait-on ./dist/index.mjs ./dist/index.d.ts ./dist/anthropic/index.mjs ./dist/anthropic/index.d.ts --window 250 --timeout 30000",
42
+ "dev:types": "tsc --emitDeclarationOnly --watch --preserveWatchOutput",
43
+ "publish:latest": "pnpm run build && npm publish --tag latest --access public",
44
+ "publish:next": "pnpm run build && npm publish --tag next --access public",
45
+ "check:all": "concurrently -n lint,type,pretty \"pnpm run check:lint\" \"pnpm run check:types\" \"pnpm run check:pretty\"",
46
+ "check:lint": "eslint --max-warnings 0 './src/**/*.{ts,tsx}'",
47
+ "check:pretty": "prettier --list-different './src/**/*.{ts,tsx}'",
48
+ "check:types": "tsc --noEmit",
49
+ "types:create": "tsc --emitDeclarationOnly",
50
+ "_syncPnpm": "pnpm sync-dependencies-meta-injected"
51
+ },
52
+ "devDependencies": {
53
+ "@imgly/plugin-utils": "workspace:*",
54
+ "@imgly/plugin-ai-generation-web": "workspace:*",
55
+ "@types/ndarray": "^1.0.14",
56
+ "chalk": "^5.3.0",
57
+ "concurrently": "^8.2.2",
58
+ "esbuild": "^0.19.11",
59
+ "eslint": "^8.51.0",
60
+ "lodash-es": "^4.17.21",
61
+ "openapi-types": "^12.1.3",
62
+ "typescript": "^5.3.3"
63
+ },
64
+ "dependenciesMeta": {
65
+ "@imgly/plugin-utils": {
66
+ "injected": true
67
+ },
68
+ "@imgly/plugin-ai-generation-web": {
69
+ "injected": true
70
+ }
71
+ },
72
+ "peerDependencies": {
73
+ "@cesdk/cesdk-js": "^1.48.0"
74
+ },
75
+ "dependencies": {
76
+ "@anthropic-ai/sdk": "^0.39.0"
77
+ }
78
+ }