@embeddables/cli 0.10.0 → 0.12.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.
- package/.prompts/custom/build-funnel.md +1 -1
- package/.prompts/embeddables-cli.md +308 -26
- package/dist/assets-manifest.d.ts +31 -0
- package/dist/assets-manifest.d.ts.map +1 -0
- package/dist/assets-manifest.js +59 -0
- package/dist/assets-manifest.js.map +1 -0
- package/dist/cli.js +283 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/assets-sync.d.ts +6 -0
- package/dist/commands/assets-sync.d.ts.map +1 -0
- package/dist/commands/assets-sync.js +35 -0
- package/dist/commands/assets-sync.js.map +1 -0
- package/dist/commands/assets-upload.d.ts +13 -0
- package/dist/commands/assets-upload.d.ts.map +1 -0
- package/dist/commands/assets-upload.js +475 -0
- package/dist/commands/assets-upload.js.map +1 -0
- package/dist/commands/experiments-connect.js +22 -19
- package/dist/commands/experiments-connect.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +37 -91
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +3 -0
- package/dist/commands/pull.js.map +1 -1
- package/dist/compiler/reverse.d.ts.map +1 -1
- package/dist/compiler/reverse.js +19 -6
- package/dist/compiler/reverse.js.map +1 -1
- package/dist/constants/defaultTagStylesV4.d.ts +6 -0
- package/dist/constants/defaultTagStylesV4.d.ts.map +1 -0
- package/dist/constants/defaultTagStylesV4.js +659 -0
- package/dist/constants/defaultTagStylesV4.js.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/group-context.d.ts +2 -0
- package/dist/group-context.d.ts.map +1 -0
- package/dist/group-context.js +29 -0
- package/dist/group-context.js.map +1 -0
- package/dist/helpers/typeStubs.d.ts +25 -0
- package/dist/helpers/typeStubs.d.ts.map +1 -0
- package/dist/helpers/typeStubs.js +153 -0
- package/dist/helpers/typeStubs.js.map +1 -0
- package/dist/prompts/experiments.d.ts +3 -1
- package/dist/prompts/experiments.d.ts.map +1 -1
- package/dist/prompts/experiments.js +12 -5
- package/dist/prompts/experiments.js.map +1 -1
- package/dist/workbench/FieldEditorPanel.d.ts +2 -1
- package/dist/workbench/FieldEditorPanel.d.ts.map +1 -1
- package/dist/workbench/FieldEditorPanel.js +21 -10
- package/dist/workbench/FieldEditorPanel.js.map +1 -1
- package/dist/workbench/UserDataPanel.d.ts.map +1 -1
- package/dist/workbench/UserDataPanel.js +103 -3
- package/dist/workbench/UserDataPanel.js.map +1 -1
- package/dist/{commands/build-workbench.d.ts → workbench/build.d.ts} +1 -1
- package/dist/workbench/build.d.ts.map +1 -0
- package/dist/{commands/build-workbench.js → workbench/build.js} +1 -1
- package/dist/workbench/build.js.map +1 -0
- package/package.json +1 -1
- package/dist/commands/build-workbench.d.ts.map +0 -1
- package/dist/commands/build-workbench.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTagStylesV4.js","sourceRoot":"","sources":["../../src/constants/defaultTagStylesV4.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAiB;IAClD,kBAAkB,EAAE;QAClB,iDAAiD,EAAE;YACjD,OAAO,EAAE,MAAM;YACf,OAAO,EAAE,MAAM;YACf,gBAAgB,EAAE,QAAQ;YAC1B,iBAAiB,EAAE,YAAY;YAC/B,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,MAAM;SACZ;KACF;IACD,cAAc,EAAE;QACd,6DAA6D,EAAE;YAC7D,WAAW,EAAE,MAAM;SACpB;KACF;IACD,eAAe,EAAE;QACf,8CAA8C,EAAE;YAC9C,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,SAAS;YAChB,kBAAkB,EAAE,SAAS;YAC7B,cAAc,EAAE,SAAS;YACzB,cAAc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 @@ export declare const BranchStatus: {
|
|
|
4
4
|
};
|
|
5
5
|
export type BranchStatus = (typeof BranchStatus)[keyof typeof BranchStatus];
|
|
6
6
|
export declare const WEB_APP_BASE_URL = "https://app.embeddables.com";
|
|
7
|
+
/** Public Cloudflare Worker used to upload embeddable assets. */
|
|
8
|
+
export declare const ASSETS_UPLOAD_WORKER_BASE_URL = "https://upload-to-r2-bucket--public-flow-assets.heysavvy.workers.dev";
|
|
7
9
|
/** CDN origin that hosts the pre-built workbench assets (workbench.js / workbench.css). */
|
|
8
10
|
export declare const WORKBENCH_CDN_ORIGIN = "https://embeddables-workbench.heysavvy.workers.dev";
|
|
9
11
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAE3E,eAAO,MAAM,gBAAgB,gCAAgC,CAAA;AAI7D,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,uDAAuD,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAE3E,eAAO,MAAM,gBAAgB,gCAAgC,CAAA;AAI7D,iEAAiE;AACjE,eAAO,MAAM,6BAA6B,yEAC8B,CAAA;AAExE,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,uDAAuD,CAAA"}
|
package/dist/constants.js
CHANGED
|
@@ -5,6 +5,8 @@ export const BranchStatus = {
|
|
|
5
5
|
export const WEB_APP_BASE_URL = 'https://app.embeddables.com';
|
|
6
6
|
// export const WEB_APP_BASE_URL = 'https://embeddables-web-fpnc2wscy-embeddables.vercel.app'
|
|
7
7
|
// export const WEB_APP_BASE_URL = 'http://localhost:3000'
|
|
8
|
+
/** Public Cloudflare Worker used to upload embeddable assets. */
|
|
9
|
+
export const ASSETS_UPLOAD_WORKER_BASE_URL = 'https://upload-to-r2-bucket--public-flow-assets.heysavvy.workers.dev';
|
|
8
10
|
/** CDN origin that hosts the pre-built workbench assets (workbench.js / workbench.css). */
|
|
9
11
|
export const WORKBENCH_CDN_ORIGIN = 'https://embeddables-workbench.heysavvy.workers.dev';
|
|
10
12
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAA;AAIV,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAA;AAC7D,6FAA6F;AAC7F,0DAA0D;AAE1D,2FAA2F;AAC3F,MAAM,CAAC,MAAM,oBAAoB,GAAG,oDAAoD,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAA;AAIV,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAA;AAC7D,6FAA6F;AAC7F,0DAA0D;AAE1D,iEAAiE;AACjE,MAAM,CAAC,MAAM,6BAA6B,GACxC,sEAAsE,CAAA;AAExE,2FAA2F;AAC3F,MAAM,CAAC,MAAM,oBAAoB,GAAG,oDAAoD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-context.d.ts","sourceRoot":"","sources":["../src/group-context.ts"],"names":[],"mappings":"AAIA,wBAAsB,cAAc,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwBrF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getAuthenticatedSupabaseClient } from './auth/index.js';
|
|
2
|
+
import { getProjectId, readProjectConfig } from './config/index.js';
|
|
3
|
+
import { promptForProject } from './prompts/index.js';
|
|
4
|
+
export async function resolveGroupId(explicitGroupId) {
|
|
5
|
+
if (explicitGroupId)
|
|
6
|
+
return explicitGroupId;
|
|
7
|
+
const config = readProjectConfig();
|
|
8
|
+
if (config?.org_id)
|
|
9
|
+
return config.org_id;
|
|
10
|
+
const projectId = config?.project_id ?? getProjectId();
|
|
11
|
+
if (projectId) {
|
|
12
|
+
const supabase = await getAuthenticatedSupabaseClient();
|
|
13
|
+
if (supabase) {
|
|
14
|
+
const { data } = await supabase
|
|
15
|
+
.from('projects')
|
|
16
|
+
.select('group_id')
|
|
17
|
+
.eq('id', projectId)
|
|
18
|
+
.maybeSingle();
|
|
19
|
+
if (data?.group_id)
|
|
20
|
+
return data.group_id;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const selectedProject = await promptForProject();
|
|
24
|
+
if (selectedProject?.org_id)
|
|
25
|
+
return selectedProject.org_id;
|
|
26
|
+
// Last-resort compatibility fallback for older local setups/tests that only know project_id.
|
|
27
|
+
return projectId ?? selectedProject?.id ?? null;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=group-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-context.js","sourceRoot":"","sources":["../src/group-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,eAAwB;IAC3D,IAAI,eAAe;QAAE,OAAO,eAAe,CAAA;IAE3C,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAA;IAClC,IAAI,MAAM,EAAE,MAAM;QAAE,OAAO,MAAM,CAAC,MAAM,CAAA;IAExC,MAAM,SAAS,GAAG,MAAM,EAAE,UAAU,IAAI,YAAY,EAAE,CAAA;IACtD,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,QAAQ,GAAG,MAAM,8BAA8B,EAAE,CAAA;QACvD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ;iBAC5B,IAAI,CAAC,UAAU,CAAC;iBAChB,MAAM,CAAC,UAAU,CAAC;iBAClB,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC;iBACnB,WAAW,EAAE,CAAA;YAChB,IAAI,IAAI,EAAE,QAAQ;gBAAE,OAAO,IAAI,CAAC,QAAQ,CAAA;QAC1C,CAAC;IACH,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,gBAAgB,EAAE,CAAA;IAChD,IAAI,eAAe,EAAE,MAAM;QAAE,OAAO,eAAe,CAAC,MAAM,CAAA;IAE1D,6FAA6F;IAC7F,OAAO,SAAS,IAAI,eAAe,EAAE,EAAE,IAAI,IAAI,CAAA;AACjD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate type declaration stubs in .types/ (project root) so the editor
|
|
3
|
+
* can resolve imports in generated TSX files without npm install.
|
|
4
|
+
*/
|
|
5
|
+
export declare function writeTypeStubs(cwd: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* Ensure a tsconfig exists inside `embeddables/` so pulled page files type-check
|
|
8
|
+
* cleanly in the editor. The editor's TypeScript language server searches upward
|
|
9
|
+
* from each file for the nearest `tsconfig.json` — placing one at `embeddables/tsconfig.json`
|
|
10
|
+
* ensures it's found for all `embeddables/<id>/pages/*.page.tsx` files.
|
|
11
|
+
*
|
|
12
|
+
* In the CLI repo this file is committed directly; in consumer repos it's generated
|
|
13
|
+
* on first `pull` (using .types/ stubs created by writeTypeStubs).
|
|
14
|
+
*
|
|
15
|
+
* Skips if:
|
|
16
|
+
* - `embeddables/tsconfig.json` already exists, OR
|
|
17
|
+
* - The root `tsconfig.json` already includes `embeddables` with the required path mappings
|
|
18
|
+
*/
|
|
19
|
+
export declare function ensureEmbeddablesTsconfig(cwd: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Full typing setup: write type stubs and ensure a tsconfig covers `embeddables/`.
|
|
22
|
+
* Called by both `init` (for consumer repos) and `pull` (for any repo including the CLI itself).
|
|
23
|
+
*/
|
|
24
|
+
export declare function ensureTypingSetup(cwd: string): void;
|
|
25
|
+
//# sourceMappingURL=typeStubs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeStubs.d.ts","sourceRoot":"","sources":["../../src/helpers/typeStubs.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,QA0FzC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CA6C3D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGnD"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import * as stdout from '../stdout.js';
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
/**
|
|
8
|
+
* Generate type declaration stubs in .types/ (project root) so the editor
|
|
9
|
+
* can resolve imports in generated TSX files without npm install.
|
|
10
|
+
*/
|
|
11
|
+
export function writeTypeStubs(cwd) {
|
|
12
|
+
const typesDir = path.join(cwd, '.types');
|
|
13
|
+
fs.mkdirSync(typesDir, { recursive: true });
|
|
14
|
+
// Copy compiled types-builder.d.ts → .types/types.d.ts
|
|
15
|
+
// When running from compiled JS: __dirname is dist/helpers/, so ../../dist/types-builder.d.ts works.
|
|
16
|
+
// When running via tsx in dev: __dirname is src/helpers/, so we fall back to dist/.
|
|
17
|
+
const candidates = [
|
|
18
|
+
path.join(__dirname, '..', 'types-builder.d.ts'),
|
|
19
|
+
path.join(__dirname, '..', '..', 'dist', 'types-builder.d.ts'),
|
|
20
|
+
];
|
|
21
|
+
const typesBuilderDts = candidates.find((p) => fs.existsSync(p));
|
|
22
|
+
if (typesBuilderDts) {
|
|
23
|
+
fs.copyFileSync(typesBuilderDts, path.join(typesDir, 'types.d.ts'));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
stdout.warn('Could not find types-builder.d.ts — run `npm run build` first');
|
|
27
|
+
}
|
|
28
|
+
fs.writeFileSync(path.join(typesDir, 'react-jsx-runtime.d.ts'), `export namespace JSX {
|
|
29
|
+
type Element = any
|
|
30
|
+
interface IntrinsicElements {
|
|
31
|
+
[elemName: string]: any
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export function jsx(type: any, props: any, key?: string): JSX.Element
|
|
35
|
+
export function jsxs(type: any, props: any, key?: string): JSX.Element
|
|
36
|
+
export const Fragment: unique symbol
|
|
37
|
+
`, 'utf8');
|
|
38
|
+
const componentsWithOwnType = [
|
|
39
|
+
'BookMeeting',
|
|
40
|
+
'Chart',
|
|
41
|
+
'Container',
|
|
42
|
+
'CustomButton',
|
|
43
|
+
'CustomHTML',
|
|
44
|
+
'FileUpload',
|
|
45
|
+
'InputBox',
|
|
46
|
+
'Lottie',
|
|
47
|
+
'MediaEmbed',
|
|
48
|
+
'MediaImage',
|
|
49
|
+
'OptionSelector',
|
|
50
|
+
'PaypalCheckout',
|
|
51
|
+
'ProgressBar',
|
|
52
|
+
'Rive',
|
|
53
|
+
'StripeCheckout',
|
|
54
|
+
'StripeCheckout2',
|
|
55
|
+
];
|
|
56
|
+
const baseOnlyComponents = ['PlainText', 'RichText', 'RichTextMarkdown'];
|
|
57
|
+
const importAliases = componentsWithOwnType.map((name) => `${name} as ${name}JSON`).join(', ');
|
|
58
|
+
const importLine = `import type { Base, OptionSelectorButton, ${importAliases} } from './types'`;
|
|
59
|
+
const omitLine = `type JSONOnly = 'type' | 'parent_id' | 'parent_key' | '_location' | 'components' | '__hide_initially' | '__is_child_already_inserted' | 'clearable' | 'central_play_button'`;
|
|
60
|
+
const languagesType = `type Languages = { languages?: Record<string, Record<string, any>> }`;
|
|
61
|
+
const componentPropsType = `type ComponentProps = { props?: Record<string, any> }`;
|
|
62
|
+
const propsTypeLine = `type Props<T> = Omit<T, JSONOnly> & { children?: any } & Languages & ComponentProps`;
|
|
63
|
+
const buttonTypeLine = `export type OptionSelectorButtonWithLanguages = OptionSelectorButton & Languages`;
|
|
64
|
+
const typedExports = componentsWithOwnType
|
|
65
|
+
.map((name) => `export function ${name}(props: Props<${name}JSON>): any`)
|
|
66
|
+
.join('\n');
|
|
67
|
+
const baseExports = baseOnlyComponents
|
|
68
|
+
.map((name) => `export function ${name}(props: Props<Base>): any`)
|
|
69
|
+
.join('\n');
|
|
70
|
+
fs.writeFileSync(path.join(typesDir, 'components.d.ts'), importLine +
|
|
71
|
+
'\n\n' +
|
|
72
|
+
omitLine +
|
|
73
|
+
'\n' +
|
|
74
|
+
languagesType +
|
|
75
|
+
'\n' +
|
|
76
|
+
componentPropsType +
|
|
77
|
+
'\n' +
|
|
78
|
+
propsTypeLine +
|
|
79
|
+
'\n\n' +
|
|
80
|
+
buttonTypeLine +
|
|
81
|
+
'\n\n' +
|
|
82
|
+
typedExports +
|
|
83
|
+
'\n' +
|
|
84
|
+
baseExports +
|
|
85
|
+
'\n', 'utf8');
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Ensure a tsconfig exists inside `embeddables/` so pulled page files type-check
|
|
89
|
+
* cleanly in the editor. The editor's TypeScript language server searches upward
|
|
90
|
+
* from each file for the nearest `tsconfig.json` — placing one at `embeddables/tsconfig.json`
|
|
91
|
+
* ensures it's found for all `embeddables/<id>/pages/*.page.tsx` files.
|
|
92
|
+
*
|
|
93
|
+
* In the CLI repo this file is committed directly; in consumer repos it's generated
|
|
94
|
+
* on first `pull` (using .types/ stubs created by writeTypeStubs).
|
|
95
|
+
*
|
|
96
|
+
* Skips if:
|
|
97
|
+
* - `embeddables/tsconfig.json` already exists, OR
|
|
98
|
+
* - The root `tsconfig.json` already includes `embeddables` with the required path mappings
|
|
99
|
+
*/
|
|
100
|
+
export function ensureEmbeddablesTsconfig(cwd) {
|
|
101
|
+
const embeddablesDir = path.join(cwd, 'embeddables');
|
|
102
|
+
const embeddablesTsconfigPath = path.join(embeddablesDir, 'tsconfig.json');
|
|
103
|
+
if (fs.existsSync(embeddablesTsconfigPath))
|
|
104
|
+
return;
|
|
105
|
+
// If the root tsconfig already covers embeddables/ with correct paths, skip
|
|
106
|
+
const mainTsconfigPath = path.join(cwd, 'tsconfig.json');
|
|
107
|
+
if (fs.existsSync(mainTsconfigPath)) {
|
|
108
|
+
try {
|
|
109
|
+
const mainTsconfig = JSON.parse(fs.readFileSync(mainTsconfigPath, 'utf8'));
|
|
110
|
+
const include = mainTsconfig.include ?? [];
|
|
111
|
+
const coversEmbeddables = include.some((p) => p === 'embeddables' || p.startsWith('embeddables/'));
|
|
112
|
+
const paths = mainTsconfig.compilerOptions?.paths ?? {};
|
|
113
|
+
const hasJsxRuntimePath = 'react/jsx-runtime' in paths;
|
|
114
|
+
const hasComponentsPath = '@embeddables/cli/components' in paths;
|
|
115
|
+
if (coversEmbeddables && hasJsxRuntimePath && hasComponentsPath)
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
// If we can't parse, generate the embeddables tsconfig as a safety net
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Generated for consumer repos: paths point to .types/ stubs (created by writeTypeStubs)
|
|
123
|
+
fs.mkdirSync(embeddablesDir, { recursive: true });
|
|
124
|
+
const tsconfig = {
|
|
125
|
+
compilerOptions: {
|
|
126
|
+
target: 'esnext',
|
|
127
|
+
module: 'esnext',
|
|
128
|
+
moduleResolution: 'bundler',
|
|
129
|
+
jsx: 'react-jsx',
|
|
130
|
+
noEmit: true,
|
|
131
|
+
strict: false,
|
|
132
|
+
skipLibCheck: true,
|
|
133
|
+
esModuleInterop: true,
|
|
134
|
+
baseUrl: '..',
|
|
135
|
+
paths: {
|
|
136
|
+
'react/jsx-runtime': ['./.types/react-jsx-runtime.d.ts'],
|
|
137
|
+
'@embeddables/cli/components': ['./.types/components.d.ts'],
|
|
138
|
+
'@embeddables/cli/types': ['./.types/types.d.ts'],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
include: ['.'],
|
|
142
|
+
};
|
|
143
|
+
fs.writeFileSync(embeddablesTsconfigPath, JSON.stringify(tsconfig, null, 2) + '\n', 'utf8');
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Full typing setup: write type stubs and ensure a tsconfig covers `embeddables/`.
|
|
147
|
+
* Called by both `init` (for consumer repos) and `pull` (for any repo including the CLI itself).
|
|
148
|
+
*/
|
|
149
|
+
export function ensureTypingSetup(cwd) {
|
|
150
|
+
writeTypeStubs(cwd);
|
|
151
|
+
ensureEmbeddablesTsconfig(cwd);
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=typeStubs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeStubs.js","sourceRoot":"","sources":["../../src/helpers/typeStubs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC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EAAE,QAAQ;YAChB,gBAAgB,EAAE,SAAS;YAC3B,GAAG,EAAE,WAAW;YAChB,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,IAAI;YACrB,OAAO,EAAE,IAAI;YACb,KAAK,EAAE;gBACL,mBAAmB,EAAE,CAAC,iCAAiC,CAAC;gBACxD,6BAA6B,EAAE,CAAC,0BAA0B,CAAC;gBAC3D,wBAAwB,EAAE,CAAC,qBAAqB,CAAC;aAClD;SACF;QACD,OAAO,EAAE,CAAC,GAAG,CAAC;KACf,CAAA;IACD,EAAE,CAAC,aAAa,CAAC,uBAAuB,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAA;AAC7F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,cAAc,CAAC,GAAG,CAAC,CAAA;IACnB,yBAAyB,CAAC,GAAG,CAAC,CAAA;AAChC,CAAC"}
|
|
@@ -10,8 +10,10 @@ export interface ExperimentInfo {
|
|
|
10
10
|
export interface PromptForExperimentOptions {
|
|
11
11
|
/** Custom message for the prompt */
|
|
12
12
|
message?: string;
|
|
13
|
-
/** Filter out experiments already connected to this embeddable ID */
|
|
13
|
+
/** Filter out experiments already connected to this embeddable ID (via flow_ids on the server) */
|
|
14
14
|
excludeConnectedTo?: string;
|
|
15
|
+
/** Filter out experiments whose experiment_id is already in the local config */
|
|
16
|
+
excludeExperimentIds?: string[];
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
19
|
* Fetch experiments for a project from Supabase (using experiments_extended view)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/prompts/experiments.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,
|
|
1
|
+
{"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/prompts/experiments.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kGAAkG;IAClG,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gFAAgF;IAChF,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAA;CAChC;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAuC1F;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAkEnE"}
|
|
@@ -46,17 +46,20 @@ export async function fetchProjectExperiments(projectId) {
|
|
|
46
46
|
* Returns null if no experiments found or user cancels
|
|
47
47
|
*/
|
|
48
48
|
export async function promptForExperiment(projectId, options = {}) {
|
|
49
|
-
const { message = 'Select an experiment to connect:', excludeConnectedTo } = options;
|
|
49
|
+
const { message = 'Select an experiment to connect:', excludeConnectedTo, excludeExperimentIds, } = options;
|
|
50
50
|
const experiments = await fetchProjectExperiments(projectId);
|
|
51
51
|
let filtered = experiments;
|
|
52
|
+
if (excludeExperimentIds && excludeExperimentIds.length > 0) {
|
|
53
|
+
filtered = filtered.filter((e) => !excludeExperimentIds.includes(e.experiment_id));
|
|
54
|
+
}
|
|
52
55
|
if (excludeConnectedTo) {
|
|
53
|
-
filtered =
|
|
56
|
+
filtered = filtered.filter((e) => {
|
|
54
57
|
const connected = e.flow_ids ?? [e.flow_id];
|
|
55
58
|
return !connected.includes(excludeConnectedTo);
|
|
56
59
|
});
|
|
57
60
|
}
|
|
58
61
|
if (filtered.length === 0) {
|
|
59
|
-
if (excludeConnectedTo && experiments.length > 0) {
|
|
62
|
+
if ((excludeConnectedTo || excludeExperimentIds?.length) && experiments.length > 0) {
|
|
60
63
|
stdout.print(pc.yellow('All experiments in this project are already connected to this embeddable.'));
|
|
61
64
|
}
|
|
62
65
|
else {
|
|
@@ -75,8 +78,12 @@ export async function promptForExperiment(projectId, options = {}) {
|
|
|
75
78
|
message,
|
|
76
79
|
choices,
|
|
77
80
|
suggest: (input, choices) => Promise.resolve(choices.filter((c) => (c.title?.toLowerCase().includes(input.toLowerCase()) ?? false) ||
|
|
78
|
-
String(c.value.experiment_key)
|
|
79
|
-
|
|
81
|
+
String(c.value.experiment_key)
|
|
82
|
+
.toLowerCase()
|
|
83
|
+
.includes(input.toLowerCase()) ||
|
|
84
|
+
String(c.value.experiment_id)
|
|
85
|
+
.toLowerCase()
|
|
86
|
+
.includes(input.toLowerCase()))),
|
|
80
87
|
});
|
|
81
88
|
const selected = response.experiment;
|
|
82
89
|
if (!selected) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experiments.js","sourceRoot":"","sources":["../../src/prompts/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"experiments.js","sourceRoot":"","sources":["../../src/prompts/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAqBtC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,SAAiB;IAC7D,MAAM,QAAQ,GAAG,MAAM,8BAA8B,EAAE,CAAA;IACvD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,CAAA;IACX,CAAC;IAED,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ;aACnC,IAAI,CAAC,sBAAsB,CAAC;aAC5B,MAAM,CAAC,oEAAoE,CAAC;aAC5E,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;aAC3B,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAA;QAExD,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,gCAAgC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;YACvE,OAAO,EAAE,CAAA;QACX,CAAC;QAED,MAAM,WAAW,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;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EAAE,EAAE,CACpD,OAAO,CAAC,OAAO,CACb,OAAO,CAAC,MAAM,CACZ,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,KAAK,CAAC;YAC/D,MAAM,CAAE,CAAC,CAAC,KAAwB,CAAC,cAAc,CAAC;iBAC/C,WAAW,EAAE;iBACb,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAChC,MAAM,CAAE,CAAC,CAAC,KAAwB,CAAC,aAAa,CAAC;iBAC9C,WAAW,EAAE;iBACb,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CACnC,CACF;KACJ,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,QAAQ,CAAC,UAAwC,CAAA;IAClE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO;QACL,aAAa,EAAE,QAAQ,CAAC,aAAa;QACrC,cAAc,EAAE,QAAQ,CAAC,cAAc;KACxC,CAAA;AACH,CAAC"}
|
|
@@ -3,7 +3,8 @@ type FieldEditorPanelProps = {
|
|
|
3
3
|
rawJson: string;
|
|
4
4
|
onUpdateUserData: (key: string, value: unknown) => void;
|
|
5
5
|
keyFilter: string;
|
|
6
|
+
selectedLanguage?: string;
|
|
6
7
|
};
|
|
7
|
-
export declare function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyFilter, }: FieldEditorPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyFilter, selectedLanguage, }: FieldEditorPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=FieldEditorPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldEditorPanel.d.ts","sourceRoot":"","sources":["../../src/workbench/FieldEditorPanel.tsx"],"names":[],"mappings":"AAGA,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACvD,SAAS,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"FieldEditorPanel.d.ts","sourceRoot":"","sources":["../../src/workbench/FieldEditorPanel.tsx"],"names":[],"mappings":"AAGA,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAqND,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,gBAAuB,GACxB,EAAE,qBAAqB,2CAq8BvB"}
|
|
@@ -173,7 +173,13 @@ function generateTestValue(field) {
|
|
|
173
173
|
return '5\'10"';
|
|
174
174
|
return 'Test value';
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
function getLocalizedProp(obj, prop, lang) {
|
|
177
|
+
if (!lang || lang === 'en')
|
|
178
|
+
return obj[prop];
|
|
179
|
+
const langKey = `lang--${lang}--${prop}`;
|
|
180
|
+
return langKey in obj ? obj[langKey] : obj[prop];
|
|
181
|
+
}
|
|
182
|
+
export function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyFilter, selectedLanguage = 'en', }) {
|
|
177
183
|
const [fields, setFields] = useState([]);
|
|
178
184
|
const [allComponentFields, setAllComponentFields] = useState([]);
|
|
179
185
|
const [expandedCategories, setExpandedCategories] = useState(new Set(['built-in', 'component', 'computed', 'registered', 'extra']));
|
|
@@ -206,19 +212,24 @@ export function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyF
|
|
|
206
212
|
existing.types.add(comp.type);
|
|
207
213
|
if (pageId)
|
|
208
214
|
existing.pageIds.add(pageId);
|
|
215
|
+
const compAny = comp;
|
|
209
216
|
if (comp.type === 'InputBox') {
|
|
210
217
|
const inputComp = comp;
|
|
211
218
|
existing.inputType = inputComp.input_type;
|
|
212
|
-
existing.label =
|
|
219
|
+
existing.label = getLocalizedProp(compAny, 'label', selectedLanguage);
|
|
213
220
|
}
|
|
214
221
|
else if (comp.type === 'OptionSelector') {
|
|
215
222
|
const optComp = comp;
|
|
216
|
-
existing.options =
|
|
217
|
-
|
|
223
|
+
existing.options =
|
|
224
|
+
optComp.buttons?.map((b) => ({
|
|
225
|
+
key: b.key,
|
|
226
|
+
text: getLocalizedProp(b, 'text', selectedLanguage),
|
|
227
|
+
})) || [];
|
|
228
|
+
existing.label = getLocalizedProp(compAny, 'label', selectedLanguage);
|
|
218
229
|
existing.isMultiple = optComp.multiple;
|
|
219
230
|
}
|
|
220
231
|
else if (comp.label) {
|
|
221
|
-
existing.label =
|
|
232
|
+
existing.label = getLocalizedProp(compAny, 'label', selectedLanguage);
|
|
222
233
|
}
|
|
223
234
|
componentMeta.set(comp.key, existing);
|
|
224
235
|
// Process nested components
|
|
@@ -339,7 +350,7 @@ export function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyF
|
|
|
339
350
|
return a.key.localeCompare(b.key);
|
|
340
351
|
});
|
|
341
352
|
setFields(fieldsList);
|
|
342
|
-
}, [rawJson, embeddableId, savvy]);
|
|
353
|
+
}, [rawJson, embeddableId, savvy, selectedLanguage]);
|
|
343
354
|
useEffect(() => {
|
|
344
355
|
analyzeFields();
|
|
345
356
|
}, [analyzeFields]);
|
|
@@ -529,7 +540,7 @@ export function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyF
|
|
|
529
540
|
const isFilled = field.value !== null && field.value !== undefined && field.value !== '';
|
|
530
541
|
return (_jsxs("div", { className: `flex items-center gap-2 rounded-lg px-2.5 py-2 ${isFilled
|
|
531
542
|
? 'bg-emerald-500/10 ring-1 ring-inset ring-emerald-500/20'
|
|
532
|
-
: 'bg-white/5 ring-1 ring-inset ring-white/10'}`, children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded bg-slate-800 text-xs", children: "\u2022" }), _jsx("div", { className: "min-w-0 flex-1", children: _jsx("div", { className: "truncate text-xs font-medium text-slate-100", title: field.key, children: field.key }) })] }), _jsx("div", { className: "flex shrink-0 items-center gap-2", children: hasOptions ? (_jsxs("select", { value: formatValue(field.value), onChange: (e) => handleValueChange(field, e.target.value), className: "max-w-[200px] truncate rounded-lg bg-slate-800
|
|
543
|
+
: 'bg-white/5 ring-1 ring-inset ring-white/10'}`, children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded bg-slate-800 text-xs", children: "\u2022" }), _jsx("div", { className: "min-w-0 flex-1", children: _jsx("div", { className: "truncate text-xs font-medium text-slate-100", title: field.key, children: field.key }) })] }), _jsx("div", { className: "flex shrink-0 items-center gap-2", children: hasOptions ? (_jsxs("select", { value: formatValue(field.value), onChange: (e) => handleValueChange(field, e.target.value), className: "max-w-[200px] truncate rounded-lg bg-slate-800 pl-2 pr-6 py-1.5 text-[11px] text-slate-100 ring-1 ring-inset ring-slate-600 focus:outline-none focus:ring-2 focus:ring-sky-500/60", children: [_jsx("option", { value: "", children: "-- Select --" }), field.options.map((opt, idx) => (_jsx("option", { value: opt.key ?? '', children: opt.text || opt.key || '(empty)' }, opt.key ?? idx)))] })) : (_jsx("input", { type: "text", value: formatValue(field.value), onChange: (e) => {
|
|
533
544
|
const input = e.target;
|
|
534
545
|
const value = input.value;
|
|
535
546
|
restoreCursorAfterUpdate(input, () => handleValueChange(field, value));
|
|
@@ -571,11 +582,11 @@ export function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyF
|
|
|
571
582
|
: field.options;
|
|
572
583
|
return (_jsxs("div", { className: `flex flex-col gap-2 rounded-lg px-2.5 py-2 ${isFilled
|
|
573
584
|
? 'bg-emerald-500/10 ring-1 ring-inset ring-emerald-500/20'
|
|
574
|
-
: 'bg-white/5 ring-1 ring-inset ring-white/10'}`, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded bg-slate-800 text-xs", title: field.componentType || field.category, children: getComponentTypeIcon(field.componentType) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: `truncate text-xs font-medium text-slate-100 ${!field.label ? 'font-mono' : ''}`, title: field.key, children: field.label || field.key }), _jsxs("div", { className: "flex items-center gap-2 text-[10px] text-slate-500", children: [field.label && field.label !== field.key && (_jsxs(_Fragment, { children: [_jsx("span", { className: "font-mono text-slate-300", children: field.key }), _jsx("span", { children: "\u2022" })] })), field.componentType && (_jsxs(_Fragment, { children: [_jsx("span", { children: field.componentType }), field.isMultiple && (_jsxs(_Fragment, { children: [_jsx("span", { children: "\u2022" }), _jsx("span", { children: "Multi-select" })] })), field.inputType && (_jsxs(_Fragment, { children: [_jsx("span", { children: "\u2022" }), _jsx("span", { className: "font-mono", children: getInputTypeLabel(field.inputType) })] }))] })), field.options && field.options.length > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { children: "\u2022" }), _jsxs("span", { children: [field.options.length, " options"] })] }))] })] })] }), !isMultiSelect && (_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [hasOptions ? (_jsxs("select", { value: formatValue(field.value), onChange: (e) => handleValueChange(field, e.target.value), className: "max-w-[180px] truncate rounded-lg bg-slate-800
|
|
585
|
+
: 'bg-white/5 ring-1 ring-inset ring-white/10'}`, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded bg-slate-800 text-xs", title: field.componentType || field.category, children: getComponentTypeIcon(field.componentType) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: `truncate text-xs font-medium text-slate-100 ${!field.label ? 'font-mono' : ''}`, title: field.key, children: field.label || field.key }), _jsxs("div", { className: "flex items-center gap-2 text-[10px] text-slate-500", children: [field.label && field.label !== field.key && (_jsxs(_Fragment, { children: [_jsx("span", { className: "font-mono text-slate-300", children: field.key }), _jsx("span", { children: "\u2022" })] })), field.componentType && (_jsxs(_Fragment, { children: [_jsx("span", { children: field.componentType }), field.isMultiple && (_jsxs(_Fragment, { children: [_jsx("span", { children: "\u2022" }), _jsx("span", { children: "Multi-select" })] })), field.inputType && (_jsxs(_Fragment, { children: [_jsx("span", { children: "\u2022" }), _jsx("span", { className: "font-mono", children: getInputTypeLabel(field.inputType) })] }))] })), field.options && field.options.length > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { children: "\u2022" }), _jsxs("span", { children: [field.options.length, " options"] })] }))] })] })] }), !isMultiSelect && (_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [hasOptions ? (_jsxs("select", { value: formatValue(field.value), onChange: (e) => handleValueChange(field, e.target.value), className: "max-w-[180px] truncate rounded-lg bg-slate-800 pl-2 pr-6 py-1.5 text-[11px] text-slate-100 ring-1 ring-inset ring-slate-600 focus:outline-none focus:ring-2 focus:ring-sky-500/60", children: [_jsx("option", { value: "", children: "-- Select --" }), field.options.map((opt, idx) => (_jsx("option", { value: opt.key ?? '', children: opt.text || opt.key || '(empty)' }, opt.key ?? idx)))] })) : (_jsx("input", { type: "text", value: formatValue(field.value), onChange: (e) => {
|
|
575
586
|
const input = e.target;
|
|
576
587
|
const value = input.value;
|
|
577
588
|
restoreCursorAfterUpdate(input, () => handleValueChange(field, value));
|
|
578
|
-
}, className: "w-32 rounded-lg bg-slate-800 px-2 py-1.5 text-[11px] font-mono text-slate-100 ring-1 ring-inset ring-slate-600 placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-sky-500/60", placeholder: "null" })), isFilled ? (_jsx("button", { type: "button", onClick: () => handleClear(field), className: "cursor-pointer rounded-lg bg-slate-700 px-2 py-1 text-[10px] font-semibold text-rose-300 ring-1 ring-inset ring-slate-600 hover:bg-slate-600 hover:text-rose-200", children: "Clear" })) : (_jsx("button", { type: "button", onClick: () => handleFill(field), className: "cursor-pointer rounded-lg bg-slate-700 px-2 py-1 text-[10px] font-semibold text-teal-300 ring-1 ring-inset ring-slate-600 hover:bg-slate-600 hover:text-teal-200", children: "Fill" }))] })), isMultiSelect && (_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsxs("select", { value: "", onChange: (e) => handleMultiSelectAdd(field, e.target.value), className: "max-w-[180px] truncate rounded-lg bg-slate-800
|
|
589
|
+
}, className: "w-32 rounded-lg bg-slate-800 px-2 py-1.5 text-[11px] font-mono text-slate-100 ring-1 ring-inset ring-slate-600 placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-sky-500/60", placeholder: "null" })), isFilled ? (_jsx("button", { type: "button", onClick: () => handleClear(field), className: "cursor-pointer rounded-lg bg-slate-700 px-2 py-1 text-[10px] font-semibold text-rose-300 ring-1 ring-inset ring-slate-600 hover:bg-slate-600 hover:text-rose-200", children: "Clear" })) : (_jsx("button", { type: "button", onClick: () => handleFill(field), className: "cursor-pointer rounded-lg bg-slate-700 px-2 py-1 text-[10px] font-semibold text-teal-300 ring-1 ring-inset ring-slate-600 hover:bg-slate-600 hover:text-teal-200", children: "Fill" }))] })), isMultiSelect && (_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsxs("select", { value: "", onChange: (e) => handleMultiSelectAdd(field, e.target.value), className: "max-w-[180px] truncate rounded-lg bg-slate-800 pl-2 pr-6 py-1.5 text-[11px] text-slate-100 ring-1 ring-inset ring-slate-600 focus:outline-none focus:ring-2 focus:ring-sky-500/60", children: [_jsx("option", { value: "", children: "+ Add..." }), availableOptions.map((opt, idx) => (_jsx("option", { value: opt.key ?? '', children: opt.text || opt.key || '(empty)' }, opt.key ?? idx)))] }), isFilled && (_jsx("button", { type: "button", onClick: () => handleClear(field), className: "cursor-pointer rounded-lg bg-slate-700 px-2 py-1 text-[10px] font-semibold text-rose-300 ring-1 ring-inset ring-slate-600 hover:bg-slate-600 hover:text-rose-200", children: "Clear All" }))] }))] }), isMultiSelect && selectedValues.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-1.5 pl-8", children: selectedValues.map((val) => (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-md bg-emerald-500/20 px-2 py-0.5 text-[11px] font-medium text-emerald-200 ring-1 ring-inset ring-emerald-500/30", children: [getOptionText(field, val), _jsx("button", { type: "button", onClick: () => handleMultiSelectRemove(field, val), className: "ml-0.5 cursor-pointer rounded hover:bg-sky-500/30 hover:text-sky-100", title: "Remove", children: _jsx("svg", { className: "h-3 w-3", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", children: _jsx("path", { d: "M3 3l6 6M9 3l-6 6" }) }) })] }, val))) }))] }, field.key));
|
|
579
590
|
};
|
|
580
591
|
// Render typed field (for computed, registered, extra)
|
|
581
592
|
const renderTypedField = (field) => {
|
|
@@ -583,7 +594,7 @@ export function FieldEditorPanel({ embeddableId, rawJson, onUpdateUserData, keyF
|
|
|
583
594
|
const isFilled = field.hasValue;
|
|
584
595
|
return (_jsxs("div", { className: `flex items-center gap-2 rounded-lg px-2.5 py-2 ${isFilled
|
|
585
596
|
? 'bg-emerald-500/10 ring-1 ring-inset ring-emerald-500/20'
|
|
586
|
-
: 'bg-white/5 ring-1 ring-inset ring-white/10'}`, children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded bg-slate-800 text-xs", children: "\u2022" }), _jsx("div", { className: "min-w-0 flex-1", children: _jsx("div", { className: "truncate text-xs font-medium text-slate-100", title: field.key, children: field.key }) })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsxs("select", { value: currentType, onChange: (e) => handleTypeChange(field.key, e.target.value, field.value), className: "w-20 rounded-lg bg-slate-800
|
|
597
|
+
: 'bg-white/5 ring-1 ring-inset ring-white/10'}`, children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded bg-slate-800 text-xs", children: "\u2022" }), _jsx("div", { className: "min-w-0 flex-1", children: _jsx("div", { className: "truncate text-xs font-medium text-slate-100", title: field.key, children: field.key }) })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsxs("select", { value: currentType, onChange: (e) => handleTypeChange(field.key, e.target.value, field.value), className: "w-20 rounded-lg bg-slate-800 pl-2 pr-6 py-1.5 text-[11px] text-slate-100 ring-1 ring-inset ring-slate-600 focus:outline-none focus:ring-2 focus:ring-sky-500/60", children: [_jsx("option", { value: "null", children: "null" }), _jsx("option", { value: "boolean", children: "boolean" }), _jsx("option", { value: "text", children: "text" }), _jsx("option", { value: "number", children: "number" }), _jsx("option", { value: "json", children: "JSON" })] }), currentType === 'null' ? (_jsx("span", { className: "w-24 rounded-lg bg-slate-800/50 px-2 py-1.5 text-center text-[11px] font-mono text-slate-500 ring-1 ring-inset ring-slate-700", children: "null" })) : currentType === 'boolean' ? (_jsxs("select", { value: String(field.value ?? false), onChange: (e) => handleTypedValueChange(field.key, 'boolean', e.target.value), className: "w-24 rounded-lg bg-slate-800 pl-2 pr-6 py-1.5 text-[11px] text-slate-100 ring-1 ring-inset ring-slate-600 focus:outline-none focus:ring-2 focus:ring-sky-500/60", children: [_jsx("option", { value: "true", children: "true" }), _jsx("option", { value: "false", children: "false" })] })) : currentType === 'number' ? (_jsx("input", { type: "number", value: field.value === null || field.value === undefined ? '' : String(field.value), onChange: (e) => {
|
|
587
598
|
const input = e.target;
|
|
588
599
|
const value = input.value;
|
|
589
600
|
restoreCursorAfterUpdate(input, () => handleTypedValueChange(field.key, 'number', value));
|