@superblocksteam/vite-plugin-file-sync 2.0.8-next.0 → 2.0.8-next.1
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/app-interface/linter.js +1 -1
- package/dist/ai-service/app-interface/linter.js.map +1 -1
- package/dist/ai-service/prompts/draft-subprompts/superblocks-api-draft.d.ts +1 -1
- package/dist/ai-service/prompts/draft-subprompts/superblocks-api-draft.d.ts.map +1 -1
- package/dist/ai-service/prompts/draft-subprompts/superblocks-api-draft.js +16 -16
- package/dist/ai-service/prompts/draft-subprompts/superblocks-layouts-with-grid-examples.d.ts +1 -1
- package/dist/ai-service/prompts/draft-subprompts/superblocks-layouts-with-grid-examples.d.ts.map +1 -1
- package/dist/ai-service/prompts/draft-subprompts/superblocks-layouts-with-grid-examples.js +49 -49
- package/dist/ai-service/prompts/generated/library-components/ButtonPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/ButtonPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ButtonPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/ButtonPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/CheckboxPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/CheckboxPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/CheckboxPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/CheckboxPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ColumnPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/ColumnPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ColumnPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/ColumnPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ContainerPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/ContainerPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ContainerPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/ContainerPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/DatePickerPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/DatePickerPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/DatePickerPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/DatePickerPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/DropdownPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/DropdownPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/DropdownPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/DropdownPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/IconPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/IconPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/IconPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/IconPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ImagePropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/ImagePropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ImagePropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/ImagePropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/InputPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/InputPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/InputPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/InputPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ModalPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/ModalPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/ModalPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/ModalPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/PagePropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/PagePropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/PagePropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/PagePropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/SectionPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/SectionPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/SectionPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/SectionPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/SlideoutPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/SlideoutPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/SlideoutPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/SlideoutPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/SwitchPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/SwitchPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/SwitchPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/SwitchPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/TablePropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/TablePropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/TablePropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/TablePropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/TextPropsDocs.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-components/TextPropsDocs.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/TextPropsDocs.js +6 -0
- package/dist/ai-service/prompts/generated/library-components/TextPropsDocs.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-components/index.d.ts +16 -16
- package/dist/ai-service/prompts/generated/library-components/index.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/library-components/index.js +16 -16
- package/dist/ai-service/prompts/generated/library-components/index.js.map +1 -1
- package/dist/ai-service/prompts/generated/library-typedefs/Dim.js +1 -1
- package/dist/ai-service/prompts/generated/library-typedefs/EventFlow.d.ts +2 -0
- package/dist/ai-service/prompts/generated/library-typedefs/EventFlow.d.ts.map +1 -0
- package/dist/ai-service/prompts/generated/library-typedefs/EventFlow.js +6 -0
- package/dist/ai-service/prompts/generated/library-typedefs/EventFlow.js.map +1 -0
- package/dist/ai-service/prompts/generated/library-typedefs/TextStyleWithVariant.js +1 -1
- package/dist/ai-service/prompts/generated/library-typedefs/index.d.ts +1 -1
- package/dist/ai-service/prompts/generated/library-typedefs/index.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/library-typedefs/index.js +1 -1
- package/dist/ai-service/prompts/generated/library-typedefs/index.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/full-examples.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/full-examples.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/full-examples.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/full-examples.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-api.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-api.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-api.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-api.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-components-rules.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-custom-components.js +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-data-filtering.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-event-flow.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-forms.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-layouts.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-page.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-page.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-page.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-page.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-rbac.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-routes.js +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-state.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-state.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-state.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/superblocks-state.js.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/superblocks-theming.js +1 -1
- package/dist/ai-service/prompts/generated/subprompts/system.d.ts +1 -1
- package/dist/ai-service/prompts/generated/subprompts/system.d.ts.map +1 -1
- package/dist/ai-service/prompts/generated/subprompts/system.js +2 -2
- package/dist/ai-service/prompts/generated/subprompts/system.js.map +1 -1
- package/dist/ai-service/prompts/markdown-loader.d.ts +1 -1
- package/dist/ai-service/prompts/markdown-loader.js +1 -1
- package/dist/ai-service/prompts/system.js +1 -1
- package/dist/ai-service/prompts/system.js.map +1 -1
- package/dist/ai-service/test-utils/app-generation-mocks/orders-app.d.ts +1 -1
- package/dist/ai-service/test-utils/app-generation-mocks/orders-app.js +98 -98
- package/dist/ai-service/test-utils/app-generation-mocks/smoketest.d.ts +1 -1
- package/dist/ai-service/test-utils/app-generation-mocks/smoketest.js +22 -22
- package/dist/file-system-manager.js +12 -12
- package/dist/file-system-manager.js.map +1 -1
- package/dist/parsing/computed/to-code-computed.js +1 -1
- package/dist/parsing/computed/to-code-computed.js.map +1 -1
- package/dist/parsing/events/to-code-events.js +3 -3
- package/dist/parsing/events/to-code-events.js.map +1 -1
- package/dist/parsing/events/to-value-events.js +4 -4
- package/dist/parsing/events/to-value-events.js.map +1 -1
- package/dist/parsing/ids.js +6 -6
- package/dist/parsing/ids.js.map +1 -1
- package/dist/parsing/imports.js +4 -4
- package/dist/parsing/imports.js.map +1 -1
- package/dist/parsing/jsx-utils.d.ts +3 -3
- package/dist/parsing/jsx-utils.d.ts.map +1 -1
- package/dist/parsing/jsx-utils.js +6 -6
- package/dist/parsing/jsx-utils.js.map +1 -1
- package/dist/parsing/jsx.d.ts +1 -0
- package/dist/parsing/jsx.d.ts.map +1 -1
- package/dist/parsing/jsx.js +24 -19
- package/dist/parsing/jsx.js.map +1 -1
- package/dist/parsing/page.d.ts.map +1 -1
- package/dist/parsing/page.js +13 -3
- package/dist/parsing/page.js.map +1 -1
- package/dist/parsing/properties.js +3 -3
- package/dist/parsing/properties.js.map +1 -1
- package/dist/parsing/scope.d.ts +2 -2
- package/dist/parsing/scope.js +8 -8
- package/dist/parsing/scope.js.map +1 -1
- package/dist/parsing/util.d.ts +2 -2
- package/dist/parsing/util.d.ts.map +1 -1
- package/dist/parsing/util.js +10 -7
- package/dist/parsing/util.js.map +1 -1
- package/dist/refactor/entities.js +1 -1
- package/dist/refactor/entities.js.map +1 -1
- package/dist/rename-manager.js +1 -1
- package/dist/rename-manager.js.map +1 -1
- package/dist/source-tracker.js +8 -8
- package/dist/source-tracker.js.map +1 -1
- package/package.json +5 -5
- package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbButtonPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbCheckboxPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbColumnPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbContainerPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbDatePickerPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbDropdownPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbIconPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbImagePropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbInputPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbModalPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbPagePropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbSectionPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbSlideoutPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbSwitchPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbTablePropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.js +0 -6
- package/dist/ai-service/prompts/generated/library-components/SbTextPropsDocs.js.map +0 -1
- package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.d.ts +0 -2
- package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.d.ts.map +0 -1
- package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.js +0 -6
- package/dist/ai-service/prompts/generated/library-typedefs/SbEventFlow.js.map +0 -1
|
@@ -12,7 +12,7 @@ const options = (cwd) => ({
|
|
|
12
12
|
// NOTE: we are only applying this single rule for now
|
|
13
13
|
// add more rules as they are validated
|
|
14
14
|
ruleFilter: ({ ruleId }) => {
|
|
15
|
-
if (ruleId === "superblocks/no-
|
|
15
|
+
if (ruleId === "superblocks/no-computed-jsx-child") {
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.js","sourceRoot":"","sources":["../../../src/ai-service/app-interface/linter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,OAAO,GAAG,CAAC,GAAW,EAAkB,EAAE,CAAC,CAAC;IAChD,GAAG;IACH,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,cAAc,CAAC;IAC7D,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,cAAc,EAAE,CAAC,iBAAiB,CAAC;IACnC,WAAW,EAAE,KAAK;IAClB,uBAAuB,EAAE,KAAK;IAC9B,sDAAsD;IACtD,uCAAuC;IACvC,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QACzB,IAAI,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"linter.js","sourceRoot":"","sources":["../../../src/ai-service/app-interface/linter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,OAAO,GAAG,CAAC,GAAW,EAAkB,EAAE,CAAC,CAAC;IAChD,GAAG;IACH,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,cAAc,CAAC;IAC7D,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,cAAc,EAAE,CAAC,iBAAiB,CAAC;IACnC,WAAW,EAAE,KAAK;IAClB,uBAAuB,EAAE,KAAK;IAC9B,sDAAsD;IACtD,uCAAuC;IACvC,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QACzB,IAAI,MAAM,KAAK,mCAAmC,EAAE,CAAC;YACnD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,OAAO,MAAM;IACA,MAAM,CAAS;IACf,GAAG,CAAS;IAE7B,YAAY,GAAW;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,SAAS,CAAC,KAAe;QACvB,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,IAAI,CACR,KAAe,EACf,WAAyB;QAEzB,IAAI,WAAW,EAAE,OAAO,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QACD,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAEhC,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;YAC/B,OAAO,IAAI,OAAO,CAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC1D,IAAI,WAAW,EAAE,OAAO,EAAE,CAAC;oBACzB,MAAM,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;oBAC3C,OAAO;gBACT,CAAC;gBAED,MAAM,YAAY,GAAG,GAAG,EAAE;oBACxB,MAAM,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;gBAC7C,CAAC,CAAC;gBAEF,WAAW,EAAE,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;gBAErD,IAAI,CAAC,MAAM;qBACR,SAAS,CAAC,KAAK,CAAC;qBAChB,IAAI,CAAC,OAAO,CAAC;qBACb,KAAK,CAAC,MAAM,CAAC;qBACb,OAAO,CAAC,GAAG,EAAE;oBACZ,WAAW,EAAE,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;gBAC1D,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,aAAa,EAAE,CAAC;QAEtC,IAAI,WAAW,EAAE,OAAO,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAElC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAC3B,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;YACd,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC9D,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ;iBAC3B,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;iBACjC,GAAG,CACF,CAAC,CAAC,EAAE,EAAE,CACJ,GAAG,YAAY,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,CACvE,CAAC;YAEJ,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACtB,GAAG,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC;YAC7B,CAAC;YAED,OAAO,GAAG,CAAC;QACb,CAAC,EACD,EAA8B,CAC/B,CAAC;QAEF,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAC9B,SAAS,EAAE,CAAC,KAAK,CACf,6BAA6B,GAAG,GAAG,KAAK,UAAU,KAAK,CAAC,MAAM,QAAQ,CACvE,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const superblocksApiPrompt = "\n#### Example of creating and then registering a Superblocks API:\n\nCreating the API by adding the myApi.ts file:\n\n```ts\n// Path to this api: /pages/Page1/apis/myApi.ts\n\nimport {\n Conditional,\n Condition,\n PostgreSQL,\n JavaScript,\n Api,\n} from \"@superblocksteam/library\";\n\nexport default new Api(\"myApi\", [\n new Conditional(\"my_conditional\", {\n if: Condition(true, [\n new PostgreSQL(\"retrieve_orders\", \"integration_goes_here\", {\n statement: \"SELECT * FROM orders\",\n }),\n ]),\n else: [\n new JavaScript(\"fallthrough\", () => \"we did not execute the sql query\"),\n ],\n }),\n]);\n```\n\nThen registering the myApi API inside the registerPage call, and executing it when an SbButton is clicked:\n\n```tsx\n// /pages/Page1/index.tsx\n\nimport { SbPage, SbApi, SbTable } from \"@superblocksteam/library\";\nimport { registerPage, showAlert } from \"@superblocksteam/library\";\n\nimport MyExampleAPI from \"./apis/example\";\n\nconst Page1 = () => (\n <SbPage>\n <SbButton\n // APIs can be invoked with the SBEventFlow API.\n onClick={SbEventFlow.runApis([\"myApi\"])}\n />\n <SbTable\n // APIs are part of the state object just like components\n tableData={(state) => state.myApi.response}\n />\n </SbPage>\n);\n\nexport default registerPage(\n Page1,\n {\n name: \"MyPage\",\n // You register APIs just like you would SbVariables\n myApi: SbApi(MyExampleAPI),\n },\n);\n```\n\n#### The Superblocks API TypeScript Type\n\nBelow is the full TypeScript spec for the APIs you create:\n\n```ts\n// @superblocksteam/types\n\nexport type JsonValue = undefined | null | number | string | boolean | JsonValue[] | object;\n\nclass Block {\n constructor(name: string) {}\n public run(): { output: JsonValue } { /* ... */ }\n}\n\ntype State = Record<string, JsonValue>\n\nclass JavaScript extends Block {\n constructor(name: string, config: { fn: ({ /* ... */ }) => JsonValue }) { /* ... */ }\n}\n\ntype Integration = string\ntype Integrations = Record<Integration, JsonValue>;\n\nclass PostgreSQL extends Block {\n static integrations: Integrations = {\n \"eacaad74-192a-4a55-bbfd-3bdd3a6dfd53\": {\n \"schema\": {\n \"tables\": [\n {\n \"type\": \"TABLE\",\n \"name\": \"orders\",\n \"columns\": [\n {\n \"name\": \"id\",\n \"type\": \"int4\",\n },\n {\n \"name\": \"user_id\",\n \"type\": \"int8\",\n },\n {\n \"name\": \"product\",\n \"type\": \"varchar\",\n },\n {\n \"name\": \"date_purchased\",\n \"type\": \"date\",\n },\n {\n \"name\": \"user_email\",\n \"type\": \"varchar\",\n },\n {\n \"name\": \"price\",\n \"type\": \"float8\",\n },\n ],\n \"schema\": \"public\",\n }\n ],\n }\n }\n }\n\n /**\n * @param {string} name The name of the block.\n * @param {string} integration The name of the integration.\n * @param {object} config The config object.\n * @returns {void}\n */\n constructor(name: string, integration: Integration, config: {\n statement: string\n }) { super(name) }\n}\n\nclass RestApi extends Block {\n constructor(\n name: string,\n config: {\n method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"OPTIONS\" | \"HEAD\" | \"TRACE\" | \"CONNECT\";\n url: string | (({ /* ... */ }) => string);\n },\n ) { super(name) }\n}\n\nclass Email extends Block {\n constructor(name: string, config: {\n from: string\n to: string\n subject: string\n cc?: string[]\n bcc?: string[]\n body?: string | JsonValue | (({ /* ... */ }) => string | JsonValue)\n }) { super(name) }\n}\n\nexport type Condition = {\n when: boolean | ((state: State) => boolean);\n then: Block[];\n};\n\nexport type Conditions = {\n if: Condition;\n elif?: Condition[];\n else?: Block[];\n};\n\nclass Conditional extends Block {\n constructor(name: string, config: Conditions) { super(name) }\n}\n\nclass TryCatch extends Block {\n constructor(name: string, config: { try: Block[]; catch: Block[]; finally?: Block[] }) { super(name) }\n}\n\n/**\n * A Superblocks variable has the following access pattern:\n *\n * How to retrieve the value of a variable:\n * ```ts\n * CORRECT\n * my_variable.value\n *\n * // INCORRECT\n * my_variable\n * ```\n *\n * How to set the value of a variable:\n * ```ts\n * CORRECT\n * my_variable.set(value)\n *\n * // INCORRECT\n * my_variable = value\n * ```\n */\nclass Variables extends Block {\n constructor(name: string, variables: {\n // The key is the name of the variable.\n // The value is the value of the variable.\n [key: string]: JsonValue | (({ /* ... */ }) => JsonValue)\n }) { super(name) }\n}\n\nclass Loop extends Block {\n constructor(\n name: string,\n // You can either loop over a certain number or times, over an array, or forever until the condition is false.\n over: number | (({ /* ... */ }) => number) | JsonValue[] | (({ /* ... */ }) => JsonValue[]) | boolean | (({ /* ... */ }) => boolean),\n variables: {\n // What the variable name for the current item is.\n item: string,\n // What the variable name for the current index is.\n index: number,\n },\n blocks: Block[]\n ) { super(name) }\n}\n\nclass Parallel extends Block {\n constructor(\n name: string,\n over: JsonValue[] | (({ /* ... */ }) => JsonValue[]),\n variables: {\n // What the variable name for the current item is.\n item: string,\n },\n blocks: Block[],\n ) { super(name) }\n}\n\nclass Api {\n constructor(name: string, steps: Block[]) {}\n public get response(): JsonValue { /* ... */ }\n public get error(): string | undefined { /* ... */ }\n public run(): void { /* ... */ }\n public cancel(): void { /* ... */ }\n}\n```\n\n#### Example Usage\n\nBelow are examples of how you create Superblocks APIs, along with annotations to describe different pieces of functinality and expectations.\n\n##### Example 1: Simple API with conditional\n\n```ts\n// Path to this api would be: /pages/Page1/apis/getOrders.ts\n\nimport {\n Conditional,\n Condition,\n PostgreSQL,\n JavaScript,\n Api,\n} from \"@superblocksteam/library\";\n\nexport default new Api(\n \"getOrders\",\n [\n new Conditional(\"my_conditional\", {\n if: {\n when: true,\n then: [\n new PostgreSQL(\"retrieve_orders\", \"integration_goes_here\", {\n statement: 'SELECT * FROM orders'\n })\n ]\n },\n else: [\n new JavaScript(\"fallthrough\", { fn: () => \"we did not execute the sql query\" })\n ]\n })\n ]\n)\n```\n\nTo run register and run the API we defined above:\n\n```tsx\n// /pages/Page1/index.tsx\n\nimport { SbPage, SbApi, SbTable, SbButton } from \"@superblocksteam/library\";\nimport { registerPage, showAlert } from \"@superblocksteam/library\";\n\nimport getOrders from \"./apis/getOrders\";\n\nconst Page1 = () => (\n <SbPage>\n <SbButton\n // APIs can be invoked with the SBEventFlow API.\n onClick={SbEventFlow.runApis([\"getOrders\"])}\n />\n // ...\n <SbTable>\n // APIs are part of the state object just like components. tableData=\n {(state) => state.getOrders.response}\n </SbTable>\n </SbPage>\n);\n\nexport default registerPage(\n Page1,\n {\n name: \"MyPage\",\n // You register APIs just like you would SbVariables.\n getOrders: SbApi(getOrders),\n },\n);\n```\n\n##### Example 2: API where steps reference outputs of previous steps\n\nThink hard about how you access the output of previous steps. You MUST use the output property of the previous step variable. There is no other way to access the output of a previous step (other than using a Variable block, but that is not what you want in this case and should only be used in very specific cases).\n\n```ts\n// Path to this api would be: /pages/Page1/apis/getOrders.ts\n\nimport {\n PostgreSQL,\n JavaScript,\n Api,\n} from \"@superblocksteam/library\";\n\nexport default new Api(\n \"getOrders\",\n [\n new PostgreSQL(\"retrieve_orders\", \"integration_goes_here\", {\n statement: 'SELECT * FROM orders'\n }),\n new JavaScript(\"format_orders\", ({ retrieve_orders }) => {\n // Format the orders data with dates\n // we access the output of the retrieve_orders block using the output property of the retrieve_orders variable\n return retrieve_orders.output.map(order => ({\n ...order,\n date: new Date(order.date).toLocaleDateString()\n }));\n })\n ]\n)\n```\n\nThen you would register the api as normal in the page file inside the registerPage function call, same as the first example.\n\n#### Control Flow blocks\n\nThe API blocks that are considered \"Control Flow\" blocks are:\n\n- Conditional\n- Loop\n- TryCatch\n- Parallel\n\n#### Rules for using Superblocks APIs\n\nThink hard about the following important rules for correctly using Superblocks APIs:\n\n- You must use a deconstructed state object as the function parameter for dynamic block fields. The valid keys are (1) Superblocks entities (components, variables, etc) and (2) previous block outputs that are in the lexial scope. Example below:\n\n```ts\n// CORRECT: uses deconstructed state\n({ Dropdown1, TextInput1 }) => Dropdown1.selectedOptionsValue + TextInput1.value\n\n// INCORRECT: uses state object directly\n(state) => state.Dropdown1.selectedOptionsValue + state.TextInput1.value\n```\n\n- APIs have lexical scope. For example, blocks in the if-statement of a conditional block will not have access to the state of the else-block.\n\n- Block outputs are immutable. Do not mutate the output of a block.\n\n- The output for a control flow block is the output of the last child block inside of that control flow block.\n\n- Favor the defined control flow blocks (conditional, loop, try-catch) over using the JavaScript block to try and control the flow of your API. This allows you to use Superblocks integrations more easily and allows the user to more easily maintain the API.\n\n- Backend APIs CANNOT mutate frontend state inside of the API.\n\n- You will not always be told which integrations to use in your API; you will have to determine that yourself based on the data you need to fetch.\n\n- Never add comments to code you generate.\n";
|
|
1
|
+
export declare const superblocksApiPrompt = "\n#### Example of creating and then registering a Superblocks API:\n\nCreating the API by adding the myApi.ts file:\n\n```ts\n// Path to this api: /pages/Page1/apis/myApi.ts\n\nimport {\n Conditional,\n Condition,\n PostgreSQL,\n JavaScript,\n Api,\n} from \"@superblocksteam/library\";\n\nexport default new Api(\"myApi\", [\n new Conditional(\"my_conditional\", {\n if: Condition(true, [\n new PostgreSQL(\"retrieve_orders\", \"integration_goes_here\", {\n statement: \"SELECT * FROM orders\",\n }),\n ]),\n else: [\n new JavaScript(\"fallthrough\", () => \"we did not execute the sql query\"),\n ],\n }),\n]);\n```\n\nThen registering the myApi API inside the registerPage call, and executing it when an Button is clicked:\n\n```tsx\n// /pages/Page1/index.tsx\n\nimport { Page, SbApi, Table } from \"@superblocksteam/library\";\nimport { registerPage, showAlert } from \"@superblocksteam/library\";\n\nimport MyExampleAPI from \"./apis/example\";\n\nconst Page1 = () => (\n <Page>\n <Button\n // APIs can be invoked with the EventFlow API.\n onClick={EventFlow.runApis([\"myApi\"])}\n />\n <Table\n // APIs are part of the state object just like components\n tableData={(state) => state.myApi.response}\n />\n </Page>\n);\n\nexport default registerPage(\n Page1,\n {\n name: \"MyPage\",\n // You register APIs just like you would SbVariables\n myApi: SbApi(MyExampleAPI),\n },\n);\n```\n\n#### The Superblocks API TypeScript Type\n\nBelow is the full TypeScript spec for the APIs you create:\n\n```ts\n// @superblocksteam/types\n\nexport type JsonValue = undefined | null | number | string | boolean | JsonValue[] | object;\n\nclass Block {\n constructor(name: string) {}\n public run(): { output: JsonValue } { /* ... */ }\n}\n\ntype State = Record<string, JsonValue>\n\nclass JavaScript extends Block {\n constructor(name: string, config: { fn: ({ /* ... */ }) => JsonValue }) { /* ... */ }\n}\n\ntype Integration = string\ntype Integrations = Record<Integration, JsonValue>;\n\nclass PostgreSQL extends Block {\n static integrations: Integrations = {\n \"eacaad74-192a-4a55-bbfd-3bdd3a6dfd53\": {\n \"schema\": {\n \"tables\": [\n {\n \"type\": \"TABLE\",\n \"name\": \"orders\",\n \"columns\": [\n {\n \"name\": \"id\",\n \"type\": \"int4\",\n },\n {\n \"name\": \"user_id\",\n \"type\": \"int8\",\n },\n {\n \"name\": \"product\",\n \"type\": \"varchar\",\n },\n {\n \"name\": \"date_purchased\",\n \"type\": \"date\",\n },\n {\n \"name\": \"user_email\",\n \"type\": \"varchar\",\n },\n {\n \"name\": \"price\",\n \"type\": \"float8\",\n },\n ],\n \"schema\": \"public\",\n }\n ],\n }\n }\n }\n\n /**\n * @param {string} name The name of the block.\n * @param {string} integration The name of the integration.\n * @param {object} config The config object.\n * @returns {void}\n */\n constructor(name: string, integration: Integration, config: {\n statement: string\n }) { super(name) }\n}\n\nclass RestApi extends Block {\n constructor(\n name: string,\n config: {\n method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"OPTIONS\" | \"HEAD\" | \"TRACE\" | \"CONNECT\";\n url: string | (({ /* ... */ }) => string);\n },\n ) { super(name) }\n}\n\nclass Email extends Block {\n constructor(name: string, config: {\n from: string\n to: string\n subject: string\n cc?: string[]\n bcc?: string[]\n body?: string | JsonValue | (({ /* ... */ }) => string | JsonValue)\n }) { super(name) }\n}\n\nexport type Condition = {\n when: boolean | ((state: State) => boolean);\n then: Block[];\n};\n\nexport type Conditions = {\n if: Condition;\n elif?: Condition[];\n else?: Block[];\n};\n\nclass Conditional extends Block {\n constructor(name: string, config: Conditions) { super(name) }\n}\n\nclass TryCatch extends Block {\n constructor(name: string, config: { try: Block[]; catch: Block[]; finally?: Block[] }) { super(name) }\n}\n\n/**\n * A Superblocks variable has the following access pattern:\n *\n * How to retrieve the value of a variable:\n * ```ts\n * CORRECT\n * my_variable.value\n *\n * // INCORRECT\n * my_variable\n * ```\n *\n * How to set the value of a variable:\n * ```ts\n * CORRECT\n * my_variable.set(value)\n *\n * // INCORRECT\n * my_variable = value\n * ```\n */\nclass Variables extends Block {\n constructor(name: string, variables: {\n // The key is the name of the variable.\n // The value is the value of the variable.\n [key: string]: JsonValue | (({ /* ... */ }) => JsonValue)\n }) { super(name) }\n}\n\nclass Loop extends Block {\n constructor(\n name: string,\n // You can either loop over a certain number or times, over an array, or forever until the condition is false.\n over: number | (({ /* ... */ }) => number) | JsonValue[] | (({ /* ... */ }) => JsonValue[]) | boolean | (({ /* ... */ }) => boolean),\n variables: {\n // What the variable name for the current item is.\n item: string,\n // What the variable name for the current index is.\n index: number,\n },\n blocks: Block[]\n ) { super(name) }\n}\n\nclass Parallel extends Block {\n constructor(\n name: string,\n over: JsonValue[] | (({ /* ... */ }) => JsonValue[]),\n variables: {\n // What the variable name for the current item is.\n item: string,\n },\n blocks: Block[],\n ) { super(name) }\n}\n\nclass Api {\n constructor(name: string, steps: Block[]) {}\n public get response(): JsonValue { /* ... */ }\n public get error(): string | undefined { /* ... */ }\n public run(): void { /* ... */ }\n public cancel(): void { /* ... */ }\n}\n```\n\n#### Example Usage\n\nBelow are examples of how you create Superblocks APIs, along with annotations to describe different pieces of functinality and expectations.\n\n##### Example 1: Simple API with conditional\n\n```ts\n// Path to this api would be: /pages/Page1/apis/getOrders.ts\n\nimport {\n Conditional,\n Condition,\n PostgreSQL,\n JavaScript,\n Api,\n} from \"@superblocksteam/library\";\n\nexport default new Api(\n \"getOrders\",\n [\n new Conditional(\"my_conditional\", {\n if: {\n when: true,\n then: [\n new PostgreSQL(\"retrieve_orders\", \"integration_goes_here\", {\n statement: 'SELECT * FROM orders'\n })\n ]\n },\n else: [\n new JavaScript(\"fallthrough\", { fn: () => \"we did not execute the sql query\" })\n ]\n })\n ]\n)\n```\n\nTo run register and run the API we defined above:\n\n```tsx\n// /pages/Page1/index.tsx\n\nimport { Page, SbApi, Table, Button } from \"@superblocksteam/library\";\nimport { registerPage, showAlert } from \"@superblocksteam/library\";\n\nimport getOrders from \"./apis/getOrders\";\n\nconst Page1 = () => (\n <Page>\n <Button\n // APIs can be invoked with the EventFlow API.\n onClick={EventFlow.runApis([\"getOrders\"])}\n />\n // ...\n <Table>\n // APIs are part of the state object just like components. tableData=\n {(state) => state.getOrders.response}\n </Table>\n </Page>\n);\n\nexport default registerPage(\n Page1,\n {\n name: \"MyPage\",\n // You register APIs just like you would SbVariables.\n getOrders: SbApi(getOrders),\n },\n);\n```\n\n##### Example 2: API where steps reference outputs of previous steps\n\nThink hard about how you access the output of previous steps. You MUST use the output property of the previous step variable. There is no other way to access the output of a previous step (other than using a Variable block, but that is not what you want in this case and should only be used in very specific cases).\n\n```ts\n// Path to this api would be: /pages/Page1/apis/getOrders.ts\n\nimport {\n PostgreSQL,\n JavaScript,\n Api,\n} from \"@superblocksteam/library\";\n\nexport default new Api(\n \"getOrders\",\n [\n new PostgreSQL(\"retrieve_orders\", \"integration_goes_here\", {\n statement: 'SELECT * FROM orders'\n }),\n new JavaScript(\"format_orders\", ({ retrieve_orders }) => {\n // Format the orders data with dates\n // we access the output of the retrieve_orders block using the output property of the retrieve_orders variable\n return retrieve_orders.output.map(order => ({\n ...order,\n date: new Date(order.date).toLocaleDateString()\n }));\n })\n ]\n)\n```\n\nThen you would register the api as normal in the page file inside the registerPage function call, same as the first example.\n\n#### Control Flow blocks\n\nThe API blocks that are considered \"Control Flow\" blocks are:\n\n- Conditional\n- Loop\n- TryCatch\n- Parallel\n\n#### Rules for using Superblocks APIs\n\nThink hard about the following important rules for correctly using Superblocks APIs:\n\n- You must use a deconstructed state object as the function parameter for dynamic block fields. The valid keys are (1) Superblocks entities (components, variables, etc) and (2) previous block outputs that are in the lexial scope. Example below:\n\n```ts\n// CORRECT: uses deconstructed state\n({ Dropdown1, TextInput1 }) => Dropdown1.selectedOptionsValue + TextInput1.value\n\n// INCORRECT: uses state object directly\n(state) => state.Dropdown1.selectedOptionsValue + state.TextInput1.value\n```\n\n- APIs have lexical scope. For example, blocks in the if-statement of a conditional block will not have access to the state of the else-block.\n\n- Block outputs are immutable. Do not mutate the output of a block.\n\n- The output for a control flow block is the output of the last child block inside of that control flow block.\n\n- Favor the defined control flow blocks (conditional, loop, try-catch) over using the JavaScript block to try and control the flow of your API. This allows you to use Superblocks integrations more easily and allows the user to more easily maintain the API.\n\n- Backend APIs CANNOT mutate frontend state inside of the API.\n\n- You will not always be told which integrations to use in your API; you will have to determine that yourself based on the data you need to fetch.\n\n- Never add comments to code you generate.\n";
|
|
2
2
|
//# sourceMappingURL=superblocks-api-draft.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"superblocks-api-draft.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/prompts/draft-subprompts/superblocks-api-draft.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"superblocks-api-draft.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/prompts/draft-subprompts/superblocks-api-draft.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,otWA+XhC,CAAC"}
|
|
@@ -29,27 +29,27 @@ export default new Api("myApi", [
|
|
|
29
29
|
]);
|
|
30
30
|
\`\`\`
|
|
31
31
|
|
|
32
|
-
Then registering the myApi API inside the registerPage call, and executing it when an
|
|
32
|
+
Then registering the myApi API inside the registerPage call, and executing it when an Button is clicked:
|
|
33
33
|
|
|
34
34
|
\`\`\`tsx
|
|
35
35
|
// /pages/Page1/index.tsx
|
|
36
36
|
|
|
37
|
-
import {
|
|
37
|
+
import { Page, SbApi, Table } from "@superblocksteam/library";
|
|
38
38
|
import { registerPage, showAlert } from "@superblocksteam/library";
|
|
39
39
|
|
|
40
40
|
import MyExampleAPI from "./apis/example";
|
|
41
41
|
|
|
42
42
|
const Page1 = () => (
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
// APIs can be invoked with the
|
|
46
|
-
onClick={
|
|
43
|
+
<Page>
|
|
44
|
+
<Button
|
|
45
|
+
// APIs can be invoked with the EventFlow API.
|
|
46
|
+
onClick={EventFlow.runApis(["myApi"])}
|
|
47
47
|
/>
|
|
48
|
-
<
|
|
48
|
+
<Table
|
|
49
49
|
// APIs are part of the state object just like components
|
|
50
50
|
tableData={(state) => state.myApi.response}
|
|
51
51
|
/>
|
|
52
|
-
</
|
|
52
|
+
</Page>
|
|
53
53
|
);
|
|
54
54
|
|
|
55
55
|
export default registerPage(
|
|
@@ -284,23 +284,23 @@ To run register and run the API we defined above:
|
|
|
284
284
|
\`\`\`tsx
|
|
285
285
|
// /pages/Page1/index.tsx
|
|
286
286
|
|
|
287
|
-
import {
|
|
287
|
+
import { Page, SbApi, Table, Button } from "@superblocksteam/library";
|
|
288
288
|
import { registerPage, showAlert } from "@superblocksteam/library";
|
|
289
289
|
|
|
290
290
|
import getOrders from "./apis/getOrders";
|
|
291
291
|
|
|
292
292
|
const Page1 = () => (
|
|
293
|
-
<
|
|
294
|
-
<
|
|
295
|
-
// APIs can be invoked with the
|
|
296
|
-
onClick={
|
|
293
|
+
<Page>
|
|
294
|
+
<Button
|
|
295
|
+
// APIs can be invoked with the EventFlow API.
|
|
296
|
+
onClick={EventFlow.runApis(["getOrders"])}
|
|
297
297
|
/>
|
|
298
298
|
// ...
|
|
299
|
-
<
|
|
299
|
+
<Table>
|
|
300
300
|
// APIs are part of the state object just like components. tableData=
|
|
301
301
|
{(state) => state.getOrders.response}
|
|
302
|
-
</
|
|
303
|
-
</
|
|
302
|
+
</Table>
|
|
303
|
+
</Page>
|
|
304
304
|
);
|
|
305
305
|
|
|
306
306
|
export default registerPage(
|
package/dist/ai-service/prompts/draft-subprompts/superblocks-layouts-with-grid-examples.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const superblocksLayoutsPrompt = "\n### Layout and Sizing in Superblocks\n\nAll layouts in Superblocks are configured through the `
|
|
1
|
+
export declare const superblocksLayoutsPrompt = "\n### Layout and Sizing in Superblocks\n\nAll layouts in Superblocks are configured through 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:\n\n- Vertical Stack (`vertical`)\n- Horizontal Stack (`horizontal`)\n- Free form (`freeform`)\n\nFor new designs, we recommend using Stacks for most use cases.\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---\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 name=\"Text1\" width={Dim.px(2)}>Hello</Text> // 2 pixels\n<Text name=\"Text1\" width={Dim.fit()}>Hello</Text> // Fit to content (default)\n<Text name=\"Text1\" width={Dim.fill()}>Hello</Text> // Fill available space, no weight (aka 1)\n<Text name=\"Text1\" width={Dim.fill(2)}>Hello</Text> // Fill available space, with weight of 2\n```\n\n---\n\n### 2. **Grid-Specific Width (Columns)**\n\nWhen using `layout=\"freeform\"`, width is based on columns.\n\n- `Dim.columns(10)` specifies the number of columns.\n- Note: `fill`, `fit`, and `px` are not supported for width in grid layouts.\n\n**Example**:\n\n```jsx\n<Container layout=\"freeform\" columns={12}>\n <Text name=\"Text1\" width={Dim.columns(2)}>\n Hello\n </Text>\n</Container>\n```\n\n---\n\n### 3. **Height Options with Rows**\n\nWhen using `layout=\"freeform\"`, height can be configured with rows.\n\n- `Dim.rows(2)` specifies the number of rows.\n- `Dim.px(100)` specifies a fixed pixel size.\n- `Dim.fit()` fits to content size (default).\n- `Dim.fill()` is **not supported** for height inside grid layouts.\n\nYou can specify height using rows to override the default `\"fit\"` behavior, similar to pixel-based height.\n\n**Example**:\n\n```jsx\n<Container layout=\"freeform\" columns={12}>\n <Text name=\"Text1\" height={Dim.rows(2)} width={Dim.columns(2)}>\n Hello\n </Text>{' '}\n // 2 rows in height, 2 columns in width\n</Container>\n```\n\n---\n\n### 4. **Grid Layout Setup**\n\nA container with `layout=\"freeform\"` can be configured with columns and rows. \nIndividual children inside the container can have margins, constraints, and dynamic sizing options.\n\n```\nContainer (layout=\"freeform\") -\n columns: number\n rows: \"auto\" | number // defaults to auto\n row-size: Dim<px> // defaults to 12px\nGridChild (components inside the container) -\n margin-top: Dim<row | px>\n margin-left: Dim<column>\n height: Dim<row | px | fit>\n width: Dim<column>\n constraintTop: GridChild | [GridChild]\n```\n\n---\n\n#### **Grid Example 1: Items Stacked with a Gap**\n\nTwo items stacked vertically, both full width, with a gap of 1.\n\n```\n[ Text1 ]\n[ Text2 ]\n```\n\n```jsx\n<Container layout=\"freeform\" columns={3}>\n <Text name=\"Text1\" width={Dim.columns(3)}>\n Hello\n </Text>\n <Text name=\"Text2\" constraintTop=\"Text1\" width={Dim.columns(3)}>\n World\n </Text>\n</Container>\n```\n\n---\n\n#### **Grid Example 2: Items Side by Side**\n\nThree items side by side, each taking part of the grid.\n\n```\n[ Text1 ][ Text2 ][ Text3 ]\n```\n\n```jsx\n<Container layout=\"freeform\" columns={4}>\n <Text name=\"Text1\" width={Dim.columns(2)}>\n Hello\n </Text>\n <Text name=\"Text2\" width={Dim.columns(2)} marginLeft={Dim.columns(2)}>\n World\n </Text>\n <Text name=\"Text3\" width={Dim.columns(2)} marginLeft={Dim.columns(4)}>\n World\n </Text>\n</Container>\n```\n\n---\n\n#### **Grid Example 3: Staggered Items**\n\nA staggered layout using constraints and margins.\n\n```\n[ Text1 ]\n[ Text2 ][ Text3 ]\n```\n\n```jsx\n<Container layout=\"freeform\" columns={2}>\n <Text name=\"Text1\" width={Dim.columns(1)}>\n Hello\n </Text>\n <Text name=\"Text2\" width={Dim.columns(1)} constraintTop=\"Text1\">\n World\n </Text>\n <Text name=\"Text3\" width={Dim.columns(1)} marginLeft={Dim.columns(1)} marginTop={Dim.rows(1)}>\n World Again\n </Text>\n</Container>\n```\n\nIn this example:\n\n- `Text2` is constrained to `Text1`.\n- `Text3` is **not constrained** to `Text2`, but uses a margin of 1 row and 1 column.\n- If `Text1` grows in size, `Text2` moves down, but `Text3` stays in place.\n\n#### **Grid Example 4: Key Value Pairs**\n\n[ Key 1 ][ Value 1 ]\n[ Key 2 ][ Value 2 ]\n\n```jsx\n<Container layout=\"freeform\" columns={12}>\n <Text name=\"Key1\" width={Dim.columns(4)}>\n Key 1\n </Text>\n <Text name=\"Value1\" width={Dim.columns(8)} marginLeft={Dim.columns(4)}>\n Value 1\n </Text>\n <Text name=\"Key2\" width={Dim.columns(4)} constraintTop=\"Key1\">\n Key 2\n </Text>\n <Text name=\"Value2\" width={Dim.columns(8)} marginLeft={Dim.columns(4)} constraintTop=\"Value1\">\n Value 2\n </Text>\n</Container>\n\nIMPORTANT: The `constraintTop` prop is used to specify the component that this component should be constrained to. You must use and supply names to all components that you want to reference in the `constraintTop` prop.\n```\n\n### Import Location\n\n```ts\nimport { Dim } from '@superblocksteam/library';\n```\n";
|
|
2
2
|
//# sourceMappingURL=superblocks-layouts-with-grid-examples.d.ts.map
|
package/dist/ai-service/prompts/draft-subprompts/superblocks-layouts-with-grid-examples.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"superblocks-layouts-with-grid-examples.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/prompts/draft-subprompts/superblocks-layouts-with-grid-examples.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"superblocks-layouts-with-grid-examples.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/prompts/draft-subprompts/superblocks-layouts-with-grid-examples.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,w4LAyNpC,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export const superblocksLayoutsPrompt = /*md*/ `
|
|
2
2
|
### Layout and Sizing in Superblocks
|
|
3
3
|
|
|
4
|
-
All layouts in Superblocks are configured through the \`
|
|
5
|
-
\`
|
|
4
|
+
All layouts in Superblocks are configured through the \`Container\` component.
|
|
5
|
+
\`Container\` provides both layout and optional visual styling.
|
|
6
6
|
|
|
7
7
|
\`\`\`jsx
|
|
8
|
-
<
|
|
8
|
+
<Container
|
|
9
9
|
variant="card" | "none" // default is "none"
|
|
10
10
|
layout="vertical" | "horizontal" | "freeform" // default is "vertical"
|
|
11
11
|
>
|
|
12
12
|
{/* Children here */}
|
|
13
|
-
</
|
|
13
|
+
</Container>
|
|
14
14
|
\`\`\`
|
|
15
15
|
|
|
16
16
|
We have three main layout options in Superblocks:
|
|
@@ -40,10 +40,10 @@ All Superblocks components support width and height. They take in a \`Dim\` obje
|
|
|
40
40
|
**Examples**:
|
|
41
41
|
|
|
42
42
|
\`\`\`jsx
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
<
|
|
43
|
+
<Text name="Text1" width={Dim.px(2)}>Hello</Text> // 2 pixels
|
|
44
|
+
<Text name="Text1" width={Dim.fit()}>Hello</Text> // Fit to content (default)
|
|
45
|
+
<Text name="Text1" width={Dim.fill()}>Hello</Text> // Fill available space, no weight (aka 1)
|
|
46
|
+
<Text name="Text1" width={Dim.fill(2)}>Hello</Text> // Fill available space, with weight of 2
|
|
47
47
|
\`\`\`
|
|
48
48
|
|
|
49
49
|
---
|
|
@@ -58,11 +58,11 @@ When using \`layout="freeform"\`, width is based on columns.
|
|
|
58
58
|
**Example**:
|
|
59
59
|
|
|
60
60
|
\`\`\`jsx
|
|
61
|
-
<
|
|
62
|
-
<
|
|
61
|
+
<Container layout="freeform" columns={12}>
|
|
62
|
+
<Text name="Text1" width={Dim.columns(2)}>
|
|
63
63
|
Hello
|
|
64
|
-
</
|
|
65
|
-
</
|
|
64
|
+
</Text>
|
|
65
|
+
</Container>
|
|
66
66
|
\`\`\`
|
|
67
67
|
|
|
68
68
|
---
|
|
@@ -81,12 +81,12 @@ You can specify height using rows to override the default \`"fit"\` behavior, si
|
|
|
81
81
|
**Example**:
|
|
82
82
|
|
|
83
83
|
\`\`\`jsx
|
|
84
|
-
<
|
|
85
|
-
<
|
|
84
|
+
<Container layout="freeform" columns={12}>
|
|
85
|
+
<Text name="Text1" height={Dim.rows(2)} width={Dim.columns(2)}>
|
|
86
86
|
Hello
|
|
87
|
-
</
|
|
87
|
+
</Text>{' '}
|
|
88
88
|
// 2 rows in height, 2 columns in width
|
|
89
|
-
</
|
|
89
|
+
</Container>
|
|
90
90
|
\`\`\`
|
|
91
91
|
|
|
92
92
|
---
|
|
@@ -97,7 +97,7 @@ A container with \`layout="freeform"\` can be configured with columns and rows.
|
|
|
97
97
|
Individual children inside the container can have margins, constraints, and dynamic sizing options.
|
|
98
98
|
|
|
99
99
|
\`\`\`
|
|
100
|
-
|
|
100
|
+
Container (layout="freeform") -
|
|
101
101
|
columns: number
|
|
102
102
|
rows: "auto" | number // defaults to auto
|
|
103
103
|
row-size: Dim<px> // defaults to 12px
|
|
@@ -121,14 +121,14 @@ Two items stacked vertically, both full width, with a gap of 1.
|
|
|
121
121
|
\`\`\`
|
|
122
122
|
|
|
123
123
|
\`\`\`jsx
|
|
124
|
-
<
|
|
125
|
-
<
|
|
124
|
+
<Container layout="freeform" columns={3}>
|
|
125
|
+
<Text name="Text1" width={Dim.columns(3)}>
|
|
126
126
|
Hello
|
|
127
|
-
</
|
|
128
|
-
<
|
|
127
|
+
</Text>
|
|
128
|
+
<Text name="Text2" constraintTop="Text1" width={Dim.columns(3)}>
|
|
129
129
|
World
|
|
130
|
-
</
|
|
131
|
-
</
|
|
130
|
+
</Text>
|
|
131
|
+
</Container>
|
|
132
132
|
\`\`\`
|
|
133
133
|
|
|
134
134
|
---
|
|
@@ -142,17 +142,17 @@ Three items side by side, each taking part of the grid.
|
|
|
142
142
|
\`\`\`
|
|
143
143
|
|
|
144
144
|
\`\`\`jsx
|
|
145
|
-
<
|
|
146
|
-
<
|
|
145
|
+
<Container layout="freeform" columns={4}>
|
|
146
|
+
<Text name="Text1" width={Dim.columns(2)}>
|
|
147
147
|
Hello
|
|
148
|
-
</
|
|
149
|
-
<
|
|
148
|
+
</Text>
|
|
149
|
+
<Text name="Text2" width={Dim.columns(2)} marginLeft={Dim.columns(2)}>
|
|
150
150
|
World
|
|
151
|
-
</
|
|
152
|
-
<
|
|
151
|
+
</Text>
|
|
152
|
+
<Text name="Text3" width={Dim.columns(2)} marginLeft={Dim.columns(4)}>
|
|
153
153
|
World
|
|
154
|
-
</
|
|
155
|
-
</
|
|
154
|
+
</Text>
|
|
155
|
+
</Container>
|
|
156
156
|
\`\`\`
|
|
157
157
|
|
|
158
158
|
---
|
|
@@ -167,17 +167,17 @@ A staggered layout using constraints and margins.
|
|
|
167
167
|
\`\`\`
|
|
168
168
|
|
|
169
169
|
\`\`\`jsx
|
|
170
|
-
<
|
|
171
|
-
<
|
|
170
|
+
<Container layout="freeform" columns={2}>
|
|
171
|
+
<Text name="Text1" width={Dim.columns(1)}>
|
|
172
172
|
Hello
|
|
173
|
-
</
|
|
174
|
-
<
|
|
173
|
+
</Text>
|
|
174
|
+
<Text name="Text2" width={Dim.columns(1)} constraintTop="Text1">
|
|
175
175
|
World
|
|
176
|
-
</
|
|
177
|
-
<
|
|
176
|
+
</Text>
|
|
177
|
+
<Text name="Text3" width={Dim.columns(1)} marginLeft={Dim.columns(1)} marginTop={Dim.rows(1)}>
|
|
178
178
|
World Again
|
|
179
|
-
</
|
|
180
|
-
</
|
|
179
|
+
</Text>
|
|
180
|
+
</Container>
|
|
181
181
|
\`\`\`
|
|
182
182
|
|
|
183
183
|
In this example:
|
|
@@ -192,20 +192,20 @@ In this example:
|
|
|
192
192
|
[ Key 2 ][ Value 2 ]
|
|
193
193
|
|
|
194
194
|
\`\`\`jsx
|
|
195
|
-
<
|
|
196
|
-
<
|
|
195
|
+
<Container layout="freeform" columns={12}>
|
|
196
|
+
<Text name="Key1" width={Dim.columns(4)}>
|
|
197
197
|
Key 1
|
|
198
|
-
</
|
|
199
|
-
<
|
|
198
|
+
</Text>
|
|
199
|
+
<Text name="Value1" width={Dim.columns(8)} marginLeft={Dim.columns(4)}>
|
|
200
200
|
Value 1
|
|
201
|
-
</
|
|
202
|
-
<
|
|
201
|
+
</Text>
|
|
202
|
+
<Text name="Key2" width={Dim.columns(4)} constraintTop="Key1">
|
|
203
203
|
Key 2
|
|
204
|
-
</
|
|
205
|
-
<
|
|
204
|
+
</Text>
|
|
205
|
+
<Text name="Value2" width={Dim.columns(8)} marginLeft={Dim.columns(4)} constraintTop="Value1">
|
|
206
206
|
Value 2
|
|
207
|
-
</
|
|
208
|
-
</
|
|
207
|
+
</Text>
|
|
208
|
+
</Container>
|
|
209
209
|
|
|
210
210
|
IMPORTANT: The \`constraintTop\` prop is used to specify the component that this component should be constrained to. You must use and supply names to all components that you want to reference in the \`constraintTop\` prop.
|
|
211
211
|
\`\`\`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const content = "## Button\n\nThe following is the type definition for the Button component.\n\n```typescript\ninterface ButtonProps {\n label?: string;\n /** @default {\"left\":{\"mode\":\"px\",\"value\":10},\"right\":{\"mode\":\"px\",\"value\":10},\"top\":{\"mode\":\"px\",\"value\":8},\"bottom\":{\"mode\":\"px\",\"value\":8}} */\n padding?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n width?: Dim;\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n minHeight?: Dim;\n maxHeight?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n margin?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default true */\n isVisible?: boolean;\n /** @default \"primary\" */\n variant?: \"primary\" | \"secondary\" | \"tertiary\";\n icon?: string;\n /** @default \"left\" */\n iconPosition?: \"left\" | \"right\";\n /** @default \"Computed at runtime\" */\n textStyle?: TextStyleWithVariant;\n /** @default \"Computed at runtime\" */\n backgroundColor?: string;\n /** @default {\"left\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"},\"right\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"},\"top\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"},\"bottom\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"}} */\n border?: { left: Border; right: Border; top: Border; bottom: Border };\n /** @default \"Computed at runtime\" */\n borderRadius?: {\n topLeft: Dim;\n topRight: Dim;\n bottomLeft: Dim;\n bottomRight: Dim;\n };\n /** @default \"center\" */\n horizontalAlign?: \"left\" | \"center\" | \"right\";\n loading?: boolean;\n /** @default false */\n isDisabled?: boolean;\n onClick?: EventFlow;\n}\n```\n";
|
|
2
|
+
//# sourceMappingURL=ButtonPropsDocs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonPropsDocs.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/ButtonPropsDocs.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,q5DAAq5D,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated from ButtonPropsDocs.md
|
|
3
|
+
// Do not edit this file directly
|
|
4
|
+
// Generated at: 2025-07-03T15:08:51.451Z
|
|
5
|
+
export const content = "## Button\n\nThe following is the type definition for the Button component.\n\n```typescript\ninterface ButtonProps {\n label?: string;\n /** @default {\"left\":{\"mode\":\"px\",\"value\":10},\"right\":{\"mode\":\"px\",\"value\":10},\"top\":{\"mode\":\"px\",\"value\":8},\"bottom\":{\"mode\":\"px\",\"value\":8}} */\n padding?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n width?: Dim;\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n minHeight?: Dim;\n maxHeight?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n margin?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default true */\n isVisible?: boolean;\n /** @default \"primary\" */\n variant?: \"primary\" | \"secondary\" | \"tertiary\";\n icon?: string;\n /** @default \"left\" */\n iconPosition?: \"left\" | \"right\";\n /** @default \"Computed at runtime\" */\n textStyle?: TextStyleWithVariant;\n /** @default \"Computed at runtime\" */\n backgroundColor?: string;\n /** @default {\"left\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"},\"right\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"},\"top\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"},\"bottom\":{\"width\":{\"mode\":\"px\",\"value\":1},\"style\":\"solid\",\"color\":\"transparent\"}} */\n border?: { left: Border; right: Border; top: Border; bottom: Border };\n /** @default \"Computed at runtime\" */\n borderRadius?: {\n topLeft: Dim;\n topRight: Dim;\n bottomLeft: Dim;\n bottomRight: Dim;\n };\n /** @default \"center\" */\n horizontalAlign?: \"left\" | \"center\" | \"right\";\n loading?: boolean;\n /** @default false */\n isDisabled?: boolean;\n onClick?: EventFlow;\n}\n```\n";
|
|
6
|
+
//# sourceMappingURL=ButtonPropsDocs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonPropsDocs.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/ButtonPropsDocs.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,yCAAyC;AACzC,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,k5DAAk5D,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const content = "## Checkbox\n\nThe following is the type definition for the Checkbox component.\n\n```typescript\ninterface CheckboxProps {\n /** @default \"\" */\n label?: string;\n /** @default true */\n defaultChecked?: boolean;\n /** @default {\"variant\":\"inputLabel\"} */\n labelStyle?: TextStyleWithVariant;\n loading?: boolean;\n width?: Dim;\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n minHeight?: Dim;\n maxHeight?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n margin?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default true */\n isVisible?: boolean;\n isRequired?: boolean;\n /** @default false */\n isDisabled?: boolean;\n /** @default \"tooltip\" */\n errorMessagePlacement?: \"tooltip\" | \"inline\";\n /** @default \"\" */\n customValidationRule?: string;\n /** @default \"\" */\n customErrorMessage?: string;\n onCheckChange?: EventFlow;\n}\n```\n\nAnd the following properties can be referenced on this component in the Superblocks state object:\n\n```typescript\ninterface CheckboxComponentState {\n value?: boolean;\n /** @default {} */\n validationErrors?: any;\n /** @default true */\n isValid?: boolean;\n showError?: boolean;\n}\n```\n\nAnd the following properties are settable via BindEntity.{propertyName} = newValue;\n\n```typescript\ninterface CheckboxMetaProperties {\n /** @default false */\n isTouched?: boolean;\n isChecked?: boolean;\n}\n```\n";
|
|
2
|
+
//# sourceMappingURL=CheckboxPropsDocs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxPropsDocs.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/CheckboxPropsDocs.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,+hDAA+hD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated from CheckboxPropsDocs.md
|
|
3
|
+
// Do not edit this file directly
|
|
4
|
+
// Generated at: 2025-07-03T15:08:51.451Z
|
|
5
|
+
export const content = "## Checkbox\n\nThe following is the type definition for the Checkbox component.\n\n```typescript\ninterface CheckboxProps {\n /** @default \"\" */\n label?: string;\n /** @default true */\n defaultChecked?: boolean;\n /** @default {\"variant\":\"inputLabel\"} */\n labelStyle?: TextStyleWithVariant;\n loading?: boolean;\n width?: Dim;\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n minHeight?: Dim;\n maxHeight?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n margin?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default true */\n isVisible?: boolean;\n isRequired?: boolean;\n /** @default false */\n isDisabled?: boolean;\n /** @default \"tooltip\" */\n errorMessagePlacement?: \"tooltip\" | \"inline\";\n /** @default \"\" */\n customValidationRule?: string;\n /** @default \"\" */\n customErrorMessage?: string;\n onCheckChange?: EventFlow;\n}\n```\n\nAnd the following properties can be referenced on this component in the Superblocks state object:\n\n```typescript\ninterface CheckboxComponentState {\n value?: boolean;\n /** @default {} */\n validationErrors?: any;\n /** @default true */\n isValid?: boolean;\n showError?: boolean;\n}\n```\n\nAnd the following properties are settable via BindEntity.{propertyName} = newValue;\n\n```typescript\ninterface CheckboxMetaProperties {\n /** @default false */\n isTouched?: boolean;\n isChecked?: boolean;\n}\n```\n";
|
|
6
|
+
//# sourceMappingURL=CheckboxPropsDocs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxPropsDocs.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/CheckboxPropsDocs.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,2CAA2C;AAC3C,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,4hDAA4hD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const content = "## Column\n\nThe following is the type definition for the Column component.\n\n```typescript\ninterface ColumnProps {\n /** @default \"vertical\" */\n layout?: \"freeform\" | \"vertical\" | \"horizontal\";\n /** @default \"top\" */\n verticalAlign?:\n | \"top\"\n | \"center\"\n | \"bottom\"\n | \"space-between\"\n | \"space-around\";\n /** @default \"left\" */\n horizontalAlign?:\n | \"left\"\n | \"center\"\n | \"right\"\n | \"space-between\"\n | \"space-around\";\n /** @default {\"mode\":\"px\",\"value\":12} */\n spacing?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":12},\"bottom\":{\"mode\":\"px\",\"value\":12},\"left\":{\"mode\":\"px\",\"value\":12},\"right\":{\"mode\":\"px\",\"value\":12}} */\n padding?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default {\"mode\":\"fill\",\"value\":1} */\n width?: Dim;\n /** @default {\"mode\":\"fill\",\"value\":1} */\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n /** @default 12 */\n columns?: number;\n /** @default 12 */\n rowHeight?: Dim;\n /** @default true */\n shouldScrollContents?: boolean;\n /** @default true */\n isVisible?: boolean;\n backgroundColor?: string;\n border?: { left: Border; right: Border; top: Border; bottom: Border };\n loading?: boolean;\n}\n```\n";
|
|
2
|
+
//# sourceMappingURL=ColumnPropsDocs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnPropsDocs.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/ColumnPropsDocs.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,2yCAA2yC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated from ColumnPropsDocs.md
|
|
3
|
+
// Do not edit this file directly
|
|
4
|
+
// Generated at: 2025-07-03T15:08:51.451Z
|
|
5
|
+
export const content = "## Column\n\nThe following is the type definition for the Column component.\n\n```typescript\ninterface ColumnProps {\n /** @default \"vertical\" */\n layout?: \"freeform\" | \"vertical\" | \"horizontal\";\n /** @default \"top\" */\n verticalAlign?:\n | \"top\"\n | \"center\"\n | \"bottom\"\n | \"space-between\"\n | \"space-around\";\n /** @default \"left\" */\n horizontalAlign?:\n | \"left\"\n | \"center\"\n | \"right\"\n | \"space-between\"\n | \"space-around\";\n /** @default {\"mode\":\"px\",\"value\":12} */\n spacing?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":12},\"bottom\":{\"mode\":\"px\",\"value\":12},\"left\":{\"mode\":\"px\",\"value\":12},\"right\":{\"mode\":\"px\",\"value\":12}} */\n padding?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default {\"mode\":\"fill\",\"value\":1} */\n width?: Dim;\n /** @default {\"mode\":\"fill\",\"value\":1} */\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n /** @default 12 */\n columns?: number;\n /** @default 12 */\n rowHeight?: Dim;\n /** @default true */\n shouldScrollContents?: boolean;\n /** @default true */\n isVisible?: boolean;\n backgroundColor?: string;\n border?: { left: Border; right: Border; top: Border; bottom: Border };\n loading?: boolean;\n}\n```\n";
|
|
6
|
+
//# sourceMappingURL=ColumnPropsDocs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnPropsDocs.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/ColumnPropsDocs.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,yCAAyC;AACzC,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,wyCAAwyC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const content = "## Container\n\nThe following is the type definition for the Container component.\n\n```typescript\ninterface ContainerProps {\n /** @default \"vertical\" */\n layout?: \"freeform\" | \"vertical\" | \"horizontal\";\n /** @default \"top\" */\n verticalAlign?:\n | \"top\"\n | \"center\"\n | \"bottom\"\n | \"space-between\"\n | \"space-around\";\n /** @default \"left\" */\n horizontalAlign?:\n | \"left\"\n | \"center\"\n | \"right\"\n | \"space-between\"\n | \"space-around\";\n /** @default {\"mode\":\"px\",\"value\":12} */\n spacing?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n padding?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n margin?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n width?: Dim;\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n minHeight?: Dim;\n maxHeight?: Dim;\n /** @default 12 */\n columns?: number;\n /** @default 12 */\n rowHeight?: Dim;\n /** @default true */\n shouldScrollContents?: boolean;\n /** @default true */\n isVisible?: boolean;\n /** @default \"none\" */\n variant?: \"none\" | \"card\";\n backgroundColor?: string;\n border?: { left: Border; right: Border; top: Border; bottom: Border };\n borderRadius?: {\n topLeft: Dim;\n topRight: Dim;\n bottomLeft: Dim;\n bottomRight: Dim;\n };\n loading?: boolean;\n}\n```\n";
|
|
2
|
+
//# sourceMappingURL=ContainerPropsDocs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerPropsDocs.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/ContainerPropsDocs.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,+oDAA+oD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated from ContainerPropsDocs.md
|
|
3
|
+
// Do not edit this file directly
|
|
4
|
+
// Generated at: 2025-07-03T15:08:51.450Z
|
|
5
|
+
export const content = "## Container\n\nThe following is the type definition for the Container component.\n\n```typescript\ninterface ContainerProps {\n /** @default \"vertical\" */\n layout?: \"freeform\" | \"vertical\" | \"horizontal\";\n /** @default \"top\" */\n verticalAlign?:\n | \"top\"\n | \"center\"\n | \"bottom\"\n | \"space-between\"\n | \"space-around\";\n /** @default \"left\" */\n horizontalAlign?:\n | \"left\"\n | \"center\"\n | \"right\"\n | \"space-between\"\n | \"space-around\";\n /** @default {\"mode\":\"px\",\"value\":12} */\n spacing?: Dim;\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n padding?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n /** @default {\"top\":{\"mode\":\"px\",\"value\":0},\"bottom\":{\"mode\":\"px\",\"value\":0},\"left\":{\"mode\":\"px\",\"value\":0},\"right\":{\"mode\":\"px\",\"value\":0}} */\n margin?: { left: Dim; right: Dim; top: Dim; bottom: Dim };\n width?: Dim;\n height?: Dim;\n minWidth?: Dim;\n maxWidth?: Dim;\n minHeight?: Dim;\n maxHeight?: Dim;\n /** @default 12 */\n columns?: number;\n /** @default 12 */\n rowHeight?: Dim;\n /** @default true */\n shouldScrollContents?: boolean;\n /** @default true */\n isVisible?: boolean;\n /** @default \"none\" */\n variant?: \"none\" | \"card\";\n backgroundColor?: string;\n border?: { left: Border; right: Border; top: Border; bottom: Border };\n borderRadius?: {\n topLeft: Dim;\n topRight: Dim;\n bottomLeft: Dim;\n bottomRight: Dim;\n };\n loading?: boolean;\n}\n```\n";
|
|
6
|
+
//# sourceMappingURL=ContainerPropsDocs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerPropsDocs.js","sourceRoot":"","sources":["../../../../../src/ai-service/prompts/generated/library-components/ContainerPropsDocs.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,4CAA4C;AAC5C,iCAAiC;AACjC,yCAAyC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,4oDAA4oD,CAAC"}
|