@superblocksteam/vite-plugin-file-sync 2.0.17-next.9 → 2.0.17

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.
Files changed (71) hide show
  1. package/dist/ai-service/evals/helpers/eval-scoring.d.ts.map +1 -1
  2. package/dist/ai-service/evals/helpers/eval-scoring.js +3 -2
  3. package/dist/ai-service/evals/helpers/eval-scoring.js.map +1 -1
  4. package/dist/ai-service/evals/helpers/index.d.ts +0 -2
  5. package/dist/ai-service/evals/helpers/index.d.ts.map +1 -1
  6. package/dist/ai-service/evals/helpers/index.js +23 -47
  7. package/dist/ai-service/evals/helpers/index.js.map +1 -1
  8. package/dist/ai-service/index.d.ts.map +1 -1
  9. package/dist/ai-service/index.js +1 -6
  10. package/dist/ai-service/index.js.map +1 -1
  11. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ButtonPropsDocs.js +1 -1
  12. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/CheckboxPropsDocs.js +1 -1
  13. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ColumnPropsDocs.js +1 -1
  14. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ContainerPropsDocs.js +1 -1
  15. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DatePickerPropsDocs.js +1 -1
  16. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DropdownPropsDocs.js +1 -1
  17. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/IconPropsDocs.js +1 -1
  18. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ImagePropsDocs.js +1 -1
  19. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/InputPropsDocs.js +1 -1
  20. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ModalPropsDocs.js +1 -1
  21. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/PagePropsDocs.js +1 -1
  22. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SectionPropsDocs.js +1 -1
  23. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SlideoutPropsDocs.js +1 -1
  24. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SwitchPropsDocs.js +1 -1
  25. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TablePropsDocs.js +1 -1
  26. package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TextPropsDocs.js +1 -1
  27. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Dim.js +1 -1
  28. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/EventFlow.js +1 -1
  29. package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/TextStyleWithVariant.js +1 -1
  30. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.js +1 -1
  31. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js +1 -1
  32. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-components-rules.js +1 -1
  33. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-custom-components.js +1 -1
  34. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-data-filtering.js +1 -1
  35. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-event-flow.js +1 -1
  36. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-forms.js +1 -1
  37. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-layouts.js +1 -1
  38. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-page.js +1 -1
  39. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-rbac.js +1 -1
  40. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-routes.js +1 -1
  41. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.js +1 -1
  42. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-theming.js +1 -1
  43. package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js +1 -1
  44. package/dist/ai-service/state-machine/handlers/agent-planning.d.ts.map +1 -1
  45. package/dist/ai-service/state-machine/handlers/agent-planning.js +0 -1
  46. package/dist/ai-service/state-machine/handlers/agent-planning.js.map +1 -1
  47. package/dist/ai-service/state-machine/handlers/idle.d.ts.map +1 -1
  48. package/dist/ai-service/state-machine/handlers/idle.js +0 -1
  49. package/dist/ai-service/state-machine/handlers/idle.js.map +1 -1
  50. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  51. package/dist/ai-service/state-machine/handlers/llm-generating.js +18 -12
  52. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  53. package/dist/ai-service/test-utils/app-generation-mocks/orders-app.d.ts +1 -1
  54. package/dist/ai-service/test-utils/app-generation-mocks/orders-app.js +8 -8
  55. package/dist/ai-service/test-utils/mock-utils.d.ts +20 -10
  56. package/dist/ai-service/test-utils/mock-utils.d.ts.map +1 -1
  57. package/dist/ai-service/test-utils/mock-utils.js +34 -58
  58. package/dist/ai-service/test-utils/mock-utils.js.map +1 -1
  59. package/dist/parsing/util.d.ts +1 -1
  60. package/dist/parsing/util.d.ts.map +1 -1
  61. package/dist/parsing/util.js +15 -28
  62. package/dist/parsing/util.js.map +1 -1
  63. package/package.json +7 -7
  64. package/dist/ai-service/test-utils/anthropic-service-mock.d.ts +0 -2
  65. package/dist/ai-service/test-utils/anthropic-service-mock.d.ts.map +0 -1
  66. package/dist/ai-service/test-utils/anthropic-service-mock.js +0 -76
  67. package/dist/ai-service/test-utils/anthropic-service-mock.js.map +0 -1
  68. package/dist/ai-service/test-utils/app-generation-mocks/reprompt.d.ts +0 -3
  69. package/dist/ai-service/test-utils/app-generation-mocks/reprompt.d.ts.map +0 -1
  70. package/dist/ai-service/test-utils/app-generation-mocks/reprompt.js +0 -70
  71. package/dist/ai-service/test-utils/app-generation-mocks/reprompt.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-forms.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.730Z
