@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.
- package/LICENSE +201 -0
- package/README.md +20 -0
- package/content/actions/callapi.md +66 -0
- package/content/actions/callmethod.md +41 -0
- package/content/actions/copytoclipboard.md +32 -0
- package/content/actions/displaymessage.md +53 -0
- package/content/actions/downloadcsv.md +89 -0
- package/content/actions/fetch.md +50 -0
- package/content/actions/geolocationcurrentposition.md +56 -0
- package/content/actions/link.md +104 -0
- package/content/actions/login.md +85 -0
- package/content/actions/logout.md +56 -0
- package/content/actions/pdfmake.md +304 -0
- package/content/actions/request.md +67 -0
- package/content/actions/reset.md +27 -0
- package/content/actions/resetvalidation.md +85 -0
- package/content/actions/scrollto.md +85 -0
- package/content/actions/setdarkmode.md +62 -0
- package/content/actions/setfocus.md +33 -0
- package/content/actions/setglobal.md +63 -0
- package/content/actions/setlocale.md +69 -0
- package/content/actions/setstate.md +70 -0
- package/content/actions/throw.md +72 -0
- package/content/actions/validate.md +87 -0
- package/content/actions/wait.md +24 -0
- package/content/agents/agent-endpoint-tools.md +190 -0
- package/content/agents/agent-mcp-tools.md +124 -0
- package/content/agents/agent-multi-agent.md +136 -0
- package/content/agents/agent-properties.md +174 -0
- package/content/agents/agent-server-hooks.md +336 -0
- package/content/agents/agentchat.md +515 -0
- package/content/agents/agentconversations.md +148 -0
- package/content/concepts/ai-agent-docs.md +190 -0
- package/content/concepts/cli.md +213 -0
- package/content/concepts/connections-and-requests.md +7 -0
- package/content/concepts/custom-html.md +3 -0
- package/content/concepts/custom-styling.md +161 -0
- package/content/concepts/events-and-actions.md +271 -0
- package/content/concepts/hosting-files.md +18 -0
- package/content/concepts/i18n.md +320 -0
- package/content/concepts/keyboard-shortcuts.md +218 -0
- package/content/concepts/layout-overview.md +478 -0
- package/content/concepts/lists.md +144 -0
- package/content/concepts/logger.md +43 -0
- package/content/concepts/lowdefy-schema.md +365 -0
- package/content/concepts/menus.md +144 -0
- package/content/concepts/module-authoring.md +564 -0
- package/content/concepts/modules.md +338 -0
- package/content/concepts/operators.md +45 -0
- package/content/concepts/overview.md +19 -0
- package/content/concepts/references-and-templates.md +207 -0
- package/content/concepts/secrets.md +24 -0
- package/content/concepts/selectors.md +143 -0
- package/content/connections/amazonredshift.md +176 -0
- package/content/connections/anthropic.md +232 -0
- package/content/connections/awss3.md +313 -0
- package/content/connections/azureblobstorage.md +133 -0
- package/content/connections/elasticsearch.md +371 -0
- package/content/connections/google.md +228 -0
- package/content/connections/googlecloudstorage.md +139 -0
- package/content/connections/googlesheet.md +313 -0
- package/content/connections/knex.md +206 -0
- package/content/connections/mariadb.md +177 -0
- package/content/connections/mcp.md +134 -0
- package/content/connections/mongodb.md +739 -0
- package/content/connections/mssql.md +191 -0
- package/content/connections/mysql.md +192 -0
- package/content/connections/openai-connection.md +228 -0
- package/content/connections/postgresql.md +200 -0
- package/content/connections/redis.md +116 -0
- package/content/connections/sendgridmail.md +94 -0
- package/content/connections/smtp.md +149 -0
- package/content/connections/sqlite.md +187 -0
- package/content/connections/stripe.md +115 -0
- package/content/container-blocks/affix.md +413 -0
- package/content/container-blocks/alert.md +937 -0
- package/content/container-blocks/badge.md +1222 -0
- package/content/container-blocks/box.md +1453 -0
- package/content/container-blocks/card.md +1200 -0
- package/content/container-blocks/carousel.md +2247 -0
- package/content/container-blocks/collapse.md +1335 -0
- package/content/container-blocks/configprovider.md +1070 -0
- package/content/container-blocks/confirmmodal.md +1159 -0
- package/content/container-blocks/content.md +597 -0
- package/content/container-blocks/descriptions.md +870 -0
- package/content/container-blocks/drawer.md +1379 -0
- package/content/container-blocks/dropdownmenu.md +643 -0
- package/content/container-blocks/flex.md +1510 -0
- package/content/container-blocks/footer.md +380 -0
- package/content/container-blocks/googlemaps.md +546 -0
- package/content/container-blocks/googlemapsheatmap.md +607 -0
- package/content/container-blocks/googlemapsscript.md +61 -0
- package/content/container-blocks/header.md +302 -0
- package/content/container-blocks/label.md +739 -0
- package/content/container-blocks/layout.md +604 -0
- package/content/container-blocks/masonry.md +1090 -0
- package/content/container-blocks/mobilemenu.md +1244 -0
- package/content/container-blocks/modal.md +1180 -0
- package/content/container-blocks/pageheadermenu.md +614 -0
- package/content/container-blocks/pagesidebarlayout.md +438 -0
- package/content/container-blocks/pagesidermenu.md +651 -0
- package/content/container-blocks/popover.md +1421 -0
- package/content/container-blocks/result.md +972 -0
- package/content/container-blocks/sider.md +1064 -0
- package/content/container-blocks/span.md +747 -0
- package/content/container-blocks/spinner.md +267 -0
- package/content/container-blocks/splitter.md +1735 -0
- package/content/container-blocks/tabs.md +1718 -0
- package/content/container-blocks/tooltip.md +1274 -0
- package/content/container-blocks/watermark.md +515 -0
- package/content/controls/for.md +103 -0
- package/content/controls/if.md +107 -0
- package/content/controls/log.md +50 -0
- package/content/controls/parallel.md +71 -0
- package/content/controls/parallel_for.md +36 -0
- package/content/controls/reject.md +56 -0
- package/content/controls/return.md +66 -0
- package/content/controls/set_state.md +98 -0
- package/content/controls/switch.md +90 -0
- package/content/controls/throw.md +79 -0
- package/content/controls/try.md +88 -0
- package/content/deployment/docker.md +149 -0
- package/content/deployment/node-server.md +27 -0
- package/content/deployment/vercel.md +101 -0
- package/content/display-blocks/aggrid.md +1459 -0
- package/content/display-blocks/anchor.md +336 -0
- package/content/display-blocks/avatar.md +1154 -0
- package/content/display-blocks/breadcrumb.md +517 -0
- package/content/display-blocks/button.md +758 -0
- package/content/display-blocks/calendar.md +156 -0
- package/content/display-blocks/dangeroushtml.md +314 -0
- package/content/display-blocks/dangerousmarkdown.md +423 -0
- package/content/display-blocks/diffgit.md +44 -0
- package/content/display-blocks/difflist.md +225 -0
- package/content/display-blocks/diffsidebyside.md +56 -0
- package/content/display-blocks/difftimeline.md +94 -0
- package/content/display-blocks/divider.md +406 -0
- package/content/display-blocks/download.md +60 -0
- package/content/display-blocks/dropdownbutton.md +661 -0
- package/content/display-blocks/echart.md +418 -0
- package/content/display-blocks/floatbutton.md +545 -0
- package/content/display-blocks/html.md +311 -0
- package/content/display-blocks/icon.md +717 -0
- package/content/display-blocks/img.md +479 -0
- package/content/display-blocks/markdown.md +520 -0
- package/content/display-blocks/markdownwithcode.md +730 -0
- package/content/display-blocks/menu.md +1123 -0
- package/content/display-blocks/message.md +941 -0
- package/content/display-blocks/notification.md +1410 -0
- package/content/display-blocks/paragraph.md +643 -0
- package/content/display-blocks/progress.md +818 -0
- package/content/display-blocks/qrcode.md +519 -0
- package/content/display-blocks/s3download.md +240 -0
- package/content/display-blocks/search.md +360 -0
- package/content/display-blocks/skeleton.md +272 -0
- package/content/display-blocks/skeletonavatar.md +222 -0
- package/content/display-blocks/skeletonbutton.md +245 -0
- package/content/display-blocks/skeletoninput.md +223 -0
- package/content/display-blocks/skeletonparagraph.md +201 -0
- package/content/display-blocks/statistic.md +485 -0
- package/content/display-blocks/steps.md +585 -0
- package/content/display-blocks/tag.md +620 -0
- package/content/display-blocks/title.md +654 -0
- package/content/display-blocks/tour.md +2359 -0
- package/content/input-blocks/autocomplete.md +786 -0
- package/content/input-blocks/buttonselector.md +964 -0
- package/content/input-blocks/checkboxselector.md +765 -0
- package/content/input-blocks/checkboxswitch.md +497 -0
- package/content/input-blocks/colorselector.md +884 -0
- package/content/input-blocks/daterangeselector.md +777 -0
- package/content/input-blocks/dateselector.md +693 -0
- package/content/input-blocks/datetimeselector.md +791 -0
- package/content/input-blocks/inputgallery.md +528 -0
- package/content/input-blocks/monthselector.md +717 -0
- package/content/input-blocks/multipleselector.md +1337 -0
- package/content/input-blocks/numberinput.md +855 -0
- package/content/input-blocks/pagination.md +679 -0
- package/content/input-blocks/paragraphinput.md +1664 -0
- package/content/input-blocks/passwordinput.md +480 -0
- package/content/input-blocks/phonenumberinput.md +688 -0
- package/content/input-blocks/radioselector.md +820 -0
- package/content/input-blocks/ratingslider.md +684 -0
- package/content/input-blocks/s3uploadbutton.md +384 -0
- package/content/input-blocks/s3uploaddragger.md +305 -0
- package/content/input-blocks/s3uploadphoto.md +288 -0
- package/content/input-blocks/segmentedselector.md +782 -0
- package/content/input-blocks/selector.md +1162 -0
- package/content/input-blocks/switch.md +552 -0
- package/content/input-blocks/textarea.md +714 -0
- package/content/input-blocks/textinput.md +639 -0
- package/content/input-blocks/tiptapinput.md +226 -0
- package/content/input-blocks/tiptapmentioninput.md +471 -0
- package/content/input-blocks/titleinput.md +1094 -0
- package/content/input-blocks/treeinput.md +144 -0
- package/content/input-blocks/treemultipleselector.md +162 -0
- package/content/input-blocks/treeselector.md +185 -0
- package/content/input-blocks/upload.md +149 -0
- package/content/input-blocks/uploaddragger.md +85 -0
- package/content/input-blocks/uploadphoto.md +84 -0
- package/content/input-blocks/weekselector.md +630 -0
- package/content/list-blocks/controlledlist.md +498 -0
- package/content/list-blocks/list.md +529 -0
- package/content/list-blocks/listselector.md +301 -0
- package/content/list-blocks/masonrylist.md +230 -0
- package/content/migration/upgrade-guide.md +106 -0
- package/content/migration/v4-to-v5.md +589 -0
- package/content/migration/v5-to-v6.md +36 -0
- package/content/operators/_actions.md +58 -0
- package/content/operators/_and.md +76 -0
- package/content/operators/_api.md +254 -0
- package/content/operators/_app.md +114 -0
- package/content/operators/_args.md +65 -0
- package/content/operators/_array.md +331 -0
- package/content/operators/_base64.md +49 -0
- package/content/operators/_boolean.md +33 -0
- package/content/operators/_build.md +166 -0
- package/content/operators/_change_case.md +357 -0
- package/content/operators/_date.md +415 -0
- package/content/operators/_dayjs.md +128 -0
- package/content/operators/_diff.md +61 -0
- package/content/operators/_divide.md +32 -0
- package/content/operators/_eq.md +52 -0
- package/content/operators/_event.md +86 -0
- package/content/operators/_function.md +52 -0
- package/content/operators/_get.md +92 -0
- package/content/operators/_global.md +86 -0
- package/content/operators/_gt.md +50 -0
- package/content/operators/_gte.md +50 -0
- package/content/operators/_hash.md +112 -0
- package/content/operators/_if.md +30 -0
- package/content/operators/_if_none.md +47 -0
- package/content/operators/_index.md +48 -0
- package/content/operators/_input.md +86 -0
- package/content/operators/_intl.md +135 -0
- package/content/operators/_item.md +166 -0
- package/content/operators/_js.md +113 -0
- package/content/operators/_json.md +120 -0
- package/content/operators/_jsonata.md +152 -0
- package/content/operators/_locale.md +65 -0
- package/content/operators/_location.md +40 -0
- package/content/operators/_log.md +22 -0
- package/content/operators/_lt.md +50 -0
- package/content/operators/_lte.md +50 -0
- package/content/operators/_math.md +407 -0
- package/content/operators/_media.md +83 -0
- package/content/operators/_menu.md +62 -0
- package/content/operators/_module.md +340 -0
- package/content/operators/_mql.md +95 -0
- package/content/operators/_ne.md +62 -0
- package/content/operators/_not.md +33 -0
- package/content/operators/_number.md +159 -0
- package/content/operators/_nunjucks.md +117 -0
- package/content/operators/_object.md +253 -0
- package/content/operators/_operator.md +33 -0
- package/content/operators/_or.md +67 -0
- package/content/operators/_product.md +45 -0
- package/content/operators/_random.md +90 -0
- package/content/operators/_ref.md +80 -0
- package/content/operators/_regex.md +69 -0
- package/content/operators/_request.md +35 -0
- package/content/operators/_request_details.md +29 -0
- package/content/operators/_secret.md +56 -0
- package/content/operators/_state.md +134 -0
- package/content/operators/_step.md +98 -0
- package/content/operators/_string.md +327 -0
- package/content/operators/_subtract.md +24 -0
- package/content/operators/_sum.md +45 -0
- package/content/operators/_switch.md +37 -0
- package/content/operators/_t.md +96 -0
- package/content/operators/_theme.md +65 -0
- package/content/operators/_type.md +78 -0
- package/content/operators/_uri.md +49 -0
- package/content/operators/_url_query.md +92 -0
- package/content/operators/_user.md +154 -0
- package/content/operators/_uuid.md +118 -0
- package/content/operators/_var.md +88 -0
- package/content/operators/_yaml.md +96 -0
- package/content/other/introduction.md +39 -0
- package/content/other/next-auth-providers.md +3 -0
- package/content/other/updatesession.md +26 -0
- package/content/plugins/plugins-actions.md +80 -0
- package/content/plugins/plugins-connections.md +98 -0
- package/content/plugins/plugins-dev.md +138 -0
- package/content/plugins/plugins-introduction.md +29 -0
- package/content/plugins/plugins-operators.md +71 -0
- package/content/testing/e2e-auth.md +108 -0
- package/content/testing/e2e-configuration.md +107 -0
- package/content/testing/e2e-getting-started.md +96 -0
- package/content/testing/e2e-introduction.md +53 -0
- package/content/testing/e2e-mocking.md +155 -0
- package/content/testing/e2e-writing-tests.md +214 -0
- package/content/tutorial/tutorial-actions-operators.md +222 -0
- package/content/tutorial/tutorial-add-blocks.md +86 -0
- package/content/tutorial/tutorial-create-page.md +57 -0
- package/content/tutorial/tutorial-display-data-page.md +181 -0
- package/content/tutorial/tutorial-next-steps.md +53 -0
- package/content/tutorial/tutorial-requests-sql.md +22 -0
- package/content/tutorial/tutorial-start.md +71 -0
- package/content/user-authentication/auth-providers.md +15 -0
- package/content/user-authentication/login-and-logout.md +122 -0
- package/content/user-authentication/users-introduction.md +31 -0
- package/index.json +2281 -0
- package/package.json +34 -0
- package/scripts/extractAgentDocs.js +130 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# _math
|
|
2
|
+
|
|
3
|
+
The `_math` operator can be used to run javascript [`Math`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math) methods.
|
|
4
|
+
|
|
5
|
+
The `_math` operator can take arguments in the following forms:
|
|
6
|
+
|
|
7
|
+
###### No Arguments
|
|
8
|
+
```text
|
|
9
|
+
(void): number
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Some methods like `_math.PI` take no arguments:
|
|
13
|
+
```yaml
|
|
14
|
+
_math.PI: null
|
|
15
|
+
```
|
|
16
|
+
Returns: `pi`
|
|
17
|
+
|
|
18
|
+
###### Single argument
|
|
19
|
+
```text
|
|
20
|
+
(x: number): number
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Some methods like `_math.round` take a single argument:
|
|
24
|
+
```yaml
|
|
25
|
+
_math.round: 3.14
|
|
26
|
+
```
|
|
27
|
+
Returns: `3`
|
|
28
|
+
|
|
29
|
+
###### Named arguments
|
|
30
|
+
```text
|
|
31
|
+
({x: number, y: number}): number
|
|
32
|
+
([x: number, y: number]): number
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Some methods like `_math.pow` take an object with named arguments:
|
|
36
|
+
```yaml
|
|
37
|
+
_math.pow:
|
|
38
|
+
base: 2
|
|
39
|
+
exponent: 3
|
|
40
|
+
```
|
|
41
|
+
Returns: `8`
|
|
42
|
+
|
|
43
|
+
These methods also accept their arguments as an array:
|
|
44
|
+
```yaml
|
|
45
|
+
_math.pow:
|
|
46
|
+
- 2
|
|
47
|
+
- 3
|
|
48
|
+
```
|
|
49
|
+
Returns: `8`
|
|
50
|
+
|
|
51
|
+
###### Array arguments
|
|
52
|
+
```text
|
|
53
|
+
(values: number[]): number
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Some methods like `_math.max` take an array of values as arguments:
|
|
57
|
+
```
|
|
58
|
+
_math.max:
|
|
59
|
+
- 42
|
|
60
|
+
- 99
|
|
61
|
+
- 0
|
|
62
|
+
```
|
|
63
|
+
Returns: `99`
|
|
64
|
+
|
|
65
|
+
> This operator can be used as a [`_build`](/_build) operator method.
|
|
66
|
+
|
|
67
|
+
# Operator methods:
|
|
68
|
+
|
|
69
|
+
## _math.abs
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
(x: number): number
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The `_math.abs` method returns the [absolute value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs) of a number.
|
|
76
|
+
|
|
77
|
+
## _math.acos
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
(x: number): number
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The `_math.acos` method returns the [arccosine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos) (in radians) of a number.
|
|
84
|
+
|
|
85
|
+
## _math.acosh
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
(x: number): number
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The `_math.acosh` method returns the [hyperbolic arc-cosine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh) of a number.
|
|
92
|
+
|
|
93
|
+
## _math.asin
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
(x: number): number
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The `_math.asin` method returns the [arcsine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin) (in radians) of a number.
|
|
100
|
+
|
|
101
|
+
## _math.atan
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
(x: number): number
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The `_math.atan` method returns the [arctangent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan) (in radians) of a number.
|
|
108
|
+
|
|
109
|
+
## _math.atan2
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
({x: number, y: number}): number
|
|
113
|
+
([x: number, y: number]): number
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The `_math.atan2` method returns the [angle in the plane (in radians) between the positive x-axis and the ray from (0,0) to the point (x,y)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2).
|
|
117
|
+
|
|
118
|
+
## _math.atanh
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
(x: number): number
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The `_math.atanh` method returns the [hyperbolic arctangent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh) of a number.
|
|
125
|
+
|
|
126
|
+
## _math.cbrt
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
(x: number): number
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The `_math.cbrt` method returns the returns the [cube root](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt) of a number.
|
|
133
|
+
|
|
134
|
+
## _math.ceil
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
(x: number): number
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The `_math.ceil` method [rounds a number up](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil) to the next largest integer.
|
|
141
|
+
|
|
142
|
+
## _math.clz32
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
(x: number): number
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The `_math.clz32` method returns the [number of leading zero bits in the 32-bit binary representation of a number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32).
|
|
149
|
+
|
|
150
|
+
## _math.cos
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
(x: number): number
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The `_math.cos` method returns the [cosine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos) of the specified angle, which must be specified in radians
|
|
157
|
+
|
|
158
|
+
## _math.cosh
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
(x: number): number
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The `_math.cosh` method returns the [hyperbolic cosine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh) of a number.
|
|
165
|
+
|
|
166
|
+
## _math.exp
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
(x: number): number
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The `_math.exp` method returns [`e` (Euler's number) to the power `x`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp).
|
|
173
|
+
|
|
174
|
+
## _math.expm1
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
(x: number): number
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The `_math.expm1` method returns [`e` (Euler's number) to the power `x` minus `1`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1).
|
|
181
|
+
|
|
182
|
+
## _math.floor
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
(x: number): number
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The `_math.floor` method returns the [largest integer less than or equal to a given number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor).
|
|
189
|
+
|
|
190
|
+
## _math.fround
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
(x: number): number
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
The `_math.fround` method returns the [nearest 32-bit single precision float representation of a number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround).
|
|
197
|
+
|
|
198
|
+
## _math.hypot
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
(values: number[]): number
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The `_math.hypot` method returns the [square root of the sum of squares of its arguments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot).
|
|
205
|
+
|
|
206
|
+
## _math.imul
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
({a: number, b: number}): number
|
|
210
|
+
([a: number, b: number]): number
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The `_math.imul` method returns the [result of the C-like 32-bit multiplication of the two parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul).
|
|
214
|
+
|
|
215
|
+
## _math.log
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
(x: number): number
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The `_math.log` method returns the [natural logarithm](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log) (base `e`) of a number.
|
|
222
|
+
|
|
223
|
+
## _math.log10
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
(x: number): number
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The `_math.log10` method returns the [base `10` logarithm](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log10) of a number.
|
|
230
|
+
|
|
231
|
+
## _math.log1p
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
(x: number): number
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
The `_math.log1p` method returns the [natural logarithm (base e) of `1 + a number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p).
|
|
238
|
+
|
|
239
|
+
## _math.log2
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
(x: number): number
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
The `_math.log2` method returns the [base `2` logarithm](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2) of a number.
|
|
246
|
+
|
|
247
|
+
## _math.max
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
(values: number[]): number
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
The `_math.max` method returns the [largest of the numbers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) given as input parameters.
|
|
254
|
+
|
|
255
|
+
## _math.min
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
(values: number[]): number
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The `_math.min` method returns the [smallest of the numbers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) given as input parameters.
|
|
262
|
+
|
|
263
|
+
## _math.mod
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
({dividend: number, divisor: number}): number
|
|
267
|
+
([dividend: number, divisor: number]): number
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
The `_math.mod` method returns the remainder of the `dividend` divided by the `divisor` (the [modulo operation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder)).
|
|
271
|
+
|
|
272
|
+
## _math.pow
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
({base: number, exponent: number}): number
|
|
276
|
+
([base: number, exponent: number]): number
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
The `_math.pow` method returns the [`base` to the `exponent` power](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow).
|
|
280
|
+
|
|
281
|
+
## _math.random
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
(void): number
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
The `_math.random` method returns a floating-point, [pseudo-random number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random) in the range `0` to less than `1`.
|
|
288
|
+
|
|
289
|
+
## _math.round
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
(x: number): number
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
The `_math.round` method returns the value of a number [rounded to the nearest integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round).
|
|
296
|
+
|
|
297
|
+
## _math.sign
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
(x: number): number
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
The `_math.sign` method returns either a [positive or negative 1 (`+/- 1`)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign), indicating the sign of a number passed into the argument.
|
|
304
|
+
|
|
305
|
+
## _math.sin
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
(x: number): number
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
The `_math.sin` method returns the [sine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin) of a number.
|
|
312
|
+
|
|
313
|
+
## _math.sinh
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
(x: number): number
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
The `_math.sinh` method returns the [hyperbolic sine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh) of a number.
|
|
320
|
+
|
|
321
|
+
## _math.sqrt
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
(x: number): number
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
The `_math.sqrt` method returns the [square root](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt) of a number.
|
|
328
|
+
|
|
329
|
+
## _math.tan
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
(x: number): number
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
The `_math.tan` method returns the [tangent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tan) of a number.
|
|
336
|
+
|
|
337
|
+
## _math.trunc
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
(x: number): number
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
The `_math.trunc` method returns the [integer part](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc) of a number by removing any fractional digits.
|
|
344
|
+
|
|
345
|
+
## _math.E
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
(void): number
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The `_math.E` method returns [Euler's number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/E), the base of natural logarithms, `e`, which is approximately 2.718.
|
|
352
|
+
|
|
353
|
+
## _math.LN10
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
(void): number
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
The `_math.LN10` method returns the [natural logarithm of `10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10), which is approximately 2.302.
|
|
360
|
+
|
|
361
|
+
## _math.LN2
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
(void): number
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
The `_math.LN2` method returns the [natural logarithm of `2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2), which is approximately 0.693.
|
|
368
|
+
|
|
369
|
+
## _math.LOG10E
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
(void): number
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
The `_math.LOG10E` method returns the [base `10` logarithm of `e`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E), which is approximately 0.434.
|
|
376
|
+
|
|
377
|
+
## _math.LOG2E
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
(void): number
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
The `_math.LOG2E` method returns the [base `2` logarithm of `e`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E), which is approximately 1.442.
|
|
384
|
+
|
|
385
|
+
## _math.PI
|
|
386
|
+
|
|
387
|
+
```
|
|
388
|
+
(void): number
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
The `_math.PI` method returns the constant [`pi`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI), the ratio of the circumference of a circle to its diameter, which is approximately 3.14159.
|
|
392
|
+
|
|
393
|
+
## _math.SQRT1_2
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
(void): number
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
The `_math.SQRT1_2` method returns the [square root of `1/2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2), which is approximately 0.707.
|
|
400
|
+
|
|
401
|
+
## _math.SQRT2
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
(void): number
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
The `_math.SQRT2` method returns the [square root of `2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT2), which is approximately 1.414.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# _media
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
(key: string): any
|
|
5
|
+
(all: boolean): any
|
|
6
|
+
(arguments: {
|
|
7
|
+
all?: boolean,
|
|
8
|
+
key?: string,
|
|
9
|
+
default?: any,
|
|
10
|
+
}): any
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The `_media` operator gets a value from the [`media`](/page-and-app-state) object. It can only be used on the web-client (Not in `requests` or `connections`). `media` is a data object that contains information about the current screen size of a users browser window. It contains the following data:
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
- `width: number`: The width of the window in pixels.
|
|
17
|
+
- `height: number`: The height of the window in pixels.
|
|
18
|
+
- `darkMode: boolean`: Whether dark mode is currently active. Resolves from the user's preference (`'dark'` → true, `'light'` → false, `'system'` → follows OS `prefers-color-scheme`).
|
|
19
|
+
- `darkModePreference: 'system' | 'light' | 'dark'`: The user's dark mode preference. `'system'` means the OS preference is being followed.
|
|
20
|
+
- `size: enum`: One of `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. The sizes are determined by comparing the window width to the following breakpoints (in pixels):
|
|
21
|
+
- `xs`: `width < 640px`
|
|
22
|
+
- `sm`: `640px <= width < 768px`
|
|
23
|
+
- `md`: `768px <= width < 1024px`
|
|
24
|
+
- `lg`: `1024px <= width < 1280px`
|
|
25
|
+
- `xl`: `1280px <= width < 1536px`
|
|
26
|
+
- `2xl`: `1536px <= width`
|
|
27
|
+
|
|
28
|
+
> **Note:** In v4, the largest breakpoint was `xxl` (1600px). It has been renamed to `2xl` (1536px) to align with Tailwind CSS breakpoints. See the [Migration Guide](/v4-to-v5) for details.
|
|
29
|
+
|
|
30
|
+
#### Arguments
|
|
31
|
+
|
|
32
|
+
###### string
|
|
33
|
+
If the `_media` operator is called with a string argument, the value of the key in the `media` object is returned. If the value is not found, `null` is returned.
|
|
34
|
+
|
|
35
|
+
###### boolean
|
|
36
|
+
If the `_media` operator is called with boolean argument `true`, the entire `media` object is returned.
|
|
37
|
+
|
|
38
|
+
###### object
|
|
39
|
+
- `all: boolean`: If `all` is set to `true`, the entire `media` object is returned. One of `all` or `key` are required.
|
|
40
|
+
- `key: string`: The value of the key in the `media` object is returned. If the value is not found, `null`, or the specified default value is returned. One of `all` or `key` are required.
|
|
41
|
+
- `default: any`: A value to return if the `key` is not found in `media`. By default, `null` is returned if a value is not found.
|
|
42
|
+
|
|
43
|
+
#### Examples
|
|
44
|
+
|
|
45
|
+
###### Get the value of `size` from `media`:
|
|
46
|
+
```yaml
|
|
47
|
+
_media: size
|
|
48
|
+
```
|
|
49
|
+
```yaml
|
|
50
|
+
_media:
|
|
51
|
+
key: size
|
|
52
|
+
```
|
|
53
|
+
Returns: The value of `size`.
|
|
54
|
+
|
|
55
|
+
###### Get the entire `media` object:
|
|
56
|
+
```yaml
|
|
57
|
+
_media: true
|
|
58
|
+
```
|
|
59
|
+
```yaml
|
|
60
|
+
_media:
|
|
61
|
+
all: true
|
|
62
|
+
```
|
|
63
|
+
Returns: The entire `media` object.
|
|
64
|
+
|
|
65
|
+
###### Check if dark mode is active:
|
|
66
|
+
```yaml
|
|
67
|
+
_media: darkMode
|
|
68
|
+
```
|
|
69
|
+
Returns: `true` or `false`.
|
|
70
|
+
|
|
71
|
+
###### Get the current dark mode preference:
|
|
72
|
+
```yaml
|
|
73
|
+
_media: darkModePreference
|
|
74
|
+
```
|
|
75
|
+
Returns: `'system'`, `'light'`, or `'dark'`.
|
|
76
|
+
|
|
77
|
+
###### Return a default value if the value is not found:
|
|
78
|
+
```yaml
|
|
79
|
+
_media:
|
|
80
|
+
key: does_not_exist
|
|
81
|
+
default: Not there
|
|
82
|
+
```
|
|
83
|
+
Returns: `"Not there"`.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# _menu
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
(menuId: string): object
|
|
5
|
+
(menuIndex: number): object
|
|
6
|
+
(all: boolean): object[]
|
|
7
|
+
(arguments: {
|
|
8
|
+
value?: string,
|
|
9
|
+
index?: number
|
|
10
|
+
all?: boolean,
|
|
11
|
+
}): object | object[]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The `_menu` operator can be used to access `menu` objects defined in the [`menus`](/lowdefy-schema) section of the Lowdefy configuration.
|
|
15
|
+
|
|
16
|
+
#### Arguments
|
|
17
|
+
|
|
18
|
+
###### string
|
|
19
|
+
The `menuId` of the `menu` to return.
|
|
20
|
+
|
|
21
|
+
###### number
|
|
22
|
+
The index of the `menu` to return.
|
|
23
|
+
|
|
24
|
+
###### boolean
|
|
25
|
+
If the `_menu` operator is called with boolean argument `true`, the entire `menus` object is returned.
|
|
26
|
+
|
|
27
|
+
###### object
|
|
28
|
+
- `value: string`: The `menuId` of the `menu` to return.
|
|
29
|
+
- `index: number`: The index of the `menu` to return.
|
|
30
|
+
- `all: boolean`: If the `_menu` operator is called with boolean argument `true`, the entire `menus` object is returned.
|
|
31
|
+
|
|
32
|
+
#### Examples
|
|
33
|
+
|
|
34
|
+
###### Get the `menus` object:
|
|
35
|
+
```yaml
|
|
36
|
+
_menu: true
|
|
37
|
+
```
|
|
38
|
+
```yaml
|
|
39
|
+
_menu:
|
|
40
|
+
all: true
|
|
41
|
+
```
|
|
42
|
+
Returns: An array of `menu` objects.
|
|
43
|
+
|
|
44
|
+
###### Get a `menu` by `id`:
|
|
45
|
+
```yaml
|
|
46
|
+
_menu: default
|
|
47
|
+
```
|
|
48
|
+
```yaml
|
|
49
|
+
_menu:
|
|
50
|
+
value: default
|
|
51
|
+
```
|
|
52
|
+
Returns: A `menu` object.
|
|
53
|
+
|
|
54
|
+
###### Get a `menu` by `index`:
|
|
55
|
+
```yaml
|
|
56
|
+
_menu: 0
|
|
57
|
+
```
|
|
58
|
+
```yaml
|
|
59
|
+
_menu:
|
|
60
|
+
value: 0
|
|
61
|
+
```
|
|
62
|
+
Returns: A `menu` object.
|