@lowdefy/docs-content 0.0.0-experimental-20260710073520

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 (304) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +20 -0
  3. package/content/actions/callapi.md +66 -0
  4. package/content/actions/callmethod.md +41 -0
  5. package/content/actions/copytoclipboard.md +32 -0
  6. package/content/actions/displaymessage.md +53 -0
  7. package/content/actions/downloadcsv.md +89 -0
  8. package/content/actions/fetch.md +50 -0
  9. package/content/actions/geolocationcurrentposition.md +56 -0
  10. package/content/actions/link.md +104 -0
  11. package/content/actions/login.md +85 -0
  12. package/content/actions/logout.md +56 -0
  13. package/content/actions/pdfmake.md +304 -0
  14. package/content/actions/request.md +67 -0
  15. package/content/actions/reset.md +27 -0
  16. package/content/actions/resetvalidation.md +85 -0
  17. package/content/actions/scrollto.md +85 -0
  18. package/content/actions/setdarkmode.md +62 -0
  19. package/content/actions/setfocus.md +33 -0
  20. package/content/actions/setglobal.md +63 -0
  21. package/content/actions/setlocale.md +69 -0
  22. package/content/actions/setstate.md +70 -0
  23. package/content/actions/throw.md +72 -0
  24. package/content/actions/validate.md +87 -0
  25. package/content/actions/wait.md +24 -0
  26. package/content/agents/agent-endpoint-tools.md +190 -0
  27. package/content/agents/agent-mcp-tools.md +124 -0
  28. package/content/agents/agent-multi-agent.md +136 -0
  29. package/content/agents/agent-properties.md +174 -0
  30. package/content/agents/agent-server-hooks.md +336 -0
  31. package/content/agents/agentchat.md +515 -0
  32. package/content/agents/agentconversations.md +148 -0
  33. package/content/concepts/ai-agent-docs.md +190 -0
  34. package/content/concepts/cli.md +213 -0
  35. package/content/concepts/connections-and-requests.md +7 -0
  36. package/content/concepts/custom-html.md +3 -0
  37. package/content/concepts/custom-styling.md +161 -0
  38. package/content/concepts/events-and-actions.md +271 -0
  39. package/content/concepts/hosting-files.md +18 -0
  40. package/content/concepts/i18n.md +320 -0
  41. package/content/concepts/keyboard-shortcuts.md +218 -0
  42. package/content/concepts/layout-overview.md +478 -0
  43. package/content/concepts/lists.md +144 -0
  44. package/content/concepts/logger.md +43 -0
  45. package/content/concepts/lowdefy-schema.md +365 -0
  46. package/content/concepts/menus.md +144 -0
  47. package/content/concepts/module-authoring.md +564 -0
  48. package/content/concepts/modules.md +338 -0
  49. package/content/concepts/operators.md +45 -0
  50. package/content/concepts/overview.md +19 -0
  51. package/content/concepts/references-and-templates.md +207 -0
  52. package/content/concepts/secrets.md +24 -0
  53. package/content/concepts/selectors.md +143 -0
  54. package/content/connections/amazonredshift.md +176 -0
  55. package/content/connections/anthropic.md +232 -0
  56. package/content/connections/awss3.md +313 -0
  57. package/content/connections/azureblobstorage.md +133 -0
  58. package/content/connections/elasticsearch.md +371 -0
  59. package/content/connections/google.md +228 -0
  60. package/content/connections/googlecloudstorage.md +139 -0
  61. package/content/connections/googlesheet.md +313 -0
  62. package/content/connections/knex.md +206 -0
  63. package/content/connections/mariadb.md +177 -0
  64. package/content/connections/mcp.md +134 -0
  65. package/content/connections/mongodb.md +739 -0
  66. package/content/connections/mssql.md +191 -0
  67. package/content/connections/mysql.md +192 -0
  68. package/content/connections/openai-connection.md +228 -0
  69. package/content/connections/postgresql.md +200 -0
  70. package/content/connections/redis.md +116 -0
  71. package/content/connections/sendgridmail.md +94 -0
  72. package/content/connections/smtp.md +149 -0
  73. package/content/connections/sqlite.md +187 -0
  74. package/content/connections/stripe.md +115 -0
  75. package/content/container-blocks/affix.md +413 -0
  76. package/content/container-blocks/alert.md +937 -0
  77. package/content/container-blocks/badge.md +1222 -0
  78. package/content/container-blocks/box.md +1453 -0
  79. package/content/container-blocks/card.md +1200 -0
  80. package/content/container-blocks/carousel.md +2247 -0
  81. package/content/container-blocks/collapse.md +1335 -0
  82. package/content/container-blocks/configprovider.md +1070 -0
  83. package/content/container-blocks/confirmmodal.md +1159 -0
  84. package/content/container-blocks/content.md +597 -0
  85. package/content/container-blocks/descriptions.md +870 -0
  86. package/content/container-blocks/drawer.md +1379 -0
  87. package/content/container-blocks/dropdownmenu.md +643 -0
  88. package/content/container-blocks/flex.md +1510 -0
  89. package/content/container-blocks/footer.md +380 -0
  90. package/content/container-blocks/googlemaps.md +546 -0
  91. package/content/container-blocks/googlemapsheatmap.md +607 -0
  92. package/content/container-blocks/googlemapsscript.md +61 -0
  93. package/content/container-blocks/header.md +302 -0
  94. package/content/container-blocks/label.md +739 -0
  95. package/content/container-blocks/layout.md +604 -0
  96. package/content/container-blocks/masonry.md +1090 -0
  97. package/content/container-blocks/mobilemenu.md +1244 -0
  98. package/content/container-blocks/modal.md +1180 -0
  99. package/content/container-blocks/pageheadermenu.md +614 -0
  100. package/content/container-blocks/pagesidebarlayout.md +438 -0
  101. package/content/container-blocks/pagesidermenu.md +651 -0
  102. package/content/container-blocks/popover.md +1421 -0
  103. package/content/container-blocks/result.md +972 -0
  104. package/content/container-blocks/sider.md +1064 -0
  105. package/content/container-blocks/span.md +747 -0
  106. package/content/container-blocks/spinner.md +267 -0
  107. package/content/container-blocks/splitter.md +1735 -0
  108. package/content/container-blocks/tabs.md +1718 -0
  109. package/content/container-blocks/tooltip.md +1274 -0
  110. package/content/container-blocks/watermark.md +515 -0
  111. package/content/controls/for.md +103 -0
  112. package/content/controls/if.md +107 -0
  113. package/content/controls/log.md +50 -0
  114. package/content/controls/parallel.md +71 -0
  115. package/content/controls/parallel_for.md +36 -0
  116. package/content/controls/reject.md +56 -0
  117. package/content/controls/return.md +66 -0
  118. package/content/controls/set_state.md +98 -0
  119. package/content/controls/switch.md +90 -0
  120. package/content/controls/throw.md +79 -0
  121. package/content/controls/try.md +88 -0
  122. package/content/deployment/docker.md +149 -0
  123. package/content/deployment/node-server.md +27 -0
  124. package/content/deployment/vercel.md +101 -0
  125. package/content/display-blocks/aggrid.md +1459 -0
  126. package/content/display-blocks/anchor.md +336 -0
  127. package/content/display-blocks/avatar.md +1154 -0
  128. package/content/display-blocks/breadcrumb.md +517 -0
  129. package/content/display-blocks/button.md +758 -0
  130. package/content/display-blocks/calendar.md +156 -0
  131. package/content/display-blocks/dangeroushtml.md +314 -0
  132. package/content/display-blocks/dangerousmarkdown.md +423 -0
  133. package/content/display-blocks/diffgit.md +44 -0
  134. package/content/display-blocks/difflist.md +225 -0
  135. package/content/display-blocks/diffsidebyside.md +56 -0
  136. package/content/display-blocks/difftimeline.md +94 -0
  137. package/content/display-blocks/divider.md +406 -0
  138. package/content/display-blocks/download.md +60 -0
  139. package/content/display-blocks/dropdownbutton.md +661 -0
  140. package/content/display-blocks/echart.md +418 -0
  141. package/content/display-blocks/floatbutton.md +545 -0
  142. package/content/display-blocks/html.md +311 -0
  143. package/content/display-blocks/icon.md +717 -0
  144. package/content/display-blocks/img.md +479 -0
  145. package/content/display-blocks/markdown.md +520 -0
  146. package/content/display-blocks/markdownwithcode.md +730 -0
  147. package/content/display-blocks/menu.md +1123 -0
  148. package/content/display-blocks/message.md +941 -0
  149. package/content/display-blocks/notification.md +1410 -0
  150. package/content/display-blocks/paragraph.md +643 -0
  151. package/content/display-blocks/progress.md +818 -0
  152. package/content/display-blocks/qrcode.md +519 -0
  153. package/content/display-blocks/s3download.md +240 -0
  154. package/content/display-blocks/search.md +360 -0
  155. package/content/display-blocks/skeleton.md +272 -0
  156. package/content/display-blocks/skeletonavatar.md +222 -0
  157. package/content/display-blocks/skeletonbutton.md +245 -0
  158. package/content/display-blocks/skeletoninput.md +223 -0
  159. package/content/display-blocks/skeletonparagraph.md +201 -0
  160. package/content/display-blocks/statistic.md +485 -0
  161. package/content/display-blocks/steps.md +585 -0
  162. package/content/display-blocks/tag.md +620 -0
  163. package/content/display-blocks/title.md +654 -0
  164. package/content/display-blocks/tour.md +2359 -0
  165. package/content/input-blocks/autocomplete.md +786 -0
  166. package/content/input-blocks/buttonselector.md +964 -0
  167. package/content/input-blocks/checkboxselector.md +765 -0
  168. package/content/input-blocks/checkboxswitch.md +497 -0
  169. package/content/input-blocks/colorselector.md +884 -0
  170. package/content/input-blocks/daterangeselector.md +777 -0
  171. package/content/input-blocks/dateselector.md +693 -0
  172. package/content/input-blocks/datetimeselector.md +791 -0
  173. package/content/input-blocks/inputgallery.md +528 -0
  174. package/content/input-blocks/monthselector.md +717 -0
  175. package/content/input-blocks/multipleselector.md +1337 -0
  176. package/content/input-blocks/numberinput.md +855 -0
  177. package/content/input-blocks/pagination.md +679 -0
  178. package/content/input-blocks/paragraphinput.md +1664 -0
  179. package/content/input-blocks/passwordinput.md +480 -0
  180. package/content/input-blocks/phonenumberinput.md +688 -0
  181. package/content/input-blocks/radioselector.md +820 -0
  182. package/content/input-blocks/ratingslider.md +684 -0
  183. package/content/input-blocks/s3uploadbutton.md +384 -0
  184. package/content/input-blocks/s3uploaddragger.md +305 -0
  185. package/content/input-blocks/s3uploadphoto.md +288 -0
  186. package/content/input-blocks/segmentedselector.md +782 -0
  187. package/content/input-blocks/selector.md +1162 -0
  188. package/content/input-blocks/switch.md +552 -0
  189. package/content/input-blocks/textarea.md +714 -0
  190. package/content/input-blocks/textinput.md +639 -0
  191. package/content/input-blocks/tiptapinput.md +226 -0
  192. package/content/input-blocks/tiptapmentioninput.md +471 -0
  193. package/content/input-blocks/titleinput.md +1094 -0
  194. package/content/input-blocks/treeinput.md +144 -0
  195. package/content/input-blocks/treemultipleselector.md +162 -0
  196. package/content/input-blocks/treeselector.md +185 -0
  197. package/content/input-blocks/upload.md +149 -0
  198. package/content/input-blocks/uploaddragger.md +85 -0
  199. package/content/input-blocks/uploadphoto.md +84 -0
  200. package/content/input-blocks/weekselector.md +630 -0
  201. package/content/list-blocks/controlledlist.md +498 -0
  202. package/content/list-blocks/list.md +529 -0
  203. package/content/list-blocks/listselector.md +301 -0
  204. package/content/list-blocks/masonrylist.md +230 -0
  205. package/content/migration/upgrade-guide.md +106 -0
  206. package/content/migration/v4-to-v5.md +589 -0
  207. package/content/migration/v5-to-v6.md +36 -0
  208. package/content/operators/_actions.md +58 -0
  209. package/content/operators/_and.md +76 -0
  210. package/content/operators/_api.md +254 -0
  211. package/content/operators/_app.md +114 -0
  212. package/content/operators/_args.md +65 -0
  213. package/content/operators/_array.md +331 -0
  214. package/content/operators/_base64.md +49 -0
  215. package/content/operators/_boolean.md +33 -0
  216. package/content/operators/_build.md +166 -0
  217. package/content/operators/_change_case.md +357 -0
  218. package/content/operators/_date.md +415 -0
  219. package/content/operators/_dayjs.md +128 -0
  220. package/content/operators/_diff.md +61 -0
  221. package/content/operators/_divide.md +32 -0
  222. package/content/operators/_eq.md +52 -0
  223. package/content/operators/_event.md +86 -0
  224. package/content/operators/_function.md +52 -0
  225. package/content/operators/_get.md +92 -0
  226. package/content/operators/_global.md +86 -0
  227. package/content/operators/_gt.md +50 -0
  228. package/content/operators/_gte.md +50 -0
  229. package/content/operators/_hash.md +112 -0
  230. package/content/operators/_if.md +30 -0
  231. package/content/operators/_if_none.md +47 -0
  232. package/content/operators/_index.md +48 -0
  233. package/content/operators/_input.md +86 -0
  234. package/content/operators/_intl.md +135 -0
  235. package/content/operators/_item.md +166 -0
  236. package/content/operators/_js.md +113 -0
  237. package/content/operators/_json.md +120 -0
  238. package/content/operators/_jsonata.md +152 -0
  239. package/content/operators/_locale.md +65 -0
  240. package/content/operators/_location.md +40 -0
  241. package/content/operators/_log.md +22 -0
  242. package/content/operators/_lt.md +50 -0
  243. package/content/operators/_lte.md +50 -0
  244. package/content/operators/_math.md +407 -0
  245. package/content/operators/_media.md +83 -0
  246. package/content/operators/_menu.md +62 -0
  247. package/content/operators/_module.md +340 -0
  248. package/content/operators/_mql.md +95 -0
  249. package/content/operators/_ne.md +62 -0
  250. package/content/operators/_not.md +33 -0
  251. package/content/operators/_number.md +159 -0
  252. package/content/operators/_nunjucks.md +117 -0
  253. package/content/operators/_object.md +253 -0
  254. package/content/operators/_operator.md +33 -0
  255. package/content/operators/_or.md +67 -0
  256. package/content/operators/_product.md +45 -0
  257. package/content/operators/_random.md +90 -0
  258. package/content/operators/_ref.md +80 -0
  259. package/content/operators/_regex.md +69 -0
  260. package/content/operators/_request.md +35 -0
  261. package/content/operators/_request_details.md +29 -0
  262. package/content/operators/_secret.md +56 -0
  263. package/content/operators/_state.md +134 -0
  264. package/content/operators/_step.md +98 -0
  265. package/content/operators/_string.md +327 -0
  266. package/content/operators/_subtract.md +24 -0
  267. package/content/operators/_sum.md +45 -0
  268. package/content/operators/_switch.md +37 -0
  269. package/content/operators/_t.md +96 -0
  270. package/content/operators/_theme.md +65 -0
  271. package/content/operators/_type.md +78 -0
  272. package/content/operators/_uri.md +49 -0
  273. package/content/operators/_url_query.md +92 -0
  274. package/content/operators/_user.md +154 -0
  275. package/content/operators/_uuid.md +118 -0
  276. package/content/operators/_var.md +88 -0
  277. package/content/operators/_yaml.md +96 -0
  278. package/content/other/introduction.md +39 -0
  279. package/content/other/next-auth-providers.md +3 -0
  280. package/content/other/updatesession.md +26 -0
  281. package/content/plugins/plugins-actions.md +80 -0
  282. package/content/plugins/plugins-connections.md +98 -0
  283. package/content/plugins/plugins-dev.md +138 -0
  284. package/content/plugins/plugins-introduction.md +29 -0
  285. package/content/plugins/plugins-operators.md +71 -0
  286. package/content/testing/e2e-auth.md +108 -0
  287. package/content/testing/e2e-configuration.md +107 -0
  288. package/content/testing/e2e-getting-started.md +96 -0
  289. package/content/testing/e2e-introduction.md +53 -0
  290. package/content/testing/e2e-mocking.md +155 -0
  291. package/content/testing/e2e-writing-tests.md +214 -0
  292. package/content/tutorial/tutorial-actions-operators.md +222 -0
  293. package/content/tutorial/tutorial-add-blocks.md +86 -0
  294. package/content/tutorial/tutorial-create-page.md +57 -0
  295. package/content/tutorial/tutorial-display-data-page.md +181 -0
  296. package/content/tutorial/tutorial-next-steps.md +53 -0
  297. package/content/tutorial/tutorial-requests-sql.md +22 -0
  298. package/content/tutorial/tutorial-start.md +71 -0
  299. package/content/user-authentication/auth-providers.md +15 -0
  300. package/content/user-authentication/login-and-logout.md +122 -0
  301. package/content/user-authentication/users-introduction.md +31 -0
  302. package/index.json +2281 -0
  303. package/package.json +34 -0
  304. package/scripts/extractAgentDocs.js +130 -0