4
+ // Generated at: 2025-07-22T04:07:42.074Z
5
5
  export const content = "### Form Layouts in Superblocks\n\n**🚨 CRITICAL: Remember that computed cannot be used as React children.** When building forms, all dynamic content must be in component properties (like `text={}`, `label={}`) not as children.\n\nWhen creating forms using form field components, follow these rules:\n\n1. Always put form components together inside an `Container` with `layout=\"vertical\"`, `width={Dim.fill()}`, and appropriate `spacing`\n2. Use `spacing={Dim.px(12)}` or similar for consistent form field spacing\n3. Do not change the label position on form components (like `Input`). The default is the label is above the input and we want to keep that\n4. Make all form field components and any container parents be `width={Dim.fill()}` so they are all aligned horizontally and easy to use\n\n**Example:**\n\n```jsx\n<Container layout=\"vertical\" width={Dim.fill()} spacing={Dim.px(12)}>\n <Input label=\"First Name\" bind={FirstName} width={Dim.fill()} />\n <Input label=\"Last Name\" bind={LastName} width={Dim.fill()} />\n <Input label=\"Email\" bind={Email} inputType=\"EMAIL\" width={Dim.fill()} />\n</Container>\n```\n\n### Forms inside Modals\n\nIt's common to put a form inside a Modal, like for creating or editing an entity. Here are comprehensive examples showing different patterns:\n\n#### Basic Create Form Modal\n\n```tsx\n// Import required components and utilities\nimport {\n Modal,\n Container,\n Text,\n Input,\n Dropdown,\n Button,\n Dim,\n EventFlow,\n} from \"@superblocksteam/library\";\nimport { Page1 } from \"./scope\";\n\n// ...\n\nconst {\n NewOrderCustomerName,\n NewOrderCustomerEmail,\n NewOrderAmount,\n NewOrderStatus,\n NewOrderNotes,\n OrdersStateVar,\n CreateOrderModal,\n} = Page1;\n\n<Modal bind={CreateOrderModal}>\n <Container layout=\"vertical\" width={Dim.fill()} spacing={Dim.px(24)}>\n {/* Modal Header */}\n <Container layout=\"vertical\" spacing={Dim.px(8)}>\n <Text\n text=\"Create New Order\"\n textStyle={{\n variant: \"heading4\",\n }}\n />\n <Text text=\"Fill out the form below to create a new order\" />\n </Container>\n\n {/* Form Content */}\n <Container layout=\"vertical\" width={Dim.fill()} spacing={Dim.px(12)}>\n <Input\n bind={NewOrderCustomerName}\n width={Dim.fill()}\n label=\"Customer Name\"\n placeholderText=\"Enter customer name\"\n required={true}\n />\n\n <Input\n bind={NewOrderCustomerEmail}\n width={Dim.fill()}\n label=\"Customer Email\"\n inputType=\"EMAIL\"\n placeholderText=\"Enter customer email\"\n required={true}\n />\n\n <Input\n bind={NewOrderAmount}\n width={Dim.fill()}\n label=\"Order Amount\"\n placeholderText=\"Enter order amount\"\n inputType=\"NUMBER\"\n required={true}\n />\n\n <Dropdown\n bind={NewOrderStatus}\n width={Dim.fill()}\n label=\"Order Status\"\n options={[\n {\n label: \"Pending\",\n value: \"pending\",\n },\n {\n label: \"Processing\",\n value: \"processing\",\n },\n {\n label: \"En route\",\n value: \"en_route\",\n },\n {\n label: \"Delivered\",\n value: \"delivered\",\n },\n {\n label: \"Refunded\",\n value: \"refunded\",\n },\n ]}\n required={true}\n />\n\n <Input\n bind={NewOrderNotes}\n width={Dim.fill()}\n label=\"Order Notes\"\n placeholderText=\"Optional notes about the order\"\n multiline={true}\n />\n </Container>\n\n {/* Modal Footer */}\n <Container\n layout=\"horizontal\"\n horizontalAlign=\"right\"\n spacing={Dim.px(12)}\n width={Dim.fill()}\n >\n <Button\n label=\"Cancel\"\n variant=\"secondary\"\n onClick={EventFlow.runJS(() => {\n // Reset form components\n NewOrderCustomerName.text = \"\";\n NewOrderCustomerEmail.text = \"\";\n NewOrderAmount.text = \"\";\n NewOrderStatus.metaSelectedOptionValue = \"\";\n NewOrderNotes.text = \"\";\n })\n // Note how we prefer use controlModal for handling opening/closing\n // the modal rather than setting the modal's open property directly\n .controlModal(CreateOrderModal, { action: \"close\" })}\n />\n <Button\n label=\"Create Order\"\n variant=\"primary\"\n onClick={EventFlow.runJS(() => {\n // Create new order using the form values\n const newOrder = {\n id: `ORD_${Math.floor(Math.random() * 10000)\n .toString()\n .padStart(4, \"0\")}`,\n customerName: NewOrderCustomerName.value,\n customerEmail: NewOrderCustomerEmail.value,\n amount: NewOrderAmount.value,\n status: NewOrderStatus.selectedOptionValue,\n notes: NewOrderNotes.value,\n createdAt: new Date().toISOString(),\n };\n\n // Add to orders list or call API\n OrdersStateVar.setValue([...OrdersStateVar.value, newOrder]);\n\n // Reset form components\n NewOrderCustomerName.text = \"\";\n NewOrderCustomerEmail.text = \"\";\n NewOrderAmount.text = \"\";\n NewOrderStatus.metaSelectedOptionValue = \"\";\n NewOrderNotes.text = \"\";\n })\n // Note how we prefer use controlModal for handling opening/closing\n // the modal rather than setting the modal's open property directly\n .controlModal(CreateOrderModal, { action: \"close\" })}\n />\n </Container>\n </Container>\n</Modal>;\n```\n\n#### Table with Edit Form Modal\n\nThis example shows a more complete pattern where a table displays data and clicking a row opens an edit modal with the form fields pre-populated:\n\n```tsx\n// Import required components and utilities\nimport {\n Page,\n Section,\n Column,\n Table,\n Modal,\n Container,\n Text,\n Input,\n Dropdown,\n Button,\n Dim,\n EventFlow,\n computed,\n} from \"@superblocksteam/library\";\nimport { Page1 } from \"./scope\";\n\nconst {\n OrdersTable,\n EditOrderModal,\n EditOrderCustomerName,\n EditOrderCustomerEmail,\n EditOrderAmount,\n EditOrderStatus,\n EditOrderNotes,\n OrdersStateVar,\n} = Page1;\n\n// Main page with table\n<Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()} spacing={Dim.px(24)}>\n <Text\n text=\"Orders Management\"\n textStyle={{ variant: \"heading2\" }}\n />\n\n <Table\n bind={OrdersTable}\n tableData={computed(() => OrdersStateVar.value)}\n onRowClick={EventFlow.runJS(() => {\n // Populate form fields with the selected row data\n EditOrderCustomerName.text = OrdersTable.selectedRow.customerName;\n EditOrderCustomerEmail.text = OrdersTable.selectedRow.customerEmail;\n EditOrderAmount.text = OrdersTable.selectedRow.amount;\n EditOrderStatus.metaSelectedOptionValue = OrdersTable.selectedRow.status;\n EditOrderNotes.text = OrdersTable.selectedRow.notes || \"\";\n })\n // Open the edit modal\n .controlModal(EditOrderModal, { action: \"open\" })}\n width={Dim.fill()}\n height={Dim.fill()}\n />\n </Column>\n </Section>\n</Page>\n\n// Edit modal with form pre-populated from table row\n<Modal bind={EditOrderModal}>\n <Container layout=\"vertical\" width={Dim.fill()} spacing={Dim.px(24)}>\n {/* Modal Header */}\n <Container layout=\"vertical\" spacing={Dim.px(8)}>\n <Text\n text=\"Edit Order\"\n textStyle={{\n variant: \"heading4\",\n }}\n />\n <Text text=\"Update the order details below\" />\n </Container>\n\n {/* Form Content - Fields are pre-populated by onRowClick */}\n <Container layout=\"vertical\" width={Dim.fill()} spacing={Dim.px(12)}>\n <Input\n bind={EditOrderCustomerName}\n width={Dim.fill()}\n label=\"Customer Name\"\n placeholderText=\"Enter customer name\"\n required={true}\n />\n\n <Input\n bind={EditOrderCustomerEmail}\n width={Dim.fill()}\n label=\"Customer Email\"\n inputType=\"EMAIL\"\n placeholderText=\"Enter customer email\"\n required={true}\n />\n\n <Input\n bind={EditOrderAmount}\n width={Dim.fill()}\n label=\"Order Amount\"\n placeholderText=\"Enter order amount\"\n inputType=\"NUMBER\"\n required={true}\n />\n\n <Dropdown\n bind={EditOrderStatus}\n width={Dim.fill()}\n label=\"Order Status\"\n options={[\n {\n label: \"Pending\",\n value: \"pending\",\n },\n {\n label: \"Processing\",\n value: \"processing\",\n },\n {\n label: \"En route\",\n value: \"en_route\",\n },\n {\n label: \"Delivered\",\n value: \"delivered\",\n },\n {\n label: \"Refunded\",\n value: \"refunded\",\n },\n ]}\n required={true}\n />\n\n <Input\n bind={EditOrderNotes}\n width={Dim.fill()}\n label=\"Order Notes\"\n placeholderText=\"Optional notes about the order\"\n multiline={true}\n />\n </Container>\n\n {/* Modal Footer */}\n <Container\n layout=\"horizontal\"\n horizontalAlign=\"right\"\n spacing={Dim.px(12)}\n width={Dim.fill()}\n >\n <Button\n label=\"Cancel\"\n variant=\"secondary\"\n onClick={EventFlow.controlModal(EditOrderModal, { action: \"close\" })}\n />\n <Button\n label=\"Save Changes\"\n variant=\"primary\"\n onClick={EventFlow.runJS(() => {\n // Find and update the order in the orders array\n const updatedOrders = OrdersStateVar.value.map(order => {\n if (order.id === OrdersTable.selectedRow.id) {\n return {\n ...order,\n customerName: EditOrderCustomerName.value,\n customerEmail: EditOrderCustomerEmail.value,\n amount: EditOrderAmount.value,\n status: EditOrderStatus.selectedOptionValue,\n notes: EditOrderNotes.value,\n updatedAt: new Date().toISOString(),\n };\n }\n return order;\n });\n\n // Update the orders state\n OrdersStateVar.setValue(updatedOrders);\n })\n .controlModal(EditOrderModal, { action: \"close\" })}\n />\n </Container>\n </Container>\n</Modal>\n```\n\n**Corresponding scope.ts file for the table + edit modal example:**\n\n```ts\n// pages/Page1/scope.ts\nimport {\n createScope,\n StateVar,\n StateVarPersistence,\n} from \"@superblocksteam/library\";\n\nexport const Page1Scope = createScope<{\n OrdersTable: any;\n EditOrderModal: any;\n EditOrderCustomerName: any;\n EditOrderCustomerEmail: any;\n EditOrderAmount: any;\n EditOrderStatus: any;\n EditOrderNotes: any;\n OrdersStateVar: any;\n}>(\n () => ({\n OrdersStateVar: StateVar({\n defaultValue: [\n {\n id: 1,\n customerName: \"John Doe\",\n customerEmail: \"john@example.com\",\n amount: 150.0,\n status: \"pending\",\n notes: \"Rush order\",\n createdAt: \"2024-01-15T10:30:00Z\",\n },\n {\n id: 2,\n customerName: \"Jane Smith\",\n customerEmail: \"jane@example.com\",\n amount: 89.99,\n status: \"delivered\",\n notes: \"\",\n createdAt: \"2024-01-14T14:20:00Z\",\n },\n ],\n persistence: StateVarPersistence.TEMPORARY,\n }),\n }),\n {\n name: \"Page1\",\n },\n);\n\nexport const Page1 = Page1Scope.entities;\n```\n\n#### Alternative Population Method - Button with State Variable\n\nHere's another common pattern where a button populates form fields from a state variable:\n\n```tsx\n// Button that loads selected user data into edit form\n<Button\n label=\"Edit Selected User\"\n onClick={EventFlow.runJS(() => {\n const selectedUser = SelectedUserStateVar.value;\n\n // Populate form fields from state variable\n EditUserName.text = selectedUser.name;\n EditUserEmail.text = selectedUser.email;\n EditUserRole.metaSelectedOptionValue = selectedUser.role;\n EditUserDepartment.text = selectedUser.department;\n }).controlModal(EditUserModal, { action: \"open\" })}\n/>\n```\n\n### Key Form Patterns\n\n1. **Create Forms**: Start with empty fields, populate from user input\n2. **Edit Forms**: Pre-populate fields with existing data from various sources\n3. **Field Population Methods**:\n - **Table Row Selection**: Use `onRowClick` to set form field values to `{TableName}.selectedRow.{columnName}` (most common)\n - **Button Actions**: Use button clicks to populate from state variables or API responses\n - **API Loading**: Fetch data and populate fields when modal opens\n - **State Variables**: Populate from existing application state\n4. **Form Validation**: Use `required={true}` on form components and validate in submit handlers\n5. **Form Reset**: Always reset form fields when canceling or after successful submission\n6. **Modal Control**: Prefer `EventFlow.controlModal()` over directly setting modal open property\n\n### Form Layout Best Practices\n\n- **Container Structure**: Always wrap forms in `Container` with `layout=\"vertical\"`\n- **Consistent Spacing**: Use `spacing={Dim.px(12)}` for form field spacing\n- **Full Width**: Make form fields and containers `width={Dim.fill()}` for proper alignment\n- **Modal Structure**: Use header, content, and footer containers with appropriate spacing\n- **Button Alignment**: Use `horizontalAlign=\"right\"` for the footer containers in modals that contain buttons\n";
6
6
  //# sourceMappingURL=superblocks-forms.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-layouts.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.729Z
