@vcp-dev/site-edit-engine 0.11.4 → 0.11.6
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/README.md +3 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +14 -12
- package/dist/site-edit-instrumentation-loader.cjs +1 -1
- package/dist/webpack-loader.cjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ npm install @vcp-dev/contracts @vcp-dev/site-edit-engine
|
|
|
24
24
|
- `PreviewFileSystemSiteEditEngineRuntime`
|
|
25
25
|
- `scanSiteEditThemeStyleViolations` / `SITE_EDIT_RAW_COLOR_LITERAL_RE`
|
|
26
26
|
- `parseSourceModule` / `resolveImportBase`:复用引擎的 TSX 解析与本地 import 路径规则,公开类型由独立 facade 定义,不暴露 `internal/*` 模块路径。
|
|
27
|
+
- `provenRecordThumbnailRanges`:只读 AST 分析,返回可证明来自 `record.thumbnail` 数组的 JSX 表达式范围(`start:end`)。调用方仍须验证集合视图身份和完整记录媒体覆盖;范围集合不授予执行、写入或媒体下载权限。
|
|
27
28
|
- `openFileHistoryStore` / `FileHistoryStoreError`
|
|
28
29
|
- 相关 runtime、style policy 与 file history public types
|
|
29
30
|
|
|
@@ -85,6 +86,8 @@ Next.js 插件平台,也不承诺覆盖 preview instrumentation 之外的构
|
|
|
85
86
|
`site-edit-instrumentation-loader` 的兼容别名,不维护第二套转换逻辑;新接入建议优先使用
|
|
86
87
|
bundler-neutral 子路径。
|
|
87
88
|
|
|
89
|
+
CMS 预览身份 helper 从已安装 Bridge 包中定位,注入的 import 必须相对于当前源文件,不能使用绝对磁盘路径(Turbopack 会将其当作不支持的 server-relative import)。同目录路径也保留 `./`,不能退化为裸模块名;该注入仍仅限开发预览。
|
|
90
|
+
|
|
88
91
|
## 内部职责边界
|
|
89
92
|
|
|
90
93
|
内部组织遵循 [Site Edit 核心复杂度合同 #71](https://github.com/trojanbox/project-documents/issues/71),不改变公开入口、Bridge 协议、operation 或 History/Recovery 语义。
|
package/dist/index.d.ts
CHANGED
|
@@ -2692,7 +2692,9 @@ export interface PortableBlockSelection {
|
|
|
2692
2692
|
readonly source_range: PortableInvocationSourceRange;
|
|
2693
2693
|
readonly owner: ResolvedPageBlock["descriptor"]["owner"];
|
|
2694
2694
|
readonly call_chain: readonly (PortableInvocationCall | PortableLocalInvocationCall)[];
|
|
2695
|
-
readonly strategy: "reuse-entry" | "extract-jsx" | "managed-thin-entry";
|
|
2695
|
+
readonly strategy: "reuse-entry" | "extract-jsx" | "managed-thin-entry" | "collection-container";
|
|
2696
|
+
/** Only set after proving the selected root is the container's sole view. */
|
|
2697
|
+
readonly collection_container_file?: string;
|
|
2696
2698
|
readonly entry_file: string;
|
|
2697
2699
|
readonly entry_export: {
|
|
2698
2700
|
readonly kind: "default";
|
|
@@ -2889,6 +2891,8 @@ export type PageBlockSnapshotResolution = BlockResolution & {
|
|
|
2889
2891
|
index?: PageBlockIndex;
|
|
2890
2892
|
};
|
|
2891
2893
|
export declare function resolvePageBlockFromSnapshot(input: BlockSnapshotInput): Promise<PageBlockSnapshotResolution>;
|
|
2894
|
+
/** Exact JSX ranges proven to read the captured record.thumbnail array only. */
|
|
2895
|
+
export declare function provenRecordThumbnailRanges(source: string): ReadonlySet<string>;
|
|
2892
2896
|
export type PortableMediaReferenceKind = "src" | "srcset" | "poster" | "thumbnail" | "object" | "array-item" | "import" | "manifest";
|
|
2893
2897
|
export type PortableMediaReferenceSource = "jsx-attribute" | "object-property" | "array-item" | "import" | "media-manifest";
|
|
2894
2898
|
export interface PortableMediaSourceRange {
|