@lowdefy/docs-content 6.0.0 → 7.0.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.
Files changed (285) hide show
  1. package/README.md +1 -0
  2. package/content/actions/downloadcsv.md +1 -1
  3. package/content/actions/emailotpsend.md +58 -0
  4. package/content/actions/emailotpverify.md +79 -0
  5. package/content/actions/getlocalstorage.md +43 -0
  6. package/content/actions/link.md +47 -1
  7. package/content/actions/login.md +25 -5
  8. package/content/actions/logout.md +7 -5
  9. package/content/actions/magiclinkverify.md +117 -0
  10. package/content/actions/pdfmake.md +2 -2
  11. package/content/actions/posthogalias.md +29 -0
  12. package/content/actions/posthogcapture.md +49 -0
  13. package/content/actions/posthogcapturepageleave.md +38 -0
  14. package/content/actions/posthogfeatureflag.md +50 -0
  15. package/content/actions/posthoggroup.md +37 -0
  16. package/content/actions/posthogidentify.md +54 -0
  17. package/content/actions/posthoginit.md +96 -0
  18. package/content/actions/posthogoptin.md +29 -0
  19. package/content/actions/posthogoptout.md +29 -0
  20. package/content/actions/posthogpageview.md +37 -0
  21. package/content/actions/posthogreloadfeatureflags.md +47 -0
  22. package/content/actions/posthogreset.md +28 -0
  23. package/content/actions/posthogsetpersonproperties.md +36 -0
  24. package/content/actions/removelocalstorage.md +28 -0
  25. package/content/actions/resetvalidation.md +5 -3
  26. package/content/actions/setdarkmode.md +3 -3
  27. package/content/actions/setglobal.md +2 -0
  28. package/content/actions/setlocale.md +1 -1
  29. package/content/actions/setlocalstorage.md +34 -0
  30. package/content/actions/setstate.md +2 -0
  31. package/content/actions/validate.md +7 -4
  32. package/content/adapter-reference/mongodbauthadapter.md +46 -0
  33. package/content/agents/agent-endpoint-tools.md +24 -0
  34. package/content/agents/agent-properties.md +13 -3
  35. package/content/agents/agent-server-hooks.md +1 -1
  36. package/content/agents/agentchat.md +41 -4
  37. package/content/agents/agentconversations.md +42 -8
  38. package/content/agents/agents-introduction.md +107 -0
  39. package/content/callback-reference/auth0logoutcallback.md +54 -0
  40. package/content/concepts/ai-agent-docs.md +455 -106
  41. package/content/concepts/blocks.md +150 -0
  42. package/content/concepts/connections-and-requests.md +402 -0
  43. package/content/concepts/custom-html.md +42 -0
  44. package/content/concepts/custom-styling.md +50 -5
  45. package/content/concepts/dynamic-page-content.md +309 -0
  46. package/content/concepts/events-and-actions.md +185 -2
  47. package/content/concepts/four-primitives.md +31 -0
  48. package/content/concepts/html-attributes.md +293 -0
  49. package/content/concepts/i18n.md +12 -3
  50. package/content/concepts/keyboard-shortcuts.md +2 -2
  51. package/content/concepts/layout-overview.md +1 -1
  52. package/content/concepts/logger.md +99 -0
  53. package/content/concepts/lowdefy-api.md +1319 -0
  54. package/content/concepts/lowdefy-schema.md +144 -3
  55. package/content/concepts/menus.md +8 -7
  56. package/content/concepts/module-authoring.md +76 -5
  57. package/content/concepts/modules.md +3 -1
  58. package/content/concepts/notifications.md +180 -0
  59. package/content/concepts/operators.md +7 -0
  60. package/content/concepts/page-and-app-state.md +252 -0
  61. package/content/concepts/page-paths.md +209 -0
  62. package/content/concepts/theming.md +582 -0
  63. package/content/connections/aigateway.md +375 -0
  64. package/content/connections/anthropic.md +169 -2
  65. package/content/connections/awss3.md +178 -2
  66. package/content/connections/axioshttp.md +181 -0
  67. package/content/connections/google.md +169 -2
  68. package/content/connections/mongodb.md +1014 -3
  69. package/content/connections/openai-connection.md +169 -2
  70. package/content/connections/sendgridmail.md +3 -0
  71. package/content/connections/smtp.md +16 -0
  72. package/content/connections/treg.md +329 -0
  73. package/content/container-blocks/affix.md +47 -7
  74. package/content/container-blocks/alert.md +76 -24
  75. package/content/container-blocks/badge.md +100 -24
  76. package/content/container-blocks/box.md +9 -9
  77. package/content/container-blocks/card.md +132 -27
  78. package/content/container-blocks/carousel.md +60 -7
  79. package/content/container-blocks/collapse.md +153 -9
  80. package/content/container-blocks/configprovider.md +35 -13
  81. package/content/container-blocks/confirmmodal.md +69 -23
  82. package/content/container-blocks/content.md +62 -98
  83. package/content/container-blocks/descriptions.md +45 -4
  84. package/content/container-blocks/drawer.md +139 -28
  85. package/content/container-blocks/dropdownmenu.md +119 -31
  86. package/content/container-blocks/flex.md +40 -62
  87. package/content/container-blocks/footer.md +15 -11
  88. package/content/container-blocks/googlemapsheatmap.md +1 -1
  89. package/content/container-blocks/googlemapsscript.md +2 -2
  90. package/content/container-blocks/header.md +71 -36
  91. package/content/container-blocks/label.md +34 -7
  92. package/content/container-blocks/layout.md +52 -34
  93. package/content/container-blocks/masonry.md +17 -71
  94. package/content/container-blocks/mobilemenu.md +131 -88
  95. package/content/container-blocks/modal.md +161 -26
  96. package/content/container-blocks/pageheadermenu.md +138 -31
  97. package/content/container-blocks/pagesidebarlayout.md +230 -27
  98. package/content/container-blocks/pagesidermenu.md +153 -43
  99. package/content/container-blocks/popover.md +34 -31
  100. package/content/container-blocks/result.md +32 -21
  101. package/content/container-blocks/sider.md +85 -122
  102. package/content/container-blocks/span.md +7 -7
  103. package/content/container-blocks/spinner.md +3 -3
  104. package/content/container-blocks/splitter.md +150 -68
  105. package/content/container-blocks/tabs.md +64 -12
  106. package/content/container-blocks/tooltip.md +22 -46
  107. package/content/container-blocks/watermark.md +22 -4
  108. package/content/controls/parallel_for.md +21 -2
  109. package/content/controls/reject.md +26 -3
  110. package/content/controls/return.md +17 -1
  111. package/content/controls/throw.md +30 -2
  112. package/content/controls/try.md +24 -2
  113. package/content/controls/while.md +46 -0
  114. package/content/deployment/deployment-environments.md +146 -0
  115. package/content/deployment/docker.md +23 -7
  116. package/content/deployment/node-server.md +4 -0
  117. package/content/deployment/vercel.md +25 -19
  118. package/content/display-blocks/aggrid.md +33 -16
  119. package/content/display-blocks/anchor.md +16 -15
  120. package/content/display-blocks/avatar.md +57 -37
  121. package/content/display-blocks/breadcrumb.md +70 -21
  122. package/content/display-blocks/button.md +93 -19
  123. package/content/display-blocks/calendar.md +12 -0
  124. package/content/display-blocks/clickablehtml.md +239 -0
  125. package/content/display-blocks/dangeroushtml.md +1 -1
  126. package/content/display-blocks/difflist.md +1 -1
  127. package/content/display-blocks/difftimeline.md +1 -1
  128. package/content/display-blocks/divider.md +64 -3
  129. package/content/display-blocks/dropdownbutton.md +81 -30
  130. package/content/display-blocks/echart.md +35 -1
  131. package/content/display-blocks/eventlog.md +363 -0
  132. package/content/display-blocks/floatbutton.md +129 -42
  133. package/content/display-blocks/html.md +61 -1
  134. package/content/display-blocks/icon.md +250 -67
  135. package/content/display-blocks/img.md +2 -2
  136. package/content/display-blocks/menu.md +146 -73
  137. package/content/display-blocks/message.md +38 -124
  138. package/content/display-blocks/notification.md +94 -222
  139. package/content/display-blocks/paragraph.md +59 -9
  140. package/content/display-blocks/pollingtimer.md +263 -0
  141. package/content/display-blocks/progress.md +96 -17
  142. package/content/display-blocks/qrcode.md +19 -4
  143. package/content/display-blocks/s3download.md +1 -1
  144. package/content/display-blocks/search.md +19 -9
  145. package/content/display-blocks/skeletonbutton.md +1 -0
  146. package/content/display-blocks/skeletoninput.md +1 -0
  147. package/content/display-blocks/statistic.md +75 -17
  148. package/content/display-blocks/steps.md +58 -25
  149. package/content/display-blocks/table.md +2527 -0
  150. package/content/display-blocks/tablelight.md +621 -0
  151. package/content/display-blocks/tag.md +102 -17
  152. package/content/display-blocks/title.md +50 -11
  153. package/content/display-blocks/tour.md +33 -23
  154. package/content/input-blocks/autocomplete.md +81 -9
  155. package/content/input-blocks/buttonselector.md +45 -8
  156. package/content/input-blocks/captcha.md +40 -0
  157. package/content/input-blocks/checkboxselector.md +97 -7
  158. package/content/input-blocks/checkboxswitch.md +33 -3
  159. package/content/input-blocks/colorselector.md +63 -14
  160. package/content/input-blocks/daterangeselector.md +165 -45
  161. package/content/input-blocks/dateselector.md +139 -41
  162. package/content/input-blocks/datetimeselector.md +158 -49
  163. package/content/input-blocks/inputgallery.md +3 -3
  164. package/content/input-blocks/intentinput.md +207 -0
  165. package/content/input-blocks/monthselector.md +120 -52
  166. package/content/input-blocks/multipleselector.md +150 -39
  167. package/content/input-blocks/numberinput.md +98 -12
  168. package/content/input-blocks/pagination.md +70 -14
  169. package/content/input-blocks/paragraphinput.md +51 -37
  170. package/content/input-blocks/passwordinput.md +60 -6
  171. package/content/input-blocks/phonenumberinput.md +59 -26
  172. package/content/input-blocks/placesautocomplete.md +319 -0
  173. package/content/input-blocks/radioselector.md +83 -7
  174. package/content/input-blocks/ratingslider.md +57 -26
  175. package/content/input-blocks/s3uploadbutton.md +24 -24
  176. package/content/input-blocks/s3uploaddragger.md +3 -3
  177. package/content/input-blocks/s3uploadphoto.md +5 -5
  178. package/content/input-blocks/segmentedselector.md +72 -32
  179. package/content/input-blocks/selector.md +109 -21
  180. package/content/input-blocks/switch.md +65 -17
  181. package/content/input-blocks/tableinput.md +445 -0
  182. package/content/input-blocks/tagmultipleselector.md +114 -0
  183. package/content/input-blocks/tagselector.md +114 -0
  184. package/content/input-blocks/textarea.md +32 -3
  185. package/content/input-blocks/textinput.md +70 -29
  186. package/content/input-blocks/tiptapinput.md +1 -1
  187. package/content/input-blocks/tiptapmentioninput.md +2 -2
  188. package/content/input-blocks/titleinput.md +39 -12
  189. package/content/input-blocks/treeinput.md +49 -25
  190. package/content/input-blocks/treemultipleselector.md +127 -10
  191. package/content/input-blocks/treeselector.md +97 -9
  192. package/content/input-blocks/upload.md +64 -15
  193. package/content/input-blocks/uploaddragger.md +17 -1
  194. package/content/input-blocks/uploadphoto.md +18 -1
  195. package/content/input-blocks/weekselector.md +120 -55
  196. package/content/learn/introduction.md +27 -0
  197. package/content/learn/quickstart.md +53 -0
  198. package/content/learn/showcase.md +8 -0
  199. package/content/list-blocks/controlledlist.md +24 -15
  200. package/content/list-blocks/list.md +11 -11
  201. package/content/list-blocks/masonrylist.md +7 -34
  202. package/content/migration/auth-upgrade.md +337 -0
  203. package/content/migration/upgrade-guide.md +1 -0
  204. package/content/migration/v3-to-v4.md +417 -0
  205. package/content/migration/v6-to-v7.md +620 -0
  206. package/content/operators/_agent.md +155 -0
  207. package/content/operators/_app.md +2 -1
  208. package/content/operators/_array.md +122 -1
  209. package/content/operators/_build.md +1 -0
  210. package/content/operators/_credential.md +57 -0
  211. package/content/operators/_cron.md +292 -0
  212. package/content/operators/_date.md +2 -0
  213. package/content/operators/_error.md +196 -0
  214. package/content/operators/_get.md +6 -6
  215. package/content/operators/_hmac.md +78 -0
  216. package/content/operators/_js.md +2 -1
  217. package/content/operators/_location.md +1 -1
  218. package/content/operators/_media.md +13 -0
  219. package/content/operators/_module.md +56 -2
  220. package/content/operators/_operator.md +17 -3
  221. package/content/operators/_path_params.md +82 -0
  222. package/content/operators/_ref.md +258 -0
  223. package/content/operators/_request.md +1 -1
  224. package/content/operators/_request_details.md +6 -0
  225. package/content/operators/_type.md +14 -3
  226. package/content/operators/_url_query.md +2 -0
  227. package/content/operators/_user.md +3 -3
  228. package/content/plugins/plugins-actions.md +10 -0
  229. package/content/plugins/plugins-connections.md +25 -0
  230. package/content/plugins/plugins-dev.md +66 -0
  231. package/content/plugins/plugins-icon-sets.md +267 -0
  232. package/content/plugins/plugins-introduction.md +27 -1
  233. package/content/plugins/plugins.md +19 -0
  234. package/content/plugins/posthog.md +359 -0
  235. package/content/provider-reference/auth-js-providers.md +107 -0
  236. package/content/provider-reference/openidconnectprovider.md +44 -0
  237. package/content/recipes/recipes.md +16 -0
  238. package/content/reference/actions-reference.md +31 -0
  239. package/content/reference/blocks-reference.md +35 -0
  240. package/content/reference/cli.md +403 -0
  241. package/content/reference/connections-reference.md +23 -0
  242. package/content/reference/operators-reference.md +47 -0
  243. package/content/reference/reference.md +16 -0
  244. package/content/reference/schema-reference.md +12 -0
  245. package/content/testing/config-tests.md +677 -0
  246. package/content/testing/e2e-configuration.md +31 -1
  247. package/content/testing/e2e-getting-started.md +1 -1
  248. package/content/testing/e2e-introduction.md +1 -1
  249. package/content/testing/e2e-writing-tests.md +12 -1
  250. package/content/testing/explore-pull-request.md +136 -0
  251. package/content/testing/journey-data-sets.md +326 -0
  252. package/content/tutorial/tutorial-actions-operators.md +2 -2
  253. package/content/tutorial/tutorial-add-blocks.md +2 -2
  254. package/content/tutorial/tutorial-create-page.md +48 -2
  255. package/content/tutorial/tutorial-display-data-page.md +3 -3
  256. package/content/tutorial/tutorial-requests-api.md +155 -0
  257. package/content/tutorial/tutorial-requests-sql.md +153 -0
  258. package/content/tutorial/tutorial-start.md +66 -1
  259. package/content/user-authentication/auth-configuration.md +267 -0
  260. package/content/user-authentication/auth-providers.md +24 -0
  261. package/content/user-authentication/auth-steps.md +141 -0
  262. package/content/user-authentication/login-and-logout.md +160 -8
  263. package/content/user-authentication/mcp-oauth.md +424 -0
  264. package/content/user-authentication/organizations.md +246 -0
  265. package/content/user-authentication/protected-pages-apis.md +97 -0
  266. package/content/user-authentication/roles.md +49 -0
  267. package/content/user-authentication/two-factor.md +229 -0
  268. package/content/user-authentication/user-object.md +58 -0
  269. package/content/user-authentication/users-introduction.md +8 -0
  270. package/content/websockets/websocket-publish.md +105 -0
  271. package/content/websockets/websocket-subscriptions.md +136 -0
  272. package/content/websockets/websockets-introduction.md +101 -0
  273. package/hazards.json +56 -0
  274. package/index.json +3472 -14
  275. package/package.json +10 -1
  276. package/scripts/extractAgentDocs.js +41 -30
  277. package/scripts/hashDocSources.js +38 -0
  278. package/scripts/isRedirectPage.js +26 -0
  279. package/scripts/recordSourceHashes.js +97 -0
  280. package/scripts/resolvePageSections.js +42 -0
  281. package/scripts/sectionKind.js +27 -0
  282. package/content/concepts/cli.md +0 -223
  283. package/content/other/introduction.md +0 -39
  284. package/content/other/next-auth-providers.md +0 -3
  285. /package/content/{other → actions}/updatesession.md +0 -0
@@ -75,6 +75,8 @@ Deleted (strikethrough) text indicating removed content.
75
75
 
76
76
  Marked (highlighted) text to call out key information.
77
77
 
78
+ Ctrl + K
79
+
78
80
  ```yaml
79
81
  - id: deco_strong
80
82
  type: Paragraph
@@ -101,6 +103,11 @@ Marked (highlighted) text to call out key information.
101
103
  properties:
102
104
  content: Marked (highlighted) text to call out key information.
103
105
  mark: true
106
+ - id: deco_keyboard
107
+ type: Paragraph
108
+ properties:
109
+ content: Ctrl + K
110
+ keyboard: true
104
111
  ```
105
112
 
106
113
  Bold and italic text for maximum emphasis.
@@ -199,6 +206,8 @@ Two-state copy icons that change after clicking
199
206
 
200
207
  npm install lowdefy
201
208
 
209
+ The copy button sits before this text.
210
+
202
211
  ```yaml
203
212
  - id: copyable_simple
204
213
  type: Paragraph
@@ -226,14 +235,21 @@ npm install lowdefy
226
235
  content: Two-state copy icons that change after clicking
227
236
  copyable:
228
237
  icon:
229
- - AiOutlineCopy
230
- - AiOutlineCheck
238
+ - copy
239
+ - check
231
240
  - id: copyable_code
232
241
  type: Paragraph
233
242
  properties:
234
243
  content: npm install lowdefy
235
244
  code: true
236
245
  copyable: true
246
+ - id: copyable_actions_start
247
+ type: Paragraph
248
+ properties:
249
+ content: The copy button sits before this text.
250
+ copyable: true
251
+ actions:
252
+ placement: start
237
253
  ```
238
254
 
239
255
  Copy this text and a message will appear.
@@ -324,6 +340,33 @@ Three-line ellipsis with a custom suffix. Lowdefy makes it easy to build interna
324
340
  suffix: " /Read More"
325
341
  ```
326
342
 
343
+ Collapsible ellipsis lets readers expand the full text and fold it back. Lowdefy apps are defined in YAML with blocks, operators, actions and connections, and the framework handles rendering, state and server-side logic.
344
+
345
+ Hover over this single line to read the full text in a tooltip. The rest of the sentence is cut off with an ellipsis when it does not fit.
346
+
347
+ ```yaml
348
+ - id: ellipsis_collapsible
349
+ type: Paragraph
350
+ properties:
351
+ content: Collapsible ellipsis lets readers expand the full text and fold it
352
+ back. Lowdefy apps are defined in YAML with blocks, operators, actions and
353
+ connections, and the framework handles rendering, state and server-side
354
+ logic.
355
+ ellipsis:
356
+ rows: 2
357
+ expandable: collapsible
358
+ symbol:
359
+ - Read more
360
+ - Show less
361
+ - id: ellipsis_tooltip
362
+ type: Paragraph
363
+ properties:
364
+ content: Hover over this single line to read the full text in a tooltip. The
365
+ rest of the sentence is cut off with an ellipsis when it does not fit.
366
+ ellipsis:
367
+ tooltip: true
368
+ ```
369
+
327
370
  Click expand to trigger an event. Lowdefy makes it easy to build internal tools, client portals, and web applications using YAML or JSON configuration files. No need to learn complex frontend frameworks, manage build tooling, or write boilerplate code.
328
371
 
329
372
  Expanding this paragraph will update state. This is useful for tracking which sections the user has read or interacted with. You can use the ellipsis state to drive conditional logic elsewhere in the app.
@@ -438,7 +481,7 @@ A blockquote-style paragraph using inline styles with a left border and padding.
438
481
  italic: true
439
482
  style:
440
483
  .element:
441
- borderLeft: 3px solid
484
+ borderLeft: "3px solid #1677ff"
442
485
  paddingLeft: 12px
443
486
  ```