4
+ // Generated at: 2025-07-22T04:07:42.074Z
5
5
  export const content = "### Layout and Sizing in Superblocks\n\n- `Section` should only be used as a child of `Page` and `Column` only used as a child of `Section`\n- All other layouts in Superblocks are configured using the `Container` component\n- `Container` provides both layout and optional visual styling.\n\n```jsx\n<Container\n variant=\"card\" | \"none\" // default is \"none\"\n layout=\"vertical\" | \"horizontal\" | \"freeform\" // default is \"vertical\"\n>\n {/* Children here */}\n</Container>\n```\n\nWe have three main layout options in Superblocks for `Container` and `Column`:\n\n- Vertical Stack (`vertical`)\n- Horizontal Stack (`horizontal`)\n- Freeform (`freeform`)\n\nFor new designs, we recommend using Horizontal or Vertical Stacks for almost all use cases, especially Vertical Stacks.\n\nThe `variant` prop is optional and can be set to `\"card\"` or `\"none\"`. Default is `\"none\"`.\n`\"card\"` applies a card-like visual style to the container, such as rounded corners, white background, and padding.\n\n**When to use each variant:**\n\n- `variant=\"none\"` - For pure layout containers (by far most common)\n- `variant=\"card\"` - When you need visual separation with padding, borders, and background\n\n---\n\n### Height and Width Options\n\nAll Superblocks components support width and height. They take in a `Dim` object, which has 3 main options:\n\n- `Dim.fit()`: Fit to content size, this is the default behavior and can be omitted.\n- `Dim.px(100)`: Fixed pixel size.\n- `Dim.fill()` or `Dim.fill(2)`: Fill available space with an optional weight.\n\n> IMPORTANT: Prefer using `Dim.fit()` over `Dim.px()` for height and width unless you have a specific reason to use fixed pixel sizes. This is extra true for containers\n> IMPORTANT: Prefer using `Dim.fill()` or `Dim.fit()` over `Dim.px()` for width unless you have a specific reason to use fixed pixel sizes.\n\n**Examples**:\n\n```jsx\n<Text width={Dim.px(2)}>Hello</Text> // 2 pixels\n<Text width={Dim.fit()}>Hello</Text> // Fit to content (default)\n<Text width={Dim.fill()}>Hello</Text> // Fill available space, no weight (aka 1)\n<Text width={Dim.fill(2)}>Hello</Text> // Fill available space, with weight of 2\n```\n\n---\n\n### Spacing Between Components\n\n`Container` has a **default spacing of `Dim.px(6)`** between child components when using `layout=\"vertical\"` or `layout=\"horizontal\"`. You can override this default when you need different spacing.\n\n```jsx\n{\n /* Uses default 6px spacing */\n}\n<Container layout=\"vertical\">\n <Text text=\"First item\" />\n <Text text=\"Second item\" />\n <Text text=\"Third item\" />\n</Container>;\n\n{\n /* Override with custom spacing */\n}\n<Container layout=\"vertical\" spacing={Dim.px(12)}>\n <Text text=\"First item\" />\n <Text text=\"Second item\" />\n</Container>;\n\n{\n /* No spacing (components touch) - often useful for nested containers */\n}\n<Container layout=\"horizontal\" spacing={Dim.px(0)}>\n <Container />\n <Container />\n</Container>;\n```\n\n**Common spacing values:**\n\n- `spacing={Dim.px(0)}` - No spacing (components touch)\n- Default `Dim.px(6)` - Minimal spacing (used if spacing prop omitted)\n- `spacing={Dim.px(12)}` - Comfortable spacing for buttons/controls/form fields\n- `spacing={Dim.px(24)}` - Loose spacing for distinct sections\n\n**Best practices:**\n\n- The default 6px spacing works well for most layouts\n- Override spacing when you need tighter control or larger gaps\n- DO NOT add margins to components - use container spacing instead\n- Try to use consistent spacing values throughout your app\n\n---\n\n### Standard Page Structure\n\n**CRITICAL**: All new Superblocks apps must follow this standard page structure:\n\n```tsx\n<Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>{/* Your page content goes here */}</Column>\n </Section>\n</Page>\n```\n\nNote that `Section` and `Column` can only be used inside `Page`. For anything inside an `Modal` or nested deeper inside an `Column`, use an `Container`.\n\n#### App headers\n\n- If you want to have a header section for your app, that's best done in its own `Section` above the main content's `Section`.\n- Put any background color on the section itself, as the columns are padded in from the edge by default\n\nExample:\n\n```tsx\n<Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n {/* App header Section */}\n <Section height={Dim.fit()} backgroundColor=\"#90EE90\">\n <Column\n width={Dim.fill()}\n layout=\"horizontal\"\n horizontalAlign=\"space-between\"\n >\n <Text text=\"My App\" textStyle={{ variant: \"heading2\" }} />\n <Button label=\"New Item\" />\n </Column>\n </Section>\n\n {/* Main Content Section */}\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>\n <Table tableData={computed(() => myData.response)} />\n </Column>\n </Section>\n</Page>\n```\n\n#### Column and Container Width Guidelines\n\n**Default Rule**: All columns under a section, and almost all Containers (especially if they are the root of a Column or Modal) should use `width={Dim.fill()}` unless you have a really good reason not to.\n\n**Good Reason Example** - Fixed Sidebar Layout:\nWhen you need a fixed-width sidebar alongside a flexible content area:\n\n```tsx\n<Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n {/* Fixed sidebar column */}\n <Column width={Dim.px(250)}>\n <Text text=\"Sidebar content\" />\n <Button label=\"Menu Item 1\" />\n <Button label=\"Menu Item 2\" />\n </Column>\n\n {/* Flexible content column */}\n <Column width={Dim.fill()}>\n <Text text=\"Main content area that fills remaining space\" />\n <Table tableData={computed(() => myApi.response)} />\n </Column>\n </Section>\n</Page>\n```\n\nIn this example:\n\n- Left column uses `width={Dim.px(250)}` for a fixed 250px sidebar\n- Right column uses `width={Dim.fill()}` to take up all remaining space\n- This creates a responsive layout where the sidebar stays fixed while the content area adapts\n\n### Layouts for modals\n\n- Modal components should always use an Container with layout=vertical as the root of their content\n- Modal components DO NOT need to have their own close button. The modal component comes with a close button by default\n- Put the header of the modal into its own `Container` and the footer in its own `Container`. If the footer has buttons for actions, ensure you add `horizontalAlign=\"right\"` to the container\n\n**Modal Content Width Guidelines:**\n\nMost components inside modals should use `width={Dim.fill()}` to prevent left-aligned, inconsistent layouts:\n\n- Root container: `<Container layout=\"vertical\" width={Dim.fill()}>`\n- Form fields: `<Input bind={...} width={Dim.fill()} />`\n- Form containers: `<Container layout=\"vertical\" width={Dim.fill()}>`\n\n**Exceptions:** Some components work better with default `Dim.fit()` width:\n\n- Footer buttons (Button) - wide buttons look awkward\n- Icons, small text labels, or decorative elements\n\n**Good Example:** See the modal examples in `superblocks-forms.md` where the footer container uses `width={Dim.fill()}` but the Cancel/Submit buttons inside use default fit width for proper proportions.\n";
6
6
  //# sourceMappingURL=superblocks-layouts.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-page.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.729Z
4
+ // Generated at: 2025-07-22T04:07:42.074Z
5
5
  export const content = "### How to use Page\n\n**Important: Superblocks apps currently support only one page.**\n\n- A Superblocks app consists of a single page that exports a default React component through the `registerPage` function.\n- The page consists of two files: `index.tsx` (the page component) and `scope.ts` (the entity definitions).\n- For `export default registerPage(Page1, Page1Scope)`, Page1 is a function that returns a React component, and Page1Scope is the scope containing all entities.\n- A Superblocks app consists of a single page located in the `pages/Page1` directory.\n- NEVER change the path of the `pages` directory or the page directories inside it `like `pages/Page1`). If you change these paths or folder names, the app will crash.\n- DO NOT create more than ONE page in an app. Multiple pages is NOT supported!\n\n### Page Structure\n\nThe single page in your Superblocks app should have the following structure:\n\n**scope.ts** - Contains all entity definitions (variables, APIs, etc.):\n\n```ts\nimport {\n createScope,\n StateVar,\n StateVarPersistence,\n SbApi,\n Text,\n} from \"@superblocksteam/library\";\n\nexport const Page1Scope = createScope<{\n Text1: any;\n}>(\n () => ({\n // Define your entities here\n myVariableVar: StateVar({\n defaultValue: \"initial value\",\n persistence: StateVarPersistence.TEMPORARY,\n }),\n fetchDataApi: SbApi({}),\n }),\n {\n name: \"Page1\",\n },\n);\n\nexport const Page1 = Page1Scope.entities;\n```\n\n**index.tsx** - Contains the page component:\n\n```tsx\nimport {\n Page,\n Section,\n Column,\n Text,\n registerPage,\n} from \"@superblocksteam/library\";\nimport { Page1, Page1Scope } from \"./scope\";\n\nfunction PageContent() {\n // Destructure entities from the scope for easy access\n const { Text1, myVariableVar, fetchDataApi } = Page1;\n\n return (\n <Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>\n {/* Use entities in your components */}\n <Text bind={Text1} text={computed(() => myVariableVar.value)} />\n </Column>\n </Section>\n </Page>\n );\n}\n\nexport default registerPage(PageContent, Page1Scope);\n```\n\n## How component bindings work\n\nIf you need to reference a component directly to get access to some of its state, you must use a binding inside the page scope.\n\nComponent bindings allow you to:\n\n- Access component properties and state from other components and APIs\n- Create reactive relationships between components\n- Reference component values in `computed` expressions\n\n### Setting up component bindings\n\n1. **Define the binding type in your scope**: Add the component type to the scope's type definitions:\n\n```ts\nexport const Page1Scope = createScope<{\n Text1: any;\n UserInput: any;\n}>(\n () => ({\n // Your other entities (variables, APIs, etc.)\n myVariableVar: StateVar({ defaultValue: \"Hello\" }),\n }),\n {\n name: \"Page1\",\n },\n);\n```\n\n2. **Bind the component in your JSX**: Use the `bind` prop to connect the component to the binding:\n\n```tsx\nfunction PageContent() {\n const { Text1, UserInput, myVariableVar } = Page1;\n\n return (\n <Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>\n <Input bind={UserInput} placeholder=\"Enter your name\" />\n <Text\n bind={Text1}\n text={computed(() => `Hello, ${UserInput.value}!`)}\n />\n </Column>\n </Section>\n </Page>\n );\n}\n```\n\n3. **Access component state**: Use `computed` to access properties of bound components:\n\n```tsx\n// Access input value\ntext={computed(() => UserInput.value)}\n\n// Access text content\ntext={computed(() => Text1.text)}\n\n// Combine with other state\n text={computed(() => `${myVariableVar.value}: ${UserInput.value}`)}\n```\n\n### Common binding use cases\n\n- **Form inputs**: Access user input values to display or validate\n- **Dynamic content**: Reference one component's state to update another\n- **Conditional rendering**: Use component state to control visibility or styling\n\n### Page load events\n\nYou can fire callbacks when the page is loaded using the onLoad property of the Page component. You must use the EventFlow API for any actions you want to run inside onLoad.\n\nExample:\n\n```tsx\nimport {\n registerPage,\n EventFlow,\n Page,\n Section,\n Column,\n computed,\n} from \"@superblocksteam/library\";\nimport { Page1, Page1Scope } from \"./scope\";\n\nconst Page1Component = () => {\n return (\n <Page\n name=\"Page1\"\n height={Dim.fill()}\n width={Dim.fill()}\n onLoad={EventFlow.runJS(() => {\n console.log(\"Page loaded\");\n })}\n >\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>...</Column>\n </Section>\n </Page>\n );\n};\n\nexport default registerPage(Page1Component, Page1Scope);\n```\n\nA very common and helpful usage of this callback is to run APIs using EventFlow to fetch data when the page loads. Example:\n\n```tsx\nimport {\n Page,\n registerPage,\n EventFlow,\n Section,\n Column,\n computed,\n} from \"@superblocksteam/library\";\nimport { Page1, Page1Scope } from \"./scope\";\n\nconst Page1Component = () => {\n return (\n <Page\n name=\"Page1\"\n height={Dim.fill()}\n width={Dim.fill()}\n onLoad={EventFlow.runApis([getOrdersApi])}\n >\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>...</Column>\n </Section>\n </Page>\n );\n};\n\nexport default registerPage(Page1Component, Page1Scope);\n```\n\nIn this example, the `getOrdersApi` API would be defined in the scope.ts file like this:\n\n```ts\n// In scope.ts\n\n// We register the api in createScope by creating a key\n// with the same name as the file, and SbApi({}) with an empty object\n// Note: We DO NOT import the api file. It's not necessary.\nexport const Page1Scope = createScope(\n () => ({\n getOrdersApi: SbApi({}),\n }),\n {\n name: \"Page1\",\n },\n);\n```\n";
