@blocklet/pages-kit-block-studio 0.4.71 → 0.4.73
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/constants/index.js +1 -1
- package/lib/cjs/constants/new-block-template/@metadata.json +2 -2
- package/lib/cjs/constants/new-block-template/index.js +2 -2
- package/lib/cjs/constants/new-block-template/index.tsx +1 -1
- package/lib/cjs/middlewares/init-resource-router.js +1 -1
- package/lib/cjs/plugins/_theme.js +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/helper.js +0 -3
- package/lib/esm/constants/index.js +1 -1
- package/lib/esm/constants/new-block-template/@metadata.json +2 -2
- package/lib/esm/constants/new-block-template/index.js +1 -1
- package/lib/esm/constants/new-block-template/index.tsx +1 -1
- package/lib/esm/middlewares/init-resource-router.js +1 -1
- package/lib/esm/plugins/_theme.js +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/helper.js +0 -3
- package/lib/types/constants/index.d.ts +1 -1
- package/lib/types/constants/new-block-template/index.d.ts +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
package/lib/cjs/utils/helper.js
CHANGED
|
@@ -186,9 +186,6 @@ function initializeMetadata(tempFilePath) {
|
|
|
186
186
|
if (!metadata.name) {
|
|
187
187
|
metadata.name = getBlockName(filePath);
|
|
188
188
|
}
|
|
189
|
-
if (!fs_1.default.existsSync(filePath)) {
|
|
190
|
-
fs_1.default.writeFileSync(filePath, JSON.stringify(metadata, null, 2));
|
|
191
|
-
}
|
|
192
189
|
return metadata;
|
|
193
190
|
}
|
|
194
191
|
function generateYaml(metadata) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
export const PAGES_KIT_DID = 'z8iZiDFg3vkkrPwsiba1TLXy3H9XHzFERsP8o';
|
|
3
3
|
export const PAGES_KIT_RESOURCE_TYPE = 'page';
|
|
4
|
-
export const PAGES_KIT_BLOCK_STUDIO_DID = '
|
|
4
|
+
export const PAGES_KIT_BLOCK_STUDIO_DID = 'z2qa7BQdkEb3TwYyEYC1psK6uvmGnHSUHt5RM';
|
|
5
5
|
export const PAGES_KIT_BLOCK_STUDIO_RESOURCE_TYPE = 'page';
|
|
6
6
|
export const MEDIA_KIT_DID = 'z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9';
|
|
7
7
|
export const MEDIA_KIT_RESOURCE_TYPE = 'imgpack';
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"locales": {
|
|
24
24
|
"zh": {
|
|
25
25
|
"name": "描述",
|
|
26
|
-
"defaultValue": "
|
|
26
|
+
"defaultValue": "欢迎使用 Component Studio"
|
|
27
27
|
},
|
|
28
28
|
"en": {
|
|
29
29
|
"name": "Description",
|
|
30
|
-
"defaultValue": "Welcome to
|
|
30
|
+
"defaultValue": "Welcome to Component Studio"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// default export
|
|
3
|
-
export default function
|
|
3
|
+
export default function BlockComponent({ title = 'Hello World', logo, description, copyright }) {
|
|
4
4
|
return (_jsxs("div", { style: {
|
|
5
5
|
display: 'flex',
|
|
6
6
|
flexDirection: 'column',
|
|
@@ -17,7 +17,7 @@ export interface BlockProps {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// default export
|
|
20
|
-
export default function
|
|
20
|
+
export default function BlockComponent({ title = 'Hello World', logo, description, copyright }: BlockProps) {
|
|
21
21
|
return (
|
|
22
22
|
<div
|
|
23
23
|
style={{
|
|
@@ -5,7 +5,7 @@ import fs from 'fs';
|
|
|
5
5
|
import set from 'lodash/set';
|
|
6
6
|
import path, { join } from 'path';
|
|
7
7
|
import { findComponentFiles, libDir, getPreviewImageRelativePath, generateYaml, logger } from '../utils/helper';
|
|
8
|
-
const DID = '
|
|
8
|
+
const DID = 'z2qa7BQdkEb3TwYyEYC1psK6uvmGnHSUHt5RM';
|
|
9
9
|
const RESOURCE_TYPE = 'page';
|
|
10
10
|
const allTag = '@ALL_COMPONENTS';
|
|
11
11
|
// use for tracking build process
|
|
@@ -32,7 +32,7 @@ import { joinURL } from 'ufo';
|
|
|
32
32
|
import { useStaticData } from 'vite-plugin-react-pages/client';
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
const basename = window.blocklet?.prefix || '/';
|
|
35
|
-
const PAGES_KIT_BLOCK_STUDIO_BLOCKLET_DID = '
|
|
35
|
+
const PAGES_KIT_BLOCK_STUDIO_BLOCKLET_DID = 'z2qa7BQdkEb3TwYyEYC1psK6uvmGnHSUHt5RM';
|
|
36
36
|
const api = createAxios({
|
|
37
37
|
timeout: 200000,
|
|
38
38
|
}, {
|