@@ -0,0 +1,240 @@
1
+ # S3Download
2
+
3
+ __Deprecated__ — use the provider-neutral <a href="/Download">Download</a> block with `downloadPolicyRequestId` instead. S3Download remains as an alias so existing apps keep working. Download files from AWS S3. Requires an AwsS3Bucket connection and an AwsS3PresignedGetObject request. The s3GetPolicyRequestId property must reference the request id. If files were uploaded with S3Upload, its fileList value can be mapped directly to this block.
4
+
5
+ > The S3Download block requires an AwsS3Bucket connection and an AwsS3PresignedGetObject request. The examples below show configuration structure but will not download files without a configured connection.
6
+
7
+ ```yaml
8
+ - id: basic_download
9
+ type: S3Download
10
+ properties:
11
+ s3GetPolicyRequestId: download_file
12
+ fileList:
13
+ - key: report.pdf
14
+ type: application/pdf
15
+ name: report.pdf
16
+ - key: photo.jpg
17
+ type: image/jpeg
18
+ name: photo.jpg
19
+ ```
20
+
21
+ ```yaml
22
+ - id: single_file
23
+ type: S3Download
24
+ properties:
25
+ s3GetPolicyRequestId: download_file
26
+ fileList:
27
+ - key: invoice_2026_001.pdf
28
+ type: application/pdf
29
+ name: invoice_2026_001.pdf
30
+ ```
31
+
32
+ ```yaml
33
+ - id: multi_type
34
+ type: S3Download
35
+ properties:
36
+ s3GetPolicyRequestId: download_file
37
+ fileList:
38
+ - key: documents/contract.pdf
39
+ type: application/pdf
40
+ name: contract.pdf
41
+ - key: images/logo.png
42
+ type: image/png
43
+ name: logo.png
44
+ - key: data/export.csv
45
+ type: text/csv
46
+ name: export.csv
47
+ - key: archives/backup.zip
48
+ type: application/zip
49
+ name: backup.zip
50
+ ```
51
+
52
+ ```yaml
53
+ - id: styled_download
54
+ type: S3Download
55
+ style:
56
+ .element:
57
+ background: "#f6ffed"
58
+ border: 1px solid
59
+ borderRadius: 8
60
+ padding: 12
61
+ properties:
62
+ s3GetPolicyRequestId: download_file
63
+ fileList:
64
+ - key: report.pdf
65
+ type: application/pdf
66
+ name: Quarterly Report.pdf
67
+ - key: summary.pdf
68
+ type: application/pdf
69
+ name: Executive Summary.pdf
70
+ ```
71
+
72
+ ```yaml
73
+ - id: themed_download
74
+ type: S3Download
75
+ properties:
76
+ s3GetPolicyRequestId: download_file
77
+ theme:
78
+ actionsColor: "#f5222d"
79
+ controlItemBgHover: "#f9f0ff"
80
+ colorIcon: "#f5222d"
81
+ fontSize: 18
82
+ fileList:
83
+ - key: contracts/nda.pdf
84
+ type: application/pdf
85
+ name: Non-Disclosure Agreement.pdf
86
+ - key: contracts/sla.pdf
87
+ type: application/pdf
88
+ name: Service Level Agreement.pdf
89
+ - key: contracts/msa.pdf
90
+ type: application/pdf
91
+ name: Master Services Agreement.pdf
92
+ ```
93
+
94
+ Full page config with connection, request, and S3Download block:
95
+ ```yaml
96
+ # lowdefy.yaml
97
+ connections:
98
+ - id: project_files
99
+ type: AwsS3Bucket
100
+ properties:
101
+ accessKeyId:
102
+ _secret: FILES_S3_ACCESS_KEY_ID
103
+ secretAccessKey:
104
+ _secret: FILES_S3_SECRET_ACCESS_KEY
105
+ region: us-east-1
106
+ bucket:
107
+ _secret: FILES_S3_BUCKET
108
+
109
+ # page config
110
+ id: document_portal
111
+ type: PageSiderMenu
112
+ blocks:
113
+ - id: documents_card
114
+ type: Card
115
+ properties:
116
+ title: Project Documents
117
+ blocks:
118
+ - id: download_files
119
+ type: S3Download
120
+ properties:
121
+ s3GetPolicyRequestId: download_file
122
+ fileList:
123
+ - key: projects/alpha/proposal.pdf
124
+ type: application/pdf
125
+ name: Project Alpha - Proposal.pdf
126
+ - key: projects/alpha/budget.xlsx
127
+ type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
128
+ name: Project Alpha - Budget.xlsx
129
+ requests:
130
+ - id: download_file
131
+ type: AwsS3PresignedGetObject
132
+ connectionId: project_files
133
+ payload:
134
+ key:
135
+ _event: file.key
136
+ type:
137
+ _event: file.type
138
+ properties:
139
+ key:
140
+ _payload: key
141
+ responseContentType:
142
+ _payload: type
143
+ ```
144
+
145
+ Upload and download files on the same page by mapping the S3Upload fileList to S3Download:
146
+ ```yaml
147
+ # lowdefy.yaml
148
+ connections:
149
+ - id: attachments
150
+ type: AwsS3Bucket
151
+ properties:
152
+ accessKeyId:
153
+ _secret: FILES_S3_ACCESS_KEY_ID
154
+ secretAccessKey:
155
+ _secret: FILES_S3_SECRET_ACCESS_KEY
156
+ region: us-east-1
157
+ bucket:
158
+ _secret: FILES_S3_BUCKET
159
+ write: true
160
+
161
+ # page config
162
+ id: file_management
163
+ type: PageSiderMenu
164
+ blocks:
165
+ - id: upload_card
166
+ type: Card
167
+ properties:
168
+ title: Upload Files
169
+ blocks:
170
+ - id: upload_files
171
+ type: S3Upload
172
+ properties:
173
+ s3PutPolicyRequestId: upload_policy
174
+ requests:
175
+ - id: upload_policy
176
+ type: AwsS3PresignedPutObject
177
+ connectionId: attachments
178
+ payload:
179
+ filename:
180
+ _event: filename
181
+ properties:
182
+ key:
183
+ _payload: filename
184
+ - id: download_card
185
+ type: Card
186
+ properties:
187
+ title: Download Uploaded Files
188
+ blocks:
189
+ - id: download_files
190
+ type: S3Download
191
+ properties:
192
+ s3GetPolicyRequestId: download_policy
193
+ # Map fileList directly from S3Upload state
194
+ fileList:
195
+ _state: upload_files
196
+ requests:
197
+ - id: download_policy
198
+ type: AwsS3PresignedGetObject
199
+ connectionId: attachments
200
+ payload:
201
+ key:
202
+ _event: file.key
203
+ type:
204
+ _event: file.type
205
+ properties:
206
+ key:
207
+ _payload: key
208
+ responseContentType:
209
+ _payload: type
210
+ ```
211
+
212
+ | Property | Type | Default | Description |
213
+ | --- | --- | --- | --- |
214
+ | `fileList` | array | - | List of files to be downloaded. If files were uploaded using an S3Upload block, the fileList value can just be mapped to this field. |
215
+ | `fileList.$.key` | string | - | S3 file key. |
216
+ | `fileList.$.lastModified` | string | - | File last modified date. |
217
+ | `fileList.$.name` | string | - | File name. |
218
+ | `fileList.$.size` | number | - | File size in bytes. |
219
+ | `fileList.$.type` | string | - | File MIME type. |
220
+ | `s3GetPolicyRequestId` | string | - | Id of a request of type AwsS3PresignedGetObject that defines which S3 bucket and file to download. |
221
+ | `showRemoveIcon` | boolean | `false` | Show a remove (×) icon next to each file in the list. Clicking it fires the `onRemove` event; the file is not removed from `fileList` automatically — the action handler is responsible. |
222
+ | `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/upload#design-token). See [Ant Design upload tokens](https://ant.design/components/upload#design-token). |
223
+ | `theme.actionsColor` | string | - | Color of action icons (download, preview, remove). |
224
+ | `theme.pictureCardSize` | number | - | Size of list items in card type (affects both picture-card and picture-circle). |
225
+ | `theme.controlItemBgHover` | string | - | Background color of file item on hover. |
226
+ | `theme.colorIcon` | string | - | Color of file icons. |
227
+ | `theme.fontSize` | number | - | Font size of file name text. |
228
+ | `theme.borderRadiusSM` | number | - | Border radius of file list items. |
229
+
230
+ | Event | Event Data | Description |
231
+ | --- | --- | --- |
232
+ | `onChange` | \- | Triggered when the upload state is changing. |
233
+ | `onRemove` | `{ file }` | Triggered when a file remove icon is clicked. The file is NOT removed automatically — the handler is responsible for updating `fileList` (e.g. via `SetState`). |
234
+
235
+ | Key | Target |
236
+ | --- | --- |
237
+ | `/block` | Outer block wrapper (always available). |
238
+ | `/element` | The S3Download element. |
239
+
240
+ No slots defined.
@@ -0,0 +1,360 @@
1
+ # Search
2
+
3
+ A full-text search command palette (Cmd+K / Ctrl+K) with keyboard navigation, result highlighting, and grouped results. Uses [MiniSearch](https://lucaong.github.io/minisearch/) for the search engine and antd Modal for the overlay. Two ways to provide data: pre-built index file via `indexUrl` (generated at build time, best for static content), or runtime `documents` array (indexed client-side, good for dynamic content). See the guide and examples below.
4
+
5
+ ## Generating a Search Index
6
+
7
+ The Search block supports two data sources. For most apps, a **pre-built index file** is the best approach — it's generated once at build time and loaded on-demand when the user opens the search modal.
8
+
9
+ ### Option 1: Pre-built index file (recommended)
10
+
11
+ Create a JavaScript transformer that runs during `lowdefy build`. It receives all resolved pages, extracts searchable text, builds a [MiniSearch](https://lucaong.github.io/minisearch/) index, and writes it to `public/search-index.json`.
12
+
13
+ **Step 1 — Write the transformer:**
14
+
15
+ ```javascript
16
+ // templates/buildSearchIndex.js
17
+ import MiniSearch from 'minisearch';
18
+ import fs from 'fs';
19
+ import path, { dirname } from 'path';
20
+ import { fileURLToPath } from 'url';
21
+
22
+ function buildSearchIndex(pages) {
23
+ // Extract searchable content from each page
24
+ const documents = pages.filter(Boolean).map((page) => ({
25
+ id: page.id,
26
+ pageId: page.id,
27
+ title: page.properties?.title ?? page.id,
28
+ section: 'Docs', // or derive from menus
29
+ description: '', // extract from page content as needed
30
+ }));
31
+
32
+ const miniSearch = new MiniSearch({
33
+ fields: ['title', 'description'],
34
+ storeFields: ['title', 'pageId', 'section'],
35
+ });
36
+ miniSearch.addAll(documents);
37
+
38
+ // The index JSON format the Search block expects
39
+ const index = {
40
+ engine: 'minisearch',
41
+ version: 1,
42
+ options: {
43
+ fields: ['title', 'description'],
44
+ storeFields: ['title', 'pageId', 'section'],
45
+ idField: 'id',
46
+ },
47
+ searchDefaults: {
48
+ boost: { title: 2 },
49
+ fuzzy: 0.2,
50
+ prefix: true,
51
+ },
52
+ resultDefaults: {
53
+ title: 'title',
54
+ description: 'description',
55
+ pageId: 'pageId',
56
+ },
57
+ data: JSON.parse(JSON.stringify(miniSearch)),
58
+ };
59
+
60
+ const dir = path.join(dirname(fileURLToPath(import.meta.url)), '../public');
61
+ fs.mkdirSync(dir, { recursive: true });
62
+ fs.writeFileSync(path.join(dir, 'search-index.json'), JSON.stringify(index));
63
+ }
64
+
65
+ export default buildSearchIndex;
66
+ ```
67
+
68
+ **Step 2 — Wire it into lowdefy.yaml:**
69
+
70
+ ```yaml
71
+ # lowdefy.yaml
72
+ pages:
73
+ _ref:
74
+ path: pages.yaml
75
+ transformer: templates/buildSearchIndex.js
76
+ ```
77
+
78
+ The transformer runs during every build. The output file (`public/search-index.json`) is served as a static asset and fetched by the Search block when the modal opens.
79
+
80
+ **Step 3 — Add the Search block:**
81
+
82
+ ```yaml
83
+ - id: site_search
84
+ type: Search
85
+ properties:
86
+ indexUrl: /search-index.json
87
+ events:
88
+ onSelect:
89
+ - id: navigate
90
+ type: Link
91
+ params:
92
+ pageId:
93
+ _event: pageId
94
+ ```
95
+
96
+ ### Option 2: Runtime documents (no build step)
97
+
98
+ For small datasets or dynamic content (e.g., from a request), pass documents directly. The block indexes them client-side:
99
+
100
+ ```yaml
101
+ - id: feature_search
102
+ type: Search
103
+ properties:
104
+ documents:
105
+ - id: users
106
+ title: User Management
107
+ body: Create, edit, and deactivate user accounts.
108
+ category: Admin
109
+ - id: billing
110
+ title: Billing
111
+ body: View invoices and update payment methods.
112
+ category: Finance
113
+ fields: [title, body]
114
+ storeFields: [title, category, id]
115
+ searchOptions:
116
+ boost:
117
+ title: 2
118
+ fuzzy: 0.2
119
+ result:
120
+ title: title
121
+ description: body
122
+ category: category
123
+ ```
124
+
125
+ You can also load documents from a request and pass them via state:
126
+
127
+ ```yaml
128
+ properties:
129
+ documents:
130
+ _state: searchDocuments
131
+ fields: [title, body]
132
+ storeFields: [title, id]
133
+ ```
134
+
135
+ ### Index JSON format
136
+
137
+ The `indexUrl` JSON file has this structure:
138
+
139
+ | Key | Type | Description |
140
+ | ---------------- | -------- | -------------------------------------------------------------------------------------------- |
141
+ | `engine` | `string` | Always `"minisearch"` |
142
+ | `version` | `number` | Schema version (currently `1`) |
143
+ | `options` | `object` | MiniSearch constructor options (`fields`, `storeFields`, `idField`) |
144
+ | `searchDefaults` | `object` | Default search options (`boost`, `fuzzy`, `prefix`, `combineWith`) |
145
+ | `resultDefaults` | `object` | Maps index fields to result UI (`title`, `description`, `category`, `pageId`, `url`, `icon`) |
146
+ | `groups` | `array` | Result grouping definitions (`label`, `match`, `icon`) |
147
+ | `data` | `object` | Serialized MiniSearch index (from `JSON.parse(JSON.stringify(miniSearch))`) |
148
+
149
+ See the [MiniSearch API docs](https://lucaong.github.io/minisearch/classes/MiniSearch.MiniSearch.html) for all available field and search options.
150
+
151
+ ```yaml
152
+ - id: example_search_prebuilt
153
+ type: Search
154
+ properties:
155
+ indexUrl: /search-index.json
156
+ placeholder: Search pages...
157
+ result:
158
+ title: title
159
+ description: snippet
160
+ category: section
161
+ pageId: pageId
162
+ groups:
163
+ - label: Concepts
164
+ match:
165
+ section: Concepts
166
+ icon: AiOutlineBulb
167
+ - label: Blocks
168
+ match:
169
+ section: Blocks
170
+ icon: AiOutlineLayout
171
+ events:
172
+ onSelect:
173
+ - id: navigate
174
+ type: Link
175
+ params:
176
+ pageId:
177
+ _event: pageId
178
+ ```
179
+
180
+ ```yaml
181
+ - id: example_search_runtime
182
+ type: Search
183
+ properties:
184
+ documents:
185
+ - id: users
186
+ title: User Management
187
+ body: Create, edit, and deactivate user accounts. Assign roles and permissions.
188
+ category: Admin
189
+ - id: billing
190
+ title: Billing & Invoices
191
+ body: View invoices, update payment methods, and download receipts.
192
+ category: Finance
193
+ - id: reports
194
+ title: Analytics Reports
195
+ body: Dashboard with charts for revenue, signups, and engagement metrics.
196
+ category: Analytics
197
+ - id: settings
198
+ title: App Settings
199
+ body: Configure notifications, theme, language, and integration API keys.
200
+ category: Admin
201
+ - id: api-keys
202
+ title: API Keys
203
+ body: Generate and revoke API keys for third-party integrations.
204
+ category: Admin
205
+ fields:
206
+ - title
207
+ - body
208
+ storeFields:
209
+ - title
210
+ - category
211
+ - id
212
+ searchOptions:
213
+ boost:
214
+ title: 2
215
+ fuzzy: 0.2
216
+ result:
217
+ title: title
218
+ description: body
219
+ category: category
220
+ groups:
221
+ - label: Admin
222
+ match:
223
+ category: Admin
224
+ icon: AiOutlineSetting
225
+ - label: Finance
226
+ match:
227
+ category: Finance
228
+ icon: AiOutlineDollar
229
+ - label: Analytics
230
+ match:
231
+ category: Analytics
232
+ icon: AiOutlineBarChart
233
+ placeholder: Search features...
234
+ label: Find
235
+ shortcut: mod+k
236
+ events:
237
+ onSelect:
238
+ - id: show_result
239
+ type: DisplayMessage
240
+ params:
241
+ content:
242
+ _string.concat:
243
+ - "Selected: "
244
+ - _event: title
245
+ ```
246
+
247
+ ```yaml
248
+ - id: example_search_custom_shortcut
249
+ type: Search
250
+ properties:
251
+ indexUrl: /search-index.json
252
+ shortcut: mod+j
253
+ label: Quick Find
254
+ placeholder: Quick find...
255
+ events:
256
+ onSelect:
257
+ - id: navigate
258
+ type: Link
259
+ params:
260
+ pageId:
261
+ _event: pageId
262
+ ```
263
+
264
+ ```yaml
265
+ - id: example_search_analytics
266
+ type: Search
267
+ properties:
268
+ indexUrl: /search-index.json
269
+ events:
270
+ onSearch:
271
+ - id: track_search
272
+ type: DisplayMessage
273
+ params:
274
+ content:
275
+ _string.concat:
276
+ - 'Search: "'
277
+ - _event: value
278
+ - '" ('
279
+ - _event: resultCount
280
+ - " results)"
281
+ onSelect:
282
+ - id: track_click
283
+ type: DisplayMessage
284
+ params:
285
+ content:
286
+ _string.concat:
287
+ - Clicked "
288
+ - _event: title
289
+ - '" for query "'
290
+ - _event: query
291
+ - '"'
292
+ - id: navigate
293
+ type: Link
294
+ params:
295
+ pageId:
296
+ _event: pageId
297
+ ```
298
+
299
+ | Property | Type | Default | Description |
300
+ | --- | --- | --- | --- |
301
+ | `indexUrl` | string \| array | - | URL or array of URLs to pre-built search index JSON files. |
302
+ | `documents` | array | - | Array of document objects for client-side indexing. |
303
+ | `fields` | array | - | Fields to index. Required when using documents, optional for indexUrl. |
304
+ | `storeFields` | array | - | Fields to store in the index and return in results. |
305
+ | `searchOptions` | object | - | MiniSearch search options. |
306
+ | `searchOptions.boost` | object | - | Field boost factors for relevance scoring. |
307
+ | `searchOptions.fuzzy` | number | - | Fuzzy matching tolerance as a fraction of term length (0 to 1). |
308
+ | `searchOptions.prefix` | boolean | `true` | Enable prefix matching. |
309
+ | `searchOptions.combineWith` | string | `"OR"` | How to combine search terms. Enum: `OR`, `AND`. |
310
+ | `label` | string | `"Search"` | Trigger button text. |
311
+ | `icon` | string \| object | - | Trigger button icon name or Icon block properties. |
312
+ | `showShortcut` | boolean | `true` | Show keyboard shortcut badge on the trigger button. |
313
+ | `placeholder` | string | `"Search..."` | Search input placeholder text. |
314
+ | `shortcut` | string | `"mod+k"` | Keyboard shortcut to open the modal. Renders a shortcut badge on the trigger button (see showShortcut). Use "mod" for Cmd on Mac, Ctrl elsewhere. |
315
+ | `width` | number | `640` | Modal width in pixels. |
316
+ | `maxResults` | number | `20` | Maximum number of results displayed. |
317
+ | `result` | object | - | Maps index fields to result UI slots. |
318
+ | `result.title` | string | `"title"` | Field name for result title. |
319
+ | `result.description` | string | - | Field name for result description/snippet. |
320
+ | `result.category` | string | - | Field name for result grouping category. |
321
+ | `result.icon` | string | - | Field name for result icon name. |
322
+ | `result.pageId` | string | - | Field name for Lowdefy page navigation. |
323
+ | `result.url` | string | - | Field name for external URL navigation. |
324
+ | `groups` | array | - | Result grouping definitions. |
325
+ | `groups.$.label` | string | - | Group display label. |
326
+ | `groups.$.match` | object | - | Field/value pairs to match results to this group. |
327
+ | `groups.$.icon` | string | - | Icon for the group header. |
328
+ | `noResultsMessage` | string | `"No results found."` | Message shown when no results match. |
329
+ | `highlightMatches` | boolean | `true` | Highlight matched terms in results. |
330
+ | `recentSearches` | boolean | `true` | Show recent searches when input is empty. |
331
+ | `recentSearchesKey` | string | `"search"` | localStorage key prefix for recent searches. |
332
+ | `recentSearchesCount` | number | `5` | Maximum number of recent searches stored. |
333
+ | `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). |
334
+
335
+ | Event | Event Data | Description |
336
+ | --- | --- | --- |
337
+ | `onSelect` | `{ query, resultCount }` | Trigger actions when a search result is selected. Result item stored fields are spread into the event object. |
338
+ | `onSearch` | `{ value, resultCount }` | Trigger actions when the search query changes. |
339
+ | `onOpen` | \- | Trigger actions when the search modal opens. |
340
+ | `onClose` | \- | Trigger actions when the search modal closes. |
341
+
342
+ | Key | Target |
343
+ | --- | --- |
344
+ | `/block` | Outer block wrapper (always available). |
345
+ | `/element` | The search trigger button and modal root. |
346
+ | `/trigger` | The trigger button. |
347
+ | `/triggerBadge` | The keyboard shortcut badge on the trigger. |
348
+ | `/modal` | The antd Modal container. |
349
+ | `/input` | The search input field. |
350
+ | `/results` | The scrollable results list. |
351
+ | `/group` | A result group container. |
352
+ | `/groupHeading` | A group heading label. |
353
+ | `/item` | A result item row. |
354
+ | `/itemIcon` | The icon in a result item. |
355
+ | `/itemTitle` | The title in a result item. |
356
+ | `/itemDescription` | The description/snippet in a result item. |
357
+ | `/highlight` | Highlighted match text (<mark> elements). |
358
+ | `/empty` | The empty state message. |
359
+
360
+ No slots defined.