@dropsh/plugin-display-builder 0.5.5 → 0.5.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.
@@ -0,0 +1,2 @@
1
+ import type { DropSHPlugin } from "dropsh/plugin";
2
+ export declare function displayBuilderPlugin(): DropSHPlugin;
@@ -0,0 +1,21 @@
1
+ import { type PluginContext } from "dropsh/plugin";
2
+ export type DisplayBuilderMetadata = {
3
+ enabled: false;
4
+ } | {
5
+ enabled: true;
6
+ entityType: string;
7
+ bundle: string;
8
+ viewMode: string;
9
+ profile?: unknown;
10
+ profileConfig?: unknown;
11
+ overrideField: string;
12
+ overrideProfile?: unknown;
13
+ overrideProfileConfig?: unknown;
14
+ sourceTree?: unknown;
15
+ componentLibrary?: unknown;
16
+ };
17
+ /**
18
+ * Fetches Display Builder schema metadata from standard JSON:API config
19
+ * resources: entity_view_display and display_builder_profile.
20
+ */
21
+ export declare function fetchDisplayBuilderMetadata(ctx: PluginContext, entityType: string, bundle: string, viewMode?: string): Promise<DisplayBuilderMetadata>;
@@ -0,0 +1,3 @@
1
+ import type { SdcComponent } from "@dropsh/sdc-client";
2
+ import type { DisplayBuilderMetadata } from "./metadata-client.js";
3
+ export declare function extendDisplayBuilderSchema(baseSchema: unknown, metadata: DisplayBuilderMetadata, components: SdcComponent[]): unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dropsh/plugin-display-builder",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "type": "module",
5
5
  "main": "./dist/plugins/display-builder/src/index.js",
6
6
  "exports": {
@@ -17,12 +17,12 @@
17
17
  "dropsh": "*"
18
18
  },
19
19
  "dependencies": {
20
- "@dropsh/sdc-client": "0.5.5"
20
+ "@dropsh/sdc-client": "0.5.6"
21
21
  },
22
22
  "devDependencies": {
23
23
  "typescript": "^5.6.0",
24
24
  "vitest": "^4.1.8",
25
- "dropsh": "0.5.5"
25
+ "dropsh": "0.5.6"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsc",