@blocklet/pages-kit 0.4.32 → 0.4.34
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/lib/cjs/api/call.js +7 -18
- package/lib/cjs/api/pages-kit.js +5 -17
- package/lib/cjs/builtin/async/react-scroll-to-bottom.js +5 -1
- package/lib/cjs/builtin/components/LanguageField/index.js +6 -18
- package/lib/cjs/builtin/iconify/react.js +1 -1
- package/lib/cjs/builtin/page/header.js +8 -5
- package/lib/cjs/builtin/session.js +6 -0
- package/lib/cjs/builtin/stream.js +1 -1
- package/lib/cjs/builtin/utils.js +3 -5
- package/lib/cjs/components/CustomComponentRenderer/BlockletReactComponentRenderer.js +5 -19
- package/lib/cjs/components/CustomComponentRenderer/DevProvider.js +2 -14
- package/lib/cjs/components/CustomComponentRenderer/ErrorComponent.js +2 -14
- package/lib/cjs/components/CustomComponentRenderer/index.js +12 -27
- package/lib/cjs/components/CustomComponentRenderer/state.js +121 -151
- package/lib/cjs/components/ResponsiveImage/index.js +3 -16
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/inject-es-module-shims-options.js +1 -2
- package/lib/cjs/utils/inject-global-components-dump-json.js +1 -1
- package/lib/cjs/utils/inject-global-components.js +29 -20
- package/lib/cjs/utils/preload.js +1 -15
- package/lib/cjs/utils/property.js +31 -25
- package/lib/cjs/utils/typescript/builtin-module-transformer.js +12 -9
- package/lib/esm/api/call.js +7 -18
- package/lib/esm/api/pages-kit.js +5 -17
- package/lib/esm/builtin/async/react-scroll-to-bottom.js +5 -1
- package/lib/esm/builtin/components/LanguageField/index.js +6 -18
- package/lib/esm/builtin/iconify/react.js +1 -1
- package/lib/esm/builtin/page/header.js +8 -5
- package/lib/esm/builtin/session.js +5 -0
- package/lib/esm/builtin/stream.js +1 -1
- package/lib/esm/builtin/utils.js +3 -5
- package/lib/esm/components/CustomComponentRenderer/BlockletReactComponentRenderer.js +5 -19
- package/lib/esm/components/CustomComponentRenderer/DevProvider.js +2 -14
- package/lib/esm/components/CustomComponentRenderer/ErrorComponent.js +2 -14
- package/lib/esm/components/CustomComponentRenderer/index.js +12 -27
- package/lib/esm/components/CustomComponentRenderer/state.js +121 -151
- package/lib/esm/components/ResponsiveImage/index.js +3 -16
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/inject-es-module-shims-options.js +1 -2
- package/lib/esm/utils/inject-global-components-dump-json.js +1 -1
- package/lib/esm/utils/inject-global-components.js +29 -20
- package/lib/esm/utils/preload.js +1 -15
- package/lib/esm/utils/property.js +30 -25
- package/lib/esm/utils/typescript/builtin-module-transformer.js +10 -8
- package/lib/types/builtin/session.d.ts +13 -0
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/types/core.d.ts +11 -2
- package/lib/types/utils/property.d.ts +1 -0
- package/lib/types/utils/typescript/builtin-module-transformer.d.ts +1 -0
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ export type CustomComponent = {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
export type CustomComponentProperty = CustomComponentCommonProperty | CustomComponentCustomProperty | CustomComponentStringProperty | CustomComponentComponentProperty;
|
|
35
|
+
export type CustomComponentProperty = CustomComponentCommonProperty | CustomComponentCustomProperty | CustomComponentStringProperty | CustomComponentComponentProperty | CustomComponentPropertyWithSubProperties;
|
|
36
36
|
export interface CustomComponentPropertyBase {
|
|
37
37
|
id: string;
|
|
38
38
|
key?: string;
|
|
@@ -44,8 +44,17 @@ export interface CustomComponentPropertyBase {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
+
export interface CustomComponentPropertyWithSubProperties extends CustomComponentPropertyBase {
|
|
48
|
+
type: 'json' | 'yaml' | 'array';
|
|
49
|
+
subProperties?: {
|
|
50
|
+
[id: string]: {
|
|
51
|
+
index: number;
|
|
52
|
+
data: CustomComponentProperty;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}
|
|
47
56
|
export interface CustomComponentCommonProperty extends CustomComponentPropertyBase {
|
|
48
|
-
type: 'number' | 'boolean' | '
|
|
57
|
+
type: 'number' | 'boolean' | 'url' | 'decimal' | 'color';
|
|
49
58
|
}
|
|
50
59
|
export interface CustomComponentCustomProperty extends CustomComponentPropertyBase {
|
|
51
60
|
type: 'custom';
|
|
@@ -19,6 +19,7 @@ export declare function mergeComponent({ componentId, getComponent, locale, defa
|
|
|
19
19
|
};
|
|
20
20
|
} | null;
|
|
21
21
|
export declare const RenderNestedComponent = "__RENDER_NESTED_COMPONENT__";
|
|
22
|
+
export declare function safeJSONParse(value: string | Record<string, any>): any;
|
|
22
23
|
export declare function parsePropertyValue(property: NonNullable<CustomComponent['properties']>[string]['data'], value: any, { locale, defaultLocale }: {
|
|
23
24
|
locale?: string;
|
|
24
25
|
defaultLocale?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { SourceFile, TransformerFactory } from 'typescript';
|
|
2
2
|
export declare const isRelativeModule: (moduleSpecifier: string) => boolean;
|
|
3
|
+
export declare const isAwaitModule: (moduleSpecifier: string) => boolean;
|
|
3
4
|
export declare const createBuiltinModuleTransformer: (ts: typeof import("typescript")) => TransformerFactory<SourceFile>;
|