@superblocksteam/cli 2.0.3-next.191 → 2.0.3-next.193
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/README.md
CHANGED
|
@@ -14,7 +14,7 @@ $ npm install -g @superblocksteam/cli
|
|
|
14
14
|
$ superblocks COMMAND
|
|
15
15
|
running command...
|
|
16
16
|
$ superblocks (--version)
|
|
17
|
-
@superblocksteam/cli/2.0.3-next.
|
|
17
|
+
@superblocksteam/cli/2.0.3-next.193 linux-x64 node-v20.19.0
|
|
18
18
|
$ superblocks --help [COMMAND]
|
|
19
19
|
USAGE
|
|
20
20
|
$ superblocks COMMAND
|
|
@@ -40,7 +40,7 @@ var content3 = '### Rules for using Superblocks components:\n\n- ENSURE THAT ALL
|
|
|
40
40
|
|
|
41
41
|
// ../../../vite-plugin-file-sync/dist/ai-service/prompts/generated/subprompts/superblocks-custom-components.js
|
|
42
42
|
init_cjs_shims();
|
|
43
|
-
var content4 = '# Custom Components\n\n- ULTRA CRITICAL: NEVER use Superblocks components in a custom component.\n\n- CRITICAL: Use custom components sparingly.\n\n- CRITICAL: ONLY when all else fails and a component is not available in the Superblocks library, you may construct it out of external component libraries by installing them.\n\n- CRITICAL: ALWAYS import React using a namespace import: `import * as React from \'react\'`.\n\nIn order to hook it up correctly, the platform needs to know what props the component exposes, their types, default values, and how they should be displayed to users.\n\nTo do this, you use the **`Prop` API** and **`registerComponent`** function.\n\n## Key Concepts\n\n- All custom components should live within the `components/` folder.\n- **`Prop`**: Defines a single editable property for your component.\n - Can specify the data type (`string`, `number`, `boolean`, `event`, etc.).\n - Can define a **default value**, **label** for the properties panel, and other validations.\n- **`registerComponent`**: Connects your React component with its editable schema (`properties`) so it appears correctly in the visual editor.\n- **`useUpdateProperties`**: A hook that lets your component programmatically update its properties during runtime (e.g., when a user interacts with it).\n\n---\n\n## Basic Example\n\n```tsx\nimport { Rate } from "antd";\nimport {\n CustomComponentProps,\n Prop,\n registerComponent,\n useUpdateProperties,\n} from "@superblocksteam/library";\n\n// 1. Define editable properties\nconst properties = {\n value: Prop.number()\n .default(3) // Default to 3 stars\n .propertiesPanel({ label: "Default value" }), // Editor label\n onChange: Prop.event().propertiesPanel({ label: "On change" }), // Editor label for event\n};\n\n// 2. Create typed props for your component\ntype ComponentProps = CustomComponentProps<typeof properties>;\n\n// 3. Build your React component\nconst Rating = ({ value, onChange }: ComponentProps) => {\n const updateProperties = useUpdateProperties(); // Hook to update properties dynamically\n\n return (\n <div style={{ display: "flex" }}>\n <Rate\n value={value}\n defaultValue={value}\n onChange={(newValue) => {\n updateProperties({ value: newValue }); // Update visual editor\n onChange?.(); // Trigger custom event\n }}\n />\n </div>\n );\n};\n\n// 4. Register your component to make it available in the visual editor\nexport default registerComponent("Rating", properties, Rating);\n```\n\n---\n\n## How `Prop` Works\n\nYou can define different types of props:\n\n- **`string`**: `Prop.string()`\n- **`number`**: `Prop.number()`\n- **`boolean`**: `Prop.boolean()`\n- **`event`**: `Prop.event()` (for user interactions like clicks)\n- **`any`**: `Prop.any()` (for any type)\n- **`composite`**: `Prop.composite({ x: Prop.number(), y: Prop.number() })` (for nested objects)\n- **`record`**: `Prop.record({...})` (for key-value maps)\n- **`union`**: `Prop.union({...})` (for multiple variants)\n\nYou can chain additional methods:\n\n- `.default(value)` \u2014 Sets a default value.\n- `.propertiesPanel({ label: "Your Label" })` \u2014 Controls how the prop appears in the editor.\n- `.validate(fn)` \u2014 Adds custom validation logic.\n- `.readable()`, `.writable()` \u2014 Control read/write capabilities.\n\n---\n\n## Typical Flow\n\n1. **Define** the **editable schema** (`properties`) with `Prop`.\n2. **Type** your component\'s props using `CustomComponentProps`.\n3. **Use** `useUpdateProperties` to sync UI interactions back to the editor.\n4. **Register** the component using `registerComponent`.\n\n---# Tips\n\n- All `registeredComponent`s automatically support width and height using the `Dim` object.\n ```\n <CustomSlider\n width={Dim.fill(2)} // Fill available space with a weight of 2\n height={Dim.px(100)} // Fixed height of 100 pixels\n />\n ```\n\n## When not to
|
|
43
|
+
var content4 = '# Custom Components\n\n- ULTRA CRITICAL: NEVER use Superblocks components in a custom component.\n\n- CRITICAL: Use custom components sparingly.\n\n- CRITICAL: ONLY when all else fails and a component is not available in the Superblocks library, you may construct it out of external component libraries by installing them.\n\n- CRITICAL: ALWAYS import React using a namespace import: `import * as React from \'react\'`.\n\nIn order to hook it up correctly, the platform needs to know what props the component exposes, their types, default values, and how they should be displayed to users.\n\nTo do this, you use the **`Prop` API** and **`registerComponent`** function.\n\n## Key Concepts\n\n- All custom components should live within the `components/` folder.\n- **`Prop`**: Defines a single editable property for your component.\n - Can specify the data type (`string`, `number`, `boolean`, `event`, etc.).\n - Can define a **default value**, **label** for the properties panel, and other validations.\n- **`registerComponent`**: Connects your React component with its editable schema (`properties`) so it appears correctly in the visual editor.\n- **`useUpdateProperties`**: A hook that lets your component programmatically update its properties during runtime (e.g., when a user interacts with it).\n\n---\n\n## Basic Example\n\n```tsx\nimport { Rate } from "antd";\nimport {\n CustomComponentProps,\n Prop,\n registerComponent,\n useUpdateProperties,\n} from "@superblocksteam/library";\n\n// 1. Define editable properties\nconst properties = {\n value: Prop.number()\n .default(3) // Default to 3 stars\n .propertiesPanel({ label: "Default value" }), // Editor label\n onChange: Prop.event().propertiesPanel({ label: "On change" }), // Editor label for event\n};\n\n// 2. Create typed props for your component\ntype ComponentProps = CustomComponentProps<typeof properties>;\n\n// 3. Build your React component\nconst Rating = ({ value, onChange }: ComponentProps) => {\n const updateProperties = useUpdateProperties(); // Hook to update properties dynamically\n\n return (\n <div style={{ display: "flex" }}>\n <Rate\n value={value}\n defaultValue={value}\n onChange={(newValue) => {\n updateProperties({ value: newValue }); // Update visual editor\n onChange?.(); // Trigger custom event\n }}\n />\n </div>\n );\n};\n\n// 4. Register your component to make it available in the visual editor\nexport default registerComponent("Rating", properties, Rating);\n```\n\n---\n\n## How `Prop` Works\n\nYou can define different types of props:\n\n- **`string`**: `Prop.string()`\n- **`number`**: `Prop.number()`\n- **`boolean`**: `Prop.boolean()`\n- **`event`**: `Prop.event()` (for user interactions like clicks)\n- **`any`**: `Prop.any()` (for any type)\n- **`composite`**: `Prop.composite({ x: Prop.number(), y: Prop.number() })` (for nested objects)\n- **`record`**: `Prop.record({...})` (for key-value maps)\n- **`union`**: `Prop.union({...})` (for multiple variants)\n\nYou can chain additional methods:\n\n- `.default(value)` \u2014 Sets a default value.\n- `.propertiesPanel({ label: "Your Label" })` \u2014 Controls how the prop appears in the editor.\n- `.validate(fn)` \u2014 Adds custom validation logic.\n- `.readable()`, `.writable()` \u2014 Control read/write capabilities.\n\n---\n\n## Typical Flow\n\n1. **Define** the **editable schema** (`properties`) with `Prop`.\n2. **Type** your component\'s props using `CustomComponentProps`.\n3. **Use** `useUpdateProperties` to sync UI interactions back to the editor.\n4. **Register** the component using `registerComponent`.\n\n---# Tips\n\n- All `registeredComponent`s automatically support width and height using the `Dim` object.\n ```\n <CustomSlider\n width={Dim.fill(2)} // Fill available space with a weight of 2\n height={Dim.px(100)} // Fixed height of 100 pixels\n />\n ```\n\n## When not to create a net new custom component\n\n- If a user asks for something by name, like showing "metrics card", and you do not find a "metrics card" component in the Superblocks library, be sure to check if an existing custom component exists that you can use inside the `/components` directory of the project.\n';
|
|
44
44
|
|
|
45
45
|
// ../../../vite-plugin-file-sync/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.js
|
|
46
46
|
init_cjs_shims();
|
package/dist/index.js
CHANGED
|
@@ -296626,7 +296626,7 @@ init_cjs_shims();
|
|
|
296626
296626
|
init_cjs_shims();
|
|
296627
296627
|
var generated = {};
|
|
296628
296628
|
try {
|
|
296629
|
-
generated = await import("./generated-
|
|
296629
|
+
generated = await import("./generated-C6SMCIBJ.js");
|
|
296630
296630
|
} catch (_error) {
|
|
296631
296631
|
getLogger().warn("[ai-service] Generated markdown modules not found. Run `pnpm generate:markdown` first.");
|
|
296632
296632
|
}
|
|
@@ -322021,7 +322021,7 @@ var import_util28 = __toESM(require_dist3(), 1);
|
|
|
322021
322021
|
// ../sdk/package.json
|
|
322022
322022
|
var package_default = {
|
|
322023
322023
|
name: "@superblocksteam/sdk",
|
|
322024
|
-
version: "2.0.3-next.
|
|
322024
|
+
version: "2.0.3-next.193",
|
|
322025
322025
|
type: "module",
|
|
322026
322026
|
description: "Superblocks JS SDK",
|
|
322027
322027
|
homepage: "https://www.superblocks.com",
|
|
@@ -322063,8 +322063,8 @@ var package_default = {
|
|
|
322063
322063
|
"@rollup/wasm-node": "^4.35.0",
|
|
322064
322064
|
"@superblocksteam/bucketeer-sdk": "0.5.0",
|
|
322065
322065
|
"@superblocksteam/shared": "0.9160.0",
|
|
322066
|
-
"@superblocksteam/util": "2.0.3-next.
|
|
322067
|
-
"@superblocksteam/vite-plugin-file-sync": "2.0.3-next.
|
|
322066
|
+
"@superblocksteam/util": "2.0.3-next.193",
|
|
322067
|
+
"@superblocksteam/vite-plugin-file-sync": "2.0.3-next.193",
|
|
322068
322068
|
"@vitejs/plugin-react": "^4.3.4",
|
|
322069
322069
|
axios: "^1.4.0",
|
|
322070
322070
|
chokidar: "^4.0.3",
|
|
@@ -329038,7 +329038,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
|
|
|
329038
329038
|
};
|
|
329039
329039
|
const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
|
|
329040
329040
|
const customFolder = path34.join(root2, "custom");
|
|
329041
|
-
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.3-next.
|
|
329041
|
+
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.3-next.193";
|
|
329042
329042
|
const env3 = loadEnv(mode, root2, "");
|
|
329043
329043
|
const hmrPort = await getFreePort();
|
|
329044
329044
|
const hmrOptions = {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/cli",
|
|
3
|
-
"version": "2.0.3-next.
|
|
3
|
+
"version": "2.0.3-next.193",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Official Superblocks CLI",
|
|
6
6
|
"homepage": "https://www.superblocks.com",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@eslint/js": "^9.16.0",
|
|
44
44
|
"@oclif/test": "^4.1.11",
|
|
45
|
-
"@superblocksteam/sdk": "2.0.3-next.
|
|
45
|
+
"@superblocksteam/sdk": "2.0.3-next.193",
|
|
46
46
|
"@superblocksteam/shared": "0.9160.0",
|
|
47
|
-
"@superblocksteam/util": "2.0.3-next.
|
|
47
|
+
"@superblocksteam/util": "2.0.3-next.193",
|
|
48
48
|
"@types/babel__core": "^7.20.0",
|
|
49
49
|
"@types/chai": "^4",
|
|
50
50
|
"@types/fs-extra": "^11.0.1",
|