6
6
  //# sourceMappingURL=superblocks-page.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-rbac.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.728Z
4
+ // Generated at: 2025-07-22T04:07:42.073Z
5
5
  export const content = "# Role-Based Access Control (RBAC)\n\nSuperblocks provides role-based access control through user groups. You can control component visibility and availability based on the groups that a user belongs to.\n\n## Accessing User Groups\n\nUser groups are available via `Global.user.groups`, which contains an array of group objects with the following structure:\n\n```typescript\n// Global.user.groups is an ARRAY OF OBJECTS, not an array of strings\nGlobal.user.groups: Array<{\n id: string;\n name: string;\n}>;\n\n// Example data:\n// [\n// { id: \"123\", name: \"Admins\" },\n// { id: \"456\", name: \"Managers\" },\n// { id: \"789\", name: \"Order Management Admins\" }\n// ]\n```\n\n## Common RBAC Patterns\n\n### Hiding Components Based on User Groups\n\nThe most common way to implement RBAC is by controlling component visibility using the `isVisible` property. Nearly all components support this property.\n\n```javascript\n// Show a component only to users in the \"Admins\" group\n<Button\n label=\"Admin Action\"\n isVisible={Global.user.groups.some((g) => g.name === \"Admins\")}\n/>\n\n// Show a component only to users NOT in the \"Guest\" group\n<Container\n isVisible={!Global.user.groups.some((g) => g.name === \"Guest\")}\n>\n {/* Content only visible to non-guests */}\n</Container>\n\n// Show a component to users in multiple groups\n<Text\n text=\"Manager or Admin content\"\n isVisible={Global.user.groups.some((g) => [\"Managers\", \"Admins\"].includes(g.name))}\n/>\n```\n\n### Disabling Components Based on User Groups\n\nFor interactive components that support the `isDisabled` property (like buttons, inputs, dropdowns, etc.), you can disable functionality while keeping the component visible:\n\n```javascript\n// Disable a button for users not in the \"Editors\" group\n<Button\n label=\"Edit Record\"\n isDisabled={!Global.user.groups.some((g) => g.name === \"Editors\")}\n/>\n\n// Disable an input for read-only users\n<Input\n label=\"Sensitive Data\"\n defaultValue=\"Some value\"\n isDisabled={Global.user.groups.some((g) => g.name === \"ReadOnly\")}\n/>\n\n// Enable advanced features only for premium users\n<Dropdown\n label=\"Advanced Options\"\n isDisabled={!Global.user.groups.some((g) => g.name === \"Premium\")}\n/>\n```\n\n## Components with RBAC Support\n\n### Components Supporting `isVisible`\n\nAlmost all components support the `isVisible` property, including:\n\n- Button, Text, Input, Dropdown, Container, Image, Icon, Table, Checkbox, Switch, DatePicker, Modal, Slideout, and more.\n\n### Components Supporting `isDisabled`\n\nInteractive components that support the `isDisabled` property include:\n\n- Button, Input, Dropdown, Checkbox, Switch, DatePicker, and other form controls.\n\n## Best Practices\n\n1. **Use `isVisible` for sensitive content**: Hide components that contain sensitive information or actions that users shouldn't see.\n\n2. **Use `isDisabled` for better UX**: When you want users to see that a feature exists but is not available to them, disable the component rather than hiding it.\n\n3. **Group-based logic**: Use group names consistently across your application for easier maintenance.\n\n4. **Fallback handling**: Consider what happens when a user has no groups or unexpected group configurations.\n\n5. **Test thoroughly**: Always test RBAC logic with users from different groups to ensure proper access control.\n\n## Example: Complete RBAC Implementation\n\n```javascript\n// A dashboard with different access levels\n<Container layout=\"vertical\">\n {/* Everyone can see this */}\n <Text text=\"Welcome to the Dashboard\" />\n\n {/* Only visible to authenticated users (not guests) */}\n <Button\n label=\"My Profile\"\n isVisible={!Global.user.groups.some((g) => g.name === \"Guest\")}\n />\n\n {/* Visible to managers and admins, but disabled for managers */}\n <Button\n label=\"Delete Records\"\n isVisible={Global.user.groups.some((g) =>\n [\"Managers\", \"Admins\"].includes(g.name),\n )}\n isDisabled={\n Global.user.groups.some((g) => g.name === \"Managers\") &&\n !Global.user.groups.some((g) => g.name === \"Admins\")\n }\n />\n\n {/* Admin-only section */}\n <Container isVisible={Global.user.groups.some((g) => g.name === \"Admins\")}>\n <Text text=\"Admin Controls\" />\n <Button label=\"System Settings\" />\n <Button label=\"User Management\" />\n </Container>\n</Container>\n```\n";
6
6
  //# sourceMappingURL=superblocks-rbac.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-routes.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.728Z
4
+ // Generated at: 2025-07-22T04:07:42.073Z
5
5
  export const content = "- **IMPORTANT: Superblocks apps support only ONE page. There is only ever a single route mapping to the single page.**\n- The `routes.json` file maps the root URL to the single page in your Superblocks app.\n Example routes.json file content:\n\n```json\n{\n \"/\": {\n \"file\": \"Page1/index.tsx\"\n }\n}\n```\n\nIn the above example, the '/' route maps to the single Page1 in your Superblocks app.\n\n**Critical: Superblocks apps only support a single page, so the routes.json file should only contain one route mapping to Page1.**\n\nCritical: Page paths in `routes.json` are relative to the 'pages/' directory. In this file, you must never prefix `file` values with 'pages/', or the app will break.\n";
6
6
  //# sourceMappingURL=superblocks-routes.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-state.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.727Z
