@superblocksteam/vite-plugin-file-sync 2.0.12-next.2 → 2.0.12-next.21
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/dist/ai-service/const.d.ts +1 -0
- package/dist/ai-service/const.d.ts.map +1 -1
- package/dist/ai-service/const.js +5 -0
- package/dist/ai-service/const.js.map +1 -1
- package/dist/ai-service/evals/fixtures/doordash-prompt-integrations.d.ts +43 -0
- package/dist/ai-service/evals/fixtures/doordash-prompt-integrations.d.ts.map +1 -0
- package/dist/ai-service/evals/fixtures/doordash-prompt-integrations.js +2172 -0
- package/dist/ai-service/evals/fixtures/doordash-prompt-integrations.js.map +1 -0
- package/dist/ai-service/evals/fixtures/j-and-j-prompt-integrations.d.ts +43 -0
- package/dist/ai-service/evals/fixtures/j-and-j-prompt-integrations.d.ts.map +1 -0
- package/dist/ai-service/evals/fixtures/j-and-j-prompt-integrations.js +2172 -0
- package/dist/ai-service/evals/fixtures/j-and-j-prompt-integrations.js.map +1 -0
- package/dist/ai-service/evals/fixtures/linkedin-prompt-integrations.d.ts +43 -0
- package/dist/ai-service/evals/fixtures/linkedin-prompt-integrations.d.ts.map +1 -0
- package/dist/ai-service/evals/fixtures/linkedin-prompt-integrations.js +2172 -0
- package/dist/ai-service/evals/fixtures/linkedin-prompt-integrations.js.map +1 -0
- package/dist/ai-service/evals/fixtures/pfizer-prompt-integrations.d.ts +36 -0
- package/dist/ai-service/evals/fixtures/pfizer-prompt-integrations.d.ts.map +1 -0
- package/dist/ai-service/evals/fixtures/pfizer-prompt-integrations.js +2166 -0
- package/dist/ai-service/evals/fixtures/pfizer-prompt-integrations.js.map +1 -0
- package/dist/ai-service/evals/helpers/eval-scoring.d.ts +48 -0
- package/dist/ai-service/evals/helpers/eval-scoring.d.ts.map +1 -0
- package/dist/ai-service/evals/helpers/eval-scoring.js +247 -0
- package/dist/ai-service/evals/helpers/eval-scoring.js.map +1 -0
- package/dist/ai-service/evals/helpers/index.d.ts +25 -0
- package/dist/ai-service/evals/helpers/index.d.ts.map +1 -0
- package/dist/ai-service/evals/helpers/index.js +204 -0
- package/dist/ai-service/evals/helpers/index.js.map +1 -0
- package/dist/ai-service/evals/lib/modal-config.d.ts +8 -0
- package/dist/ai-service/evals/lib/modal-config.d.ts.map +1 -0
- package/dist/ai-service/evals/lib/modal-config.js +23 -0
- package/dist/ai-service/evals/lib/modal-config.js.map +1 -0
- package/dist/ai-service/evals/load-env-vars.d.ts +2 -0
- package/dist/ai-service/evals/load-env-vars.d.ts.map +1 -0
- package/dist/ai-service/evals/load-env-vars.js +11 -0
- package/dist/ai-service/evals/load-env-vars.js.map +1 -0
- package/dist/ai-service/integration-validator.d.ts +1 -1
- package/dist/ai-service/integration-validator.d.ts.map +1 -1
- package/dist/ai-service/integration-validator.js +6 -3
- package/dist/ai-service/integration-validator.js.map +1 -1
- package/dist/ai-service/integrations/store.d.ts +2 -0
- package/dist/ai-service/integrations/store.d.ts.map +1 -1
- package/dist/ai-service/integrations/store.js +30 -2
- package/dist/ai-service/integrations/store.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ButtonPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/CheckboxPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ColumnPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ContainerPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DatePickerPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DropdownPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/IconPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ImagePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/InputPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ModalPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/PagePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SectionPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SlideoutPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SwitchPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TablePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TextPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Dim.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/EventFlow.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/TextStyleWithVariant.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.d.ts +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js +2 -2
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-components-rules.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-custom-components.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-data-filtering.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-event-flow.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-forms.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-layouts.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-page.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-rbac.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-routes.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-theming.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.js +17 -9
- package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/runtime-reviewing.js +2 -2
- package/dist/parsing/entity/to-value-entity.d.ts.map +1 -1
- package/dist/parsing/entity/to-value-entity.js +3 -4
- package/dist/parsing/entity/to-value-entity.js.map +1 -1
- package/dist/parsing/events/index.d.ts.map +1 -1
- package/dist/parsing/events/index.js +1 -1
- package/dist/parsing/events/index.js.map +1 -1
- package/dist/parsing/events/to-code-events.d.ts.map +1 -1
- package/dist/parsing/events/to-code-events.js +36 -22
- package/dist/parsing/events/to-code-events.js.map +1 -1
- package/dist/parsing/events/to-value-events.d.ts +1 -1
- package/dist/parsing/events/to-value-events.d.ts.map +1 -1
- package/dist/parsing/events/to-value-events.js +111 -66
- package/dist/parsing/events/to-value-events.js.map +1 -1
- package/dist/refactor/entities.d.ts.map +1 -1
- package/dist/refactor/entities.js +4 -0
- package/dist/refactor/entities.js.map +1 -1
- package/dist/sb-scope-manager.d.ts.map +1 -1
- package/dist/sb-scope-manager.js +9 -0
- package/dist/sb-scope-manager.js.map +1 -1
- package/package.json +7 -6
package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js
CHANGED
|
@@ -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-
|
|
4
|
+
// Generated at: 2025-07-14T16:29:31.579Z
|
|
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.\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":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAKV,KAAK,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,sHAQG,uBAAuB,iBAYQ,eAAe,KAAG,OAAO,CAAC,IAAI,CAgXjE,CAAC"}
|
|
@@ -14,6 +14,7 @@ import { checkRateLimitHeaders } from "../helpers/rate-limiting.js";
|
|
|
14
14
|
import { transitionFrom } from "../helpers/transition.js";
|
|
15
15
|
const LLM_MODEL = "claude-4-sonnet-20250514";
|
|
16
16
|
const LLM_MODEL_PROVIDER = "anthropic";
|
|
17
|
+
const LLM_MAX_TOKENS = 32000;
|
|
17
18
|
export const doLLMGenerating = (clark, { anthropicProvider, appShell, artifactProcessor, templateRenderer, applicationId, organizationId, draftInterface, }) => {
|
|
18
19
|
const transitionTo = transitionFrom(clark);
|
|
19
20
|
const sendUserMessage = sendUserMessageChannel(clark);
|
|
@@ -34,20 +35,24 @@ export const doLLMGenerating = (clark, { anthropicProvider, appShell, artifactPr
|
|
|
34
35
|
}
|
|
35
36
|
// Use mock stream for e2e testing if prompt matches a mock
|
|
36
37
|
const mockName = extractMockNameFromPrompt(userPrompt);
|
|
38
|
+
const messages = [
|
|
39
|
+
...systemMessages.map((msg) => ({
|
|
40
|
+
role: msg.role,
|
|
41
|
+
content: msg.content,
|
|
42
|
+
})),
|
|
43
|
+
{
|
|
44
|
+
role: "user",
|
|
45
|
+
content: userPrompt,
|
|
46
|
+
},
|
|
47
|
+
];
|
|
37
48
|
const fullStream = mockName
|
|
38
49
|
? createMockAppGenerationStream(mockName)
|
|
39
50
|
: streamText({
|
|
40
51
|
headers,
|
|
41
52
|
model: anthropicProvider(LLM_MODEL),
|
|
42
|
-
messages
|
|
43
|
-
...systemMessages,
|
|
44
|
-
{
|
|
45
|
-
role: "user",
|
|
46
|
-
content: userPrompt,
|
|
47
|
-
},
|
|
48
|
-
],
|
|
53
|
+
messages,
|
|
49
54
|
experimental_transform: smoothStream(),
|
|
50
|
-
maxTokens:
|
|
55
|
+
maxTokens: LLM_MAX_TOKENS,
|
|
51
56
|
abortSignal: abortController?.signal,
|
|
52
57
|
}).fullStream;
|
|
53
58
|
let pendingArtifacts = false;
|
|
@@ -232,9 +237,12 @@ export const doLLMGenerating = (clark, { anthropicProvider, appShell, artifactPr
|
|
|
232
237
|
}
|
|
233
238
|
: undefined;
|
|
234
239
|
llmobs.annotate({
|
|
235
|
-
inputData:
|
|
240
|
+
inputData: messages,
|
|
236
241
|
outputData: { content: rawLLMResponse, role: "assistant" },
|
|
237
242
|
metrics,
|
|
243
|
+
metadata: {
|
|
244
|
+
max_tokens: LLM_MAX_TOKENS,
|
|
245
|
+
},
|
|
238
246
|
});
|
|
239
247
|
if (chunk.finishReason !== "stop") {
|
|
240
248
|
const rateLimitErrorMsg = checkRateLimitHeaders("response" in chunk ? chunk.response?.headers : undefined);
|
|
@@ -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,EACL,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,+BAA+B,EAAE,MAAM,yDAAyD,CAAC;AAC1G,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;
|
|
1
|
+
{"version":3,"file":"llm-generating.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine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I,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,5 +1,5 @@
|
|
|
1
1
|
import { Paths } from "../../const.js";
|
|
2
|
-
import {
|
|
2
|
+
import { getIntegrationErrorsInFiles } from "../../integration-validator.js";
|
|
3
3
|
import { matchMultiplePaths, matchPath } from "../../transform/shared.js";
|
|
4
4
|
import { APP_RUNTIME_UPDATED_WITHOUT_EDITS, POST_PROCESSING_FINISHED, RUNTIME_REVIEW_ERRORED, RUNTIME_REVIEW_FINISHED, USER_REJECTED_DRAFT, } from "../clark-fsm.js";
|
|
5
5
|
import { sendChangeInfoHelper } from "../helpers/change-info.js";
|
|
@@ -60,7 +60,7 @@ export const doRuntimeReviewing = (clark, params) => {
|
|
|
60
60
|
const availableIntegrations = clark.context.availableIntegrations ?? [];
|
|
61
61
|
const apiMatcher = matchPath(Paths.GeneratedApis);
|
|
62
62
|
const apiFiles = files.filter((file) => apiMatcher(file.filePath).matched);
|
|
63
|
-
const integrationErrorsByPath =
|
|
63
|
+
const integrationErrorsByPath = getIntegrationErrorsInFiles(apiFiles, availableIntegrations);
|
|
64
64
|
if (tsErrorsByPath || lintErrorsByPath || integrationErrorsByPath) {
|
|
65
65
|
transitionTo({
|
|
66
66
|
type: RUNTIME_REVIEW_ERRORED,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-value-entity.d.ts","sourceRoot":"","sources":["../../../src/parsing/entity/to-value-entity.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAIlB,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"to-value-entity.d.ts","sourceRoot":"","sources":["../../../src/parsing/entity/to-value-entity.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAIlB,MAAM,uCAAuC,CAAC;AA+F/C,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,EAClC,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,GACtD,iBAAiB,GAAG,IAAI,CA6D1B"}
|
|
@@ -36,8 +36,7 @@ const parseTimerProperties = (argsPath) => {
|
|
|
36
36
|
? nodeToValue(startOnPageLoad.get("value").node)
|
|
37
37
|
: false),
|
|
38
38
|
onFire: Property.Event(onFire && onFire.get("value").isCallExpression()
|
|
39
|
-
? (toValueEventFlow(onFire.get("value")) ??
|
|
40
|
-
[])
|
|
39
|
+
? (toValueEventFlow(onFire.get("value").node) ?? [])
|
|
41
40
|
: []),
|
|
42
41
|
id: id ? nodeToValue(id.get("value").node) : undefined,
|
|
43
42
|
};
|
|
@@ -55,10 +54,10 @@ const parseSbApiProperties = (argsPath) => {
|
|
|
55
54
|
return {
|
|
56
55
|
id: idProperty,
|
|
57
56
|
onSuccess: Property.Event(onSuccess && onSuccess.get("value").isCallExpression()
|
|
58
|
-
? (toValueEventFlow(onSuccess.get("value"), [], idProperty) ?? [])
|
|
57
|
+
? (toValueEventFlow(onSuccess.get("value").node, [], idProperty) ?? [])
|
|
59
58
|
: []),
|
|
60
59
|
onError: Property.Event(onError && onError.get("value").isCallExpression()
|
|
61
|
-
? (toValueEventFlow(onError.get("value"), [], idProperty) ?? [])
|
|
60
|
+
? (toValueEventFlow(onError.get("value").node, [], idProperty) ?? [])
|
|
62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gBACtB,IAAI,EAAE,YAAY,CAAC,GAAG;gBACtB,EAAE;gBACF,IAAI,EAAE,GAAG;gBACT,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC7B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC/C,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;aAC5C,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parsing/events/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parsing/events/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,cAAc,CAIzD,CAAC"}
|
|
@@ -2,6 +2,6 @@ import { toCodeEventFlow } from "./to-code-events.js";
|
|
|
2
2
|
import { toValueEventFlow } from "./to-value-events.js";
|
|
3
3
|
export const parser = {
|
|
4
4
|
toCode: (value) => toCodeEventFlow(value),
|
|
5
|
-
toValue: (source) => toValueEventFlow(source),
|
|
5
|
+
toValue: (source) => toValueEventFlow(source.node),
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parsing/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMxD,MAAM,CAAC,MAAM,MAAM,GAA2C;IAC5D,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;IACzC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parsing/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMxD,MAAM,CAAC,MAAM,MAAM,GAA2C;IAC5D,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;IACzC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAClB,gBAAgB,CAAE,MAAmC,CAAC,IAAI,CAAC;CAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-code-events.d.ts","sourceRoot":"","sources":["../../../src/parsing/events/to-code-events.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"to-code-events.d.ts","sourceRoot":"","sources":["../../../src/parsing/events/to-code-events.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,uCAAuC,CAAC;AAwC/C,wBAAgB,eAAe,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,CAsI/D"}
|
|
@@ -3,6 +3,14 @@ import { isValidStepDef, TriggerStepType, } from "@superblocksteam/library-share
|
|
|
3
3
|
import { ApplicationScope, containsBindingsAnywhere, } from "@superblocksteam/shared";
|
|
4
4
|
import { getLogger } from "../../util/logger.js";
|
|
5
5
|
import { parser as computedParser } from "../computed/index.js";
|
|
6
|
+
function createObjectString(obj) {
|
|
7
|
+
const entries = Object.entries(obj)
|
|
8
|
+
.filter(([, value]) => value !== undefined)
|
|
9
|
+
.map(([key, value]) => {
|
|
10
|
+
return `${key}: ${value}`;
|
|
11
|
+
});
|
|
12
|
+
return entries.length > 0 ? `{ ${entries.join(", ")} }` : "";
|
|
13
|
+
}
|
|
6
14
|
const getDynamicValue = (value) => {
|
|
7
15
|
if (value === undefined) {
|
|
8
16
|
return "undefined";
|
|
@@ -50,16 +58,19 @@ export function toCodeEventFlow(stepDefs_) {
|
|
|
50
58
|
}
|
|
51
59
|
case TriggerStepType.RUN_APIS: {
|
|
52
60
|
const apiNames = stepDef.apis?.map((api) => api.name) ?? [];
|
|
53
|
-
let onSuccessCode
|
|
54
|
-
let onErrorCode
|
|
61
|
+
let onSuccessCode;
|
|
62
|
+
let onErrorCode;
|
|
55
63
|
if (stepDef.onSuccess?.length > 0) {
|
|
56
|
-
onSuccessCode =
|
|
64
|
+
onSuccessCode = `${toCodeEventFlow(stepDef.onSuccess)}`;
|
|
57
65
|
}
|
|
58
66
|
if (stepDef.onError?.length > 0) {
|
|
59
|
-
|
|
60
|
-
onErrorCode = `${emptySuccessCode}, ${toCodeEventFlow(stepDef.onError)}`;
|
|
67
|
+
onErrorCode = `${toCodeEventFlow(stepDef.onError)}`;
|
|
61
68
|
}
|
|
62
|
-
|
|
69
|
+
const optsObjString = createObjectString({
|
|
70
|
+
onSuccess: onSuccessCode ?? undefined,
|
|
71
|
+
onError: onErrorCode ?? undefined,
|
|
72
|
+
});
|
|
73
|
+
code = `${code}.runApis([${apiNames.map((apiName) => `${apiName}`).join(", ")}]${optsObjString ? `, ${optsObjString}` : ""})`;
|
|
63
74
|
break;
|
|
64
75
|
}
|
|
65
76
|
case TriggerStepType.CANCEL_APIS: {
|
|
@@ -69,15 +80,17 @@ export function toCodeEventFlow(stepDefs_) {
|
|
|
69
80
|
}
|
|
70
81
|
case TriggerStepType.NAVIGATE_TO: {
|
|
71
82
|
const url = stepDef.url;
|
|
83
|
+
const newWindow = stepDef.newWindow;
|
|
84
|
+
const replaceHistory = stepDef.replaceHistory;
|
|
85
|
+
const optsString = createObjectString({
|
|
86
|
+
newWindow,
|
|
87
|
+
replaceHistory,
|
|
88
|
+
});
|
|
72
89
|
if (containsBindingsAnywhere(url)) {
|
|
73
|
-
code = `${code}.navigateTo({
|
|
74
|
-
url: SB\`${url}\`,
|
|
75
|
-
})`;
|
|
90
|
+
code = `${code}.navigateTo(sbComputed(() => \`${url}\`)${optsString ? `, ${optsString}` : ""})`;
|
|
76
91
|
}
|
|
77
92
|
else {
|
|
78
|
-
code = `${code}.navigateTo({
|
|
79
|
-
url: "${stepDef.url}",
|
|
80
|
-
})`;
|
|
93
|
+
code = `${code}.navigateTo("${stepDef.url}"${optsString ? `, ${optsString}` : ""})`;
|
|
81
94
|
}
|
|
82
95
|
break;
|
|
83
96
|
}
|
|
@@ -87,7 +100,8 @@ export function toCodeEventFlow(stepDefs_) {
|
|
|
87
100
|
: "undefined";
|
|
88
101
|
const value = stepDef.value;
|
|
89
102
|
const valueToCode = getDynamicValue(value);
|
|
90
|
-
|
|
103
|
+
console.log("valueToCode", typeof valueToCode, valueToCode);
|
|
104
|
+
code = `${code}.setStateVar(${variableName}, { value: ${valueToCode} })`;
|
|
91
105
|
break;
|
|
92
106
|
}
|
|
93
107
|
case TriggerStepType.RESET_STATE_VAR: {
|
|
@@ -98,21 +112,21 @@ export function toCodeEventFlow(stepDefs_) {
|
|
|
98
112
|
break;
|
|
99
113
|
}
|
|
100
114
|
case TriggerStepType.CONTROL_SLIDEOUT: {
|
|
101
|
-
code = `${code}.controlSlideout(${stepDef.name}, "${stepDef.action ?? "open"}")`;
|
|
115
|
+
code = `${code}.controlSlideout(${stepDef.name}, { action: "${stepDef.action ?? "open"}" })`;
|
|
102
116
|
break;
|
|
103
117
|
}
|
|
104
118
|
case TriggerStepType.CONTROL_MODAL: {
|
|
105
|
-
code = `${code}.controlModal(${stepDef.name}, "${stepDef.action ?? "open"}")`;
|
|
119
|
+
code = `${code}.controlModal(${stepDef.name}, { action: "${stepDef.action ?? "open"}" })`;
|
|
106
120
|
break;
|
|
107
121
|
}
|
|
108
122
|
case TriggerStepType.SHOW_ALERT: {
|
|
109
123
|
const message = stepDef.message ?? "";
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
code = `${code}.showAlert(${getDynamicValue(message)}
|
|
124
|
+
const optsString = createObjectString({
|
|
125
|
+
type: `"${stepDef.style ?? "success"}"`,
|
|
126
|
+
durationMs: stepDef.alertDuration ?? 4,
|
|
127
|
+
position: stepDef.alertPosition,
|
|
128
|
+
});
|
|
129
|
+
code = `${code}.showAlert(${getDynamicValue(message)}${optsString ? `, ${optsString}` : ""})`;
|
|
116
130
|
break;
|
|
117
131
|
}
|
|
118
132
|
case TriggerStepType.SET_COMPONENT_PROPERTY: {
|
|
@@ -128,7 +142,7 @@ export function toCodeEventFlow(stepDefs_) {
|
|
|
128
142
|
const timerName = stepDef.state?.name !== undefined
|
|
129
143
|
? `${stepDef.state?.scope === ApplicationScope.APP ? "App." : ""}${stepDef.state.name}`
|
|
130
144
|
: "undefined";
|
|
131
|
-
code = `${code}.controlTimer(${timerName}, "${stepDef.action ?? "start"}")`;
|
|
145
|
+
code = `${code}.controlTimer(${timerName}, { action: "${stepDef.action ?? "start"}" })`;
|
|
132
146
|
break;
|
|
133
147
|
}
|
|
134
148
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-code-events.js","sourceRoot":"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,CAAC,CAAC,CAAC;gBAC5C,IAAI,GAAG,GAAG,IAAI,yBAAyB,OAAO,CAAC,MAAM,EAAE,IAAI,kBAAkB,OAAO,CAAC,YAAY,aAAa,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC;gBAC1J,MAAM;YACR,CAAC;YACD,KAAK,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;gBACrC,qJAAqJ;gBACrJ,IAAI,GAAG,GAAG,IAAI,mBAAmB,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,OAAO,CAAC,YAAY,KAAK,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB,OAAO,CAAC,YAAY,KAAK,GAAG,CAAC;gBACjM,MAAM;YACR,CAAC;YACD,KAAK,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC;gBACnC,MAAM,SAAS,GACb,OAAO,CAAC,KAAK,EAAE,IAAI,KAAK,SAAS;oBAC/B,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,KAAK,KAAK,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE;oBACvF,CAAC,CAAC,WAAW,CAAC;gBAClB,IAAI,GAAG,GAAG,IAAI,iBAAiB,SAAS,gBAAgB,OAAO,CAAC,MAAM,IAAI,OAAO,MAAM,CAAC;gBAExF,MAAM;YACR,CAAC;YAED;gBACE,SAAS,EAAE,CAAC,IAAI,CACd,mDAAmD,OAAO,CAAC,IAAI,EAAE,CAClE,CAAC;QACN,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -6,5 +6,5 @@ export declare function getDynamicValue(nodePathOrNode: t.Node | NodePath<t.Node
|
|
|
6
6
|
value: string | undefined;
|
|
7
7
|
__info: true;
|
|
8
8
|
} | import("@superblocksteam/library-shared/types").ComputedPropertyInfo<string | undefined>;
|
|
9
|
-
export declare function toValueEventFlow(
|
|
9
|
+
export declare function toValueEventFlow(node: t.CallExpression, existingSteps?: ValidStepDef[], parentId?: string): ValidStepDef[];
|
|
10
10
|
//# sourceMappingURL=to-value-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-value-events.d.ts","sourceRoot":"","sources":["../../../src/parsing/events/to-value-events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"to-value-events.d.ts","sourceRoot":"","sources":["../../../src/parsing/events/to-value-events.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,YAAY,EAKlB,MAAM,uCAAuC,CAAC;AAQ/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AA2BlC,wBAAgB,eAAe,CAAC,cAAc,EAAE,CAAC,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;;;;6FAwBxE;AAuDD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,CAAC,CAAC,cAAc,EACtB,aAAa,GAAE,YAAY,EAAO,EAClC,QAAQ,CAAC,EAAE,MAAM,GAChB,YAAY,EAAE,CA0bhB"}
|