444
487
 
@@ -489,7 +532,7 @@ Install the CLI to get started.
489
532
 
490
533
  npx lowdefy@latest dev
491
534
 
492
- Note: Lowdefy requires Node.js 18 or later. Check your version with node /version.
535
+ Note: Lowdefy requires Node.js 24 or later. Check your version with node /version.
493
536
 
494
537
  ```yaml
495
538
  - id: article_card
@@ -532,7 +575,7 @@ Note: Lowdefy requires Node.js 18 or later. Check your version with node /versio
532
575
  - id: article_note
533
576
  type: Paragraph
534
577
  properties:
535
- content: "Note: Lowdefy requires Node.js 18 or later. Check your version with
578
+ content: "Note: Lowdefy requires Node.js 24 or later. Check your version with
536
579
  node /version."
537
580
  type: warning
538
581
  italic: true
@@ -598,6 +641,8 @@ Maintenance window scheduled for Sunday 02:00-04:00 UTC.
598
641
 
599
642
  | Property | Type | Default | Description |
600
643
  | --- | --- | --- | --- |
644
+ | `actions` | object | - | Configure the bar of action buttons, such as copy and expand. |
645
+ | `actions.placement` | string | `"end"` | Place the action buttons before or after the text. Enum: `start`, `end`. |
601
646
  | `code` | boolean | `false` | Apply code style. |
602
647
  | `content` | string | - | Paragraph text content - supports html. |
603
648
  | `copyable` | boolean \| object | `false` | Provide copy text button. |
@@ -608,16 +653,20 @@ Maintenance window scheduled for Sunday 02:00-04:00 UTC.
608
653
  | `disabled` | boolean | `false` | Apply disabled style. |
609
654
  | `ellipsis` | boolean \| object | `false` | Display ellipsis when text overflows a single line. |
610
655
  | `ellipsis.rows` | number | - | Max rows of content. |
611
- | `ellipsis.expandable` | boolean | - | Expand hidden content when clicked. |
656
+ | `ellipsis.expandable` | boolean \| string | - | Show a button that expands the hidden content. Set to 'collapsible' to also allow collapsing it again. Enum: `true`, `false`, `collapsible`. |
657
+ | `ellipsis.defaultExpanded` | boolean | `false` | Start with the content expanded. |
612
658
  | `ellipsis.suffix` | string | - | Suffix of ellipses content. |
659
+ | `ellipsis.symbol` | string \| array | - | Text of the expand button, or an array of two strings for the expand and collapse buttons. |
660
+ | `ellipsis.tooltip` | boolean \| string | - | Show a tooltip when the text is truncated. true shows the full text, a string shows that text. |
613
661
  | `italic` | boolean | `false` | Apply italic style. |
662
+ | `keyboard` | boolean | `false` | Apply keyboard key style. |
614
663
  | `mark` | boolean | `false` | Apply marked (highlighted) style. |
615
664
  | `strong` | boolean | `false` | Apply strong (bold) style. |
616
665
  | `type` | string | `"default"` | Additional types. Don't specify for default. Enum: `success`, `default`, `secondary`, `warning`, `danger`. |
617
666
  | `underline` | boolean | `false` | Apply underline style. |
618
667
  | `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design typography tokens](https://ant.design/components/typography#design-token). |
619
- | `theme.titleMarginBottom` | string | `"0.5em"` | Margin bottom of title. |
620
- | `theme.titleMarginTop` | string | `"1.2em"` | Margin top of title. |
668
+ | `theme.titleMarginBottom` | string \| number | `"0.5em"` | Margin bottom of title, as a CSS length or a number of pixels. |
669
+ | `theme.titleMarginTop` | string \| number | `"1.2em"` | Margin top of title, as a CSS length or a number of pixels. |
621
670
  | `theme.fontWeightStrong` | number | `600` | Font weight for strong text. |
622
671
  | `theme.fontFamilyCode` | string | - | Font family for code style text. |
623
672
  | `theme.colorText` | string | - | Default text color. |
@@ -630,7 +679,7 @@ Maintenance window scheduled for Sunday 02:00-04:00 UTC.
630
679
 
631
680
  | Event | Event Data | Description |
632
681
  | --- | --- | --- |
633
- | `onExpand` | \- | Trigger action when ellipse expand is clicked. |
682
+ | `onExpand` | `{ expanded }` | Trigger action when the ellipsis expand or collapse button is clicked. |
634
683
  | `onCopy` | \- | Trigger action when copy text is clicked. |
635
684
  | `onTextSelection` | \- | Trigger action when text is selected and pass selected text to the event object. |
636
685
 
@@ -639,5 +688,6 @@ Maintenance window scheduled for Sunday 02:00-04:00 UTC.
639
688
  | `/block` | Outer block wrapper (always available). |
640
689
  | `/element` | The Paragraph element. |
641
690
  | `/copyableIcon` | The copyable icon in the Paragraph. |
691
+ | `/actions` | The bar of action buttons, such as copy and expand, next to the text. |
642
692
 
643
693
  No slots defined.
@@ -0,0 +1,263 @@
1
+ # PollingTimer
2
+
3
+ A headless timer that renders nothing and triggers its `onTick` event every `interval` milliseconds while it is running. Use it to poll a request until a background job completes, or to refresh a page on a schedule. Start and stop it with the `start`, `stop` and `toggle` methods, or set `autoStart` to start it on mount. The timer always stops when the block unmounts.
4
+
5
+ ## Poll a request until a job is done
6
+
7
+ Start the timer when a background job is kicked off, fetch the job status on every tick, and stop the timer with the `stop` method once the job reports it is done:
8
+
9
+ ```yaml
10
+ requests:
11
+ - id: create_job
12
+ type: MongoDBInsertOne
13
+ connectionId: jobs
14
+ properties:
15
+ doc:
16
+ status: queued
17
+ - id: get_job
18
+ type: MongoDBFindOne
19
+ connectionId: jobs
20
+ payload:
21
+ job_id:
22
+ _state: job_id
23
+ properties:
24
+ query:
25
+ _id:
26
+ _payload: job_id
27
+ blocks:
28
+ - id: job_poller
29
+ type: PollingTimer
30
+ properties:
31
+ interval: 3000
32
+ events:
33
+ onTick:
34
+ - id: fetch_job
35
+ type: Request
36
+ params: get_job
37
+ - id: stop_when_done
38
+ type: CallMethod
39
+ skip:
40
+ _ne:
41
+ - _request: get_job.status
42
+ - done
43
+ params:
44
+ blockId: job_poller
45
+ method: stop
46
+ - id: start_job
47
+ type: Button
48
+ properties:
49
+ title: Start job
50
+ events:
51
+ onClick:
52
+ - id: create_job
53
+ type: Request
54
+ params: create_job
55
+ - id: set_job_id
56
+ type: SetState
57
+ params:
58
+ job_id:
59
+ _request: create_job.insertedId
60
+ - id: start_polling
61
+ type: CallMethod
62
+ params:
63
+ blockId: job_poller
64
+ method: start
65
+ ```
66
+
67
+ ## Timing
68
+
69
+ The next tick is scheduled `interval` ms after the `onTick` actions finish, so a slow request never causes ticks to overlap or pile up. Stopping the timer while `onTick` actions are running lets them finish, but no further tick is scheduled.
70
+
71
+ `pauseWhenHidden` pauses the timer while `document.visibilityState` is `hidden`, so a visible browser window that has lost focus keeps ticking. The page `onVisible` and `onHidden` events also fire when the window gains or loses focus, so use them instead when you want to react to focus changes, for example to refresh data once when the user returns.
72
+
73
+ The engine keeps a history of every event it runs, so each tick adds an `onTick` entry. For a timer that runs for a long time, prefer a longer `interval` or a `maxTicks` limit.
74
+
75
+ ```yaml
76
+ - id: job_timer
77
+ type: PollingTimer
78
+ properties:
79
+ interval: 1000
80
+ events:
81
+ onTick:
82
+ - id: job_timer_set_status
83
+ type: SetState
84
+ params:
85
+ job_status:
86
+ _if:
87
+ test:
88
+ _gte:
89
+ - _event: tick
90
+ - 5
91
+ then: done
92
+ else: running
93
+ - id: job_timer_stop_when_done
94
+ type: CallMethod
95
+ skip:
96
+ _ne:
97
+ - _state: job_status
98
+ - done
99
+ params:
100
+ blockId: job_timer
101
+ method: stop
102
+ - id: job_timer_controls
103
+ type: Box
104
+ layout:
105
+ gap: 8
106
+ blocks:
107
+ - id: job_timer_start
108
+ type: Button
109
+ properties:
110
+ title: Start Job
111
+ icon: CirclePlay
112
+ events:
113
+ onClick:
114
+ - id: job_timer_set_running
115
+ type: SetState
116
+ params:
117
+ job_status: running
118
+ - id: job_timer_call_start
119
+ type: CallMethod
120
+ params:
121
+ blockId: job_timer
122
+ method: start
123
+ - id: job_timer_status
124
+ type: Span
125
+ properties:
126
+ content:
127
+ _nunjucks:
128
+ template: "Job status: {{ status }}"
129
+ on:
130
+ status:
131
+ _if_none:
132
+ - _state: job_status
133
+ - not started
134
+ ```
135
+
136
+ ```yaml
137
+ - id: manual_timer
138
+ type: PollingTimer
139
+ properties:
140
+ interval: 1000
141
+ events:
142
+ onTick:
143
+ - id: manual_timer_set_tick
144
+ type: SetState
145
+ params:
146
+ manual_ticks:
147
+ _event: tick
148
+ - id: manual_timer_controls
149
+ type: Box
150
+ layout:
151
+ gap: 8
152
+ blocks:
153
+ - id: manual_timer_start
154
+ type: Button
155
+ properties:
156
+ title: Start
157
+ icon: CirclePlay
158
+ events:
159
+ onClick:
160
+ - id: manual_timer_call_start
161
+ type: CallMethod
162
+ params:
163
+ blockId: manual_timer
164
+ method: start
165
+ - id: manual_timer_stop
166
+ type: Button
167
+ properties:
168
+ title: Stop
169
+ icon: CirclePause
170
+ events:
171
+ onClick:
172
+ - id: manual_timer_call_stop
173
+ type: CallMethod
174
+ params:
175
+ blockId: manual_timer
176
+ method: stop
177
+ - id: manual_timer_toggle
178
+ type: Button
179
+ properties:
180
+ title: Toggle
181
+ icon: ArrowRightLeft
182
+ events:
183
+ onClick:
184
+ - id: manual_timer_call_toggle
185
+ type: CallMethod
186
+ params:
187
+ blockId: manual_timer
188
+ method: toggle
189
+ - id: manual_timer_ticks
190
+ type: Span
191
+ properties:
192
+ content:
193
+ _nunjucks:
194
+ template: "Ticks: {{ ticks }}"
195
+ on:
196
+ ticks:
197
+ _state: manual_ticks
198
+ ```
199
+
200
+ ```yaml
201
+ - id: limited_timer
202
+ type: PollingTimer
203
+ properties:
204
+ interval: 1000
205
+ autoStart: true
206
+ maxTicks: 5
207
+ events:
208
+ onTick:
209
+ - id: limited_timer_set_tick
210
+ type: SetState
211
+ params:
212
+ limited_ticks:
213
+ _event: tick
214
+ - id: limited_timer_ticks
215
+ type: Span
216
+ properties:
217
+ content:
218
+ _nunjucks:
219
+ template: "Ticks: {{ ticks }} of 5"
220
+ on:
221
+ ticks:
222
+ _state: limited_ticks
223
+ ```
224
+
225
+ ```yaml
226
+ - id: background_timer
227
+ type: PollingTimer
228
+ properties:
229
+ interval: 2000
230
+ autoStart: true
231
+ pauseWhenHidden: false
232
+ events:
233
+ onTick:
234
+ - id: background_timer_set_tick
235
+ type: SetState
236
+ params:
237
+ background_ticks:
238
+ _event: tick
239
+ - id: background_timer_ticks
240
+ type: Span
241
+ properties:
242
+ content:
243
+ _nunjucks:
244
+ template: "Ticks while this tab was open or hidden: {{ ticks }}"
245
+ on:
246
+ ticks:
247
+ _state: background_ticks
248
+ ```
249
+
250
+ | Property | Type | Default | Description |
251
+ | --- | --- | --- | --- |
252
+ | `interval` | integer | - | Milliseconds to wait after the `onTick` actions of one tick finish before the next tick fires. Changing it while the timer is waiting restarts the wait. |
253
+ | `autoStart` | boolean | `false` | Start ticking when the block mounts. Off by default, so the timer is started with the `start` method. |
254
+ | `maxTicks` | integer | - | Stop the timer after this many ticks. The `onTick` event of the last tick is still triggered. Unlimited by default. |
255
+ | `pauseWhenHidden` | boolean | `true` | Pause ticking while the browser tab is hidden (`document.visibilityState`), and resume when it becomes visible again. Ticks missed while hidden are not fired on resume; the next tick fires `interval` ms after the tab is visible. |
256
+
257
+ | Event | Event Data | Description |
258
+ | --- | --- | --- |
259
+ | `onTick` | `{ tick }` | Trigger actions on every tick while the timer is running. The next tick is scheduled `interval` ms after the `onTick` actions finish, so ticks never overlap. |
260
+
261
+ No CSS keys defined.
262
+
263
+ No slots defined.
@@ -253,6 +253,76 @@ Progress indicator in line, circle, and dashboard styles.
253
253
  strokeColor: "#52c41a"
254
254
  ```
255
255
 
256
+ ```yaml
257
+ - id: gradient_line
258
+ type: Progress
259
+ properties:
260
+ percent: 80
261
+ strokeColor:
262
+ from: "#108ee9"
263
+ to: "#87d068"
264
+ - id: gradient_circle
265
+ type: Progress
266
+ properties:
267
+ type: circle
268
+ percent: 90
269
+ strokeColor:
270
+ 0%: "#108ee9"
271
+ 100%: "#87d068"
272
+ ```
273
+
274
+ ```yaml
275
+ - id: percent_inner_start
276
+ type: Progress
277
+ properties:
278
+ percent: 45
279
+ size:
280
+ - -1
281
+ - 20
282
+ percentPosition:
283
+ align: start
284
+ type: inner
285
+ - id: percent_inner_center
286
+ type: Progress
287
+ properties:
288
+ percent: 65
289
+ size:
290
+ - -1
291
+ - 20
292
+ percentPosition:
293
+ align: center
294
+ type: inner
295
+ - id: percent_outer_center
296
+ type: Progress
297
+ properties:
298
+ percent: 30
299
+ percentPosition:
300
+ align: center
301
+ type: outer
302
+ ```
303
+
304
+ ```yaml
305
+ - id: size_small_line
306
+ type: Progress
307
+ properties:
308
+ percent: 50
309
+ size: small
310
+ - id: size_circle_small
311
+ type: Progress
312
+ properties:
313
+ type: circle
314
+ percent: 50
315
+ size: small
316
+ - id: circle_steps
317
+ type: Progress
318
+ properties:
319
+ type: dashboard
320
+ percent: 60
321
+ steps:
322
+ count: 8
323
+ gap: 4
324
+ ```
325
+
256
326
  ```yaml
257
327
  - id: width_small
258
328
  type: Progress
@@ -435,7 +505,7 @@ Progress indicator in line, circle, and dashboard styles.
435
505
  layout:
436
506
  flex: 0 0 auto
437
507
  properties:
438
- name: AiOutlineFile
508
+ name: file
439
509
  size: 20
440
510
  color: "#1677ff"
441
511
  - id: upload_file_1_info
@@ -464,7 +534,7 @@ Progress indicator in line, circle, and dashboard styles.
464
534
  layout:
465
535
  flex: 0 0 auto
466
536
  properties:
467
- name: AiOutlineFile
537
+ name: file
468
538
  size: 20
469
539
  color: "#1677ff"
470
540
  - id: upload_file_2_info
@@ -495,7 +565,7 @@ Progress indicator in line, circle, and dashboard styles.
495
565
  layout:
496
566
  flex: 0 0 auto
497
567
  properties:
498
- name: AiOutlineFile
568
+ name: file
499
569
  size: 20
500
570
  color: "#ff4d4f"
501
571
  - id: upload_file_3_info
@@ -526,7 +596,7 @@ Progress indicator in line, circle, and dashboard styles.
526
596
  title: Retry Failed
527
597
  color: danger
528
598
  variant: outlined
529
- icon: AiOutlineReload
599
+ icon: refresh
530
600
  size: small
531
601
  events:
532
602
  onClick:
@@ -543,7 +613,7 @@ Progress indicator in line, circle, and dashboard styles.
543
613
  title: Upload More
544
614
  color: primary
545
615
  variant: solid
546
- icon: AiOutlineUpload
616
+ icon: upload
547
617
  size: small
548
618
  events:
549
619
  onClick:
@@ -613,7 +683,7 @@ Invite team members
613
683
  layout:
614
684
  flex: 0 0 auto
615
685
  properties:
616
- name: AiOutlineCheckCircle
686
+ name: check-circle
617
687
  size: 18
618
688
  color: "#52c41a"
619
689
  - id: onboarding_step_1_label
@@ -641,7 +711,7 @@ Invite team members
641
711
  layout:
642
712
  flex: 0 0 auto
643
713
  properties:
644
- name: AiOutlineCheckCircle
714
+ name: check-circle
645
715
  size: 18
646
716
  color: "#52c41a"
647
717
  - id: onboarding_step_2_label
@@ -669,7 +739,7 @@ Invite team members
669
739
  layout:
670
740
  flex: 0 0 auto
671
741
  properties:
672
- name: AiOutlineCheckCircle
742
+ name: check-circle
673
743
  size: 18
674
744
  color: "#52c41a"
675
745
  - id: onboarding_step_3_label
@@ -697,7 +767,7 @@ Invite team members
697
767
  layout:
698
768
  flex: 0 0 auto
699
769
  properties:
700
- name: AiOutlineClockCircle
770
+ name: clock
701
771
  size: 18
702
772
  color: "#1677ff"
703
773
  - id: onboarding_step_4_label
@@ -725,7 +795,7 @@ Invite team members
725
795
  layout:
726
796
  flex: 0 0 auto
727
797
  properties:
728
- name: AiOutlineClockCircle
798
+ name: clock
729
799
  size: 18
730
800
  color: "#d9d9d9"
731
801
  - id: onboarding_step_5_label
@@ -771,7 +841,7 @@ Invite team members
771
841
  title: Continue Setup
772
842
  color: primary
773
843
  variant: solid
774
- icon: AiOutlineArrowRight
844
+ icon: arrow-right
775
845
  events:
776
846
  onClick:
777
847
  - id: continue_msg
@@ -787,17 +857,23 @@ Invite team members
787
857
  | `showInfo` | boolean | `true` | Whether to display the progress value and the status icon. |
788
858
  | `percent` | number | `0` | Set the completion percentage. |
789
859
  | `status` | string | `"normal"` | Set the status of the Progress. Enum: `success`, `exception`, `normal`, `active`. |
790
- | `strokeLinecap` | string | `"round"` | Set the style of the progress linecap. Enum: `round`, `square`. |
791
- | `strokeColor` | string \| object | - | Color of progress bar. |
860
+ | `strokeLinecap` | string | `"round"` | Set the style of the progress linecap. Enum: `round`, `butt`, `square`. |
861
+ | `strokeColor` | string \| array \| object | - | Color of progress bar. An object like `{ from: "#108ee9", to: "#87d068" }` or `{ "0%": "#108ee9", "100%": "#87d068" }` renders a gradient, and an array colors each step when steps is set. |
792
862
  | `success` | object | - | Segmented success percent configuration. |
793
863
  | `success.percent` | number | `0` | Segmented success percent. |
794
864
  | `success.strokeColor` | string | - | Color of the success segment. |
795
865
  | `trailColor` | string | - | Color of unfilled part. |
796
- | `strokeWidth` | number | - | Set the width of the progress bar. |
797
- | `width` | number | `132` | Set the canvas width of the circular progress. |
866
+ | `strokeWidth` | number | - | Thickness of the progress bar. In pixels for line progress, and as a percentage of the canvas width for circle and dashboard progress. |
867
+ | `width` | number | `120` | Set the canvas width of the circular progress. Same as a number size. |
868
+ | `size` | number \| string \| array \| object | - | Size of the progress. 'small' or 'medium', a number (the circle diameter, or both the width and the height of a line or of each step), or `[width, height]` or `{ width, height }` for line progress. |
869
+ | `percentPosition` | object | - | Position of the progress value on line progress. |
870
+ | `percentPosition.align` | string | `"end"` | Horizontal position of the value. Enum: `start`, `center`, `end`. |
871
+ | `percentPosition.type` | string | `"outer"` | Show the value inside or outside the bar. Enum: `inner`, `outer`. |
798
872
  | `gapDegree` | number | `75` | The gap degree of half circle. |
799
- | `gapPosition` | string | `"top"` | The gap position. Enum: `top`, `bottom`, `left`, `right`. |
800
- | `steps` | number | - | Number of steps for a segmented progress bar (line type only). |
873
+ | `gapPosition` | string | `"bottom"` | The gap position of circle and dashboard progress. Enum: `top`, `bottom`, `left`, `right`. |
874
+ | `steps` | number \| object | - | Number of steps for a segmented progress bar. For circle and dashboard progress, an object `{ count, gap }` also sets the gap between steps. |
875
+ | `steps.count` | number | - | Number of steps. |
876
+ | `steps.gap` | number | `2` | Gap between steps of circle and dashboard progress. |
801
877
  | `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design progress tokens](https://ant.design/components/progress#design-token). |
802
878
  | `theme.defaultColor` | string | `"#1677ff"` | Default color of the progress bar. |
803
879
  | `theme.remainingColor` | string | `"rgba(0,0,0,0.06)"` | Color of the unfilled portion of the progress bar. |
@@ -814,5 +890,8 @@ No events defined.
814
890
  | --- | --- |
815
891
  | `/block` | Outer block wrapper (always available). |
816
892
  | `/element` | The Progress element. |
893
+ | `/rail` | The unfilled part of the progress bar. |
894
+ | `/track` | The filled part of the progress bar. |
895
+ | `/indicator` | The progress value text or status icon. |
817
896
 
818
897
  No slots defined.
@@ -173,6 +173,18 @@ QR code generator with customizable size, color, and error level.
173
173
  errorLevel: H
174
174
  icon: https://lowdefy.com/favicon-32x32.png
175
175
  iconSize: 48
176
+ - id: qr_icon_wide
177
+ type: QRCode
178
+ layout:
179
+ flex: 0 0 auto
180
+ properties:
181
+ value: https://lowdefy.com
182
+ size: 200
183
+ errorLevel: H
184
+ icon: https://lowdefy.com/favicon-32x32.png
185
+ iconSize:
186
+ width: 48
187
+ height: 32
176
188
  ```
177
189
 
178
190
  ```yaml
@@ -404,7 +416,7 @@ Present this QR code at the entrance for check-in.
404
416
  - id: ticket_qr_row
405
417
  type: Box
406
418
  layout:
407
- contentAlign: center
419
+ align: center
408
420
  gap: 8
409
421
  blocks:
410
422
  - id: ticket_qr
@@ -435,7 +447,7 @@ Present this QR code at the entrance for check-in.
435
447
  - id: wifi_qr_row
436
448
  type: Box
437
449
  layout:
438
- contentAlign: center
450
+ align: center
439
451
  gap: 8
440
452
  blocks:
441
453
  - id: wifi_qr
@@ -473,7 +485,7 @@ Present this QR code at the entrance for check-in.
473
485
  title: Generate New Password
474
486
  color: primary
475
487
  variant: outlined
476
- icon: AiOutlineReload
488
+ icon: refresh
477
489
  events:
478
490
  onClick:
479
491
  - id: wifi_refresh_msg
@@ -491,7 +503,9 @@ Present this QR code at the entrance for check-in.
491
503
  | `bgColor` | string | `"transparent"` | QRCode background color. |
492
504
  | `errorLevel` | string | `"M"` | Error correction level. Enum: `L`, `M`, `Q`, `H`. |
493
505
  | `icon` | string | - | Icon URL in the center of the QR code. |
494
- | `iconSize` | integer | `40` | Icon size in pixels. |
506
+ | `iconSize` | integer \| object | `40` | Icon size in pixels, or `{ width, height }` for an icon that is not square. |
507
+ | `iconSize.width` | integer | - | Icon width in pixels. |
508
+ | `iconSize.height` | integer | - | Icon height in pixels. |
495
509
  | `marginSize` | number | `0` | Margin size of the QR code in modules. |
496
510
  | `minVersion` | integer | `1` | Minimum QR code version (1-40). Higher versions support more data. |
497
511
  | `type` | string | `"canvas"` | Render type. Enum: `canvas`, `svg`. |
@@ -515,5 +529,6 @@ Present this QR code at the entrance for check-in.
515
529
  | --- | --- |
516
530
  | `/block` | Outer block wrapper (always available). |
517
531
  | `/element` | The QRCode element. |
532
+ | `/cover` | The overlay shown over the QR code when status is expired, loading or scanned. |
518
533
 
519
534
  No slots defined.