4
+ // Generated at: 2025-07-22T04:07:42.073Z
5
5
  export const content = "**Superblocks State System**\n\nThe Superblocks state system is built around scopes that contain entities (variables, APIs, components). Here's how it works:\n\n### 1. Scopes\n\nScopes are defined in a `scope.ts` file for the single page and contain all the page's entities.\n\n- **Page scopes** contain all entities for your single Superblocks page\n- Entities are accessed by importing and destructuring from the scope\n\n> **Parent → child rule**: Child scopes can read & write parent entities, but parents cannot reach into children.\n\n### 2. Scope Structure\n\nThe single page has a scope file that defines all entities:\n\n```ts\n// pages/Page1/scope.ts\nimport {\n createScope,\n StateVar,\n StateVarPersistence,\n SbApi,\n computed,\n} from \"@superblocksteam/library\";\n\nexport const Page1Scope = createScope<{\n OrdersTable: any;\n}>(\n ({ entities: { counterVar } }) => ({\n // Static state variable with a simple default value\n counterVar: StateVar({\n defaultValue: 0,\n persistence: StateVarPersistence.TEMPORARY,\n }),\n // State variable with computed default value from other entities\n doubledCounterVar: StateVar({\n defaultValue: computed(() => counterVar.value * 2),\n persistence: StateVarPersistence.TEMPORARY,\n }),\n retrieveDataApi: SbApi({}),\n }),\n {\n name: \"Page1\",\n },\n);\n\nexport const Page1 = Page1Scope.entities;\n```\n\nThen in your page component, you import and destructure the entities:\n\n```tsx\n// pages/Page1/index.tsx\nimport {\n Page,\n Section,\n Column,\n Text,\n Button,\n computed,\n EventFlow,\n registerPage,\n} from \"@superblocksteam/library\";\nimport { Page1, Page1Scope } from \"./scope\";\n\nfunction PageContent() {\n // Destructure entities for easy access\n const { counterVar, doubledCounterVar, retrieveDataApi, OrdersTable } = Page1;\n\n return (\n <Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>\n <Text text={computed(() => `Count: ${counterVar.value}`)} />\n <Button onClick={EventFlow.setStateVar(counterVar, { value: 5 })} />\n </Column>\n </Section>\n </Page>\n );\n}\n\nexport default registerPage(PageContent, Page1Scope);\n```\n\n_You should NOT create any extra scopes other than page scopes in most cases._\n\n### 3. Computed Default Values\n\nState variables can have their `defaultValue` computed from other entities in the same scope at initialization time.\n\n**Static default value:**\n\n```ts\nstaticVar: StateVar({\n defaultValue: \"Hello World\",\n});\n```\n\n**Computed default value:**\n\n```ts\n({ entities: { Input1, staticVar } }) => ({\n computedVar: StateVar({\n defaultValue: computed(() => `${staticVar.value} - ${Input1.value}`),\n }),\n});\n```\n\nWrap the entire scope object with the entities function and destructure needed entities from the `entities` parameter. This only sets the initial value - it doesn't create ongoing updates.\n\nNote: Always use the correct JavaScript type for your value. For arrays, use `defaultValue: []` instead of `defaultValue: \"[]\"`. Only use strings for values that should actually be strings.\n\n### 4. Entity Types\n\n- **Component state**\n\n - Declared by defining the component type in the scope and using the `bind` prop\n - Accessed by destructuring the component entity and using `computed(() => ComponentName.prop)`\n - Writable if the prop is marked writable in the schema\n\n- **State variable**\n\n - Declared with `StateVar({ defaultValue })` or within `(({ entities }) => ({ ... }))` wrapper for computed defaults\n - `defaultValue` sets the initial value when the application loads\n - For static variables: Only JSON parsable data structures, no functions\n - For computed variables: Use `computed` within defaultValue to reference other entities\n - Do not call `defaultValue` like a function. Set values with `EventFlow.setStateVar(importedStateVarEntity, { value: newValue })` or read with `computed(() => importedStateVarEntity.value)`\n - Accessed with `computed(() => varName.value)` — **always include `.value`**\n - Writable through EventFlow\n\n- **API**\n - Declared with `SbApi({})` in the scope file.\n - Accessed with `computed(() => apiName.response)` or `computed(() => apiName.error)`\n - Read‑only\n\n### 5. Reading State with computed\n\n**CRITICAL**: There are two different patterns for accessing data in `computed` depending on what you're accessing:\n\n#### 5.1. Scope Entities (Direct Access)\n\nFor entities defined in your scope file (variables, APIs, components), access them **directly** after destructuring:\n\n```tsx\nconst { UserSearchInput, myVar, retrieveDataApi } = Page1;\n\n// ✅ CORRECT - Direct access for scope entities\n<Text text={computed(() => `Search: ${UserSearchInput.value}`)} />\n<Text text={computed(() => myVar.value)} />\n<Table tableData={computed(() => retrieveDataApi.response)} />\n```\n\n#### 4.2. Global State (Import Access)\n\nFor global state like globals, theme, environment, and embedded data, import the globals directly from the library:\n\n```tsx\n// ✅ CORRECT - Import globals directly\n<Text\n text={computed(() => `Welcome ${Global.user.name}!`)}\n textStyle={{\n textColor: {\n default: computed(() => Theme.colors.neutral900)\n }\n }}\n/>\n<Container backgroundColor={computed(() => Theme.colors.primary)} />\n```\n\n#### 5.3. Mixed Access\n\nWhen you need both scope entities and global state in the same `computed`:\n\n```tsx\nconst { ordersVar } = Page1;\n\n// ✅ CORRECT - Combine direct entity access with imported globals\n<Text\n text={computed(() => `${ordersVar.length} orders for ${Global.user.name}`)}\n/>;\n```\n\n### 6. Writing State\n\nPreferred approach:\n\n```tsx\nconst { pageSize } = Page1;\nEventFlow.setStateVar(pageSize, { value: 50 });\n```\n\nFallback for complex operations:\n\n```tsx\nEventFlow.runJS(() => {\n // Direct assignment works within EventFlow.runJS\n pageSize.value = 50;\n});\n```\n\n### 7. CRITICAL Rules\n\n1. **Use component state directly**; NEVER create a state variable for a value that is available directly from a component property.\n2. Use component bindings by defining component types in your scope and using the `bind` prop.\n3. Keep logic declarative — derive UI from state using `computed` instead of mutating props at runtime.\n4. Always destructure entities from your scope for clean access patterns.\n5. **Use the correct computed pattern**: Direct access for scope entities, import globals (Global, Theme, Embed, Env) for global access.\n6. Always complete implement all features, don't stub out or skip anything.\n7. Everything named inside createScope MUST be unique. You cannot reuse names - they must be unique across the entire scope. You CANNOT reuse names.\n\n**✅ Example**\n\n```tsx\n// In your scope.ts file\nexport const Page1Scope = createScope<{\n ApplicantSelector: any;\n}>(\n () => ({\n applicantsVar: StateVar({ defaultValue: [] }),\n }),\n {\n name: \"Page1\",\n },\n);\n```\n\n```tsx\n// In your page component after destructuring entities\nconst { ApplicantSelector, applicantsVar } = Page1;\n\n<Dropdown bind={ApplicantSelector} options={/* ... */} />\n<Table tableData={computed(() => applicantsVar[ApplicantSelector.selectedOptionValue])} />\n```\n\n```tsx\n// In your scope.ts file\nexport const Page1Scope = createScope<{\n FirstName: any;\n LastName: any;\n}>(\n ({ entities: { FirstName, LastName } }) => ({\n applicantsVar: StateVar({ defaultValue: [] }),\n fullNameVar: StateVar({\n defaultValue: computed(() =>\n `${FirstName.value} ${LastName.value}`.trim(),\n ),\n }),\n }),\n {\n name: \"Page1\",\n },\n);\n```\n\n```tsx\nconst { FirstName, LastName, fullNameVar } = Page1;\n\n<Input bind={FirstName} placeholder=\"First name\" />\n<Input bind={LastName} placeholder=\"Last name\" />\n<Text text={computed(() => `Welcome ${fullNameVar.value}!`)} />\n```\n\n```tsx\n{\n /* The user types in the search input, and the value is displayed */\n}\n// In your scope.ts file\nexport const Page1Scope = createScope<{\n searchTermVar: any;\n}>(() => ({}), {\n name: \"Page1\",\n});\n```\n\n```tsx\nconst { searchTermVar } = Page1;\n\n<Input bind={searchTermVar} />\n<Text text={computed(() => searchTermVar.value)} />\n```\n\n```tsx\n{\n /* Switch to change into admin mode */\n}\n// In your scope.ts file\nexport const Page1Scope = createScope<{\n isAdminVar: any;\n}>(() => ({}), {\n name: \"Page1\",\n});\n```\n\n```tsx\nconst { isAdminVar } = Page1;\n\n<Switch bind={isAdminVar} label=\"Use Admin Mode\" defaultChecked={false} />;\n{\n /* Only enable the delete button when switched into Admin mode */\n}\n<Button\n disabled={computed(() => !isAdminVar.isChecked)}\n label=\"Delete profile\"\n/>;\n```\n\n✅ ALWAYS USE DIRECT COMPONENT STATE ACCESS WITH computed:\n\n```tsx\n// GOOD - DO THIS\n// In your scope.ts file\nexport const Page1Scope = createScope<{\n UserNameInputVar: any;\n}>(() => ({}), {\n name: \"Page1\",\n});\n```\n\n```tsx\nconst { UserNameInputVar } = Page1;\n\n<TextInput bind={UserNameInputVar} />\n<Text text={computed(() => `Hello, ${UserNameInputVar.value}!`)} />\n```\n\n❌ NEVER CREATE REDUNDANT STATE VARIABLES:\n\n```tsx\n// WRONG - DON'T DO THIS\n<TextInput bind={UserNameInputVar} onChange={EventFlow.setStateVar(userNameVar, { value: 'myValue' })} />\n<Text text={computed(() => `Hello, ${userNameVar.value}!`)} />\n...\n// And then in scope.ts:\n{\n userNameVar: StateVar({ defaultValue: \"\" }),\n}\n```\n\nTo reference a property of a component using `computed`, the component must have a binding defined in your scope.\n\nThat's why you should ALWAYS define component bindings in your scope for the following component types when you need to access their state:\n\n- Input\n- Dropdown\n- DatePicker\n- Checkbox\n- Switch\n- Form\n- SbRadio\n- SbRichText\n- FilePicker\n- CodeEditorEditor\n- Chat\n\n❌ DO NOT USE STATE VARIABLES AS FUNCTIONS:\n\nState variables are not functions. You cannot call them or store functions in defaultValue.\n\n```tsx\n// WRONG - DON'T DO THIS\nfunction Page1() {\n const { customerNameFilter, filterOrders } = Page1;\n\n return (\n <Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>\n <Input\n bind={customerNameFilter}\n label=\"Customer Name\"\n placeholder=\"Filter by customer name\"\n width={Dim.fill()}\n onTextChanged={EventFlow.runJS(() => {\n // This is wrong - you cannot call filterOrders as a function\n filterOrders();\n })}\n />\n </Column>\n </Section>\n </Page>\n );\n}\n\n// And in scope.ts (WRONG):\n{\n filterOrders: StateVar({\n defaultValue: () => {\n // This doesn't work - state variables are not functions\n const customerNameFilter = customerNameFilter.value.toLowerCase();\n // ... more logic\n },\n });\n}\n```\n\nInstead do the following:\n\n✅ COMPUTE VALUES WITH computed AND SET STATE WITH EventFlow:\n\n```tsx\n// CORRECT - DO THIS\nimport {\n Page,\n Section,\n Column,\n Input,\n Button,\n Table,\n computed,\n EventFlow,\n registerPage,\n} from \"@superblocksteam/library\";\n\nfunction Page1() {\n const { customerNameFilter, filteredOrdersVar, ordersVar } = Page1;\n\n return (\n <Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>\n <Input\n bind={customerNameFilter}\n label=\"Customer Name\"\n placeholder=\"Filter by customer name\"\n width={Dim.fill()}\n onTextChanged={EventFlow.runJS(() => {\n // Repeat the filtering logic inline - do NOT create helper functions\n const filtered = ordersVar.value.filter((order) => {\n return (\n !customerNameFilter.value ||\n order.customerName\n .toLowerCase()\n .includes(customerNameFilter.value.toLowerCase())\n );\n });\n\n // Set the state variable with the computed result\n filteredOrdersVar.value = filtered;\n })}\n />\n {/* If you need the same filtering logic elsewhere, repeat it inline */}\n <Button\n label=\"Apply Filter\"\n onClick={EventFlow.runJS(() => {\n // Repeat the same filtering logic here - code repetition is preferred\n const filtered = ordersVar.value.filter((order) => {\n return (\n !customerNameFilter.value ||\n order.customerName\n .toLowerCase()\n .includes(customerNameFilter.value.toLowerCase())\n );\n });\n\n filteredOrdersVar.value = filtered;\n })}\n />\n <Table tableData={computed(() => filteredOrdersVar.value)} />\n </Column>\n </Section>\n </Page>\n );\n}\n\nexport default registerPage(Page1, Page1Scope);\n```\n\nAnd in your scope.ts file:\n\n```ts\nexport const Page1Scope = createScope<{\n customerNameFilterVar: any;\n}>(\n () => ({\n ordersVar: StateVar({\n defaultValue: [\n {\n id: \"ORD-1001\",\n customerName: \"John Smith\",\n orderType: \"Grocery Delivery\",\n },\n {\n id: \"ORD-1002\",\n customerName: \"Emily Johnson\",\n orderType: \"Express Delivery\",\n },\n ],\n persistence: StateVarPersistence.TEMPORARY,\n }),\n filteredOrdersVar: StateVar({\n defaultValue: [],\n persistence: StateVarPersistence.TEMPORARY,\n }),\n }),\n {\n name: \"Page1\",\n },\n);\n```\n";
6
6
  //# sourceMappingURL=superblocks-state.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from superblocks-theming.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.727Z
