eddev 2.3.19 → 2.3.21
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/app/lib/blocks/EditableText.d.ts +3 -1
- package/dist/app/lib/blocks/EditableText.d.ts.map +1 -1
- package/dist/app/lib/blocks/EditableText.js +9 -3
- package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts +1 -1
- package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts.map +1 -1
- package/dist/app/lib/blocks/editor/installGutenbergHooks.js +16 -0
- package/dist/app/lib/blocks/editor/useBlockLabel.d.ts +2 -0
- package/dist/app/lib/blocks/editor/useBlockLabel.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/useBlockLabel.js +8 -0
- package/dist/app/lib/blocks/index.d.ts +1 -0
- package/dist/app/lib/blocks/index.d.ts.map +1 -1
- package/dist/app/lib/blocks/index.js +1 -0
- package/dist/app/lib/blocks/inline-editing.d.ts +3 -0
- package/dist/app/lib/blocks/inline-editing.d.ts.map +1 -1
- package/dist/app/lib/blocks/inline-editing.js +8 -0
- package/dist/app/lib/devtools/components/DevUI.d.ts +1 -1
- package/dist/app/lib/devtools/hooks/useTailwind.d.ts +40 -40
- package/dist/app/utils/trpc-client.d.ts.map +1 -1
- package/dist/app/utils/trpc-client.js +32 -36
- package/dist/node/cli/version.d.ts +1 -1
- package/dist/node/cli/version.js +1 -1
- package/dist/node/compiler/get-vite-config.js +2 -4
- package/dist/node/project/eddev-build-file.d.ts.map +1 -1
- package/dist/node/project/eddev-build-file.js +3 -1
- package/dist/node/project/manifest/block-manifest.js +1 -0
- package/dist/node/types/block-type.d.ts +11 -0
- package/dist/node/types/block-type.d.ts.map +1 -1
- package/dist/node/types/block-type.js +1 -0
- package/package.json +1 -1
- package/types.env.d.ts +92 -7
- package/types.meta.d.ts +31 -8
- package/dist/app/utils/asset-capture.d.ts +0 -3
- package/dist/app/utils/asset-capture.d.ts.map +0 -1
- package/dist/app/utils/asset-capture.js +0 -5
- package/dist/app/utils/ssr-cache.d.ts +0 -6
- package/dist/app/utils/ssr-cache.d.ts.map +0 -1
- package/dist/app/utils/ssr-cache.js +0 -5
|
@@ -41,6 +41,8 @@ type Props<T extends ElementType> = {
|
|
|
41
41
|
removeOnDelete?: boolean;
|
|
42
42
|
/** An optional placeholder to indicate a typable area */
|
|
43
43
|
placeholder?: string | null;
|
|
44
|
+
/** Automatically set the block name based on this store value */
|
|
45
|
+
asBlockName?: boolean;
|
|
44
46
|
} & {
|
|
45
47
|
/**
|
|
46
48
|
* The 'key' of this editable text value.
|
|
@@ -61,6 +63,6 @@ type MaybeAsProp<T> = T extends {
|
|
|
61
63
|
} ? (U extends unknown ? {} : {
|
|
62
64
|
asProp?: U;
|
|
63
65
|
}) : {};
|
|
64
|
-
export declare function EditableText<T extends ElementType>({ id, as, appendOnEnter, removeOnDelete, plainText, store, ...props }: Props<T>): import("react").JSX.Element | null;
|
|
66
|
+
export declare function EditableText<T extends ElementType>({ id, as, appendOnEnter, removeOnDelete, plainText, store, asBlockName, ...props }: Props<T>): import("react").JSX.Element | null;
|
|
65
67
|
export {};
|
|
66
68
|
//# sourceMappingURL=EditableText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/EditableText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA0C,MAAM,OAAO,CAAA;AAE3E,OAAO,EAAE,gBAAgB,EAAoD,MAAM,qBAAqB,CAAA;AAGxG,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;AAE3D,KAAK,cAAc,GACf,WAAW,GACX,WAAW,GACX,aAAa,GACb,WAAW,GACX,oBAAoB,GACpB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,yBAAyB,GACzB,eAAe,CAAA;AAEnB,KAAK,KAAK,CAAC,CAAC,SAAS,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react";
|
|
2
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
3
3
|
import { useRouter } from "../routing/hooks/useRouter.js";
|
|
4
4
|
import { useBlockAppender, useBlockContext, useValueStore } from "./inline-editing.js";
|
|
5
5
|
import { resolveAcfBlockName } from "./editor/block-templates.js";
|
|
6
|
-
export function EditableText({ id, as, appendOnEnter, removeOnDelete, plainText, store, ...props }) {
|
|
6
|
+
export function EditableText({ id, as, appendOnEnter, removeOnDelete, plainText, store, asBlockName, ...props }) {
|
|
7
7
|
if (env.admin) {
|
|
8
|
-
const
|
|
8
|
+
const ctx = useBlockContext();
|
|
9
|
+
const readOnly = ctx?.readonly;
|
|
9
10
|
if (!readOnly) {
|
|
10
11
|
const ref = useRef(null);
|
|
11
12
|
const [value, setValue] = useValueStore(store ?? id);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (asBlockName) {
|
|
15
|
+
ctx?.setBlockLabel(value || props.defaultValue || props.placeholder || "");
|
|
16
|
+
}
|
|
17
|
+
}, [asBlockName, value || props.defaultValue || props.placeholder]);
|
|
12
18
|
// useEffect(() => {
|
|
13
19
|
// if ((plainText || props.allowedFormats?.length === 0) && ref.current && !!value) {
|
|
14
20
|
// const placeholder = ref.current.querySelector("[data-rich-text-placeholder]")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const blockMetaDescriptors: Map<string, BlockMeta> & {
|
|
2
|
-
$$valtioSnapshot: Omit<Map<string, BlockMeta>, "set" | "
|
|
2
|
+
$$valtioSnapshot: Omit<Map<string, BlockMeta>, "set" | "clear" | "delete">;
|
|
3
3
|
};
|
|
4
4
|
export declare function whenEditorIsReady(): Promise<void>;
|
|
5
5
|
export declare function installEDGutenbergHooks(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installGutenbergHooks.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/blocks/editor/installGutenbergHooks.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,oBAAoB;;CAAgC,CAAA;AAEjE,wBAAgB,iBAAiB,kBAsBhC;AAED,wBAAgB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"installGutenbergHooks.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/blocks/editor/installGutenbergHooks.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,oBAAoB;;CAAgC,CAAA;AAEjE,wBAAgB,iBAAiB,kBAsBhC;AAED,wBAAgB,uBAAuB,SAyVtC"}
|
|
@@ -134,6 +134,8 @@ export function installEDGutenbergHooks() {
|
|
|
134
134
|
return null;
|
|
135
135
|
return (_jsx(InlineEditingContextProvider, { values: props.attributes.inline || {}, innerBlocks: children, block: [props.name, props], editorBlock: block, index: index ?? -1, onChange: (attrs) => {
|
|
136
136
|
props.setAttributes({ ...props.attributes, inline: attrs });
|
|
137
|
+
}, onChangeMetadata: (meta) => {
|
|
138
|
+
props.setAttributes({ ...props.attributes, metadata: { ...(props.attributes.metadata ?? {}), ...meta } });
|
|
137
139
|
}, insertBlocksAfter: props.insertBlocksAfter, clientId: props.clientId, children: _createElement(BlockEdit, { ...props, key: "edit" }) }));
|
|
138
140
|
};
|
|
139
141
|
}, "withMyPluginControls");
|
|
@@ -225,6 +227,20 @@ export function installEDGutenbergHooks() {
|
|
|
225
227
|
}
|
|
226
228
|
item.attributes.isFromTemplate = { type: "boolean" };
|
|
227
229
|
item.supports.customClassName = false;
|
|
230
|
+
item.supports.className = false;
|
|
231
|
+
item.supports.style = false;
|
|
232
|
+
item.supports.customCSS = false;
|
|
233
|
+
item.supports = {
|
|
234
|
+
...item.supports,
|
|
235
|
+
};
|
|
236
|
+
// item.supports.listView = true
|
|
237
|
+
// item.supports.anchor = true
|
|
238
|
+
// if (name === "acf/cards-hero-card-item") {
|
|
239
|
+
// console.log("Support before", item.supports.anchor)
|
|
240
|
+
// item.supports.anchor = true
|
|
241
|
+
// // Object.assign(item.supports, blockMetaDescriptors.get(name)?.supports ?? {})
|
|
242
|
+
// // console.log("Support after", { ...item.supports })
|
|
243
|
+
// }
|
|
228
244
|
item.edit = function (props) {
|
|
229
245
|
const self = this;
|
|
230
246
|
useEffect(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBlockLabel.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/blocks/editor/useBlockLabel.tsx"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,QAK5D"}
|
|
@@ -6,6 +6,7 @@ export * from "./editor/controls.js";
|
|
|
6
6
|
export * from "./editor/create-block.js";
|
|
7
7
|
export { defineEditorConfig, type BlockWrapperClassGenerator, type BlockWrapperGenerator } from "./editor/editor-config.js";
|
|
8
8
|
export * from "./editor/usePostEditor.js";
|
|
9
|
+
export * from "./editor/useBlockLabel.js";
|
|
9
10
|
export { useBlockContext, useInlineEditableValue, useInnerBlocks, useTemplate, useBlockSelection, useBlockParentProps, } from "./inline-editing.js";
|
|
10
11
|
export * from "./InnerBlocks.js";
|
|
11
12
|
export * from "./SlotBlocks.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAC3H,cAAc,2BAA2B,CAAA;AACzC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAC3H,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -6,6 +6,7 @@ export * from "./editor/controls.js";
|
|
|
6
6
|
export * from "./editor/create-block.js";
|
|
7
7
|
export { defineEditorConfig } from "./editor/editor-config.js";
|
|
8
8
|
export * from "./editor/usePostEditor.js";
|
|
9
|
+
export * from "./editor/useBlockLabel.js";
|
|
9
10
|
export { useBlockContext, useInlineEditableValue, useInnerBlocks, useTemplate, useBlockSelection, useBlockParentProps, } from "./inline-editing.js";
|
|
10
11
|
export * from "./InnerBlocks.js";
|
|
11
12
|
export * from "./SlotBlocks.js";
|
|
@@ -20,6 +20,8 @@ export type InlineEditingContext = {
|
|
|
20
20
|
index: number;
|
|
21
21
|
setValue(key: string, value: any): any;
|
|
22
22
|
getValue(key: string): any;
|
|
23
|
+
setBlockLabel(label: string | undefined): any;
|
|
24
|
+
getBlockLabel(): any;
|
|
23
25
|
insertBlocksAfter?: (block: any) => void;
|
|
24
26
|
readonly?: boolean;
|
|
25
27
|
clientId?: string;
|
|
@@ -33,6 +35,7 @@ type ProviderProps = PropsWithChildren<{
|
|
|
33
35
|
editorBlock?: BlockInstance;
|
|
34
36
|
index: number;
|
|
35
37
|
onChange?: (attrs: Attributes) => void;
|
|
38
|
+
onChangeMetadata?: (data: Record<string, any>) => void;
|
|
36
39
|
insertBlocksAfter?: (block: any) => void;
|
|
37
40
|
readonly?: boolean;
|
|
38
41
|
clientId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-editing.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/inline-editing.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAA8B,MAAM,OAAO,CAAA;AAGpF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGjD,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAErC,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA;AAE1E,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,GAAG,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,aAAa,EAAE,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAE5B,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,UAAU,CAAA;IAClB,WAAW,EAAE,YAAY,EAAE,CAAA;IAC3B,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAA;IAC/B,KAAK,EAAE,CAAC,M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I,MAAM,SAAS,CAa7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,UAAU,EAAE,SAAS,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAYvG"}
|
|
@@ -28,6 +28,14 @@ export function InlineEditingContextProvider(props) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
+
getBlockLabel() {
|
|
32
|
+
return;
|
|
33
|
+
},
|
|
34
|
+
setBlockLabel(value) {
|
|
35
|
+
if (props.onChangeMetadata) {
|
|
36
|
+
props.onChangeMetadata({ name: value });
|
|
37
|
+
}
|
|
38
|
+
},
|
|
31
39
|
insertBlocksAfter: props.insertBlocksAfter,
|
|
32
40
|
readonly: props.readonly || parentContext?.readonly,
|
|
33
41
|
editorBlock: props.editorBlock,
|
|
@@ -10,7 +10,7 @@ export declare class ErrorBoundary extends Component<PropsWithChildren<{}>, Stat
|
|
|
10
10
|
state: State;
|
|
11
11
|
static getDerivedStateFromError(err: Error): State;
|
|
12
12
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
13
|
-
render(): string | number | boolean | import("react").
|
|
13
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react").JSX.Element | null | undefined;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=DevUI.d.ts.map
|
|
@@ -85,12 +85,12 @@ export declare function useTailwindConfig(): {
|
|
|
85
85
|
readonly max: string;
|
|
86
86
|
})[];
|
|
87
87
|
} | undefined;
|
|
88
|
-
readonly supports?:
|
|
88
|
+
readonly supports?: {
|
|
89
89
|
readonly [x: string]: string;
|
|
90
|
-
} | undefined;
|
|
91
|
-
readonly data?:
|
|
90
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
91
|
+
readonly data?: {
|
|
92
92
|
readonly [x: string]: string;
|
|
93
|
-
} | undefined;
|
|
93
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
94
94
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
95
95
|
readonly [x: string]: string | /*elided*/ any;
|
|
96
96
|
} | undefined;
|
|
@@ -493,12 +493,12 @@ export declare function useTailwindConfig(): {
|
|
|
493
493
|
readonly max: string;
|
|
494
494
|
})[];
|
|
495
495
|
} | undefined;
|
|
496
|
-
readonly supports?:
|
|
496
|
+
readonly supports?: {
|
|
497
497
|
readonly [x: string]: string;
|
|
498
|
-
} | undefined;
|
|
499
|
-
readonly data?:
|
|
498
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
499
|
+
readonly data?: {
|
|
500
500
|
readonly [x: string]: string;
|
|
501
|
-
} | undefined;
|
|
501
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
502
502
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
503
503
|
readonly [x: string]: string | /*elided*/ any;
|
|
504
504
|
} | undefined;
|
|
@@ -1130,12 +1130,12 @@ export declare function useTailwindConfig(): {
|
|
|
1130
1130
|
readonly max: string;
|
|
1131
1131
|
})[];
|
|
1132
1132
|
} | undefined;
|
|
1133
|
-
readonly supports?:
|
|
1133
|
+
readonly supports?: {
|
|
1134
1134
|
readonly [x: string]: string;
|
|
1135
|
-
} | undefined;
|
|
1136
|
-
readonly data?:
|
|
1135
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
1136
|
+
readonly data?: {
|
|
1137
1137
|
readonly [x: string]: string;
|
|
1138
|
-
} | undefined;
|
|
1138
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
1139
1139
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
1140
1140
|
readonly [x: string]: string | /*elided*/ any;
|
|
1141
1141
|
} | undefined;
|
|
@@ -1538,12 +1538,12 @@ export declare function useTailwindConfig(): {
|
|
|
1538
1538
|
readonly max: string;
|
|
1539
1539
|
})[];
|
|
1540
1540
|
} | undefined;
|
|
1541
|
-
readonly supports?:
|
|
1541
|
+
readonly supports?: {
|
|
1542
1542
|
readonly [x: string]: string;
|
|
1543
|
-
} | undefined;
|
|
1544
|
-
readonly data?:
|
|
1543
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
1544
|
+
readonly data?: {
|
|
1545
1545
|
readonly [x: string]: string;
|
|
1546
|
-
} | undefined;
|
|
1546
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
1547
1547
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
1548
1548
|
readonly [x: string]: string | /*elided*/ any;
|
|
1549
1549
|
} | undefined;
|
|
@@ -2150,12 +2150,12 @@ export declare function useTailwindConfig(): {
|
|
|
2150
2150
|
readonly max: string;
|
|
2151
2151
|
})[];
|
|
2152
2152
|
} | undefined;
|
|
2153
|
-
readonly supports?:
|
|
2153
|
+
readonly supports?: {
|
|
2154
2154
|
readonly [x: string]: string;
|
|
2155
|
-
} | undefined;
|
|
2156
|
-
readonly data?:
|
|
2155
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
2156
|
+
readonly data?: {
|
|
2157
2157
|
readonly [x: string]: string;
|
|
2158
|
-
} | undefined;
|
|
2158
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
2159
2159
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
2160
2160
|
readonly [x: string]: string | /*elided*/ any;
|
|
2161
2161
|
} | undefined;
|
|
@@ -2558,12 +2558,12 @@ export declare function useTailwindConfig(): {
|
|
|
2558
2558
|
readonly max: string;
|
|
2559
2559
|
})[];
|
|
2560
2560
|
} | undefined;
|
|
2561
|
-
readonly supports?:
|
|
2561
|
+
readonly supports?: {
|
|
2562
2562
|
readonly [x: string]: string;
|
|
2563
|
-
} | undefined;
|
|
2564
|
-
readonly data?:
|
|
2563
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
2564
|
+
readonly data?: {
|
|
2565
2565
|
readonly [x: string]: string;
|
|
2566
|
-
} | undefined;
|
|
2566
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
2567
2567
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
2568
2568
|
readonly [x: string]: string | /*elided*/ any;
|
|
2569
2569
|
} | undefined;
|
|
@@ -3221,12 +3221,12 @@ export declare function useTailwindConfig(): {
|
|
|
3221
3221
|
readonly max: string;
|
|
3222
3222
|
})[];
|
|
3223
3223
|
} | undefined;
|
|
3224
|
-
readonly supports?:
|
|
3224
|
+
readonly supports?: {
|
|
3225
3225
|
readonly [x: string]: string;
|
|
3226
|
-
} | undefined;
|
|
3227
|
-
readonly data?:
|
|
3226
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
3227
|
+
readonly data?: {
|
|
3228
3228
|
readonly [x: string]: string;
|
|
3229
|
-
} | undefined;
|
|
3229
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
3230
3230
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
3231
3231
|
readonly [x: string]: string | /*elided*/ any;
|
|
3232
3232
|
} | undefined;
|
|
@@ -3629,12 +3629,12 @@ export declare function useTailwindConfig(): {
|
|
|
3629
3629
|
readonly max: string;
|
|
3630
3630
|
})[];
|
|
3631
3631
|
} | undefined;
|
|
3632
|
-
readonly supports?:
|
|
3632
|
+
readonly supports?: {
|
|
3633
3633
|
readonly [x: string]: string;
|
|
3634
|
-
} | undefined;
|
|
3635
|
-
readonly data?:
|
|
3634
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
3635
|
+
readonly data?: {
|
|
3636
3636
|
readonly [x: string]: string;
|
|
3637
|
-
} | undefined;
|
|
3637
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
3638
3638
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
3639
3639
|
readonly [x: string]: string | /*elided*/ any;
|
|
3640
3640
|
} | undefined;
|
|
@@ -4239,12 +4239,12 @@ export declare function useTailwindConfig(): {
|
|
|
4239
4239
|
readonly max: string;
|
|
4240
4240
|
})[];
|
|
4241
4241
|
} | undefined;
|
|
4242
|
-
readonly supports?:
|
|
4242
|
+
readonly supports?: {
|
|
4243
4243
|
readonly [x: string]: string;
|
|
4244
|
-
} | undefined;
|
|
4245
|
-
readonly data?:
|
|
4244
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
4245
|
+
readonly data?: {
|
|
4246
4246
|
readonly [x: string]: string;
|
|
4247
|
-
} | undefined;
|
|
4247
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
4248
4248
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
4249
4249
|
readonly [x: string]: string | /*elided*/ any;
|
|
4250
4250
|
} | undefined;
|
|
@@ -4647,12 +4647,12 @@ export declare function useTailwindConfig(): {
|
|
|
4647
4647
|
readonly max: string;
|
|
4648
4648
|
})[];
|
|
4649
4649
|
} | undefined;
|
|
4650
|
-
readonly supports?:
|
|
4650
|
+
readonly supports?: {
|
|
4651
4651
|
readonly [x: string]: string;
|
|
4652
|
-
} | undefined;
|
|
4653
|
-
readonly data?:
|
|
4652
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
4653
|
+
readonly data?: {
|
|
4654
4654
|
readonly [x: string]: string;
|
|
4655
|
-
} | undefined;
|
|
4655
|
+
} | ((utils: import("tailwindcss/types/config.js").PluginUtils) => Record<string, string>) | undefined;
|
|
4656
4656
|
readonly colors?: ((utils: import("tailwindcss/types/config.js").PluginUtils) => import("tailwindcss/types/config.js").RecursiveKeyValuePair<string, string>) | {
|
|
4657
4657
|
readonly [x: string]: string | /*elided*/ any;
|
|
4658
4658
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trpc-client.d.ts","sourceRoot":"","sources":["../../../src/app/utils/trpc-client.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAiBpH,wBAAgB,YAAY,IAAI,iBAAiB,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"trpc-client.d.ts","sourceRoot":"","sources":["../../../src/app/utils/trpc-client.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAiBpH,wBAAgB,YAAY,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAqCrD"}
|
|
@@ -13,43 +13,39 @@ const getRPCName = (url) => {
|
|
|
13
13
|
};
|
|
14
14
|
let client;
|
|
15
15
|
export function getRPCClient() {
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
true: httpSubscriptionLink({
|
|
25
|
-
url: endpoint,
|
|
26
|
-
transformer: SuperJSON,
|
|
27
|
-
}),
|
|
28
|
-
false: httpLink({
|
|
29
|
-
url: endpoint,
|
|
30
|
-
fetch: async (url, opts) => {
|
|
31
|
-
const type = (opts?.method ?? "GET").toUpperCase() === "POST" ? "mutation" : "query";
|
|
32
|
-
const name = getRPCName(url);
|
|
33
|
-
const finalUrl = updatePath(url);
|
|
34
|
-
let options = {
|
|
35
|
-
...opts,
|
|
36
|
-
credentials: "omit",
|
|
37
|
-
};
|
|
38
|
-
// Apply API configuration
|
|
39
|
-
if (apiConfig.customRPCFetchOptions) {
|
|
40
|
-
options = await apiConfig.customRPCFetchOptions(type, name, finalUrl, options);
|
|
41
|
-
}
|
|
42
|
-
const response = await fetch(finalUrl, options);
|
|
43
|
-
if (apiConfig.onRPCResponse)
|
|
44
|
-
apiConfig.onRPCResponse(response, type, name, finalUrl, options);
|
|
45
|
-
return response;
|
|
46
|
-
},
|
|
47
|
-
transformer: SuperJSON,
|
|
48
|
-
}),
|
|
16
|
+
if (!client) {
|
|
17
|
+
client = createTRPCUntypedClient({
|
|
18
|
+
links: [
|
|
19
|
+
splitLink({
|
|
20
|
+
condition: (op) => op.type === "subscription",
|
|
21
|
+
true: httpSubscriptionLink({
|
|
22
|
+
url: env.serverlessOrigin,
|
|
23
|
+
transformer: SuperJSON,
|
|
49
24
|
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
false: httpLink({
|
|
26
|
+
url: env.serverlessOrigin,
|
|
27
|
+
fetch: async (url, opts) => {
|
|
28
|
+
const type = (opts?.method ?? "GET").toUpperCase() === "POST" ? "mutation" : "query";
|
|
29
|
+
const name = getRPCName(url);
|
|
30
|
+
const finalUrl = updatePath(url);
|
|
31
|
+
let options = {
|
|
32
|
+
...opts,
|
|
33
|
+
credentials: "omit",
|
|
34
|
+
};
|
|
35
|
+
// Apply API configuration
|
|
36
|
+
if (apiConfig.customRPCFetchOptions) {
|
|
37
|
+
options = await apiConfig.customRPCFetchOptions(type, name, finalUrl, options);
|
|
38
|
+
}
|
|
39
|
+
const response = await fetch(finalUrl, options);
|
|
40
|
+
if (apiConfig.onRPCResponse)
|
|
41
|
+
apiConfig.onRPCResponse(response, type, name, finalUrl, options);
|
|
42
|
+
return response;
|
|
43
|
+
},
|
|
44
|
+
transformer: SuperJSON,
|
|
45
|
+
}),
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
});
|
|
53
49
|
}
|
|
54
50
|
return client;
|
|
55
51
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.
|
|
1
|
+
export declare const VERSION = "2.3.21";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.3.
|
|
1
|
+
export const VERSION = "2.3.21";
|
|
@@ -8,6 +8,7 @@ import { createLogger } from "vite";
|
|
|
8
8
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
9
9
|
import { cliMode } from "../cli/cli-mode.js";
|
|
10
10
|
export function envPlugin(args) {
|
|
11
|
+
const serverlessOrigin = args.client && !args.serverless ? '(window.SERVERLESS_ENDPOINT ?? "/")' : JSON.stringify("/");
|
|
11
12
|
const envDefines = {
|
|
12
13
|
client: args.client ? "true" : "false",
|
|
13
14
|
serverless: args.serverless ? "true" : "false",
|
|
@@ -17,11 +18,8 @@ export function envPlugin(args) {
|
|
|
17
18
|
frontend: args.target === "frontend" ? "true" : "false",
|
|
18
19
|
themePath: JSON.stringify(args.publicUrl),
|
|
19
20
|
devUI: args.mode === "development" ? "true" : "false",
|
|
20
|
-
serverlessOrigin
|
|
21
|
-
rpcEnabled: "true",
|
|
21
|
+
serverlessOrigin,
|
|
22
22
|
origin: JSON.stringify(process.env.SITE_URL ?? "/"),
|
|
23
|
-
VERCEL_DEPLOYMENT_ID: JSON.stringify(process.env.VERCEL_DEPLOYMENT_ID ?? ""),
|
|
24
|
-
VERCEL_SKEW_PROTECTION_ENABLED: JSON.stringify(process.env.VERCEL_SKEW_PROTECTION_ENABLED ?? "0"),
|
|
25
23
|
FRONTEND_ORIGIN: process.env.FRONTEND_ORIGIN ? JSON.stringify(process.env.FRONTEND_ORIGIN) : "undefined",
|
|
26
24
|
};
|
|
27
25
|
const expandDefines = (obj, prefixes = []) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eddev-build-file.d.ts","sourceRoot":"","sources":["../../../src/node/project/eddev-build-file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C;;GAEG;AACH,qBAAa,eAAe;IACP,OAAO,EAAE,OAAO;gBAAhB,OAAO,EAAE,OAAO;IAEnC,KAAK;IAUC,KAAK;
|
|
1
|
+
{"version":3,"file":"eddev-build-file.d.ts","sourceRoot":"","sources":["../../../src/node/project/eddev-build-file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C;;GAEG;AACH,qBAAa,eAAe;IACP,OAAO,EAAE,OAAO;gBAAhB,OAAO,EAAE,OAAO;IAEnC,KAAK;IAUC,KAAK;CAoEZ"}
|
|
@@ -51,13 +51,15 @@ export class BuildInfoWriter {
|
|
|
51
51
|
childTags: block.childTags?.length ? block.childTags : undefined,
|
|
52
52
|
allowed_blocks: block.childBlocks?.length ? block.childBlocks.map(toAcfBlockName) : undefined,
|
|
53
53
|
supports: {
|
|
54
|
-
|
|
54
|
+
...block.supports ?? {},
|
|
55
|
+
align: block.supports?.align ?? false,
|
|
55
56
|
align_text: false,
|
|
56
57
|
align_center: false,
|
|
57
58
|
multiple: block.allowMultiple ? true : false,
|
|
58
59
|
mode: block.mode === "both" ? true : false,
|
|
59
60
|
customClassName: false,
|
|
60
61
|
inserter: block.inserter,
|
|
62
|
+
blockVisibility: block.supports?.visibility ?? (block.inserter === false ? false : true),
|
|
61
63
|
},
|
|
62
64
|
mode: block.mode === "edit" ? "edit" : "preview",
|
|
63
65
|
canCache: block.cache,
|
|
@@ -158,6 +158,7 @@ function readBlockDataAsJSONExport(file, contents) {
|
|
|
158
158
|
result.blockStyles = userData.blockStyles;
|
|
159
159
|
result.dynamic = userData.lazyLoad ?? true;
|
|
160
160
|
result.templatePart = userData.templatePart;
|
|
161
|
+
result.supports = userData.supports;
|
|
161
162
|
if (userData.postMetaBlock) {
|
|
162
163
|
result.postMetaBlock = {
|
|
163
164
|
postTypes: userData.postMetaBlock.postTypes,
|
|
@@ -42,6 +42,17 @@ export declare const BlockMetaSchema: z.ZodObject<{
|
|
|
42
42
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
43
43
|
}, z.core.$strip>>>;
|
|
44
44
|
lazyLoad: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
supports: z.ZodOptional<z.ZodType<{
|
|
46
|
+
visibility?: booean;
|
|
47
|
+
anchor?: boolean;
|
|
48
|
+
listView?: boolean;
|
|
49
|
+
align?: boolean | ("left" | "right" | "full")[];
|
|
50
|
+
} | undefined, undefined, z.core.$ZodTypeInternals<{
|
|
51
|
+
visibility?: booean;
|
|
52
|
+
anchor?: boolean;
|
|
53
|
+
listView?: boolean;
|
|
54
|
+
align?: boolean | ("left" | "right" | "full")[];
|
|
55
|
+
} | undefined, undefined>>>;
|
|
45
56
|
templatePart: z.ZodOptional<z.ZodObject<{
|
|
46
57
|
area: z.ZodString;
|
|
47
58
|
slug: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-type.d.ts","sourceRoot":"","sources":["../../../src/node/types/block-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAMrE,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"block-type.d.ts","sourceRoot":"","sources":["../../../src/node/types/block-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAMrE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuGk4B,MAAO;;;;;qBAAP,MAAO;;;;;;;;;iBAhEn6B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE3D,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEtE,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,UAkBjD;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,UA6B5D"}
|
|
@@ -35,6 +35,7 @@ export const BlockMetaSchema = z.object({
|
|
|
35
35
|
inserter: z.boolean().default(true),
|
|
36
36
|
blockStyles: z.array(z.object({ name: z.string(), label: z.string(), isDefault: z.boolean().optional() })).optional(),
|
|
37
37
|
lazyLoad: z.boolean().optional(),
|
|
38
|
+
supports: z.any().optional(),
|
|
38
39
|
templatePart: z
|
|
39
40
|
.object({
|
|
40
41
|
area: z.string(),
|
package/package.json
CHANGED
package/types.env.d.ts
CHANGED
|
@@ -1,22 +1,107 @@
|
|
|
1
1
|
declare global {
|
|
2
|
+
/**
|
|
3
|
+
* Compile-time environment values injected into eddev bundles.
|
|
4
|
+
*
|
|
5
|
+
* These properties are statically replaced during bundling; `env` is not a
|
|
6
|
+
* mutable runtime environment object.
|
|
7
|
+
*/
|
|
2
8
|
interface EDEnv {
|
|
9
|
+
/**
|
|
10
|
+
* Whether this bundle targets a browser environment.
|
|
11
|
+
*
|
|
12
|
+
* This is `true` for both the public frontend client and WordPress admin
|
|
13
|
+
* bundles, and `false` for the server-side SSR bundle.
|
|
14
|
+
*/
|
|
3
15
|
client: boolean
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Whether this bundle belongs to the Vinxi serverless/SSR application.
|
|
19
|
+
*
|
|
20
|
+
* This is also `true` when running the local serverless dev server; it does
|
|
21
|
+
* not specifically mean that the code is deployed on Vercel.
|
|
22
|
+
*/
|
|
4
23
|
serverless: boolean
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Whether this is the server-side portion of a serverless/SSR build.
|
|
27
|
+
*
|
|
28
|
+
* Equivalent to `env.serverless && !env.client`.
|
|
29
|
+
*/
|
|
5
30
|
server: boolean
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether this bundle targets the React application rendered inside
|
|
34
|
+
* WordPress admin.
|
|
35
|
+
*/
|
|
6
36
|
admin: boolean
|
|
7
|
-
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Whether this bundle targets the public website rather than WordPress admin.
|
|
40
|
+
*
|
|
41
|
+
* This can be `true` in either the browser client or the server-side SSR
|
|
42
|
+
* bundle; use `env.client` when browser execution is the relevant distinction.
|
|
43
|
+
*/
|
|
44
|
+
frontend: boolean
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Whether the bundle was compiled in development mode.
|
|
48
|
+
*
|
|
49
|
+
* This is a compile-time build-mode flag, not a runtime hostname or deployment
|
|
50
|
+
* check.
|
|
51
|
+
*/
|
|
8
52
|
dev: boolean
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Whether development UI features are available in this bundle.
|
|
56
|
+
*
|
|
57
|
+
* This currently mirrors `env.dev` and is not derived from the project's
|
|
58
|
+
* `devUI` configuration setting.
|
|
59
|
+
*/
|
|
9
60
|
devUI: boolean
|
|
10
|
-
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Base URL used to call eddev serverless RPC routes.
|
|
64
|
+
*
|
|
65
|
+
* In WordPress-hosted browser bundles this evaluates at runtime to
|
|
66
|
+
* `window.SERVERLESS_ENDPOINT`, falling back to `/` when PHP has not set it.
|
|
67
|
+
* Serverless and server-side bundles use `/` because the RPC routes share
|
|
68
|
+
* the application's origin.
|
|
69
|
+
*/
|
|
11
70
|
serverlessOrigin: string
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Public URL path of the active WordPress theme, usually ending with a slash.
|
|
74
|
+
*
|
|
75
|
+
* For example: `/wp-content/themes/example-theme/`.
|
|
76
|
+
*/
|
|
12
77
|
themePath: string
|
|
13
|
-
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* WordPress origin URL injected from `SITE_URL`.
|
|
81
|
+
*
|
|
82
|
+
* Server-side serverless code uses this to construct requests back to
|
|
83
|
+
* WordPress. Browser code should normally use the current document URL.
|
|
84
|
+
*/
|
|
14
85
|
origin?: string
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Optional public frontend origin override used by server-side data requests.
|
|
89
|
+
*
|
|
90
|
+
* When set, URLs returned by WordPress are rewritten for this origin instead
|
|
91
|
+
* of the origin inferred from the incoming request.
|
|
92
|
+
*/
|
|
18
93
|
FRONTEND_ORIGIN: string | undefined
|
|
19
94
|
}
|
|
95
|
+
|
|
96
|
+
namespace NodeJS {
|
|
97
|
+
interface ProcessEnv {
|
|
98
|
+
/** Vercel deployment identifier, when running on a Vercel deployment. */
|
|
99
|
+
VERCEL_DEPLOYMENT_ID?: string
|
|
100
|
+
|
|
101
|
+
/** Raw Vercel skew-protection setting supplied by the deployment environment. */
|
|
102
|
+
VERCEL_SKEW_PROTECTION_ENABLED?: string
|
|
103
|
+
}
|
|
104
|
+
}
|
|
20
105
|
}
|
|
21
106
|
|
|
22
|
-
export {
|
|
107
|
+
export {}
|
package/types.meta.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ declare global {
|
|
|
5
5
|
type ChildBlockTypeName = BlockTypeName | keyof CoreBlockProps
|
|
6
6
|
type BlockTagName = keyof DefinedBlockTags
|
|
7
7
|
|
|
8
|
-
interface PostTypes {}
|
|
9
|
-
interface PageTemplates {}
|
|
10
|
-
interface CoreBlockProps {}
|
|
11
|
-
interface DefinedBlockTags {}
|
|
12
|
-
interface DefinedBlockFlags {}
|
|
13
|
-
interface PostMetaTypes {}
|
|
8
|
+
interface PostTypes { }
|
|
9
|
+
interface PageTemplates { }
|
|
10
|
+
interface CoreBlockProps { }
|
|
11
|
+
interface DefinedBlockTags { }
|
|
12
|
+
interface DefinedBlockFlags { }
|
|
13
|
+
interface PostMetaTypes { }
|
|
14
14
|
|
|
15
15
|
type ViewMeta = {
|
|
16
16
|
/** The human-readable title of this page template, shown in the template dropdown */
|
|
@@ -113,7 +113,30 @@ declare global {
|
|
|
113
113
|
ancestors?: (BlockTypeName | BlockTagName)[]
|
|
114
114
|
/** Whether multiple of this block can be used @default true */
|
|
115
115
|
multiple?: boolean
|
|
116
|
-
}
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
supports?: {
|
|
119
|
+
/**
|
|
120
|
+
* By default, a block can be hidden by a user from the block ‘Options’ dropdown. To disable this behavior, set visibility to false.
|
|
121
|
+
* @default true
|
|
122
|
+
**/
|
|
123
|
+
visibility?: booean,
|
|
124
|
+
/**
|
|
125
|
+
* Anchors let you link directly to a specific block on a page. This property adds a field to define an id for the block and a button to copy the direct link.
|
|
126
|
+
* @default false
|
|
127
|
+
**/
|
|
128
|
+
anchor?: boolean
|
|
129
|
+
/**
|
|
130
|
+
* Enables a List View panel in the block inspector for the block’s inner blocks.
|
|
131
|
+
*
|
|
132
|
+
* When this support is enabled, the inspector shows a List View tree allowing users to inspect and manage the block’s inner blocks from the sidebar instead of only using the global document List View.
|
|
133
|
+
*/
|
|
134
|
+
listView?: boolean,
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
*/
|
|
138
|
+
align?: boolean | ('left' | 'right' | 'full')[]
|
|
139
|
+
},
|
|
117
140
|
|
|
118
141
|
/**
|
|
119
142
|
* Apply additional caching to this block, so that even if the page is updated, the block props will be cached for an additional period of time.
|
|
@@ -640,4 +663,4 @@ type BlockInstance<T extends Record<string, any> = { [k: string]: any }> = {
|
|
|
640
663
|
readonly originalContent?: string | undefined
|
|
641
664
|
}
|
|
642
665
|
|
|
643
|
-
export {}
|
|
666
|
+
export { }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset-capture.d.ts","sourceRoot":"","sources":["../../../src/app/utils/asset-capture.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,sCAAwC,CAAA;AAExE,eAAO,MAAM,eAAe,mBAE3B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-cache.d.ts","sourceRoot":"","sources":["../../../src/app/utils/ssr-cache.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,kBAAkB,0CAA6C,CAAA;AAE5E,eAAO,MAAM,cAAc,uBAE1B,CAAA"}
|