@salesforce/metadata-core-sdk 1.5.0 → 1.7.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/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/sdk/contracts/core/IMetadataParser.d.ts +39 -0
- package/dist/sdk/contracts/core/IMetadataParser.d.ts.map +1 -1
- package/dist/sdk/contracts/types/MetadataPluginInfo.d.ts +39 -9
- package/dist/sdk/contracts/types/MetadataPluginInfo.d.ts.map +1 -1
- package/dist/sdk/contracts/types/SelectableNode.d.ts +62 -0
- package/dist/sdk/contracts/types/SelectableNode.d.ts.map +1 -0
- package/dist/sdk/contracts/types/SelectableNode.js +8 -0
- package/dist/sdk/contracts/types/SelectableNode.js.map +1 -0
- package/dist/sdk/contracts/types/index.d.ts +1 -0
- package/dist/sdk/contracts/types/index.d.ts.map +1 -1
- package/dist/sdk/contracts/types/index.js +1 -0
- package/dist/sdk/contracts/types/index.js.map +1 -1
- package/dist/sdk/hooks/vibe-edit/index.d.ts +39 -0
- package/dist/sdk/hooks/vibe-edit/index.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/index.js +42 -0
- package/dist/sdk/hooks/vibe-edit/index.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGeometry.d.ts +56 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGeometry.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGeometry.js +138 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGeometry.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraph.d.ts +66 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraph.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraph.js +73 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraph.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraphEngine.d.ts +64 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraphEngine.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraphEngine.js +161 -0
- package/dist/sdk/hooks/vibe-edit/selection/selectionGraphEngine.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/types.d.ts +47 -0
- package/dist/sdk/hooks/vibe-edit/selection/types.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/types.js +40 -0
- package/dist/sdk/hooks/vibe-edit/selection/types.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/useMarqueeSelection.d.ts +30 -0
- package/dist/sdk/hooks/vibe-edit/selection/useMarqueeSelection.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/selection/useMarqueeSelection.js +50 -0
- package/dist/sdk/hooks/vibe-edit/selection/useMarqueeSelection.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/ui/MarqueeSelection.css +26 -0
- package/dist/sdk/hooks/vibe-edit/ui/MarqueeSelection.d.ts +84 -0
- package/dist/sdk/hooks/vibe-edit/ui/MarqueeSelection.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/ui/MarqueeSelection.js +256 -0
- package/dist/sdk/hooks/vibe-edit/ui/MarqueeSelection.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/ui/VibeEditPanel.css +207 -0
- package/dist/sdk/hooks/vibe-edit/ui/VibeEditPanel.d.ts +43 -0
- package/dist/sdk/hooks/vibe-edit/ui/VibeEditPanel.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/ui/VibeEditPanel.js +80 -0
- package/dist/sdk/hooks/vibe-edit/ui/VibeEditPanel.js.map +1 -0
- package/dist/sdk/hooks/vibe-edit/ui/useVibeEdit.css +79 -0
- package/dist/sdk/hooks/vibe-edit/ui/useVibeEdit.d.ts +116 -0
- package/dist/sdk/hooks/vibe-edit/ui/useVibeEdit.d.ts.map +1 -0
- package/dist/sdk/hooks/vibe-edit/ui/useVibeEdit.js +264 -0
- package/dist/sdk/hooks/vibe-edit/ui/useVibeEdit.js.map +1 -0
- package/dist/sdk/utils/HostCommunicationUtils.d.ts +2 -0
- package/dist/sdk/utils/HostCommunicationUtils.d.ts.map +1 -1
- package/dist/sdk/utils/HostCommunicationUtils.js +11 -2
- package/dist/sdk/utils/HostCommunicationUtils.js.map +1 -1
- package/dist/sdk/webviewMessageTypes.d.ts +103 -5
- package/dist/sdk/webviewMessageTypes.d.ts.map +1 -1
- package/dist/sdk/webviewMessageTypes.js +9 -4
- package/dist/sdk/webviewMessageTypes.js.map +1 -1
- package/package.json +11 -3
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { IVisualizationPlugin } from './sdk/contracts/core/IVisualizationPlugin.js';
|
|
17
17
|
export { IMetadataParser } from './sdk/contracts/core/IMetadataParser.js';
|
|
18
|
-
export type { MetadataPluginInfo } from './sdk/contracts/types/MetadataPluginInfo.js';
|
|
18
|
+
export type { MetadataPluginInfo, TrustedSources, } from './sdk/contracts/types/MetadataPluginInfo.js';
|
|
19
19
|
export type { ValidationResult } from './sdk/contracts/types/ValidationResult.js';
|
|
20
20
|
export type { PluginContext } from './sdk/contracts/types/PluginContext.js';
|
|
21
21
|
export type { PluginError } from './sdk/contracts/types/PluginError.js';
|
|
@@ -31,9 +31,12 @@ export { Logger } from './sdk/utils/logger.js';
|
|
|
31
31
|
export { ErrorBuilder } from './sdk/utils/errors/ErrorBuilder.js';
|
|
32
32
|
export { setupErrorHandlers } from './sdk/utils/errors/setupHandlers.js';
|
|
33
33
|
export { WebviewMessageType, VALID_MESSAGE_TYPES } from './sdk/webviewMessageTypes.js';
|
|
34
|
-
export type { PluginDataResponse, WebviewMessage } from './sdk/webviewMessageTypes.js';
|
|
34
|
+
export type { PluginDataResponse, PluginDataContext, WebviewMessage, SpatialContext, EditRequest, EditHandoffResult, } from './sdk/webviewMessageTypes.js';
|
|
35
35
|
export { getPluginData, sendToHost, onDataUpdate } from './sdk/utils/HostCommunicationUtils.js';
|
|
36
36
|
export type { VersionInfo } from './sdk/contracts/types/VersionInfo.js';
|
|
37
37
|
export { PLUGINS_DIST_DIR, PLUGINS_DIR, REACT_UI_DIR_NAME } from './sdk/constants.js';
|
|
38
38
|
export * from './sdk/design-system/index.js';
|
|
39
|
+
export { itemKey } from './sdk/hooks/vibe-edit/selection/selectionGeometry.js';
|
|
40
|
+
export { SELECTABLE_ATTR, TYPE_ATTR, ID_ATTR, COVERAGE_THRESHOLD, CLICK_THRESHOLD_PX, type SelectedItem, } from './sdk/hooks/vibe-edit/selection/types.js';
|
|
41
|
+
export { type SelectableNode, type SfdxPathInput, sfdxPath, hashString, structuralId, } from './sdk/hooks/vibe-edit/selection/selectionGraph.js';
|
|
39
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;GAQG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAG1E,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;GAQG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAG1E,YAAY,EACV,kBAAkB,EAClB,cAAc,GACf,MAAM,6CAA6C,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,YAAY,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,YAAY,EAAE,WAA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UAAU,EACV,YAAY,GACb,MAAM,mDAAmD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,30 @@ export { getPluginData, sendToHost, onDataUpdate } from './sdk/utils/HostCommuni
|
|
|
20
20
|
export { PLUGINS_DIST_DIR, PLUGINS_DIR, REACT_UI_DIR_NAME } from './sdk/constants.js';
|
|
21
21
|
// Design System
|
|
22
22
|
export * from './sdk/design-system/index.js';
|
|
23
|
+
// Vibe-edit feature (plugin-side, SelectionGraph). The feature is split across
|
|
24
|
+
// two entry points so that importing this MAIN barrel in a plain Node/ESM
|
|
25
|
+
// context that lacks `react` (a filesystem-only consumer such as the App Studio
|
|
26
|
+
// visualization service — react/react-dom are only OPTIONAL peers) never fails
|
|
27
|
+
// to resolve, and so a CSS side-effect import never reaches a loader that can't
|
|
28
|
+
// handle it (the vscode-ext `generate:settings` script does `await import()` on
|
|
29
|
+
// the plugins package, which evaluates this barrel — a bare `import './x.css'`
|
|
30
|
+
// from the JSX layer would crash it with ERR_UNKNOWN_FILE_EXTENSION):
|
|
31
|
+
//
|
|
32
|
+
// - MAIN ('.') → the pure, Node-safe SelectionGraph LOGIC only: the
|
|
33
|
+
// SelectableNode contract, deterministic-id / SFDX helpers, hit-test/geometry
|
|
34
|
+
// constants + `itemKey`, and the tagger/inverter engine. This is all a plugin
|
|
35
|
+
// PARSER and the framework need; NONE of it imports `react` or CSS. (The
|
|
36
|
+
// marquee state hook `useMarqueeSelection` is React, so it is NOT re-exported
|
|
37
|
+
// here — pulling it in would make `react` a hard requirement of the main
|
|
38
|
+
// entry; it lives on the subpath below.)
|
|
39
|
+
// - SUBPATH ('./vibe-edit') → the React layer (`useVibeEdit`, `VibeEditPanel`,
|
|
40
|
+
// `MarqueeSelection`, `useMarqueeSelection`). Only a plugin's Vite-bundled
|
|
41
|
+
// `ui/` code imports these, where react and CSS side-effects are handled by
|
|
42
|
+
// the bundler. See the './vibe-edit' export in package.json.
|
|
43
|
+
//
|
|
44
|
+
// See sdk/hooks/vibe-edit/ (ui/ = JSX layer, selection/ = logic layer).
|
|
45
|
+
export { itemKey } from './sdk/hooks/vibe-edit/selection/selectionGeometry.js';
|
|
46
|
+
export { SELECTABLE_ATTR, TYPE_ATTR, ID_ATTR, COVERAGE_THRESHOLD, CLICK_THRESHOLD_PX, } from './sdk/hooks/vibe-edit/selection/types.js';
|
|
47
|
+
// SelectionGraph (C1 + C4): normalized node contract + deterministic-id / SFDX helpers.
|
|
48
|
+
export { sfdxPath, hashString, structuralId, } from './sdk/hooks/vibe-edit/selection/selectionGraph.js';
|
|
23
49
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAwBJ,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAIrE,wBAAwB;AACxB,cAAc,6BAA6B,CAAC;AAK5C,YAAY;AACZ,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,0EAA0E;AAC1E,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAUvF,+DAA+D;AAC/D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAKhG,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,gBAAgB;AAChB,cAAc,8BAA8B,CAAC;AAE7C,+EAA+E;AAC/E,0EAA0E;AAC1E,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,sEAAsE;AACtE,EAAE;AACF,+EAA+E;AAC/E,kFAAkF;AAClF,kFAAkF;AAClF,6EAA6E;AAC7E,kFAAkF;AAClF,6EAA6E;AAC7E,6CAA6C;AAC7C,iFAAiF;AACjF,+EAA+E;AAC/E,gFAAgF;AAChF,iEAAiE;AACjE,EAAE;AACF,wEAAwE;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,0CAA0C,CAAC;AAClD,wFAAwF;AACxF,OAAO,EAGL,QAAQ,EACR,UAAU,EACV,YAAY,GACb,MAAM,mDAAmD,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { ValidationResult } from '../types/ValidationResult.js';
|
|
|
8
8
|
import { VersionInfo } from '../types/VersionInfo.js';
|
|
9
9
|
import { MetadataFileInfo } from '../types/MetadataFileInfo.js';
|
|
10
10
|
import { IPlatformContext } from '../../abstractions/core/IPlatformContext.js';
|
|
11
|
+
import { SelectableNode } from '../types/SelectableNode.js';
|
|
11
12
|
/**
|
|
12
13
|
* Contract for parsing metadata files
|
|
13
14
|
*
|
|
@@ -23,6 +24,23 @@ export interface IMetadataParser<TData> {
|
|
|
23
24
|
* @returns Parsed data structure
|
|
24
25
|
*/
|
|
25
26
|
parse(filePath: string, versionInfo: VersionInfo): Promise<TData>;
|
|
27
|
+
/**
|
|
28
|
+
* Parse an in-memory payload directly, without reading from disk.
|
|
29
|
+
*
|
|
30
|
+
* Optional in-memory sibling of {@link parse}. When implemented, it enables
|
|
31
|
+
* by-id in-memory rendering: a host that already holds the structured payload
|
|
32
|
+
* (e.g. a typed object pushed by another extension) can have it visualized
|
|
33
|
+
* without first materializing a temp file. The framework routes to this hook
|
|
34
|
+
* from `VisualizationEngine.visualizeData(raw, pluginId)` when a plugin is
|
|
35
|
+
* selected by id rather than by file path.
|
|
36
|
+
*
|
|
37
|
+
* Parsers that only ever read from disk omit this hook; nothing breaks — the
|
|
38
|
+
* by-id in-memory path simply reports that the plugin does not support it.
|
|
39
|
+
*
|
|
40
|
+
* @param raw - The in-memory payload to parse (shape validated by the parser)
|
|
41
|
+
* @returns Parsed data structure (or a promise of it)
|
|
42
|
+
*/
|
|
43
|
+
parseContent?(raw: unknown): Promise<TData> | TData;
|
|
26
44
|
/**
|
|
27
45
|
* Validate the parsed data
|
|
28
46
|
*
|
|
@@ -67,5 +85,26 @@ export interface IMetadataParser<TData> {
|
|
|
67
85
|
* @returns Metadata info, or `null` if no labels can be derived from the data
|
|
68
86
|
*/
|
|
69
87
|
extractMetadataInfo?(data: TData): MetadataFileInfo | null;
|
|
88
|
+
/**
|
|
89
|
+
* Emit the vibe-edit SelectionGraph — a flat, normalized list of the selectable
|
|
90
|
+
* elements in this parsed data (SelectionGraph / C1).
|
|
91
|
+
*
|
|
92
|
+
* Optional, opt-in per plugin. When implemented, the parser projects its own
|
|
93
|
+
* bespoke shape into uniform {@link SelectableNode}s as it walks the data it
|
|
94
|
+
* already traverses to render. The framework/host caches this array and the
|
|
95
|
+
* generic selection engine resolves a selected DOM element to its node by
|
|
96
|
+
* `id` alone — it never introspects the plugin's opaque parsed shape (dissolves
|
|
97
|
+
* the consumption side of shape-opacity). Assign each node's `id` via
|
|
98
|
+
* {@link structuralId} and set `filePath` via {@link sfdxPath} so ids are
|
|
99
|
+
* deterministic (host + render agree) and file paths follow SFDX conventions
|
|
100
|
+
* without the plugin hand-writing path strings.
|
|
101
|
+
*
|
|
102
|
+
* Plugins that don't implement this fall back to the descriptor / buildContext
|
|
103
|
+
* paths; nothing breaks.
|
|
104
|
+
*
|
|
105
|
+
* @param data - Data returned by `parse()`
|
|
106
|
+
* @returns The selectable nodes for this file (empty array if none)
|
|
107
|
+
*/
|
|
108
|
+
getSelectableNodes?(data: TData): SelectableNode[];
|
|
70
109
|
}
|
|
71
110
|
//# sourceMappingURL=IMetadataParser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IMetadataParser.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/core/IMetadataParser.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"IMetadataParser.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/core/IMetadataParser.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,WAAW,eAAe,CAAC,KAAK;IACpC;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAElE;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IAEpD;;;;;;;;OAQG;IACH,QAAQ,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,gBAAgB,CAAC;IAEzC;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE/D;;;;;;;OAOG;IACH,kBAAkB,CAAC,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAErD;;;;;;;;;OASG;IACH,mBAAmB,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAE3D;;;;;;;;;;;;;;;;;;;OAmBG;IACH,kBAAkB,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,cAAc,EAAE,CAAC;CACpD"}
|
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
**/
|
|
7
|
+
/** External HTTPS sources that a plugin webview is permitted to use. */
|
|
8
|
+
export interface TrustedSources {
|
|
9
|
+
/** HTTPS URLs to add to CSP script-src directive (e.g. 'https://cdn.jsdelivr.net') */
|
|
10
|
+
scripts?: string[];
|
|
11
|
+
/** HTTPS URLs to add to CSP style-src directive (e.g. 'https://fonts.googleapis.com') */
|
|
12
|
+
styles?: string[];
|
|
13
|
+
/** HTTPS URLs to add to CSP connect-src directive (e.g. 'https://api.example.com') */
|
|
14
|
+
connect?: string[];
|
|
15
|
+
}
|
|
7
16
|
/**
|
|
8
17
|
* Plugin metadata information
|
|
9
18
|
*
|
|
@@ -26,7 +35,12 @@ export interface MetadataPluginInfo {
|
|
|
26
35
|
description?: string;
|
|
27
36
|
/** Team/author */
|
|
28
37
|
author: string;
|
|
29
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* File patterns this plugin handles.
|
|
40
|
+
*
|
|
41
|
+
* This array must be non-empty for file-backed plugins and must be empty when
|
|
42
|
+
* {@link payloadOnly} is `true`.
|
|
43
|
+
*/
|
|
30
44
|
filePatterns: string[];
|
|
31
45
|
/**
|
|
32
46
|
* Priority for plugin selection when multiple plugins can handle the same file
|
|
@@ -39,6 +53,20 @@ export interface MetadataPluginInfo {
|
|
|
39
53
|
* If not specified, defaults to true
|
|
40
54
|
*/
|
|
41
55
|
defaultEnabled?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether this plugin is reached only by id via in-memory rendering, never by file path.
|
|
58
|
+
*
|
|
59
|
+
* When `true`, the plugin opts out of file-path selection entirely: it is never
|
|
60
|
+
* matched against a file's extension and is invoked only through
|
|
61
|
+
* `VisualizationEngine.visualizeData(raw, pluginId)`. Because such a plugin
|
|
62
|
+
* handles no files, it must declare `filePatterns: []` and its parser must
|
|
63
|
+
* implement `parseContent`. Conversely, an empty `filePatterns` array is valid
|
|
64
|
+
* only when this flag is `true`.
|
|
65
|
+
*
|
|
66
|
+
* Defaults to `false`/absent — ordinary file-handling plugins never set it and
|
|
67
|
+
* are unaffected.
|
|
68
|
+
*/
|
|
69
|
+
payloadOnly?: boolean;
|
|
42
70
|
/**
|
|
43
71
|
* Trusted external sources for CSP directives.
|
|
44
72
|
* Allows plugins to declare CDN sources needed for external scripts, styles, or network requests.
|
|
@@ -54,13 +82,15 @@ export interface MetadataPluginInfo {
|
|
|
54
82
|
*
|
|
55
83
|
* Plugins without trustedSources get strict CSP with no external script/network access.
|
|
56
84
|
*/
|
|
57
|
-
trustedSources?:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
85
|
+
trustedSources?: TrustedSources;
|
|
86
|
+
/**
|
|
87
|
+
* External sources approved specifically for in-memory payload rendering.
|
|
88
|
+
*
|
|
89
|
+
* Payload trust is reviewed independently: this field never inherits from
|
|
90
|
+
* {@link trustedSources}. Leaving it absent gives payload webviews the strict
|
|
91
|
+
* default CSP. This limits accidental webview egress; it is not a sandbox for
|
|
92
|
+
* malicious plugin package code, which already executes in the extension host.
|
|
93
|
+
*/
|
|
94
|
+
payloadTrustedSources?: TrustedSources;
|
|
65
95
|
}
|
|
66
96
|
//# sourceMappingURL=MetadataPluginInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataPluginInfo.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/MetadataPluginInfo.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IAEf
|
|
1
|
+
{"version":3,"file":"MetadataPluginInfo.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/MetadataPluginInfo.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,cAAc,CAAC;CACxC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* SelectionGraph node contracts (C1 + C4) — the normalized, self-describing
|
|
9
|
+
* shape a plugin's parser emits so the host/engine can resolve a selected DOM
|
|
10
|
+
* element to its node by `id` alone.
|
|
11
|
+
*
|
|
12
|
+
* These are the CONTRACT-layer types: `IMetadataParser.getSelectableNodes()`
|
|
13
|
+
* lives in `contracts/`, the lowest SDK layer, so its return type must live here
|
|
14
|
+
* too — importing it from the `hooks/` layer would drag the whole vibe-edit tree
|
|
15
|
+
* into every plugin that implements the parser interface (and left the message
|
|
16
|
+
* contract in {@link PluginDataResponse} duplicating the shape structurally to
|
|
17
|
+
* avoid exactly that). The runtime helpers that operate on these types
|
|
18
|
+
* (`sfdxPath`, `structuralId`, `hashString`) stay in the selection layer and are
|
|
19
|
+
* re-exported from there alongside these types.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* One selectable element, normalized. `id` is stable + deterministic (see
|
|
23
|
+
* `structuralId`) and is what the plugin renders as `data-mv-id`, so the host
|
|
24
|
+
* can resolve a selection to its node without any plugin-side inverse.
|
|
25
|
+
*/
|
|
26
|
+
export interface SelectableNode {
|
|
27
|
+
/** Stable, deterministic id. Rendered as data-mv-id; the selection key. */
|
|
28
|
+
id: string;
|
|
29
|
+
/** Semantic element kind, e.g. 'object' | 'field' | 'region' | 'component'. */
|
|
30
|
+
type: string;
|
|
31
|
+
/** API name / human identifier surfaced to the agent (e.g. 'Account', 'Industry__c'). */
|
|
32
|
+
apiName: string;
|
|
33
|
+
/** id of the containing node, if any (the parent object of a field, etc.). */
|
|
34
|
+
parentId?: string;
|
|
35
|
+
/** Salient attributes worth surfacing to the agent (dataType, label, …). */
|
|
36
|
+
attributes?: Record<string, unknown>;
|
|
37
|
+
/** Metadata file this node lives in. Prefer computing via `sfdxPath`. */
|
|
38
|
+
filePath?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Inputs for the shared, plugin-agnostic SFDX source-layout resolver. These are
|
|
42
|
+
* the convention PRIMITIVES a plugin emits per node (data, not a callback); the
|
|
43
|
+
* SFDX layout rule itself is universal and owned by `sfdxPath`, so the file-path
|
|
44
|
+
* string is computed once in core-sdk rather than hand-built in each plugin (B2
|
|
45
|
+
* paid once).
|
|
46
|
+
*/
|
|
47
|
+
export interface SfdxPathInput {
|
|
48
|
+
/** Node kind — drives which SFDX file the node belongs to. */
|
|
49
|
+
type: string;
|
|
50
|
+
/** The node's own api name. */
|
|
51
|
+
apiName: string;
|
|
52
|
+
/** The parent object's api name (for fields attributed to their object file). */
|
|
53
|
+
parentApiName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* True if this is a decomposed field with its own `.field-meta.xml`. When
|
|
56
|
+
* false/absent, a field inherits its parent object's `.object-meta.xml`.
|
|
57
|
+
*/
|
|
58
|
+
decomposed?: boolean;
|
|
59
|
+
/** Root of the objects tree in the SFDX source layout. Default: 'objects'. */
|
|
60
|
+
objectsRoot?: string;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=SelectableNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableNode.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/SelectableNode.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;;;GAaG;AAEH;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=SelectableNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableNode.js","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/SelectableNode.ts"],"names":[],"mappings":"AAAA;;;;;IAKI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/contracts/types/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* Vibe-edit feature barrel.
|
|
9
|
+
*
|
|
10
|
+
* ONE consumer-facing hook — `useVibeEdit` — owns the whole flow: it composes
|
|
11
|
+
* the internal selection machinery (state machine + overlay + graph engine +
|
|
12
|
+
* geometry) with the prompt panel and the SUBMIT_EDIT handoff. Everything else
|
|
13
|
+
* exported here is a lower-level primitive kept public for advanced callers.
|
|
14
|
+
*
|
|
15
|
+
* Layout (separation of concern, and the whole feature removable as one dir):
|
|
16
|
+
* ui/ — the JSX/CSS layer (useVibeEdit, VibeEditPanel, MarqueeSelection)
|
|
17
|
+
* selection/ — the logic layer (SelectionGraph contract + engine, geometry,
|
|
18
|
+
* selection state machine, shared types)
|
|
19
|
+
*
|
|
20
|
+
* This subpath is a BROWSER/BUNDLER-ONLY entry: it transitively imports React and
|
|
21
|
+
* a side-effect `.css`, so importing it in a plain Node ESM runtime throws. The
|
|
22
|
+
* inverter (`buildContextsFromNodes` / `nodeToSpatialContext`) runs in the plugin
|
|
23
|
+
* iframe against live marquee selection — there is no server-side inversion. The
|
|
24
|
+
* framework/web-adapter only PRODUCE `SelectableNode[]` and forward them verbatim
|
|
25
|
+
* as postMessage data; they never construct a SpatialContext. So do NOT import
|
|
26
|
+
* from here in a headless/server consumer — the react-free node helpers a parser
|
|
27
|
+
* needs (`SelectableNode`, `sfdxPath`, `structuralId`, `hashString`) are also on
|
|
28
|
+
* the main barrel, which stays React/CSS-free.
|
|
29
|
+
*/
|
|
30
|
+
export { useVibeEdit, isVibeEditAvailable } from './ui/useVibeEdit.js';
|
|
31
|
+
export type { UseVibeEditResult, UseVibeEditOptions } from './ui/useVibeEdit.js';
|
|
32
|
+
export { VibeEditPanel, type VibeEditChip } from './ui/VibeEditPanel.js';
|
|
33
|
+
export { MarqueeSelection } from './ui/MarqueeSelection.js';
|
|
34
|
+
export { useMarqueeSelection, type MarqueeSelectionApi } from './selection/useMarqueeSelection.js';
|
|
35
|
+
export { itemKey } from './selection/selectionGeometry.js';
|
|
36
|
+
export { SELECTABLE_ATTR, TYPE_ATTR, ID_ATTR, SELECTED_ATTR, HOVER_ATTR, COVERAGE_THRESHOLD, CLICK_THRESHOLD_PX, type SelectedItem, } from './selection/types.js';
|
|
37
|
+
export { type SelectableNode, type SfdxPathInput, sfdxPath, hashString, structuralId, } from './selection/selectionGraph.js';
|
|
38
|
+
export { tagSelectionGraphLive, buildContextsFromNodes, nodeToSpatialContext, indexNodes, } from './selection/selectionGraphEngine.js';
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/hooks/vibe-edit/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,QAAQ,EACR,UAAU,EACV,YAAY,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,GACX,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* Vibe-edit feature barrel.
|
|
9
|
+
*
|
|
10
|
+
* ONE consumer-facing hook — `useVibeEdit` — owns the whole flow: it composes
|
|
11
|
+
* the internal selection machinery (state machine + overlay + graph engine +
|
|
12
|
+
* geometry) with the prompt panel and the SUBMIT_EDIT handoff. Everything else
|
|
13
|
+
* exported here is a lower-level primitive kept public for advanced callers.
|
|
14
|
+
*
|
|
15
|
+
* Layout (separation of concern, and the whole feature removable as one dir):
|
|
16
|
+
* ui/ — the JSX/CSS layer (useVibeEdit, VibeEditPanel, MarqueeSelection)
|
|
17
|
+
* selection/ — the logic layer (SelectionGraph contract + engine, geometry,
|
|
18
|
+
* selection state machine, shared types)
|
|
19
|
+
*
|
|
20
|
+
* This subpath is a BROWSER/BUNDLER-ONLY entry: it transitively imports React and
|
|
21
|
+
* a side-effect `.css`, so importing it in a plain Node ESM runtime throws. The
|
|
22
|
+
* inverter (`buildContextsFromNodes` / `nodeToSpatialContext`) runs in the plugin
|
|
23
|
+
* iframe against live marquee selection — there is no server-side inversion. The
|
|
24
|
+
* framework/web-adapter only PRODUCE `SelectableNode[]` and forward them verbatim
|
|
25
|
+
* as postMessage data; they never construct a SpatialContext. So do NOT import
|
|
26
|
+
* from here in a headless/server consumer — the react-free node helpers a parser
|
|
27
|
+
* needs (`SelectableNode`, `sfdxPath`, `structuralId`, `hashString`) are also on
|
|
28
|
+
* the main barrel, which stays React/CSS-free.
|
|
29
|
+
*/
|
|
30
|
+
// --- ui layer ---
|
|
31
|
+
export { useVibeEdit, isVibeEditAvailable } from './ui/useVibeEdit.js';
|
|
32
|
+
export { VibeEditPanel } from './ui/VibeEditPanel.js';
|
|
33
|
+
export { MarqueeSelection } from './ui/MarqueeSelection.js';
|
|
34
|
+
// --- selection layer (logic) ---
|
|
35
|
+
export { useMarqueeSelection } from './selection/useMarqueeSelection.js';
|
|
36
|
+
export { itemKey } from './selection/selectionGeometry.js';
|
|
37
|
+
export { SELECTABLE_ATTR, TYPE_ATTR, ID_ATTR, SELECTED_ATTR, HOVER_ATTR, COVERAGE_THRESHOLD, CLICK_THRESHOLD_PX, } from './selection/types.js';
|
|
38
|
+
// SelectionGraph (C1 + C4): the normalized SelectableNode contract + the shared
|
|
39
|
+
// deterministic-id and SFDX-path helpers a plugin parser uses to emit it.
|
|
40
|
+
export { sfdxPath, hashString, structuralId, } from './selection/selectionGraph.js';
|
|
41
|
+
export { tagSelectionGraphLive, buildContextsFromNodes, nodeToSpatialContext, indexNodes, } from './selection/selectionGraphEngine.js';
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/hooks/vibe-edit/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,mBAAmB;AACnB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAqB,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,kCAAkC;AAClC,OAAO,EAAE,mBAAmB,EAA4B,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC;AAC9B,gFAAgF;AAChF,0EAA0E;AAC1E,OAAO,EAGL,QAAQ,EACR,UAAU,EACV,YAAY,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,GACX,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
import { type SelectedItem } from './types.js';
|
|
8
|
+
/** A rectangle in client coordinates. */
|
|
9
|
+
export interface Rect {
|
|
10
|
+
left: number;
|
|
11
|
+
top: number;
|
|
12
|
+
right: number;
|
|
13
|
+
bottom: number;
|
|
14
|
+
}
|
|
15
|
+
/** Build a normalized Rect from two drag points. */
|
|
16
|
+
export declare function rectFromPoints(x1: number, y1: number, x2: number, y2: number): Rect;
|
|
17
|
+
/**
|
|
18
|
+
* Fraction (0..1) of `el`'s area covered by `marquee`. This is the
|
|
19
|
+
* intersection-over-element-area used by the >=50% selection rule.
|
|
20
|
+
*/
|
|
21
|
+
export declare function coverage(marquee: Rect, el: Rect): number;
|
|
22
|
+
/** Read the SelectedItem identity from a tagged element. */
|
|
23
|
+
export declare function itemOf(el: Element): SelectedItem | null;
|
|
24
|
+
/** Stable key for a SelectedItem: `type::id`. */
|
|
25
|
+
export declare function itemKey(item: SelectedItem): string;
|
|
26
|
+
/**
|
|
27
|
+
* Find every selectable element under `root` whose area is >= threshold-covered
|
|
28
|
+
* by the marquee, applying the **ancestor-wins** rule:
|
|
29
|
+
*
|
|
30
|
+
* Selectable elements nest (a field row lives inside an object card). When the
|
|
31
|
+
* marquee covers an element AND its selectable ancestor, we keep only the
|
|
32
|
+
* ancestor — dragging a box over a whole card selects the object, not the
|
|
33
|
+
* object plus all its fields. Dragging a box over just a few rows (not enough
|
|
34
|
+
* of the card) selects those fields. This gives intuitive granularity from a
|
|
35
|
+
* single gesture.
|
|
36
|
+
*/
|
|
37
|
+
export declare function selectInMarquee(root: ParentNode, marquee: Rect, threshold?: number): SelectedItem[];
|
|
38
|
+
/**
|
|
39
|
+
* Every selectable element under `root` whose area is >= threshold-covered by
|
|
40
|
+
* the marquee — WITHOUT the ancestor-wins collapse. Where {@link selectInMarquee}
|
|
41
|
+
* returns only the outermost covered element (what actually gets selected), this
|
|
42
|
+
* returns the full covered set including the finer nested elements (a card's
|
|
43
|
+
* label / description rows as well as the card itself).
|
|
44
|
+
*
|
|
45
|
+
* Used only for the live drag preview highlight: while dragging a box over a
|
|
46
|
+
* whole tile, the user sees the tile AND its inner label/description light up,
|
|
47
|
+
* making the finer selectables visible — even though release still selects just
|
|
48
|
+
* the tile (ancestor-wins). Purely visual; never fed to the edit handoff.
|
|
49
|
+
*/
|
|
50
|
+
export declare function coveredInMarquee(root: ParentNode, marquee: Rect, threshold?: number): SelectedItem[];
|
|
51
|
+
/**
|
|
52
|
+
* Resolve the most-specific selectable element at a point (for click): the
|
|
53
|
+
* innermost tagged element containing the point. Returns null if none.
|
|
54
|
+
*/
|
|
55
|
+
export declare function selectAtPoint(root: ParentNode, x: number, y: number): SelectedItem | null;
|
|
56
|
+
//# sourceMappingURL=selectionGeometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionGeometry.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/hooks/vibe-edit/selection/selectionGeometry.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAEpB,yCAAyC;AACzC,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,oDAAoD;AACpD,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAOnF;AAcD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM,CAMxD;AAED,4DAA4D;AAC5D,wBAAgB,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAOvD;AAED,iDAAiD;AACjD,wBAAgB,OAAO,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAElD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,IAAI,EACb,SAAS,GAAE,MAA2B,GACrC,YAAY,EAAE,CAiChB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,IAAI,EACb,SAAS,GAAE,MAA2B,GACrC,YAAY,EAAE,CAehB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAezF"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
import { SELECTABLE_ATTR, TYPE_ATTR, ID_ATTR, COVERAGE_THRESHOLD, } from './types.js';
|
|
8
|
+
/** Build a normalized Rect from two drag points. */
|
|
9
|
+
export function rectFromPoints(x1, y1, x2, y2) {
|
|
10
|
+
return {
|
|
11
|
+
left: Math.min(x1, x2),
|
|
12
|
+
top: Math.min(y1, y2),
|
|
13
|
+
right: Math.max(x1, x2),
|
|
14
|
+
bottom: Math.max(y1, y2),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Area of the intersection of two rects (0 if they don't overlap). */
|
|
18
|
+
function intersectionArea(a, b) {
|
|
19
|
+
const w = Math.max(0, Math.min(a.right, b.right) - Math.max(a.left, b.left));
|
|
20
|
+
const h = Math.max(0, Math.min(a.bottom, b.bottom) - Math.max(a.top, b.top));
|
|
21
|
+
return w * h;
|
|
22
|
+
}
|
|
23
|
+
/** Area of a rect. */
|
|
24
|
+
function area(r) {
|
|
25
|
+
return Math.max(0, r.right - r.left) * Math.max(0, r.bottom - r.top);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Fraction (0..1) of `el`'s area covered by `marquee`. This is the
|
|
29
|
+
* intersection-over-element-area used by the >=50% selection rule.
|
|
30
|
+
*/
|
|
31
|
+
export function coverage(marquee, el) {
|
|
32
|
+
const elArea = area(el);
|
|
33
|
+
if (elArea <= 0) {
|
|
34
|
+
return 0;
|
|
35
|
+
}
|
|
36
|
+
return intersectionArea(marquee, el) / elArea;
|
|
37
|
+
}
|
|
38
|
+
/** Read the SelectedItem identity from a tagged element. */
|
|
39
|
+
export function itemOf(el) {
|
|
40
|
+
const type = el.getAttribute(TYPE_ATTR);
|
|
41
|
+
const id = el.getAttribute(ID_ATTR);
|
|
42
|
+
if (!type || !id) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return { type, id };
|
|
46
|
+
}
|
|
47
|
+
/** Stable key for a SelectedItem: `type::id`. */
|
|
48
|
+
export function itemKey(item) {
|
|
49
|
+
return `${item.type}::${item.id}`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Find every selectable element under `root` whose area is >= threshold-covered
|
|
53
|
+
* by the marquee, applying the **ancestor-wins** rule:
|
|
54
|
+
*
|
|
55
|
+
* Selectable elements nest (a field row lives inside an object card). When the
|
|
56
|
+
* marquee covers an element AND its selectable ancestor, we keep only the
|
|
57
|
+
* ancestor — dragging a box over a whole card selects the object, not the
|
|
58
|
+
* object plus all its fields. Dragging a box over just a few rows (not enough
|
|
59
|
+
* of the card) selects those fields. This gives intuitive granularity from a
|
|
60
|
+
* single gesture.
|
|
61
|
+
*/
|
|
62
|
+
export function selectInMarquee(root, marquee, threshold = COVERAGE_THRESHOLD) {
|
|
63
|
+
const els = Array.from(root.querySelectorAll(`[${SELECTABLE_ATTR}]`));
|
|
64
|
+
// Elements that pass the coverage threshold.
|
|
65
|
+
const covered = els.filter((el) => {
|
|
66
|
+
const r = el.getBoundingClientRect();
|
|
67
|
+
return (coverage(marquee, { left: r.left, top: r.top, right: r.right, bottom: r.bottom }) >= threshold);
|
|
68
|
+
});
|
|
69
|
+
const coveredSet = new Set(covered);
|
|
70
|
+
// Ancestor-wins: drop any covered element that has a covered selectable ancestor.
|
|
71
|
+
const result = [];
|
|
72
|
+
for (const el of covered) {
|
|
73
|
+
let parent = el.parentElement;
|
|
74
|
+
let hasCoveredAncestor = false;
|
|
75
|
+
while (parent) {
|
|
76
|
+
if (coveredSet.has(parent)) {
|
|
77
|
+
hasCoveredAncestor = true;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
parent = parent.parentElement;
|
|
81
|
+
}
|
|
82
|
+
if (hasCoveredAncestor) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const item = itemOf(el);
|
|
86
|
+
if (item) {
|
|
87
|
+
result.push(item);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Every selectable element under `root` whose area is >= threshold-covered by
|
|
94
|
+
* the marquee — WITHOUT the ancestor-wins collapse. Where {@link selectInMarquee}
|
|
95
|
+
* returns only the outermost covered element (what actually gets selected), this
|
|
96
|
+
* returns the full covered set including the finer nested elements (a card's
|
|
97
|
+
* label / description rows as well as the card itself).
|
|
98
|
+
*
|
|
99
|
+
* Used only for the live drag preview highlight: while dragging a box over a
|
|
100
|
+
* whole tile, the user sees the tile AND its inner label/description light up,
|
|
101
|
+
* making the finer selectables visible — even though release still selects just
|
|
102
|
+
* the tile (ancestor-wins). Purely visual; never fed to the edit handoff.
|
|
103
|
+
*/
|
|
104
|
+
export function coveredInMarquee(root, marquee, threshold = COVERAGE_THRESHOLD) {
|
|
105
|
+
const els = Array.from(root.querySelectorAll(`[${SELECTABLE_ATTR}]`));
|
|
106
|
+
const result = [];
|
|
107
|
+
for (const el of els) {
|
|
108
|
+
const r = el.getBoundingClientRect();
|
|
109
|
+
if (coverage(marquee, { left: r.left, top: r.top, right: r.right, bottom: r.bottom }) >= threshold) {
|
|
110
|
+
const item = itemOf(el);
|
|
111
|
+
if (item) {
|
|
112
|
+
result.push(item);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolve the most-specific selectable element at a point (for click): the
|
|
120
|
+
* innermost tagged element containing the point. Returns null if none.
|
|
121
|
+
*/
|
|
122
|
+
export function selectAtPoint(root, x, y) {
|
|
123
|
+
const els = Array.from(root.querySelectorAll(`[${SELECTABLE_ATTR}]`));
|
|
124
|
+
let best = null;
|
|
125
|
+
for (const el of els) {
|
|
126
|
+
const r = el.getBoundingClientRect();
|
|
127
|
+
if (x < r.left || x > r.right || y < r.top || y > r.bottom) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const a = (r.right - r.left) * (r.bottom - r.top);
|
|
131
|
+
// Smallest containing box = most specific (innermost) element.
|
|
132
|
+
if (!best || a < best.area) {
|
|
133
|
+
best = { el, area: a };
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return best ? itemOf(best.el) : null;
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=selectionGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionGeometry.js","sourceRoot":"","sources":["../../../../../src/sdk/hooks/vibe-edit/selection/selectionGeometry.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,kBAAkB,GAEnB,MAAM,YAAY,CAAC;AAUpB,oDAAoD;AACpD,MAAM,UAAU,cAAc,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;IAC3E,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;QACtB,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;QACrB,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;KACzB,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,SAAS,gBAAgB,CAAC,CAAO,EAAE,CAAO;IACxC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,CAAC;AACf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