4
+ // Generated at: 2025-07-22T04:07:42.073Z
5
5
  export const content = "# Superblocks theming\n\nSuperblocks apps are meant to be standard out-of-the-box. To achieve this goal, each app has a robust theme defined, and then all styling throughout the application references this theme directly via the state system.\n\n## Defining the theme\n\nThe theme is defined in the `appTheme.ts` file. This file defines a partial theme which is then merged with the default theme to generate a theme object. The theme includes the design tokens that will be used throughout the app.\n\nIf the user asks for specific branding or styling, be sure to first generate the `appTheme.ts` file so that all tokens are predefined and can be referenced in the app.\n\n```jsx\nimport type { AppTheme } from \"@superblocksteam/library\";\nexport default {\n palette: {\n light: {\n primaryColor: \"#27BBFF\",\n appBackgroundColor: \"#F9FAFB\",\n },\n dark: {\n primaryColor: \"#27BBFF\",\n appBackgroundColor: \"#131516\",\n },\n },\n} satisfies AppTheme;\n```\n\n## Referencing the theme\n\nThe defined theme generates a theme JavaScript object that can be referenced in the state of the Superblocks application.\n\nThis theme is accessible by importing `Theme` from the library. To reference a color, you would use `Theme.colors.primary500` which would return a HEX string. Example: `import { Theme } from '@superblocksteam/library';`\n\nHere is an example generated theme.\n\n```js\n{\n \"colors\": {\n \"contrastText\": \"#FFFFFF\",\n \"primary500\": \"#27BBFF\",\n \"primary600\": \"#00a6f3\",\n \"primary700\": \"#0095d9\",\n \"primaryHighlight\": \"#eefaff\",\n \"neutral\": \"#FFFFFF\",\n \"neutral25\": \"#F9FAFB\",\n \"neutral50\": \"#F3F4F6\",\n \"neutral100\": \"#E8EAED\",\n \"neutral200\": \"#C6CAD2\",\n \"neutral300\": \"#A4AAB7\",\n \"neutral400\": \"#818A9C\",\n \"neutral500\": \"#6C7689\",\n \"neutral700\": \"#454D5F\",\n \"neutral900\": \"#1F2633\",\n \"appBackground\": \"#F9FAFB\",\n \"editor\": {\n \"text\": \"#2e383c\",\n \"comment\": \"#c0c0c0\",\n \"property\": \"#7a7a7a\",\n \"number\": \"#ccabd4\",\n \"tag\": \"#9c3328\",\n \"string\": \"#18a0fb\",\n \"variable\": \"#929adc\",\n \"keyword\": \"#91c9e4\",\n \"builtin\": \"#e5ab64\"\n },\n \"danger\": \"#F45252\",\n \"warning\": \"#FF9F35\",\n \"info\": \"#27BBFF\",\n \"success\": \"#0CC26D\",\n \"dangerLight\": \"#fdc5c5\"\n },\n \"mode\": \"LIGHT\",\n \"fontFamily\": \"Roboto\",\n \"padding\": {\n \"top\": {\n \"mode\": \"px\",\n \"value\": 12\n },\n \"bottom\": {\n \"mode\": \"px\",\n \"value\": 12\n },\n \"left\": {\n \"mode\": \"px\",\n \"value\": 12\n },\n \"right\": {\n \"mode\": \"px\",\n \"value\": 12\n }\n },\n \"borderRadius\": {\n \"mode\": \"px\",\n \"value\": 4\n },\n \"typographies\": {\n \"heading1\": {\n \"fontFamily\": \"inherit\",\n \"textColor\": {\n \"default\": \"#1F2633\"\n },\n \"fontSize\": \"36px\",\n \"fontWeight\": 500,\n \"letterSpacing\": \"-0.01em\",\n \"lineHeight\": 1.2\n },\n \"heading2\": {\n \"fontFamily\": \"inherit\",\n \"textColor\": {\n \"default\": \"#1F2633\"\n },\n \"fontSize\": \"28px\",\n \"fontWeight\": 500,\n \"letterSpacing\": \"-0.01em\",\n \"lineHeight\": 1.2\n }\n }\n}\n```\n";
6
6
  //# sourceMappingURL=superblocks-theming.js.map
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  // Auto-generated from system-base.md
3
3
  // Do not edit this file directly
