@lowdefy/docs-content 6.1.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/content/actions/downloadcsv.md +1 -1
- package/content/actions/emailotpsend.md +58 -0
- package/content/actions/emailotpverify.md +79 -0
- package/content/actions/getlocalstorage.md +43 -0
- package/content/actions/link.md +47 -1
- package/content/actions/login.md +25 -5
- package/content/actions/logout.md +7 -5
- package/content/actions/magiclinkverify.md +117 -0
- package/content/actions/pdfmake.md +2 -2
- package/content/actions/posthogalias.md +29 -0
- package/content/actions/posthogcapture.md +49 -0
- package/content/actions/posthogcapturepageleave.md +38 -0
- package/content/actions/posthogfeatureflag.md +50 -0
- package/content/actions/posthoggroup.md +37 -0
- package/content/actions/posthogidentify.md +54 -0
- package/content/actions/posthoginit.md +96 -0
- package/content/actions/posthogoptin.md +29 -0
- package/content/actions/posthogoptout.md +29 -0
- package/content/actions/posthogpageview.md +37 -0
- package/content/actions/posthogreloadfeatureflags.md +47 -0
- package/content/actions/posthogreset.md +28 -0
- package/content/actions/posthogsetpersonproperties.md +36 -0
- package/content/actions/removelocalstorage.md +28 -0
- package/content/actions/resetvalidation.md +7 -3
- package/content/actions/setdarkmode.md +3 -3
- package/content/actions/setglobal.md +2 -0
- package/content/actions/setlocale.md +1 -1
- package/content/actions/setlocalstorage.md +34 -0
- package/content/actions/validate.md +7 -4
- package/content/adapter-reference/mongodbauthadapter.md +46 -0
- package/content/agents/agent-endpoint-tools.md +24 -0
- package/content/agents/agent-properties.md +13 -3
- package/content/agents/agent-server-hooks.md +1 -1
- package/content/agents/agentchat.md +43 -7
- package/content/agents/agentconversations.md +42 -8
- package/content/agents/agents-introduction.md +107 -0
- package/content/callback-reference/auth0logoutcallback.md +54 -0
- package/content/concepts/ai-agent-docs.md +455 -106
- package/content/concepts/blocks.md +150 -0
- package/content/concepts/connections-and-requests.md +402 -0
- package/content/concepts/custom-html.md +42 -0
- package/content/concepts/custom-styling.md +50 -5
- package/content/concepts/dynamic-page-content.md +309 -0
- package/content/concepts/events-and-actions.md +154 -2
- package/content/concepts/four-primitives.md +31 -0
- package/content/concepts/html-attributes.md +293 -0
- package/content/concepts/i18n.md +8 -3
- package/content/concepts/keyboard-shortcuts.md +2 -2
- package/content/concepts/layout-overview.md +1 -1
- package/content/concepts/logger.md +99 -0
- package/content/concepts/lowdefy-api.md +1319 -0
- package/content/concepts/lowdefy-schema.md +136 -3
- package/content/concepts/menus.md +8 -7
- package/content/concepts/module-authoring.md +76 -5
- package/content/concepts/modules.md +3 -1
- package/content/concepts/notifications.md +180 -0
- package/content/concepts/operators.md +7 -0
- package/content/concepts/page-and-app-state.md +252 -0
- package/content/concepts/page-paths.md +209 -0
- package/content/concepts/theming.md +582 -0
- package/content/connections/aigateway.md +375 -0
- package/content/connections/anthropic.md +169 -2
- package/content/connections/awss3.md +178 -2
- package/content/connections/axioshttp.md +181 -0
- package/content/connections/google.md +169 -2
- package/content/connections/mongodb.md +1014 -3
- package/content/connections/openai-connection.md +169 -2
- package/content/connections/sendgridmail.md +2 -0
- package/content/connections/smtp.md +3 -1
- package/content/connections/treg.md +329 -0
- package/content/container-blocks/affix.md +47 -7
- package/content/container-blocks/alert.md +76 -24
- package/content/container-blocks/badge.md +100 -24
- package/content/container-blocks/box.md +9 -9
- package/content/container-blocks/card.md +132 -27
- package/content/container-blocks/carousel.md +60 -7
- package/content/container-blocks/collapse.md +153 -9
- package/content/container-blocks/configprovider.md +35 -13
- package/content/container-blocks/confirmmodal.md +69 -23
- package/content/container-blocks/content.md +62 -98
- package/content/container-blocks/descriptions.md +45 -4
- package/content/container-blocks/drawer.md +139 -28
- package/content/container-blocks/dropdownmenu.md +119 -31
- package/content/container-blocks/flex.md +40 -62
- package/content/container-blocks/footer.md +15 -11
- package/content/container-blocks/googlemapsheatmap.md +1 -1
- package/content/container-blocks/googlemapsscript.md +2 -2
- package/content/container-blocks/header.md +71 -36
- package/content/container-blocks/label.md +34 -7
- package/content/container-blocks/layout.md +52 -34
- package/content/container-blocks/masonry.md +17 -71
- package/content/container-blocks/mobilemenu.md +131 -88
- package/content/container-blocks/modal.md +161 -26
- package/content/container-blocks/pageheadermenu.md +138 -31
- package/content/container-blocks/pagesidebarlayout.md +230 -27
- package/content/container-blocks/pagesidermenu.md +153 -43
- package/content/container-blocks/popover.md +34 -31
- package/content/container-blocks/result.md +32 -21
- package/content/container-blocks/sider.md +85 -122
- package/content/container-blocks/span.md +7 -7
- package/content/container-blocks/spinner.md +3 -3
- package/content/container-blocks/splitter.md +150 -68
- package/content/container-blocks/tabs.md +64 -12
- package/content/container-blocks/tooltip.md +22 -46
- package/content/container-blocks/watermark.md +22 -4
- package/content/controls/parallel_for.md +21 -2
- package/content/controls/reject.md +24 -3
- package/content/controls/return.md +17 -1
- package/content/controls/throw.md +1 -0
- package/content/controls/try.md +4 -2
- package/content/controls/while.md +46 -0
- package/content/deployment/deployment-environments.md +10 -7
- package/content/deployment/docker.md +22 -7
- package/content/deployment/node-server.md +4 -0
- package/content/deployment/vercel.md +17 -6
- package/content/display-blocks/aggrid.md +36 -19
- package/content/display-blocks/anchor.md +16 -15
- package/content/display-blocks/avatar.md +57 -37
- package/content/display-blocks/breadcrumb.md +70 -21
- package/content/display-blocks/button.md +93 -19
- package/content/display-blocks/calendar.md +12 -0
- package/content/display-blocks/clickablehtml.md +239 -0
- package/content/display-blocks/dangeroushtml.md +1 -1
- package/content/display-blocks/difflist.md +1 -1
- package/content/display-blocks/difftimeline.md +1 -1
- package/content/display-blocks/divider.md +64 -3
- package/content/display-blocks/dropdownbutton.md +81 -30
- package/content/display-blocks/echart.md +35 -1
- package/content/display-blocks/eventlog.md +363 -0
- package/content/display-blocks/floatbutton.md +129 -42
- package/content/display-blocks/html.md +61 -1
- package/content/display-blocks/icon.md +250 -67
- package/content/display-blocks/img.md +2 -2
- package/content/display-blocks/menu.md +146 -73
- package/content/display-blocks/message.md +38 -124
- package/content/display-blocks/notification.md +94 -222
- package/content/display-blocks/paragraph.md +59 -9
- package/content/display-blocks/pollingtimer.md +263 -0
- package/content/display-blocks/progress.md +96 -17
- package/content/display-blocks/qrcode.md +19 -4
- package/content/display-blocks/s3download.md +1 -1
- package/content/display-blocks/search.md +19 -9
- package/content/display-blocks/skeletonbutton.md +1 -0
- package/content/display-blocks/skeletoninput.md +1 -0
- package/content/display-blocks/statistic.md +75 -17
- package/content/display-blocks/steps.md +58 -25
- package/content/display-blocks/table.md +2527 -0
- package/content/display-blocks/tablelight.md +621 -0
- package/content/display-blocks/tag.md +102 -17
- package/content/display-blocks/title.md +50 -11
- package/content/display-blocks/tour.md +33 -23
- package/content/input-blocks/autocomplete.md +81 -9
- package/content/input-blocks/buttonselector.md +45 -8
- package/content/input-blocks/captcha.md +40 -0
- package/content/input-blocks/checkboxselector.md +97 -7
- package/content/input-blocks/checkboxswitch.md +33 -3
- package/content/input-blocks/colorselector.md +63 -14
- package/content/input-blocks/daterangeselector.md +165 -45
- package/content/input-blocks/dateselector.md +139 -41
- package/content/input-blocks/datetimeselector.md +158 -49
- package/content/input-blocks/inputgallery.md +3 -3
- package/content/input-blocks/intentinput.md +207 -0
- package/content/input-blocks/monthselector.md +120 -52
- package/content/input-blocks/multipleselector.md +150 -39
- package/content/input-blocks/numberinput.md +98 -12
- package/content/input-blocks/pagination.md +70 -14
- package/content/input-blocks/paragraphinput.md +51 -37
- package/content/input-blocks/passwordinput.md +60 -6
- package/content/input-blocks/phonenumberinput.md +59 -26
- package/content/input-blocks/placesautocomplete.md +319 -0
- package/content/input-blocks/radioselector.md +83 -7
- package/content/input-blocks/ratingslider.md +57 -26
- package/content/input-blocks/s3uploadbutton.md +24 -24
- package/content/input-blocks/s3uploaddragger.md +3 -3
- package/content/input-blocks/s3uploadphoto.md +5 -5
- package/content/input-blocks/segmentedselector.md +72 -32
- package/content/input-blocks/selector.md +109 -21
- package/content/input-blocks/switch.md +65 -17
- package/content/input-blocks/tableinput.md +445 -0
- package/content/input-blocks/tagmultipleselector.md +114 -0
- package/content/input-blocks/tagselector.md +114 -0
- package/content/input-blocks/textarea.md +32 -3
- package/content/input-blocks/textinput.md +70 -29
- package/content/input-blocks/tiptapinput.md +1 -1
- package/content/input-blocks/tiptapmentioninput.md +2 -2
- package/content/input-blocks/titleinput.md +39 -12
- package/content/input-blocks/treeinput.md +49 -25
- package/content/input-blocks/treemultipleselector.md +127 -10
- package/content/input-blocks/treeselector.md +97 -9
- package/content/input-blocks/upload.md +64 -15
- package/content/input-blocks/uploaddragger.md +17 -1
- package/content/input-blocks/uploadphoto.md +18 -1
- package/content/input-blocks/weekselector.md +120 -55
- package/content/learn/introduction.md +27 -0
- package/content/learn/quickstart.md +53 -0
- package/content/list-blocks/controlledlist.md +24 -15
- package/content/list-blocks/list.md +11 -11
- package/content/list-blocks/masonrylist.md +7 -34
- package/content/migration/auth-upgrade.md +337 -0
- package/content/migration/upgrade-guide.md +1 -0
- package/content/migration/v3-to-v4.md +417 -0
- package/content/migration/v6-to-v7.md +620 -0
- package/content/operators/_agent.md +155 -0
- package/content/operators/_app.md +2 -1
- package/content/operators/_array.md +122 -1
- package/content/operators/_build.md +1 -0
- package/content/operators/_credential.md +57 -0
- package/content/operators/_cron.md +292 -0
- package/content/operators/_date.md +2 -0
- package/content/operators/_error.md +24 -1
- package/content/operators/_get.md +6 -6
- package/content/operators/_hmac.md +78 -0
- package/content/operators/_js.md +2 -1
- package/content/operators/_location.md +1 -1
- package/content/operators/_media.md +13 -0
- package/content/operators/_module.md +56 -2
- package/content/operators/_operator.md +17 -3
- package/content/operators/_path_params.md +82 -0
- package/content/operators/_ref.md +258 -0
- package/content/operators/_request.md +1 -1
- package/content/operators/_request_details.md +6 -0
- package/content/operators/_type.md +14 -3
- package/content/operators/_url_query.md +2 -0
- package/content/operators/_user.md +3 -3
- package/content/plugins/plugins-actions.md +10 -0
- package/content/plugins/plugins-connections.md +25 -0
- package/content/plugins/plugins-dev.md +66 -0
- package/content/plugins/plugins-icon-sets.md +267 -0
- package/content/plugins/plugins-introduction.md +27 -1
- package/content/plugins/plugins.md +19 -0
- package/content/plugins/posthog.md +359 -0
- package/content/provider-reference/auth-js-providers.md +107 -0
- package/content/provider-reference/openidconnectprovider.md +44 -0
- package/content/recipes/recipes.md +16 -0
- package/content/reference/actions-reference.md +31 -0
- package/content/reference/blocks-reference.md +35 -0
- package/content/reference/cli.md +403 -0
- package/content/reference/connections-reference.md +23 -0
- package/content/reference/operators-reference.md +47 -0
- package/content/reference/reference.md +16 -0
- package/content/reference/schema-reference.md +12 -0
- package/content/testing/config-tests.md +677 -0
- package/content/testing/e2e-configuration.md +31 -1
- package/content/testing/e2e-getting-started.md +1 -1
- package/content/testing/e2e-introduction.md +1 -1
- package/content/testing/e2e-writing-tests.md +12 -1
- package/content/testing/explore-pull-request.md +136 -0
- package/content/testing/journey-data-sets.md +326 -0
- package/content/tutorial/tutorial-actions-operators.md +2 -2
- package/content/tutorial/tutorial-add-blocks.md +2 -2
- package/content/tutorial/tutorial-create-page.md +48 -2
- package/content/tutorial/tutorial-display-data-page.md +3 -3
- package/content/tutorial/tutorial-requests-api.md +155 -0
- package/content/tutorial/tutorial-requests-sql.md +153 -0
- package/content/tutorial/tutorial-start.md +66 -1
- package/content/user-authentication/auth-configuration.md +267 -0
- package/content/user-authentication/auth-providers.md +24 -0
- package/content/user-authentication/auth-steps.md +141 -0
- package/content/user-authentication/login-and-logout.md +160 -8
- package/content/user-authentication/mcp-oauth.md +424 -0
- package/content/user-authentication/organizations.md +246 -0
- package/content/user-authentication/protected-pages-apis.md +97 -0
- package/content/user-authentication/roles.md +49 -0
- package/content/user-authentication/two-factor.md +229 -0
- package/content/user-authentication/user-object.md +58 -0
- package/content/user-authentication/users-introduction.md +8 -0
- package/content/websockets/websocket-publish.md +105 -0
- package/content/websockets/websocket-subscriptions.md +136 -0
- package/content/websockets/websockets-introduction.md +101 -0
- package/hazards.json +44 -0
- package/index.json +3691 -14
- package/package.json +11 -1
- package/scripts/collectImportedFiles.js +80 -0
- package/scripts/extractAgentDocs.js +41 -30
- package/scripts/hashDocSources.js +38 -0
- package/scripts/isRedirectPage.js +26 -0
- package/scripts/recordSourceHashes.js +100 -0
- package/scripts/resolvePageSections.js +42 -0
- package/scripts/sectionKind.js +27 -0
- package/content/concepts/cli.md +0 -223
- package/content/other/introduction.md +0 -39
- package/content/other/next-auth-providers.md +0 -3
- /package/content/{other → actions}/updatesession.md +0 -0
|
@@ -341,6 +341,39 @@ Free standard shipping (3-5 business days). Express shipping available for $9.99
|
|
|
341
341
|
for $9.99 (1-2 business days).
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
+
Billed every month. Cancel any time.
|
|
345
|
+
|
|
346
|
+
Billed once a year with two months free.
|
|
347
|
+
|
|
348
|
+
```yaml
|
|
349
|
+
- id: centered_tabs
|
|
350
|
+
type: Tabs
|
|
351
|
+
properties:
|
|
352
|
+
centered: true
|
|
353
|
+
tabBarGutter: 40
|
|
354
|
+
indicator:
|
|
355
|
+
size: 24
|
|
356
|
+
align: center
|
|
357
|
+
tabs:
|
|
358
|
+
- key: centered_monthly
|
|
359
|
+
title: Monthly
|
|
360
|
+
- key: centered_yearly
|
|
361
|
+
title: Yearly
|
|
362
|
+
slots:
|
|
363
|
+
centered_monthly:
|
|
364
|
+
blocks:
|
|
365
|
+
- id: centered_monthly_content
|
|
366
|
+
type: Paragraph
|
|
367
|
+
properties:
|
|
368
|
+
content: Billed every month. Cancel any time.
|
|
369
|
+
centered_yearly:
|
|
370
|
+
blocks:
|
|
371
|
+
- id: centered_yearly_content
|
|
372
|
+
type: Paragraph
|
|
373
|
+
properties:
|
|
374
|
+
content: Billed once a year with two months free.
|
|
375
|
+
```
|
|
376
|
+
|
|
344
377
|
**Small:**
|
|
345
378
|
|
|
346
379
|
Compact tabs for dense interfaces where screen space is at a premium. Ideal for side panels and secondary navigation.
|
|
@@ -621,16 +654,16 @@ Monthly target progress at 85%. On track for completion by end of quarter.
|
|
|
621
654
|
tabs:
|
|
622
655
|
- key: icon_home
|
|
623
656
|
title: Home
|
|
624
|
-
icon:
|
|
657
|
+
icon: home
|
|
625
658
|
- key: icon_users
|
|
626
659
|
title: Users
|
|
627
|
-
icon:
|
|
660
|
+
icon: users
|
|
628
661
|
- key: icon_settings
|
|
629
662
|
title: Settings
|
|
630
|
-
icon:
|
|
663
|
+
icon: settings
|
|
631
664
|
- key: icon_chart
|
|
632
665
|
title: Analytics
|
|
633
|
-
icon:
|
|
666
|
+
icon: chart
|
|
634
667
|
slots:
|
|
635
668
|
icon_home:
|
|
636
669
|
blocks:
|
|
@@ -684,17 +717,17 @@ Monthly target progress at 85%. On track for completion by end of quarter.
|
|
|
684
717
|
- key: ci_success
|
|
685
718
|
title: Passed
|
|
686
719
|
icon:
|
|
687
|
-
name:
|
|
720
|
+
name: check-circle
|
|
688
721
|
color: "#52c41a"
|
|
689
722
|
- key: ci_warning
|
|
690
723
|
title: Warnings
|
|
691
724
|
icon:
|
|
692
|
-
name:
|
|
725
|
+
name: warning
|
|
693
726
|
color: "#faad14"
|
|
694
727
|
- key: ci_error
|
|
695
728
|
title: Failed
|
|
696
729
|
icon:
|
|
697
|
-
name:
|
|
730
|
+
name: close-circle
|
|
698
731
|
color: "#ff4d4f"
|
|
699
732
|
slots:
|
|
700
733
|
ci_success:
|
|
@@ -852,7 +885,7 @@ Your video library. Supports MP4, WebM, and MOV formats. Maximum file size is 50
|
|
|
852
885
|
flex: 0 0 auto
|
|
853
886
|
properties:
|
|
854
887
|
title: Upload
|
|
855
|
-
icon:
|
|
888
|
+
icon: upload
|
|
856
889
|
color: primary
|
|
857
890
|
variant: solid
|
|
858
891
|
size: small
|
|
@@ -899,13 +932,13 @@ Yesterday - Alex created 3 new issues in the backlog tracker.
|
|
|
899
932
|
tabs:
|
|
900
933
|
- key: rich_dashboard
|
|
901
934
|
title: Dashboard
|
|
902
|
-
icon:
|
|
935
|
+
icon: Gauge
|
|
903
936
|
- key: rich_team
|
|
904
937
|
title: Team
|
|
905
|
-
icon:
|
|
938
|
+
icon: users
|
|
906
939
|
- key: rich_activity
|
|
907
940
|
title: Activity
|
|
908
|
-
icon:
|
|
941
|
+
icon: history
|
|
909
942
|
slots:
|
|
910
943
|
rich_dashboard:
|
|
911
944
|
blocks:
|
|
@@ -1664,7 +1697,13 @@ Press Cmd+3 (Mac) or Ctrl+3 (Windows) to jump to this tab.
|
|
|
1664
1697
|
| Property | Type | Default | Description |
|
|
1665
1698
|
| --- | --- | --- | --- |
|
|
1666
1699
|
| `animated` | boolean | `true` | Whether to change tabs with animation. Only works while tabPlacement is top or bottom. |
|
|
1700
|
+
| `centered` | boolean | `false` | Center the tabs in the tab bar. |
|
|
1667
1701
|
| `defaultActiveKey` | string | - | Initial active TabPane's key, if activeKey is not set. |
|
|
1702
|
+
| `destroyOnHidden` | boolean | `false` | Unmount the content of inactive tabs. Blocks in a hidden tab keep their state values. |
|
|
1703
|
+
| `indicator` | object | - | Size and alignment of the active tab indicator (ink bar). |
|
|
1704
|
+
| `indicator.size` | number | - | Length of the indicator in pixels. Defaults to the width of the tab. |
|
|
1705
|
+
| `indicator.align` | string | `"center"` | Alignment of the indicator along the tab when size is set. Enum: `start`, `center`, `end`. |
|
|
1706
|
+
| `tabBarGutter` | number | - | Gap between tabs in pixels. |
|
|
1668
1707
|
| `size` | string | `"default"` | Size of the tabs. Enum: `default`, `small`, `large`. |
|
|
1669
1708
|
| `tabPlacement` | string | `"top"` | Position of the tabs. Enum: `top`, `end`, `bottom`, `start`. |
|
|
1670
1709
|
| `tabType` | string | `"line"` | Type of tabs. Enum: `line`, `card`. |
|
|
@@ -1673,13 +1712,24 @@ Press Cmd+3 (Mac) or Ctrl+3 (Windows) to jump to this tab.
|
|
|
1673
1712
|
| `tabs.$.key` | string | - | Area key of the tab. |
|
|
1674
1713
|
| `tabs.$.eventName` | string | - | Block-level event name to trigger when this tab becomes active, in addition to onChange. Declare an event with this name under `events:`. The event receives `{ key }` of the now-active tab. |
|
|
1675
1714
|
| `tabs.$.disabled` | boolean | `false` | Disable the tab if true. |
|
|
1676
|
-
| `tabs.$.icon` | string \| object | - |
|
|
1715
|
+
| `tabs.$.icon` | string \| object | - | Icon name (a semantic name like `edit`, a Lucide icon name like `Pencil`, or a set-qualified name like `tabler:Pencil`) or properties of an Icon block to customize icon to show in tab title. |
|
|
1716
|
+
| `tabs.$.icon.name` | string | - | Icon name: a semantic name like `edit`, a Lucide icon name like `Pencil`, or a set-qualified name like `tabler:Pencil`. |
|
|
1717
|
+
| `tabs.$.icon.color` | string | - | Icon color. |
|
|
1718
|
+
| `tabs.$.icon.size` | string \| number | - | Size of the icon. Defaults to `theme.icons.size`. |
|
|
1719
|
+
| `tabs.$.icon.rotate` | number | - | Number of degrees to rotate the icon. |
|
|
1720
|
+
| `tabs.$.icon.spin` | boolean | - | Continuously spin the icon with animation. |
|
|
1721
|
+
| `tabs.$.icon.strokeWidth` | number | - | Stroke width of the icon lines, in pixels of the 24px icon grid. Defaults to `theme.icons.strokeWidth` (2). |
|
|
1722
|
+
| `tabs.$.icon.nonScalingStroke` | boolean | - | Keep the stroke width constant at any icon size. Defaults to `theme.icons.nonScalingStroke`. |
|
|
1723
|
+
| `tabs.$.icon.title` | string | - | Icon hover title for accessibility. An empty string marks the icon as decorative. |
|
|
1724
|
+
| `tabs.$.icon.disableLoadingIcon` | boolean | - | While loading after the icon has been clicked, don't render the loading icon. |
|
|
1677
1725
|
| `tabs.$.shortcut` | string | - | Keyboard shortcut to switch to this tab. Use "mod" for Cmd/Ctrl. |
|
|
1678
1726
|
| `extraAreaKey` | string | - | Area key for the extra area blocks. |
|
|
1679
1727
|
| `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design tabs tokens](https://ant.design/components/tabs#design-token). |
|
|
1680
1728
|
| `theme.cardBg` | string | `"rgba(0, 0, 0, 0.02)"` | Background color of card-type tab. |
|
|
1681
1729
|
| `theme.cardGutter` | number | `2` | Gap between card-type tabs. |
|
|
1682
1730
|
| `theme.cardHeight` | number | `40` | Height of card-type tab. |
|
|
1731
|
+
| `theme.cardHeightSM` | number | `32` | Height of small card-type tab. |
|
|
1732
|
+
| `theme.cardHeightLG` | number | `48` | Height of large card-type tab. |
|
|
1683
1733
|
| `theme.cardPadding` | string | `"8px 16px"` | Padding of card-type tab. |
|
|
1684
1734
|
| `theme.cardPaddingLG` | string | `"11px 16px"` | Padding of large card-type tab. |
|
|
1685
1735
|
| `theme.cardPaddingSM` | string | `"4px 8px"` | Padding of small card-type tab. |
|
|
@@ -1714,5 +1764,7 @@ Press Cmd+3 (Mac) or Ctrl+3 (Windows) to jump to this tab.
|
|
|
1714
1764
|
| `/tabBar` | The Tabs tab bar. |
|
|
1715
1765
|
| `/tabPane` | The Tabs tab pane. |
|
|
1716
1766
|
| `/inkBar` | The Tabs ink bar. |
|
|
1767
|
+
| `/item` | Each tab in the tab bar. |
|
|
1768
|
+
| `/popup` | The dropdown that lists tabs that overflow the tab bar. |
|
|
1717
1769
|
|
|
1718
1770
|
Slot keys are user-defined in your config and resolved at build time — not generated at runtime. The block typically pairs slots with an array property (`tabs`, `panels`, `slides`) listed in the Properties table; see the examples above for the expected shape.
|
|
@@ -689,7 +689,7 @@ Hover over this text to see the tooltip.
|
|
|
689
689
|
layout:
|
|
690
690
|
flex: 0 0 auto
|
|
691
691
|
properties:
|
|
692
|
-
icon:
|
|
692
|
+
icon: delete
|
|
693
693
|
hideTitle: true
|
|
694
694
|
color: danger
|
|
695
695
|
variant: text
|
|
@@ -749,7 +749,8 @@ Hover over this text to see the tooltip.
|
|
|
749
749
|
flex: 0 0 auto
|
|
750
750
|
properties:
|
|
751
751
|
title: Tooltip with custom overlay style
|
|
752
|
-
|
|
752
|
+
style:
|
|
753
|
+
.inner:
|
|
753
754
|
boxShadow: 0 4px 12px rgba(0, 0, 0, 0.3)
|
|
754
755
|
blocks:
|
|
755
756
|
- id: tooltip_overlay_style_btn
|
|
@@ -920,7 +921,7 @@ Hover me (Tailwind element class)
|
|
|
920
921
|
properties:
|
|
921
922
|
title: Tailwind on element wrapper
|
|
922
923
|
class:
|
|
923
|
-
element: cursor-help
|
|
924
|
+
.element: cursor-help
|
|
924
925
|
blocks:
|
|
925
926
|
- id: tooltip_class_element_text
|
|
926
927
|
type: Paragraph
|
|
@@ -933,7 +934,7 @@ Hover me (Tailwind element class)
|
|
|
933
934
|
properties:
|
|
934
935
|
title: Tailwind on inner popup
|
|
935
936
|
class:
|
|
936
|
-
inner: text-lg font-bold
|
|
937
|
+
.inner: text-lg font-bold
|
|
937
938
|
blocks:
|
|
938
939
|
- id: tooltip_class_inner_btn
|
|
939
940
|
type: Button
|
|
@@ -1088,47 +1089,19 @@ $8,230
|
|
|
1088
1089
|
properties:
|
|
1089
1090
|
label:
|
|
1090
1091
|
title: Username
|
|
1091
|
-
|
|
1092
|
-
-
|
|
1093
|
-
|
|
1094
|
-
layout:
|
|
1095
|
-
flex: 0 0 auto
|
|
1096
|
-
properties:
|
|
1097
|
-
title: Your unique username. Must be 3-20 characters, letters and numbers only.
|
|
1098
|
-
placement: right
|
|
1099
|
-
blocks:
|
|
1100
|
-
- id: tooltip_form_username_icon
|
|
1101
|
-
type: Icon
|
|
1102
|
-
layout:
|
|
1103
|
-
flex: 0 0 auto
|
|
1104
|
-
properties:
|
|
1105
|
-
name: AiOutlineQuestionCircle
|
|
1106
|
-
size: 14
|
|
1107
|
-
color: "#8c8c8c"
|
|
1092
|
+
tooltip:
|
|
1093
|
+
title: Your unique username. Must be 3-20 characters, letters and numbers only.
|
|
1094
|
+
color: "#8c8c8c"
|
|
1108
1095
|
placeholder: Enter your username
|
|
1109
1096
|
- id: tooltip_form_email
|
|
1110
1097
|
type: TextInput
|
|
1111
1098
|
properties:
|
|
1112
1099
|
label:
|
|
1113
1100
|
title: Email Address
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
flex: 0 0 auto
|
|
1119
|
-
properties:
|
|
1120
|
-
title: We will send account notifications to this address. You can change it at
|
|
1121
|
-
any time.
|
|
1122
|
-
placement: right
|
|
1123
|
-
blocks:
|
|
1124
|
-
- id: tooltip_form_email_icon
|
|
1125
|
-
type: Icon
|
|
1126
|
-
layout:
|
|
1127
|
-
flex: 0 0 auto
|
|
1128
|
-
properties:
|
|
1129
|
-
name: AiOutlineQuestionCircle
|
|
1130
|
-
size: 14
|
|
1131
|
-
color: "#8c8c8c"
|
|
1101
|
+
tooltip:
|
|
1102
|
+
title: We will send account notifications to this address. You can change it at
|
|
1103
|
+
any time.
|
|
1104
|
+
color: "#8c8c8c"
|
|
1132
1105
|
placeholder: Enter your email
|
|
1133
1106
|
```
|
|
1134
1107
|
|
|
@@ -1175,7 +1148,7 @@ Monthly Revenue
|
|
|
1175
1148
|
layout:
|
|
1176
1149
|
flex: 0 0 auto
|
|
1177
1150
|
properties:
|
|
1178
|
-
name:
|
|
1151
|
+
name: info
|
|
1179
1152
|
size: 14
|
|
1180
1153
|
color: "#8c8c8c"
|
|
1181
1154
|
- id: tooltip_dashboard_users_stat
|
|
@@ -1220,7 +1193,7 @@ Monthly Revenue
|
|
|
1220
1193
|
layout:
|
|
1221
1194
|
flex: 0 0 auto
|
|
1222
1195
|
properties:
|
|
1223
|
-
name:
|
|
1196
|
+
name: info
|
|
1224
1197
|
size: 14
|
|
1225
1198
|
color: "#8c8c8c"
|
|
1226
1199
|
- id: tooltip_dashboard_revenue_stat
|
|
@@ -1237,15 +1210,18 @@ Monthly Revenue
|
|
|
1237
1210
|
|
|
1238
1211
|
| Property | Type | Default | Description |
|
|
1239
1212
|
| --- | --- | --- | --- |
|
|
1240
|
-
| `
|
|
1213
|
+
| `arrow` | boolean \| object | `true` | Whether to show the arrow. Set `{ pointAtCenter: true }` to point the arrow at the center of the target. |
|
|
1214
|
+
| `arrow.pointAtCenter` | boolean | `false` | Whether the arrow is pointed at the center of target. |
|
|
1215
|
+
| `arrowPointAtCenter` | boolean | `false` | Whether the arrow is pointed at the center of target. Same as `arrow: { pointAtCenter: true }`. |
|
|
1241
1216
|
| `autoAdjustOverflow` | boolean | `true` | Whether to adjust popup placement automatically when popup is off screen. |
|
|
1242
1217
|
| `color` | string | - | The background color. |
|
|
1243
1218
|
| `defaultOpen` | boolean | `false` | Whether the floating tooltip card is visible by default. |
|
|
1244
|
-
| `
|
|
1219
|
+
| `destroyOnHidden` | boolean | `false` | Whether to destroy the tooltip DOM when hidden. |
|
|
1220
|
+
| `destroyTooltipOnHide` | boolean | `false` | Same as destroyOnHidden, which takes precedence. |
|
|
1245
1221
|
| `mouseEnterDelay` | number | `0.1` | Delay in seconds, before tooltip is shown on mouse enter. |
|
|
1246
|
-
| `mouseLeaveDelay` | number | `0.1` | Delay in seconds, before tooltip is
|
|
1222
|
+
| `mouseLeaveDelay` | number | `0.1` | Delay in seconds, before tooltip is hidden on mouse leave. |
|
|
1247
1223
|
| `placement` | string | `"top"` | The position of the tooltip relative to the target. Enum: `top`, `left`, `right`, `bottom`, `topLeft`, `topRight`, `bottomLeft`, `bottomRight`, `leftTop`, `leftBottom`, `rightTop`, `rightBottom`. |
|
|
1248
|
-
| `trigger` | string | `"hover"` | Tooltip trigger mode. Enum: `hover`, `focus`, `click`. |
|
|
1224
|
+
| `trigger` | string | `"hover"` | Tooltip trigger mode. `contextMenu` opens the tooltip on right click. Enum: `hover`, `focus`, `click`, `contextMenu`. |
|
|
1249
1225
|
| `title` | string | - | Title to show in the title area - supports html. Overwritten by blocks in the title content area. |
|
|
1250
1226
|
| `zIndex` | integer | - | The z-index of the Tooltip. |
|
|
1251
1227
|
| `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design tooltip tokens](https://ant.design/components/tooltip#design-token). |
|
|
@@ -1261,7 +1237,7 @@ Monthly Revenue
|
|
|
1261
1237
|
|
|
1262
1238
|
| Event | Event Data | Description |
|
|
1263
1239
|
| --- | --- | --- |
|
|
1264
|
-
| `onOpenChange` |
|
|
1240
|
+
| `onOpenChange` | `{ open }` | Trigger action when visibility of the tooltip card is changed. |
|
|
1265
1241
|
|
|
1266
1242
|
| Key | Target |
|
|
1267
1243
|
| --- | --- |
|
|
@@ -91,6 +91,24 @@ Watermark overlay with text, image, and font customization.
|
|
|
91
91
|
height: 200px
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
+
```yaml
|
|
95
|
+
- id: per_line_font
|
|
96
|
+
type: Watermark
|
|
97
|
+
properties:
|
|
98
|
+
text:
|
|
99
|
+
- text: CONFIDENTIAL
|
|
100
|
+
font:
|
|
101
|
+
fontSize: 22
|
|
102
|
+
fontWeight: bold
|
|
103
|
+
color: rgba(255, 0, 0, 0.12)
|
|
104
|
+
- Prepared for the finance team
|
|
105
|
+
blocks:
|
|
106
|
+
- id: per_line_font_child
|
|
107
|
+
type: Box
|
|
108
|
+
style:
|
|
109
|
+
height: 200px
|
|
110
|
+
```
|
|
111
|
+
|
|
94
112
|
```yaml
|
|
95
113
|
- id: align_left
|
|
96
114
|
type: Watermark
|
|
@@ -278,7 +296,7 @@ Drag and drop files here or click to browse
|
|
|
278
296
|
- id: css_gradient_bg
|
|
279
297
|
type: Watermark
|
|
280
298
|
class:
|
|
281
|
-
element: bg-gradient-to-br from-primary/10 to-primary/5 rounded-lg p-4
|
|
299
|
+
.element: bg-gradient-to-br from-primary/10 to-primary/5 rounded-lg p-4
|
|
282
300
|
properties:
|
|
283
301
|
text: Preview
|
|
284
302
|
font:
|
|
@@ -295,7 +313,7 @@ Drag and drop files here or click to browse
|
|
|
295
313
|
- id: css_dark_surface
|
|
296
314
|
type: Watermark
|
|
297
315
|
class:
|
|
298
|
-
element: bg-bg-layout rounded-lg p-4
|
|
316
|
+
.element: bg-bg-layout rounded-lg p-4
|
|
299
317
|
properties:
|
|
300
318
|
text: Dark Theme
|
|
301
319
|
font:
|
|
@@ -320,7 +338,7 @@ Drag and drop files here or click to browse
|
|
|
320
338
|
- id: css_bordered_area
|
|
321
339
|
type: Watermark
|
|
322
340
|
class:
|
|
323
|
-
element: border-2 border-dashed border-border rounded-xl p-6
|
|
341
|
+
.element: border-2 border-dashed border-border rounded-xl p-6
|
|
324
342
|
properties:
|
|
325
343
|
text: Upload Area
|
|
326
344
|
font:
|
|
@@ -495,7 +513,7 @@ Mobile app for real-time inventory tracking across multiple warehouses. Integrat
|
|
|
495
513
|
| `inherit` | boolean | `true` | Inherit watermark config from parent Watermark block. |
|
|
496
514
|
| `offset` | array | - | Offset of the watermark from the top-left as [x, y]. |
|
|
497
515
|
| `rotate` | number | `-22` | Rotation angle of watermark in degrees. |
|
|
498
|
-
| `text` | string \| array | - | Watermark text content.
|
|
516
|
+
| `text` | string \| array | - | Watermark text content. An array renders one line per item. A line can be a string, or `{ text, font }` to give that line its own font style. |
|
|
499
517
|
| `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design watermark tokens](https://ant.design/components/watermark#design-token). |
|
|
500
518
|
| `theme.colorFill` | string | - | Default watermark text color when font.color is not set. Maps to the global colorFill token. |
|
|
501
519
|
| `theme.fontSizeLG` | number | `16` | Default watermark font size when font.fontSize is not set. Maps to the global fontSizeLG token. |
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
# :parallel_for
|
|
2
2
|
|
|
3
3
|
```
|
|
4
|
-
({:parallel_for: string, :in: any[], :do: routine}): void
|
|
4
|
+
({:parallel_for: string, :in: any[], :do: routine, :concurrency?: integer}): void
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
The `:parallel_for` control executes a routine for each item in an array simultaneously. Each iteration has access to its array item through the [`_item`](/_item) operator using the key specified in `:parallel_for`.
|
|
8
8
|
Unlike sequential [`:for`](/:for), all iterations start at the same time, making it ideal for processing independent items where order doesn't matter.
|
|
9
|
-
|
|
9
|
+
Set `:concurrency` to run at most that many iterations at once: the next item starts when one finishes. Use it when every iteration calls a rate-limited service (an AI or enrichment API), so a large array does not send hundreds of calls at the same moment.
|
|
10
|
+
The control waits for all iterations to complete before continuing. Every item runs, with or without `:concurrency`; then the first error, else the first rejection, else the first return (in item order) ends the control with that result.
|
|
10
11
|
|
|
11
12
|
#### Keys
|
|
12
13
|
|
|
13
14
|
- `:parallel_for: string`: __Required__ - Used to define the key that can be used to access the value of the array item of the executing iteration.
|
|
14
15
|
- `:in: any`: __Required__ - Used to define the array of data to iterate over.
|
|
15
16
|
- `:do: routine`: __Required__ - Used to define the routine that will be executed for each array item in parallel.
|
|
17
|
+
- `:concurrency: integer`: The maximum number of iterations running at once, a positive integer (operators allowed, for example `_payload`). Without it every iteration starts at once.
|
|
16
18
|
|
|
17
19
|
#### Examples
|
|
18
20
|
|
|
@@ -34,3 +36,20 @@ The control waits for all iterations to complete before continuing, unless an er
|
|
|
34
36
|
last_seen:
|
|
35
37
|
_date: now
|
|
36
38
|
```
|
|
39
|
+
|
|
40
|
+
###### Call a rate-limited API, five domains at a time
|
|
41
|
+
```yaml
|
|
42
|
+
- :parallel_for: domain
|
|
43
|
+
:in:
|
|
44
|
+
_payload: domains
|
|
45
|
+
:concurrency: 5
|
|
46
|
+
:do:
|
|
47
|
+
id: lookup
|
|
48
|
+
type: AxiosHttp
|
|
49
|
+
connectionId: company_api
|
|
50
|
+
properties:
|
|
51
|
+
url: /lookup
|
|
52
|
+
params:
|
|
53
|
+
domain:
|
|
54
|
+
_item: domain
|
|
55
|
+
```
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
# :reject
|
|
2
2
|
|
|
3
3
|
```
|
|
4
|
-
({:reject: string | Error, :cause: any}): void
|
|
4
|
+
({:reject: string | Error, :cause: any, :status: integer, :body: any}): void
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
The `:reject` control is used to return a user-friendly error to the client when validation fails or business rules are violated.
|
|
8
8
|
Unlike [`:throw`](/:throw), which indicates a system error, `:reject` represents an expected failure condition that should be communicated to the user.
|
|
9
9
|
The control immediately stops routine execution and returns with a `"reject"` status.
|
|
10
|
-
Importantly, `:reject` does not trigger `:catch` blocks in [`:try`](/:try) statements
|
|
10
|
+
Importantly, `:reject` does not trigger `:catch` blocks in [`:try`](/:try) statements: the reject flows past every enclosing `:try`, so a `:catch` in an outer `:try` never runs either, while `:finally` still runs.
|
|
11
|
+
This makes `:reject` ideal for handling validation and business logic errors separately from system errors.
|
|
12
|
+
Choose [`:throw`](/:throw) when a step failed and the routine may recover; choose `:reject` when the routine decided the request cannot be fulfilled.
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
In a [webhook endpoint](/api#webhook-endpoints), `:status` and `:body` set the HTTP answer: the endpoint answers `:status` (an integer from 400 to 499, default 400) with `:body` sent as is. Without `:body`, the body is `{ "error": { "code": "rejected", "message": <the reject message> } }`. A `:reject` in an `InternalApi` endpoint the webhook calls with `CallApi` sets the answer the same way. On any other endpoint, `:status` and `:body` are a build error.
|
|
15
|
+
|
|
16
|
+
`:reject` also takes an Error as its message, such as the error a `:catch` caught: `:reject: { _error: true }`. The reject message is then "Something went wrong.", unless the error was a `UserError` or an auth refusal (`AuthenticationError`, `AuthorizationError` or `TwoFactorEnrolmentRequiredError`), whose message is kept. To reject with the caught error's real message, name it: `:reject: { _error: message }`. See [`_error`](/_error).
|
|
13
17
|
|
|
14
18
|
#### Keys
|
|
15
19
|
|
|
16
20
|
- `:reject: string | Error`: __Required__ - The error message that will be returned in the response object of the API call result, or an Error whose message to use.
|
|
17
21
|
- `:cause: any`: Additional metadata that will be returned with the error message.
|
|
22
|
+
- `:status: integer`: In a webhook endpoint, or an `InternalApi` endpoint a webhook calls, the HTTP status the webhook answers with, from 400 to 499. Defaults to 400.
|
|
23
|
+
- `:body: any`: In a webhook endpoint, or an `InternalApi` endpoint a webhook calls, the body the webhook answers with, sent as is.
|
|
18
24
|
|
|
19
25
|
#### Examples
|
|
20
26
|
|
|
@@ -40,6 +46,21 @@ Importantly, `:reject` does not trigger `:catch` blocks in [`:try`](/:try) state
|
|
|
40
46
|
- " items available"
|
|
41
47
|
```
|
|
42
48
|
|
|
49
|
+
###### Answer a webhook with a status
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
- :if:
|
|
53
|
+
_eq:
|
|
54
|
+
- _step: find_ticket
|
|
55
|
+
- null
|
|
56
|
+
:then:
|
|
57
|
+
:reject: Ticket not found.
|
|
58
|
+
:status: 404
|
|
59
|
+
:body:
|
|
60
|
+
error:
|
|
61
|
+
code: not_found
|
|
62
|
+
```
|
|
63
|
+
|
|
43
64
|
###### Reject with Additional Context
|
|
44
65
|
|
|
45
66
|
```yaml
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
# :return
|
|
2
2
|
|
|
3
3
|
```
|
|
4
|
-
({:return: any}): void
|
|
4
|
+
({:return: any, :content_type: string}): void
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
The `:return` control immediately ends the execution of an API endpoint routine and returns a successful response with the specified data.
|
|
8
8
|
Any routine steps after a `:return` are not executed. The control accepts any value type (objects, arrays, strings, numbers, null) and marks the API call as successful.
|
|
9
9
|
When used within conditional controls like [`:if`](/:if) or [`:switch`](/:switch), it provides a way to exit early with a success status and return data to the client.
|
|
10
10
|
|
|
11
|
+
In a [webhook endpoint](/api#answering-with-plain-text), `:content_type: text/plain` sends the returned string as a plain-text body instead of JSON, for a handshake that wants a text reply. The value must be a string. `text/plain` is the only accepted type, and `:content_type` on any other endpoint is a build error.
|
|
12
|
+
|
|
11
13
|
The `:return` control also works in client [event action lists](/events-and-actions) — it ends the whole event successfully, the event's `catch` actions do not run, and any actions after it are recorded as skipped. Inside a `catch` action list, `:return` ends the remaining catch actions the same way, but the event keeps its error result — `success` stays `false`.
|
|
12
14
|
|
|
13
15
|
#### Keys
|
|
14
16
|
|
|
15
17
|
- `:return: any`: __Required__ - The value that will be returned in the response object of the API call result.
|
|
18
|
+
- `:content_type: string`: In a webhook endpoint, `text/plain` answers with the returned string as a plain-text body.
|
|
16
19
|
|
|
17
20
|
#### Examples
|
|
18
21
|
|
|
@@ -30,6 +33,19 @@ The `:return` control also works in client [event action lists](/events-and-acti
|
|
|
30
33
|
_step: get_company
|
|
31
34
|
```
|
|
32
35
|
|
|
36
|
+
###### Answer a webhook handshake with plain text
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
- :if:
|
|
40
|
+
_ne:
|
|
41
|
+
- _payload: query.validationToken
|
|
42
|
+
- null
|
|
43
|
+
:then:
|
|
44
|
+
:return:
|
|
45
|
+
_payload: query.validationToken
|
|
46
|
+
:content_type: text/plain
|
|
47
|
+
```
|
|
48
|
+
|
|
33
49
|
###### Switch with multiple returns
|
|
34
50
|
|
|
35
51
|
```yaml
|
|
@@ -8,6 +8,7 @@ The `:throw` control creates a system error that immediately stops routine execu
|
|
|
8
8
|
Unlike [`:reject`](/:reject), which handles expected user errors, `:throw` is designed for unexpected system failures, programming errors, or critical issues that require attention.
|
|
9
9
|
The key difference is that `:throw` can be caught and handled by [`:try`](/:try)/`:catch` blocks, while [`:reject`](/:reject) cannot.
|
|
10
10
|
This makes `:throw` ideal for recoverable system errors where you might want to implement fallback logic.
|
|
11
|
+
Choose `:throw` when a step failed and the routine may recover; choose [`:reject`](/:reject) when the routine decided the request cannot be fulfilled.
|
|
11
12
|
|
|
12
13
|
`:throw` also takes an Error as its message, such as the error a `:catch` caught: `:throw: { _error: true }`. The error is rethrown as it is, with its own class and cause, and `:cause` is ignored. The client receives it with the message "Something went wrong.", keeping its `code` and `statusCode`, unless it was a `UserError`, whose message is kept. To show the user the caught error's real message, name it: `:throw: { _error: message }`. See [`_error`](/_error).
|
|
13
14
|
|
package/content/controls/try.md
CHANGED
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
If one control in the routine chain defined in the `:try` key fails by throwing an error, the steps in the list following the failed control will not be executed.
|
|
8
8
|
To handle any errors thrown by a routine element, a routine can be provided using `catch` key.
|
|
9
9
|
The routine defined using the `:finally` key will be run regardless of whether or not the routine throws an error.
|
|
10
|
+
A [`:reject`](/:reject) inside the `:try` routine is __not__ caught. `:reject` is the routine's own reply — it stops the routine, returns a `"reject"` status to the caller, and flows past every enclosing `:catch`. `:finally` still runs. Use [`:throw`](/:throw) for failures a `:catch` should handle.
|
|
11
|
+
An error a `:catch` handles is an outcome, not a fault, when it is a request or service error (a provider's 404, a timeout) or a [`:throw`](/:throw): it is logged at debug level only. A config, operator or internal error in the `:try` is still logged as an error, with its config location, and the `:catch` runs as well.
|
|
10
12
|
Inside the `:catch` routine, the [`_error`](/_error) operator returns the error that was caught, so the routine can branch on its `statusCode` or `code`, or read its `message`. `_error` returns the error of the innermost `:catch` that encloses it, and `null` outside a `:catch`.
|
|
11
13
|
|
|
12
14
|
#### Keys
|
|
13
15
|
|
|
14
16
|
- `:try: routine`: __Required__ - The routine to be run.
|
|
15
|
-
- `:catch: routine`: The routine to execute if any step in the routine defined errors.
|
|
16
|
-
- `:finally: routine`: The routine to be run regardless of the out come of the initial routine.
|
|
17
|
+
- `:catch: routine`: The routine to execute if any step in the routine defined errors. Runs on a thrown error only — a `:reject` is not caught.
|
|
18
|
+
- `:finally: routine`: The routine to be run regardless of the out come of the initial routine. Runs on success, error and reject.
|
|
17
19
|
|
|
18
20
|
#### Examples
|
|
19
21
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# :while
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
({:while: boolean, :do: routine}): void
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
The `:while` control implements a while loop within a routine. The routine defined in the `:do` key will be repeated as long as the test defined using the `:while` key is true.
|
|
8
|
+
|
|
9
|
+
#### Keys
|
|
10
|
+
|
|
11
|
+
- `:while: boolean`: __Required__ - The test that will determine whether or not the defined routine should execute again.
|
|
12
|
+
- `:do: routine`: __Required__ - The routine to run while the test condition holds.
|
|
13
|
+
|
|
14
|
+
The `:while` condition is evaluated fresh before every iteration, against the routine's current `state` and `steps`. This is how the loop terminates - the routine in `:do` changes the state or step results that the condition reads.
|
|
15
|
+
|
|
16
|
+
Unlike `:for`, a `:while` loop does not index the step results of its body. A `:while` has no item to index by, so each iteration overwrites the previous iteration's step results, and `_step: my_step` inside or after the loop reads the value from the latest iteration.
|
|
17
|
+
|
|
18
|
+
There is no iteration cap and no timeout. A condition that the routine in `:do` never falsifies loops forever, exactly as it would in JavaScript.
|
|
19
|
+
|
|
20
|
+
#### Examples
|
|
21
|
+
|
|
22
|
+
###### Simple Example
|
|
23
|
+
```
|
|
24
|
+
- :set_state:
|
|
25
|
+
count: 0
|
|
26
|
+
- :while:
|
|
27
|
+
_lt:
|
|
28
|
+
- _state: count
|
|
29
|
+
- 5
|
|
30
|
+
:do:
|
|
31
|
+
- :log:
|
|
32
|
+
_state: count
|
|
33
|
+
- :set_state:
|
|
34
|
+
count:
|
|
35
|
+
_sum:
|
|
36
|
+
- _state: count
|
|
37
|
+
- 1
|
|
38
|
+
```
|
|
39
|
+
Logs:
|
|
40
|
+
```
|
|
41
|
+
0
|
|
42
|
+
1
|
|
43
|
+
2
|
|
44
|
+
3
|
|
45
|
+
4
|
|
46
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deployment environments
|
|
2
2
|
|
|
3
|
-
Most apps run as more than one deployment: production, a staging copy, a developer's machine. Everything that differs between them is declared once, under `config.environments`, and each deployment says which environment it is with the `LOWDEFY_ENVIRONMENT` environment variable. Lowdefy then takes every environment-specific default from the **current environment** — the app URL, crons, the email delivery filter, Sentry, and the feature switches — so none of them needs its own variable or operator chain.
|
|
3
|
+
Most apps run as more than one deployment: production, a staging copy, a developer's machine. Everything that differs between them is declared once, under `config.environments`, and each deployment says which environment it is with the `LOWDEFY_ENVIRONMENT` environment variable. Lowdefy then takes every environment-specific default from the **current environment** — the app URL, crons, the email delivery filter, Sentry, PostHog, and the feature switches — so none of them needs its own variable or operator chain.
|
|
4
4
|
|
|
5
5
|
```yaml
|
|
6
6
|
# lowdefy.yaml
|
|
@@ -46,17 +46,18 @@ Every setting is optional, and every feature is **on by default**: only an expli
|
|
|
46
46
|
| `email.filter` | none | Delivery filter (`replaceAddress`, `allowlist`, `regex`) for mail requests. |
|
|
47
47
|
| `email.enabled` | `true` | `false`: mail requests send nothing. |
|
|
48
48
|
| `sentry.enabled` | `true` | `false`: Sentry off, server and client. |
|
|
49
|
+
| `posthog.enabled` | `true` | `false`: PostHog off — `PostHogInit` behaves as `enabled: false`. |
|
|
49
50
|
| `guards.secrets`, `guards.env` | none | Regular expressions the named secrets and environment variables must match, or the build fails. |
|
|
50
51
|
|
|
51
52
|
## URL
|
|
52
53
|
|
|
53
54
|
The current environment's `url` is the default for:
|
|
54
55
|
|
|
55
|
-
- the auth
|
|
56
|
+
- the auth canonical URL (`BETTER_AUTH_URL`) — password-reset, magic-link and verification links, the CSRF origin allowlist, and the MCP resource URIs;
|
|
56
57
|
- the `serverUrl` of `RenderNotification` steps — the links and logo in notification emails;
|
|
57
58
|
- where crons are forwarded to, when another environment forwards to this one.
|
|
58
59
|
|
|
59
|
-
An explicit `
|
|
60
|
+
An explicit `BETTER_AUTH_URL` or `serverUrl` still wins. The dev server (`lowdefy dev`) never uses the current environment's `url`: notification and auth links use the request origin, the local app, even when your local `.env` names a deployed environment. On the dev server, a `BETTER_AUTH_URL` on `localhost`, `127.0.0.1` or `[::1]` follows the port the dev server runs on: the port it names is usually the one you ran on before, while `lowdefy dev` skips a busy port and the dev hub allocates its own. Any other origin, such as a tunnel, is used as set. Production never uses the request origin, since a spoofed `Host` header would then steer the links in outgoing mail. A production server with `auth.email` configured refuses to start when neither `BETTER_AUTH_URL` nor the current environment's `url` is set.
|
|
60
61
|
|
|
61
62
|
Every deployment that names an environment is taken to be served at its `url`. Preview deployments that should not sign users in on the staging host need their own environment, e.g. a `preview` environment with no `url` and the same `email.filter` and guards as staging.
|
|
62
63
|
|
|
@@ -75,15 +76,17 @@ Endpoint `schedules` can be keyed by environment name, with a `default` for the
|
|
|
75
76
|
|
|
76
77
|
- **`email.filter`** is applied to every `SMTPMailSend` and `SendGridMailSend` request whose connection sets no `filter` of its own, or a filter whose fields all resolve to `null` (a `_secret` that is not set on this deployment, say). Put a catch-all `replaceAddress` on every non-production environment and no environment can email real users by accident.
|
|
77
78
|
- A connection's own `filter` wins when it sets at least one field, and **`filter: false`** on a connection turns filtering off entirely, the environment's too — for mail that must reach its real recipient everywhere, such as an invite.
|
|
79
|
+
- Addresses on the reserved `.invalid` domain are always dropped before any filter, in every environment and for auth emails too. So test users with addresses such as `user@audit.invalid` never reach a `replaceAddress` catch-all. Use `.invalid` for test users that must never receive mail, and `example.com` or `.test` for journey users whose mail a journey reads.
|
|
78
80
|
- **`email.enabled: false`** sends nothing: each message reports `{ messageId: null, to: null, disabled: true }`.
|
|
79
|
-
- Auth emails (magic links, verification, invitations sent by the auth engine) never go through a mail request, so neither setting affects them — sign-in keeps working in every environment.
|
|
81
|
+
- Auth emails (magic links, verification, invitations sent by the auth engine) never go through a mail request, so neither setting affects them — sign-in keeps working in every environment. The `auth.email` connection's own `filter` still applies to them, so set one there to catch auth emails outside production.
|
|
80
82
|
|
|
81
83
|
See the [SMTP](/SMTP) and [SendGridMail](/SendGridMail) connections for the filter fields.
|
|
82
84
|
|
|
83
|
-
## Logs and
|
|
85
|
+
## Logs, Sentry and PostHog
|
|
84
86
|
|
|
85
87
|
- Every server log line carries `environment` next to `app_name`, `app_version` and `git_sha`, so one log drain can hold every environment. Logging cannot be switched off.
|
|
86
88
|
- Sentry reports under the environment name unless `logger.sentry.environment` is set, and `sentry.enabled: false` turns it off on the server and in the browser.
|
|
89
|
+
- `PostHogInit` registers the environment name as the `environment` super property, so every PostHog event carries it. `posthog.enabled: false` switches PostHog off in that environment: `PostHogInit` behaves as `enabled: false` whatever its params say, needs no `apiKey`, and every other PostHog action is a no-op.
|
|
87
90
|
|
|
88
91
|
## Guards
|
|
89
92
|
|
|
@@ -98,7 +101,7 @@ config:
|
|
|
98
101
|
secrets: # Lowdefy secrets, by name (LOWDEFY_SECRET_<name>)
|
|
99
102
|
MONGODB_URI: 'acme-prod\.a1b2c\.mongodb\.net'
|
|
100
103
|
env: # any environment variable
|
|
101
|
-
|
|
104
|
+
BETTER_AUTH_URL: '^https://app\.example\.com$'
|
|
102
105
|
```
|
|
103
106
|
|
|
104
107
|
- Patterns match anywhere in the value, so a distinctive substring is enough; add `^` and `$` to pin the whole value. A pattern is committed with your config, so never put the sensitive part of a secret in it — a host name or database name is enough.
|
|
@@ -111,7 +114,7 @@ config:
|
|
|
111
114
|
Environment settings stay on the server. The browser only learns the current environment's **name** and the list of features it switches off, through the app metadata:
|
|
112
115
|
|
|
113
116
|
- `_app: environment` — the current environment's name.
|
|
114
|
-
- `_app: disabled` — the switched-off features, e.g. `[email,
|
|
117
|
+
- `_app: disabled` — the switched-off features, e.g. `[email, posthog]`.
|
|
115
118
|
|
|
116
119
|
Other environments' settings, URLs, secret names, email filters and guards never reach the client bundle. Only the current environment's guards are kept in the build output, in the server-only `config.json`, for the startup check.
|
|
117
120
|
|