@blocklet/pages-kit-block-studio 0.6.1 → 0.6.3
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/middlewares/init-resource-router.js +35 -0
- package/lib/cjs/middlewares/init-uploader-router.js +0 -3
- package/lib/cjs/plugins/_theme.js +3 -2
- package/lib/cjs/plugins/vite-plugin-block-studio.js +5 -125
- package/lib/cjs/plugins/vite-plugin-code-splitter.js +594 -246
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/helper.js +17 -3
- package/lib/esm/middlewares/init-resource-router.js +36 -1
- package/lib/esm/middlewares/init-uploader-router.js +0 -3
- package/lib/esm/plugins/_theme.js +5 -4
- package/lib/esm/plugins/vite-plugin-block-studio.js +6 -126
- package/lib/esm/plugins/vite-plugin-code-splitter.js +562 -247
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/helper.js +13 -2
- package/lib/types/plugins/vite-plugin-block-studio.d.ts +0 -1
- package/lib/types/plugins/vite-plugin-code-splitter.d.ts +8 -4
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/helper.d.ts +6 -1
- package/package.json +5 -5
package/lib/esm/utils/helper.js
CHANGED
|
@@ -184,7 +184,18 @@ export const safeParse = (text) => {
|
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
export const EDIT_COMPONENT_NAME = 'EditComponent';
|
|
187
|
-
export const EDIT_COMPONENT_BUNDLE_FLAG = `(${EDIT_COMPONENT_NAME})`;
|
|
188
187
|
export const getEditComponentBlockName = (blockName) => {
|
|
189
|
-
return `${blockName}${
|
|
188
|
+
return `${blockName}(${EDIT_COMPONENT_NAME})`;
|
|
189
|
+
};
|
|
190
|
+
export const PROPERTIES_SCHEMA_NAME = 'PROPERTIES_SCHEMA';
|
|
191
|
+
export const getPropertiesSchemaBlockName = (blockName) => {
|
|
192
|
+
return `${blockName}(${PROPERTIES_SCHEMA_NAME})`;
|
|
193
|
+
};
|
|
194
|
+
export const AIGNE_OUTPUT_VALUE_SCHEMA_NAME = 'aigneOutputValueSchema';
|
|
195
|
+
export const getAigneOutputValueSchemaBlockName = (blockName) => {
|
|
196
|
+
return `${blockName}(${AIGNE_OUTPUT_VALUE_SCHEMA_NAME})`;
|
|
197
|
+
};
|
|
198
|
+
export const GET_SERVER_SIDE_PROPS_NAME = 'getServerSideProps';
|
|
199
|
+
export const getGetServerSidePropsBlockName = (blockName) => {
|
|
200
|
+
return `${blockName}(${GET_SERVER_SIDE_PROPS_NAME})`;
|
|
190
201
|
};
|
|
@@ -6,7 +6,6 @@ export declare function initBlockStudioPlugins(options?: {
|
|
|
6
6
|
formats?: LibraryFormats[];
|
|
7
7
|
transpileBuiltinModule?: boolean;
|
|
8
8
|
ignoreNodePolyfills?: boolean;
|
|
9
|
-
ignoreSplitEditComponent?: boolean;
|
|
10
9
|
watchFilesDir?: string;
|
|
11
10
|
}): Plugin[];
|
|
12
11
|
export default initBlockStudioPlugins;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
1
|
+
import type { Plugin, LibraryFormats } from 'vite';
|
|
2
2
|
/**
|
|
3
|
-
* Vite
|
|
4
|
-
*
|
|
3
|
+
* 🎯 MAIN EXPORT: Vite Plugin Factory
|
|
4
|
+
* Creates two plugins that work together to split and optimize component code
|
|
5
5
|
*/
|
|
6
|
-
export declare function vitePluginCodeSplitter(
|
|
6
|
+
export declare function vitePluginCodeSplitter(options?: {
|
|
7
|
+
formats?: LibraryFormats[];
|
|
8
|
+
transpileBuiltinModule?: boolean;
|
|
9
|
+
skipBundleNodeTarget?: boolean;
|
|
10
|
+
}): Plugin[];
|
|
7
11
|
export default vitePluginCodeSplitter;
|