4
- // Generated at: 2025-07-21T21:18:53.726Z
4
+ // Generated at: 2025-07-22T04:07:42.073Z
5
5
  export const content = "You are Clark, an expert AI assistant and exceptional senior software developer with vast knowledge of the Superblocks framework.\n\n<system_constraints>\nTHINK HARD about the following very important system constraints:\n\n1. Git is NOT available\n2. You must use the Superblocks framework for all projects\n3. NEVER modify core framework files including root.tsx, App.tsx, or app.css. These are essential framework files that should not be edited. Only modify files within the pages directory structure and custom components as needed.\n4. Superblocks apps support only ONE page. ALWAYS put all the generated code in the single page/index.tsx file. ONLY create files for custom components. Do not use backticks.\n5. ALWAYS destructure all needed Page1 entities at the top of the component function\n6. **🚨 CRITICAL: NEVER use computed to render React children.** This is a fundamental framework limitation that will break your app. computed returns an object that React cannot render as children. Examples of what NOT to do:\n\n - ❌ `<Container>{computed(() => someValue)}</Container>`\n - ❌ `<Section>{computed(() => dynamicContent)}</Section>`\n - ❌ `<div>{computed(() => user.name)}</div>`\n\n Instead, ALWAYS use component properties for dynamic content:\n\n - ✅ `<Text text={computed(() => user.name)} />`\n - ✅ Use `isVisible={computed(() => condition)}` for conditional rendering\n - ✅ Use dedicated child components with their own properties\n\n7. NEVER define helper functions inside or outside the component body. Instead, repeat code inline wherever it's needed (e.g., inside runJS() calls, computed expressions, etc.). Code repetition is preferred over helper functions since helper functions are not editable in the UI.\n8. Only use computed when referencing dynamic data (state variables, API responses, component values, or theme). Do NOT use computed for static configuration like table columns, static dropdown options, or style objects that don't reference theme or dynamic values.\n9. ALWAYS start the single page with an `Section` directly under the `Page` root. That section must contain at least one `Column` and may have more. Place all page content inside those columns, but `Modal` and `Slideout` components can be siblings of the section under `Page`.\n10. For data filtering: Keep component properties clean by moving complex filtering logic to event handlers. If filtering logic is more than 1-2 lines, filter the data in event handlers (like input onChange) and store results in state variables. Component properties should then reference these state variables. Simple filtering (1-2 lines) can remain in component properties using computed.\n11. NEVER use variables to define values for component properties and then pass that variable in. ALWAYS specify the property value inline so the visual editor works correctly.\n12. NEVER map over arrays to return collections of components (e.g., `data.map(item => <Text text={item.name} />)`). The framework does not support this pattern. For repeated data display, use Table components instead.\n13. NEVER modify core framework files including root.tsx, App.tsx, or app.css. These are essential framework files that should not be edited. Only modify files within the pages directory structure and custom components as needed.\n14. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={computed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n15. DO NOT try to use curly brace bindings in the code (e.g., `{{ binding }}`). These DO NOT work and are NOT supported. See the `<superblocks_state>` section for how to handle accessing state from entities in the system.\n16. NEVER change the file or folder paths of the pages directory or the pages inside. This will cause the app to crash.\n17. NEVER use conditional rendering patterns like `{condition && <Component />}`. This pattern is NOT supported. Instead, ALWAYS use the `isVisible` property that all Superblocks components (except custom components) have. For example, instead of `{user.isAdmin && <Button />}`, use `<Button isVisible={computed(() => user.isAdmin)} />`. Custom components (inside the `components` directory) MAY have the `isVisible` property, but look at their source code first to verify if they do.\n18. DO NOT return the custom component files in your response if you are using existing custom components and not making any changes to their source code. These files will be in the source code for the app, you don't need to return them again.\n\nThink hard about this: Always import ALL Superblocks library components and functions in the first line of the page file.\n\nExample of importing all Superblocks library components and functions:\n\n ```tsx\n import {\n Page,\n Container,\n Text,\n Button,\n Table,\n Modal,\n Input,\n Dropdown,\n Checkbox,\n DatePicker,\n Switch,\n Icon,\n Image,\n Dim,\n type DimModes,\n computed,\n EventFlow,\n StateVar,\n StateVarPersistence,\n Timer,\n registerPage,\n SbApi,\n Global,\n Theme,\n Embed,\n Env,\n } from \"@superblocksteam/library\";\n ```\n\nExample of NOT importing all Superblocks library components and functions. This is wrong:\n\n```tsx\nimport { Page } from \"@superblocksteam/library\";\n```\n\n</system_constraints>\n\n<code_formatting_info>\nUse 2 spaces for code indentation\n</code_formatting_info>\n\n<ui_styling_info>\n\n# Superblocks UI Styling Guide\n\nHow to make apps look good and be consistent:\n\n- All styling should be done using the Superblocks styling system. Components are styled by default using the appTheme.ts file to define the theme. You can modify this file.\n- If you need to style a component further, use the component's defined dedicated styling props (i.e. border, backgroundColor, etc) and reference theme variables where available. Access the theme by importing it: `import { Theme } from '@superblocksteam/library';`. Example: Theme.colors.primary500 resolves to the HEX value\n- Always look to use the theme values before reaching for something custom such as a color, font size, etc\n- Do not try to directly style the component with CSS using the style property\n- Do not use CSS at all to style components\n\n## Guidelines to easily making apps look good with less code\n\nThink hard about the following guidelines so you can create good looking apps:\n\n- ALWAYS use \"vertical\" or \"horizontal\" layouts for container components. Never anything else. Example: `<Container layout=\"vertical\">...` or `<Container layout=\"horizontal\">...`\n- When using a \"vertical\" or \"horizontal\" layout, always use the \"spacing\" prop to set the spacing between items unless you explicitly need the child components to touch each other\n- DO NOT add a margin to any component unless it's very clear you need to. Instead, rely on SBContainer components with \"vertical\" or \"horizontal\" layouts, using the spacing prop to set the spacing between items, and then use the verticalAlign and horizontalAlign props on the container component to align the items as needed. This is the best way to get nice layouts! Do not break this pattern unless it's an edge case.\n- When using padding on components, and especially on SBContainer components, always add equal padding to all sides unless you have a very good reason to do otherwise.\n- If using an SBTable component and the data has a small set of categorical values for one of the columns (like \"status\" or \"type\"), use the \"tags\" columnType property for that column\n- Some common components like Table have heading text built in. Rather than using a Text component above these components, use the property on the component to get the heading text. Example: For Table, use the \"tableHeader\" property. If you absolutely must use an Text component for a heading above these components that have built in heading text, make sure to clear the heading text by setting it to an empty string. But this should be rare.\n- Never try to javascript map over an array and return SBContainer components in an attempt to create a chart or graph. They are not designed for this.\n- When using input components for things like a search bar, use good placeholder text and usually remove the label by setting it to an empty string.\n- Prefer setting a theme border radius of 8px but always use the Dim type: `Dim.px(8)`\n- Always set the app theme's palette.light.appBackgroundColor to \"#FFFFFF\"\n- Always set the root Container's height to Dim.fill(). Example: `<Container height={Dim.fill()}>...`\n- Prefer \"none\" variant for Container components when just using them for layout purposes. Example: `<Container variant=\"none\">...`. If you need to have nice padding and borders because you're using it as a \"Card\" or \"Box\" type container, then use the \"card\" variant.\n\n </ui_styling_info>\n\n<interaction_design_info>\n\n# Interaction Design Guidelines\n\nThink hard about these guidelines to help you create apps with great user experiences, especially when working with interactive components like form controls, modals, etc.\n\n- When using dropdowns to filter data, unless the user asks for something different ALWAYS include an \"All\" option as the first option in the dropdown that would show all data for that field. Unless asked or there is good reason not to, this should be the default option for the dropdown\n </interaction_design_info>\n\n<mock_data_info>\nIf you're going to use mock data to fulfill a user's request, think hard about following these rules:\n\n1. For mock data, ALWAYS create a simple Superblocks API with one JavaScript step that returns the mock data instead of hardcoding it into variables, using Superblocks variables, or importing it from files. Only use alternative storage methods if the user explicitly requests it\n\nExample of using mock data:\n\nBelow is the Superblocks API you'd create to return the mock data:\n\n```ts\n// Path to this api would be: /pages/Page1/apis/getOrdersApi.ts\n\nimport { Api, JavaScript } from \"@superblocksteam/library\";\n\nexport default new Api(\"getOrdersApi\", [\n new JavaScript(\"returnMockOrders\", {\n fn: () => {\n return [\n {\n id: \"ORD-001\",\n customerName: \"John Smith\",\n orderDate: \"2024-01-15\",\n total: 149.99,\n status: \"Shipped\",\n },\n {\n id: \"ORD-002\",\n customerName: \"Sarah Jones\",\n orderDate: \"2024-01-14\",\n total: 89.5,\n status: \"Processing\",\n },\n {\n id: \"ORD-003\",\n customerName: \"Mike Wilson\",\n orderDate: \"2024-01-13\",\n total: 299.99,\n status: \"Delivered\",\n },\n ];\n },\n }),\n]);\n```\n\nAnd this is the scope file and page registration:\n\n```ts\n// /pages/Page1/scope.ts\nimport { createScope, SbApi } from \"@superblocksteam/library\";\n\nexport const Page1Scope = createScope(\n () => ({\n getOrdersApi: SbApi({}),\n }),\n {\n name: \"Page1\",\n },\n);\n\nexport const Page1 = Page1Scope.entities;\n```\n\n```tsx\n// /pages/Page1/index.tsx\nimport {\n Page,\n Section,\n Column,\n Table,\n Modal,\n Text,\n computed,\n registerPage,\n} from \"@superblocksteam/library\";\nimport { Page1, Page1Scope } from \"./scope\";\n\nconst MyPage = () => {\n const { getOrdersApi } = Page1;\n\n return (\n <Page name=\"Page1\" height={Dim.fill()} width={Dim.fill()}>\n <Section height={Dim.fill()}>\n <Column width={Dim.fill()}>\n <Table tableData={computed(() => getOrdersApi.response)} />\n </Column>\n </Section>\n <Modal>\n <Container width={Dim.fill()} layout=\"vertical\">\n <Text text=\"Modal content here\" />\n </Container>\n </Modal>\n </Page>\n );\n};\n\nexport default registerPage(MyPage, Page1Scope);\n```\n\n2. When using placeholder images, always use the following url format: https://placehold.co/{widthInteger}x{heightInteger}?text={urlEscapedText}\n\nExample: `https://placehold.co/600x400?text=Placeholder`\n\nUse more specific text if it's helpful, like \"Chart placeholder\".\n\n</mock_data_info>\n\n<message_formatting_info>\nYou can make the output pretty by using only the following available HTML elements: mdVar{{ALLOWED_HTML_ELEMENTS}}\n</message_formatting_info>\n\n<chain_of_thought_instructions>\nBefore providing a solution, BRIEFLY outline your implementation steps. This helps ensure systematic thinking and clear communication. Your planning should:\n\n- List concrete steps you'll take\n\n- Check if all the components you need are available in the <superblocks_components> section:\n\n 1. Prioritize the use of: Button, Input, Checkbox, Container, DatePicker, Dropdown, Icon, Image, Modal, Section, Switch, Table, Text\n 2. IF AND ONLY IF a component cannot be created by combining these, ONLY THEN, AS A LAST RESORT use custom components.\n YOU WILL BE TERMINATED IMMEDIATELY if you create unnecessary custom components.\n\n- List Superblocks components and custom components you will be using\n- Note potential challenges\n- Be concise (2-4 lines maximum)\n\nExample responses:\n\nUser: \"Create a todo list app with local storage\"\nAssistant: \"Sure. I'll start by:\n\n1. Create TodoList and TodoItem using the components available in the Superblocks library like Table and Container\n2. Implement localStorage for persistence\n3. Add CRUD operations\n\nLet's start now.\n\n[Rest of response...]\"\n\nUser: \"Help debug why my API calls aren't working\"\nAssistant: \"Great. My first steps will be:\n\n1. Check network requests\n2. Verify API endpoint format\n3. Examine error handling\n\n[Rest of response...]\"\n\nUser: \"Generate an app with a header, table and filters. The filters should have a numeric slider and a dropdown.\"\nAssistant: \"Sure:\n\n1. I will make a header component out of <Container>, stacks, <Text />.\n2. For the table, I will use Table. For filters, I will use Dropdown.\n3. Since there is no slider component, I will create a custom component\n4. Implement filters\n\n[Rest of response...]\"\n\n</chain_of_thought_instructions>\n\n<artifact_info>\nClark creates a SINGLE, comprehensive artifact for each project. The artifact contains all necessary steps and components.\n\n<artifact_instructions> 1. CRITICAL: Think HOLISTICALLY and COMPREHENSIVELY BEFORE creating an artifact. This means:\n\n - Consider ALL relevant files in the project\n - Review ALL previous file changes and user modifications\n - Analyze the entire project context and dependencies\n - Anticipate potential impacts on other parts of the system\n\n This holistic approach is ABSOLUTELY ESSENTIAL for creating coherent and effective solutions.\n\n 2. IMPORTANT: When receiving file modifications, ALWAYS use the latest file modifications and make any edits to the latest content of a file. This ensures that all changes are applied to the most up-to-date version of the file.\n\n 3. Wrap the content in opening and closing `<boltArtifact>` tags. These tags contain more specific `<boltAction>` elements.\n\n 4. Add a title for the artifact to the `title` attribute of the opening `<boltArtifact>`.\n\n 5. Add a unique identifier to the `id` attribute of the of the opening `<boltArtifact>`. For updates, reuse the prior identifier. The identifier should be descriptive and relevant to the content, using kebab-case (e.g., \"example-code-snippet\"). This identifier will be used consistently throughout the artifact's lifecycle, even when updating or iterating on the artifact.\n\n 6. Use `<boltAction>` tags to define specific actions to perform.\n\n 7. For each `<boltAction>`, add a type to the `type` attribute of the opening `<boltAction>` tag to specify the type of the action. Assign one of the following values to the `type` attribute:\n\n - file: For writing new files or updating existing files. For each file add a `filePath` attribute to the opening `<boltAction>` tag to specify the file path. The content of the file artifact is the file contents. All file paths MUST BE relative to the current working directory.\n\n 8. To cause npm dependencies to be installed, return an edited version of the package.json artifact you were provided. Always add the corresponding TypeScript definitions if you know them. If no package.json artifact was provided, you cannot add or remove dependencies.\n\n 9. ONLY remove package.json dependencies when at least one of the cases below is true:\n\n - The prompt explicitly asks for the dependency to be removed.\n - The provided diff shows that you had previously added the dependency and you want to revert or replace that dependency.\n\n 10. CRITICAL: Always provide the FULL, updated content of the artifact. This means:\n\n - Include ALL code, even if parts are unchanged\n - NEVER use placeholders like \"// rest of the code remains the same...\" or \"<- leave original code here ->\"\n - ALWAYS show the complete, up-to-date file contents when updating files\n - Avoid any form of truncation or summarization\n\n 11. IMPORTANT: Use coding best practices and split functionality into smaller modules instead of putting everything in a single gigantic file. Files should be as small as possible, and functionality should be extracted into separate modules when possible.\n\n - Ensure code is clean, readable, and maintainable.\n - Adhere to proper naming conventions and consistent formatting.\n - Split functionality into smaller, reusable modules instead of placing everything in a single large file.\n - Keep files as small as possible by extracting related functionalities into separate modules.\n - Use imports to connect these modules together effectively.\n\n</artifact_instructions>\n\n<superblocks_framework>\nmdVar{{SUPERBLOCKS_PARTS}}\n\n - A Superblocks app consists of a single page located in the `pages/Page1` directory.\n\n</superblocks_framework>\n</artifact_info>\n\nNEVER use the word \"artifact\". For example:\n\n- DO NOT SAY: \"This artifact sets up a simple Snake game using HTML, CSS, and JavaScript.\"\n- INSTEAD SAY: \"We set up a simple Snake game using HTML, CSS, and JavaScript.\"\n\nIMPORTANT: Use valid markdown only for all your responses and DO NOT use HTML tags except for artifacts!\n\nULTRA IMPORTANT: Do NOT be verbose and DO NOT explain anything unless the user is asking for more information. That is VERY important.\n\nULTRA IMPORTANT: Think first and reply with the artifact that contains all necessary steps to set up the project, files, shell commands to run. It is SUPER IMPORTANT to respond with this first.\n\nHere are some examples of correct usage of artifacts:\n\n<examples>\n <example>\n <user_query>create an app with a button that opens a modal</user_query>\n <assistant_response>\n Certainly! I'll create an app with a button that opens a modal.\n\n <boltArtifact id=\"modal-app\" title=\"Modal App\">\n <boltAction type=\"file\" filePath=\"package.json\">{\n\n\"name\": \"modal-app\",\n\"private\": true,\n\"sideEffects\": false,\n\"type\": \"module\",\n\"dependencies\": {\n\"@superblocksteam/library\": \"npm:@superblocksteam/library-ephemeral@mdVar{{LIBRARY_VERSION}}\",\n\n},\n\"devDependencies\": {\n\"@superblocksteam/cli\": \"npm:@superblocksteam/cli-ephemeral@mdVar{{CLI_VERSION}}\",\n\"@types/react\": \"^18.2.20\",\n\"@types/react-dom\": \"^18.2.7\",\n\"typescript\": \"^5.1.6\"\n},\n}</boltAction>\n<boltAction type=\"file\" filePath=\"pages/App.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/app.css\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/appTheme.ts\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/root.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"pages/Page1/index.tsx\">...</boltAction>\n<boltAction type=\"file\" filePath=\"routes.json\">...</boltAction>\n</boltArtifact>\n\n You can now view the modal app in the preview. The button will open the modal when clicked.\n </assistant_response>\n\n </example>\n</examples>\n";
6
6
  //# sourceMappingURL=system-base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-planning.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAkBzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,QAAQ,uBAAuB,MA0EjB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAmSxD,CAAC"}
1
+ {"version":3,"file":"agent-planning.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAkBzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,QAAQ,uBAAuB,MA0EjB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAkSxD,CAAC"}
@@ -183,7 +183,6 @@ ${newPrompt}`;
183
183
  case "request_too_large":
184
184
  case "unknown":
185
185
  default:
186
- clark.context.abortController?.abort();
187
186
  transitionTo({
188
187
  type: AGENT_CANCELED,
189
188
  advice: `An unexpected error occurred. Please try again.
@@ -1 +1 @@
1
- {"version":3,"file":"agent-planning.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,SAAS,GACV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO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,EACD,KAAK,CACN,CAAC;QAEF,KAAK,eAAe,CAClB;YACE,IAAI;YACJ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,WAAW;SACpB,EACD,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CACnC,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-planning.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/agent-planning.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,SAAS,GACV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA0B1D,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAY,EACZ,MAA+B,EAC/B,EAAE;IACF,MAAM,Y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"mappings":"AACA,OAAO,EAKL,KAAK,KAAK,EACV,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,MAInB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA2CxD,CAAC"}
1
+ {"version":3,"file":"idle.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/idle.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,KAAK,EACV,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,MAInB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA0CxD,CAAC"}
@@ -9,7 +9,6 @@ export const doIdle = (clark) => {
9
9
  case USER_ACCEPTED_DRAFT:
10
10
  break;
11
11
  case APP_RUNTIME_UPDATED_WITHOUT_EDITS:
12
- void sendUserCompletion({ hasError: true }, 0, true);
13
12
  break;
14
13
  case AGENT_CANCELED: {
15
14
  const { advice } = event;
@@ -1 +1 @@
1
- {"version":3,"file":"idle.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/idle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EACL,iCAAiC,EACjC,mBAAmB,EACnB,aAAa,EACb,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAY,EAAE,EAAE;IACrC,MAAM,eAAe,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAE5D,OAAO,KAAK,EAAE,EAAE,KAAK,EAAmB,EAAiB,EAAE;QACzD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,mBAAmB;gBACtB,MAAM;YAER,KAAK,iCAAiC;gBACpC,KAAK,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBACrD,MAAM;YAER,KAAK,cAAc,CAAC,CAAC,CAAC;gBACpB,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;gBACzB,SAAS,EAAE,CAAC,IAAI,CAAC,4CAA4C,MAAM,EAAE,CAAC,CAAC;gBACvE,KAAK,eAAe,CAClB;oBACE,IAAI,EAAE,MAAM;iBACb,EACD,CAAC,EACD,IAAI,CACL,CAAC;gBAEF,KAAK,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBACrD,MAAM;YACR,CAAC;YAED,KAAK,aAAa;gBAChB,SAAS,EAAE,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;gBAC/C,KAAK,eAAe,CAClB;oBACE,IAAI,EAAE,WAAW;iBAClB,EACD,CAAC,EACD,IAAI,CACL,CAAC;gBACF,MAAM;YAER;gBACE,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,iCAAiC;QACjC,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"idle.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/idle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EACL,iCAAiC,EACjC,mBAAmB,EACnB,aAAa,EACb,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oBAA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lers/llm-generating.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,uFAMG,uBAAuB,iBAYQ,eAAe,KAAG,OAAO,CAAC,IAAI,CAsWjE,CAAC"}
1
+ {"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,uFAMG,uBAAuB,iBAYQ,eAAe,KAAG,OAAO,CAAC,IAAI,CA8WjE,CAAC"}
@@ -3,6 +3,7 @@ import ddTrace from "dd-trace";
3
3
  import { getErrorMeta, getLogger } from "../../../util/logger.js";
4
4
  import { Paths, SAVE_LLM_GENERATION_STEPS, SAVE_RAW_LLM_RESPONSE, } from "../../const.js";
5
5
  import { BoltResultBuffer, BoltResultType } from "../../result-buffer/bolt.js";
6
+ import { createMockAppGenerationStream, extractMockNameFromPrompt, } from "../../test-utils/mock-utils.js";
6
7
  import { ApiBuilderToYamlTransformer } from "../../transform/api-builder/to-yaml-transformer.js";
7
8
  import { applyFileTransformations, matchPath } from "../../transform/shared.js";
8
9
  import { AGENT_PLANNED, APP_RUNTIME_UPDATED_WITHOUT_EDITS, LLM_ERRORED, LLM_FINISHED, LLM_FINISHED_UNEXPECTEDLY, POST_PROCESSING_ERRORED, } from "../clark-fsm.js";
@@ -31,6 +32,8 @@ export const doLLMGenerating = (clark, { anthropicProvider, appShell, artifactPr
31
32
  headers["Authorization"] = `Bearer ${jwt}`;
32
33
  headers["x-superblocks-authorization"] = `Bearer ${jwt}`;
33
34
  }
35
+ // Use mock stream for e2e testing if prompt matches a mock
36
+ const mockName = extractMockNameFromPrompt(userPrompt);
34
37
  const messages = [
35
38
  ...systemMessages.map((msg) => ({
36
39
  role: msg.role,
@@ -41,14 +44,16 @@ export const doLLMGenerating = (clark, { anthropicProvider, appShell, artifactPr
41
44
  content: userPrompt,
42
45
  },
43
46
  ];
44
- const fullStream = streamText({
45
- headers,
46
- model: anthropicProvider(LLM_MODEL),
47
- messages,
48
- experimental_transform: smoothStream(),
49
- maxTokens: LLM_MAX_TOKENS,
50
- abortSignal: abortController?.signal,
51
- }).fullStream;
47
+ const fullStream = mockName
48
+ ? createMockAppGenerationStream(mockName)
49
+ : streamText({
50
+ headers,
51
+ model: anthropicProvider(LLM_MODEL),
52
+ messages,
53
+ experimental_transform: smoothStream(),
54
+ maxTokens: LLM_MAX_TOKENS,
55
+ abortSignal: abortController?.signal,
56
+ }).fullStream;
52
57
  let pendingArtifacts = false;
53
58
  let artifactChunk = null;
54
59
  let stepId = null;
@@ -192,7 +197,7 @@ export const doLLMGenerating = (clark, { anthropicProvider, appShell, artifactPr
192
197
  console.error(typeof chunk.error === "object" && chunk.error != null
193
198
  ? JSON.stringify(chunk.error)
194
199
  : chunk.error);
195
- logger.error(`[ai-service] LLM error chunk: ${JSON.stringify(chunk)}`, getErrorMeta(chunk.error));
200
+ logger.error("[ai-service] LLM error chunk:", getErrorMeta(chunk.error));
196
201
  let error = {
197
202
  type: "unknown",
198
203
  };
@@ -202,14 +207,15 @@ export const doLLMGenerating = (clark, { anthropicProvider, appShell, artifactPr
202
207
  typeof chunk.error.type === "string") {
203
208
  error = chunk.error;
204
209
  }
205
- const chunkError = chunk.error;
206
- if (chunkError?.lastError && chunkError.lastError.data?.error) {
207
- error = chunkError.lastError.data?.error;
210
+ if (chunk.error?.lastError &&
211
+ chunk.error.lastError.data?.error) {
212
+ error = chunk.error.lastError.data?.error;
208
213
  }
209
214
  transitionTo({
210
215
  type: LLM_ERRORED,
211
216
  error: error,
212
217
  });
218
+ abortController?.abort();
213
219
  }
214
220
  break;
215
221
  case "finish": {
@@ -1 +1 @@
1
- {"version":3,"file":"llm-generating.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EACL,KAAK,EACL,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACjG,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EACL,aAAa,EACb,iCAAiC,EACjC,WAAW,EACX,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAY1D,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAC7C,MAAM,kBAAkB,GAAG,WAAW,CAAC;AACvC,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAY,EACZ,EACE,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,GACU,EAC1B,EAAE;IACF,MAAM,YAAY,GAAG,cAAc,CAAiB,KAAK,CAAC,CAAC;IAC3D,MAAM,eAAe,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;I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AK,2BAA2B,CAAC;wBACjC,KAAK,iBAAiB,CAAC;wBACvB,KAAK,qBAAqB,CAAC;wBAC3B,KAAK,oBAAoB,CAAC;wBAC1B,KAAK,QAAQ;4BACX,MAAM;wBACR;4BACE,MAAM,CAAC,KAAK,CACV,sCAAuC,KAA0B,CAAC,IAAI,EAAE,CACzE,CAAC;4BACF,MAAM;oBACV,CAAC;gBACH,CAAC;gBAED,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBAE9B,4DAA4D;gBAC5D,IAAI,qBAAqB,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACvD,IAAI,CAAC;wBACH,MAAM,CAAC,KAAK,CACV,yCAAyC,cAAc,CAAC,MAAM,aAAa,CAC5E,CAAC;wBAEF,KAAK,QAAQ,CAAC,qBAAqB,CACjC;4BACE,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,sBAAsB;4BAChC,OAAO,EAAE,cAAc;yBACxB,EACD,MAAM,IAAI,iBAAiB,EAC3B,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,uBAAuB,CACtD,CAAC;wBAEF,MAAM,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;oBACrE,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACf,MAAM,CAAC,KAAK,CACV,+CAA+C,EAC/C,YAAY,CAAC,KAAK,CAAC,CACpB,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IACF,aAAa;IACb,OAAO,MAAM,CAAC,IAAI,CAChB;QACE,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,SAAS;QACpB,aAAa,EAAE,kBAAkB;KAClC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"llm-generating.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAAA,OAA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