instaui 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl

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 (198) hide show
  1. instaui/arco/__init__.py +191 -0
  2. instaui/arco/_settings.py +25 -0
  3. instaui/arco/_use_tools/locale.py +50 -0
  4. instaui/arco/component_types.py +1019 -0
  5. instaui/arco/components/_utils.py +22 -0
  6. instaui/arco/components/affix.py +29 -0
  7. instaui/arco/components/alert.py +42 -0
  8. instaui/arco/components/anchor.py +42 -0
  9. instaui/arco/components/auto_complete.py +96 -0
  10. instaui/arco/components/avatar.py +55 -0
  11. instaui/arco/components/back_top.py +14 -0
  12. instaui/arco/components/badge.py +14 -0
  13. instaui/arco/components/breadcrumb.py +14 -0
  14. instaui/arco/components/button.py +43 -0
  15. instaui/arco/components/calendar.py +47 -0
  16. instaui/arco/components/card.py +14 -0
  17. instaui/arco/components/carousel.py +33 -0
  18. instaui/arco/components/cascader.py +111 -0
  19. instaui/arco/components/checkbox.py +32 -0
  20. instaui/arco/components/collapse.py +31 -0
  21. instaui/arco/components/color_picker.py +45 -0
  22. instaui/arco/components/comment.py +14 -0
  23. instaui/arco/components/config_provider.py +13 -0
  24. instaui/arco/components/date_picker.py +111 -0
  25. instaui/arco/components/descriptions.py +14 -0
  26. instaui/arco/components/divider.py +13 -0
  27. instaui/arco/components/drawer.py +98 -0
  28. instaui/arco/components/dropdown.py +45 -0
  29. instaui/arco/components/empty.py +14 -0
  30. instaui/arco/components/form.py +55 -0
  31. instaui/arco/components/icon.py +17 -0
  32. instaui/arco/components/image.py +33 -0
  33. instaui/arco/components/input.py +102 -0
  34. instaui/arco/components/input_number.py +97 -0
  35. instaui/arco/components/input_password.py +38 -0
  36. instaui/arco/components/input_search.py +37 -0
  37. instaui/arco/components/input_tag.py +110 -0
  38. instaui/arco/components/layout.py +13 -0
  39. instaui/arco/components/layout_content.py +6 -0
  40. instaui/arco/components/layout_footer.py +6 -0
  41. instaui/arco/components/layout_header.py +6 -0
  42. instaui/arco/components/layout_sider.py +53 -0
  43. instaui/arco/components/link.py +36 -0
  44. instaui/arco/components/list.py +68 -0
  45. instaui/arco/components/mention.py +97 -0
  46. instaui/arco/components/menu.py +88 -0
  47. instaui/arco/components/modal.py +97 -0
  48. instaui/arco/components/overflow_list.py +29 -0
  49. instaui/arco/components/page_header.py +29 -0
  50. instaui/arco/components/pagination.py +45 -0
  51. instaui/arco/components/pop_confirm.py +58 -0
  52. instaui/arco/components/popover.py +32 -0
  53. instaui/arco/components/progress.py +14 -0
  54. instaui/arco/components/radio.py +40 -0
  55. instaui/arco/components/radio_group.py +42 -0
  56. instaui/arco/components/rate.py +45 -0
  57. instaui/arco/components/resize_box.py +62 -0
  58. instaui/arco/components/result.py +14 -0
  59. instaui/arco/components/select.py +179 -0
  60. instaui/arco/components/skeleton.py +14 -0
  61. instaui/arco/components/slider.py +38 -0
  62. instaui/arco/components/space.py +14 -0
  63. instaui/arco/components/spin.py +14 -0
  64. instaui/arco/components/split.py +76 -0
  65. instaui/arco/components/statistic.py +14 -0
  66. instaui/arco/components/steps.py +32 -0
  67. instaui/arco/components/switch.py +57 -0
  68. instaui/arco/components/tab_pane.py +12 -0
  69. instaui/arco/components/table.py +276 -0
  70. instaui/arco/components/tabs.py +101 -0
  71. instaui/arco/components/tag.py +42 -0
  72. instaui/arco/components/textarea.py +84 -0
  73. instaui/arco/components/time_picker.py +76 -0
  74. instaui/arco/components/timeline.py +14 -0
  75. instaui/arco/components/tooltip.py +29 -0
  76. instaui/arco/components/transfer.py +58 -0
  77. instaui/arco/components/tree.py +120 -0
  78. instaui/arco/components/tree_select.py +86 -0
  79. instaui/arco/components/trigger.py +58 -0
  80. instaui/arco/components/typography.py +142 -0
  81. instaui/arco/components/upload.py +71 -0
  82. instaui/arco/components/verification_code.py +58 -0
  83. instaui/arco/components/watermark.py +14 -0
  84. instaui/arco/locales/__init__.py +4 -0
  85. instaui/arco/locales/_index.py +31 -0
  86. instaui/arco/locales/en_us.py +227 -0
  87. instaui/arco/locales/zh_cn.py +224 -0
  88. instaui/arco/setup.py +36 -0
  89. instaui/arco/static/instaui-arco.css +1 -0
  90. instaui/arco/static/instaui-arco.js +55771 -0
  91. instaui/arco/types.py +24 -0
  92. instaui/components/column.py +10 -2
  93. instaui/components/echarts/echarts.js +128 -0
  94. instaui/components/echarts/echarts.py +194 -0
  95. instaui/components/echarts/static/echarts.esm.min.js +45 -0
  96. instaui/components/element.py +50 -6
  97. instaui/components/grid.py +81 -0
  98. instaui/components/html/__init__.py +30 -19
  99. instaui/components/html/_preset.py +4 -0
  100. instaui/components/html/heading.py +51 -0
  101. instaui/components/html/range.py +3 -0
  102. instaui/components/html/select.py +13 -31
  103. instaui/components/html/table.py +36 -0
  104. instaui/components/markdown/static/github-markdown.css +1 -1
  105. instaui/components/markdown/static/marked.esm.js +0 -1
  106. instaui/components/row.py +8 -7
  107. instaui/components/shiki_code/shiki_code.js +126 -0
  108. instaui/components/shiki_code/shiki_code.py +99 -0
  109. instaui/components/shiki_code/static/langs/css.mjs +5 -0
  110. instaui/components/shiki_code/static/langs/markdown.mjs +5 -0
  111. instaui/components/shiki_code/static/langs/python.mjs +5 -0
  112. instaui/components/shiki_code/static/langs/shell.mjs +2 -0
  113. instaui/components/shiki_code/static/langs/shellscript.mjs +5 -0
  114. instaui/components/shiki_code/static/shiki-core.js +5784 -0
  115. instaui/components/shiki_code/static/shiki-style.css +179 -0
  116. instaui/components/shiki_code/static/shiki-transformers.js +461 -0
  117. instaui/components/shiki_code/static/themes/vitesse-dark.mjs +2 -0
  118. instaui/components/shiki_code/static/themes/vitesse-light.mjs +2 -0
  119. instaui/components/value_element.py +7 -3
  120. instaui/consts.py +2 -1
  121. instaui/event/js_event.py +1 -0
  122. instaui/event/web_event.py +6 -7
  123. instaui/experimental/link_sql/__init__.py +3 -0
  124. instaui/experimental/link_sql/_base.py +23 -0
  125. instaui/experimental/link_sql/_duckdb.py +221 -0
  126. instaui/experimental/link_sql/_types.py +15 -0
  127. instaui/experimental/link_sql/data_source.js +50 -0
  128. instaui/fastapi_server/debug_mode_router.py +1 -1
  129. instaui/fastapi_server/server.py +4 -12
  130. instaui/handlers/event_handler.py +3 -1
  131. instaui/handlers/watch_handler.py +4 -0
  132. instaui/html_tools.py +41 -4
  133. instaui/runtime/_app.py +37 -3
  134. instaui/runtime/_link_manager.py +89 -0
  135. instaui/runtime/resource.py +19 -9
  136. instaui/runtime/scope.py +28 -7
  137. instaui/shadcn_classless/_index.py +42 -0
  138. instaui/shadcn_classless/static/shadcn-classless.css +403 -0
  139. instaui/static/insta-ui.css +1 -1
  140. instaui/static/insta-ui.esm-browser.prod.js +3663 -3658
  141. instaui/static/insta-ui.js.map +1 -1
  142. instaui/static/instaui-tools-browser.js +511 -0
  143. instaui/static/templates/debug/sse.html +1 -1
  144. instaui/static/templates/webview.html +78 -0
  145. instaui/tailwind/__init__.py +6 -0
  146. instaui/tailwind/_index.py +24 -0
  147. instaui/{static/tailwindcss.min.js → tailwind/static/tailwindcss-v3.min.js} +62 -62
  148. instaui/tailwind/static/tailwindcss-v4.min.js +8 -0
  149. instaui/template/_utils.py +23 -0
  150. instaui/template/webview_template.py +50 -0
  151. instaui/ui/__init__.py +8 -2
  152. instaui/ui/__init__.pyi +7 -1
  153. instaui/ui_functions/ui_page.py +1 -1
  154. instaui/vars/data.py +7 -7
  155. instaui/vars/element_ref.py +2 -4
  156. instaui/vars/event_context.py +4 -0
  157. instaui/vars/js_computed.py +6 -8
  158. instaui/vars/ref.py +6 -6
  159. instaui/vars/vue_computed.py +6 -7
  160. instaui/vars/web_computed.py +31 -32
  161. instaui/watch/vue_watch.py +23 -7
  162. instaui/watch/web_watch.py +5 -6
  163. instaui/webview/__init__.py +1 -0
  164. instaui/webview/_utils.py +8 -0
  165. instaui/webview/api.py +72 -0
  166. instaui/webview/func.py +114 -0
  167. instaui/webview/index.py +162 -0
  168. instaui/webview/resource.py +172 -0
  169. instaui/zero/func.py +19 -12
  170. instaui/zero/scope.py +29 -28
  171. {instaui-0.1.4.dist-info → instaui-0.1.6.dist-info}/METADATA +6 -2
  172. instaui-0.1.6.dist-info/RECORD +286 -0
  173. instaui/components/highlight_code/code.js +0 -63
  174. instaui/components/highlight_code/code.py +0 -117
  175. instaui/components/highlight_code/static/core.min.js +0 -307
  176. instaui/components/highlight_code/static/languages/css.min.js +0 -31
  177. instaui/components/highlight_code/static/languages/javascript.min.js +0 -81
  178. instaui/components/highlight_code/static/languages/json.min.js +0 -8
  179. instaui/components/highlight_code/static/languages/python-repl.min.js +0 -5
  180. instaui/components/highlight_code/static/languages/python.min.js +0 -42
  181. instaui/components/highlight_code/static/languages/shell.min.js +0 -5
  182. instaui/components/highlight_code/static/styles/default.min.css +0 -9
  183. instaui/components/highlight_code/static/styles/github-dark-dimmed.min.css +0 -9
  184. instaui/components/highlight_code/static/styles/github-dark.min.css +0 -10
  185. instaui/components/highlight_code/static/styles/github.min.css +0 -10
  186. instaui/daisyui/__init__.py +0 -20
  187. instaui/daisyui/_index.py +0 -15
  188. instaui/daisyui/button.py +0 -38
  189. instaui/daisyui/checkbox.py +0 -17
  190. instaui/daisyui/static/daisyui.css +0 -1
  191. instaui/daisyui/static/themes.css +0 -1
  192. instaui/handlers/computed_handler.py +0 -42
  193. instaui/handlers/config_handler.py +0 -13
  194. instaui/ui/__build_init.py +0 -73
  195. instaui/vars/_utils.py +0 -12
  196. instaui-0.1.4.dist-info/RECORD +0 -179
  197. {instaui-0.1.4.dist-info → instaui-0.1.6.dist-info}/LICENSE +0 -0
  198. {instaui-0.1.4.dist-info → instaui-0.1.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,227 @@
1
+ locale = {
2
+ "locale": "en-US",
3
+ "empty": {"description": "No Data"},
4
+ "drawer": {"okText": "Ok", "cancelText": "Cancel"},
5
+ "popconfirm": {"okText": "Ok", "cancelText": "Cancel"},
6
+ "modal": {"okText": "Ok", "cancelText": "Cancel"},
7
+ "pagination": {
8
+ "goto": "Goto",
9
+ "page": "Page",
10
+ "countPerPage": " / Page",
11
+ "total": "Total: {0}",
12
+ },
13
+ "table": {"okText": "Ok", "resetText": "Reset"},
14
+ "upload": {
15
+ "start": "Start",
16
+ "cancel": "Cancel",
17
+ "delete": "Delete",
18
+ "retry": "Click to retry",
19
+ "buttonText": "Upload",
20
+ "preview": "Preview",
21
+ "drag": "Click or drag file to this area to upload",
22
+ "dragHover": "Release to upload",
23
+ "error": "Upload Error",
24
+ },
25
+ "calendar": {
26
+ "formatYear": "YYYY",
27
+ "formatMonth": "MMM YYYY",
28
+ "today": "Today",
29
+ "view": {"month": "Month", "year": "Year", "week": "Week", "day": "Day"},
30
+ "month": {
31
+ "long": {
32
+ "January": "January",
33
+ "February": "February",
34
+ "March": "March",
35
+ "April": "April",
36
+ "May": "May",
37
+ "June": "June",
38
+ "July": "July",
39
+ "August": "August",
40
+ "September": "September",
41
+ "October": "October",
42
+ "November": "November",
43
+ "December": "December",
44
+ },
45
+ "short": {
46
+ "January": "Jan",
47
+ "February": "Feb",
48
+ "March": "Mar",
49
+ "April": "Apr",
50
+ "May": "May",
51
+ "June": "Jun",
52
+ "July": "Jul",
53
+ "August": "Aug",
54
+ "September": "Sept",
55
+ "October": "Oct",
56
+ "November": "Nov",
57
+ "December": "Dec",
58
+ },
59
+ },
60
+ "week": {
61
+ "long": {
62
+ "self": "Week",
63
+ "monday": "Monday",
64
+ "tuesday": "Tuesday",
65
+ "wednesday": "Wednesday",
66
+ "thursday": "Thursday",
67
+ "friday": "Friday",
68
+ "saturday": "Saturday",
69
+ "sunday": "Sunday",
70
+ },
71
+ "short": {
72
+ "self": "Week",
73
+ "monday": "Mon",
74
+ "tuesday": "Tue",
75
+ "wednesday": "Wed",
76
+ "thursday": "Thu",
77
+ "friday": "Fri",
78
+ "saturday": "Sat",
79
+ "sunday": "Sun",
80
+ },
81
+ },
82
+ },
83
+ "datePicker": {
84
+ "view": {"month": "Month", "year": "Year", "week": "Week", "day": "Day"},
85
+ "month": {
86
+ "long": {
87
+ "January": "January",
88
+ "February": "February",
89
+ "March": "March",
90
+ "April": "April",
91
+ "May": "May",
92
+ "June": "June",
93
+ "July": "July",
94
+ "August": "August",
95
+ "September": "September",
96
+ "October": "October",
97
+ "November": "November",
98
+ "December": "December",
99
+ },
100
+ "short": {
101
+ "January": "Jan",
102
+ "February": "Feb",
103
+ "March": "Mar",
104
+ "April": "Apr",
105
+ "May": "May",
106
+ "June": "Jun",
107
+ "July": "Jul",
108
+ "August": "Aug",
109
+ "September": "Sept",
110
+ "October": "Oct",
111
+ "November": "Nov",
112
+ "December": "Dec",
113
+ },
114
+ },
115
+ "week": {
116
+ "long": {
117
+ "self": "Week",
118
+ "monday": "Monday",
119
+ "tuesday": "Tuesday",
120
+ "wednesday": "Wednesday",
121
+ "thursday": "Thursday",
122
+ "friday": "Friday",
123
+ "saturday": "Saturday",
124
+ "sunday": "Sunday",
125
+ },
126
+ "short": {
127
+ "self": "Week",
128
+ "monday": "Mon",
129
+ "tuesday": "Tue",
130
+ "wednesday": "Wed",
131
+ "thursday": "Thu",
132
+ "friday": "Fri",
133
+ "saturday": "Sat",
134
+ "sunday": "Sun",
135
+ },
136
+ },
137
+ "placeholder": {
138
+ "date": "Please select date",
139
+ "week": "Please select week",
140
+ "month": "Please select month",
141
+ "year": "Please select year",
142
+ "quarter": "Please select quarter",
143
+ "time": "Please select time",
144
+ },
145
+ "rangePlaceholder": {
146
+ "date": ["Start date", "End date"],
147
+ "week": ["Start week", "End week"],
148
+ "month": ["Start month", "End month"],
149
+ "year": ["Start year", "End year"],
150
+ "quarter": ["Start quarter", "End quarter"],
151
+ "time": ["Start time", "End time"],
152
+ },
153
+ "selectTime": "Select time",
154
+ "today": "Today",
155
+ "now": "Now",
156
+ "ok": "Ok",
157
+ },
158
+ "image": {"loading": "loading"},
159
+ "imagePreview": {
160
+ "fullScreen": "Full Screen",
161
+ "rotateRight": "Rotate Right",
162
+ "rotateLeft": "Rotate Left",
163
+ "zoomIn": "Zoom In",
164
+ "zoomOut": "Zoom Out",
165
+ "originalSize": "Original Size",
166
+ },
167
+ "typography": {
168
+ "copied": "Copied",
169
+ "copy": "Copy",
170
+ "expand": "Expand",
171
+ "collapse": "Collapse",
172
+ "edit": "Edit",
173
+ },
174
+ "form": {
175
+ "validateMessages": {
176
+ "required": "#{field} is required",
177
+ "type": {
178
+ "ip": "#{field} is not a #{type} type",
179
+ "email": "#{field} is not a #{type} type",
180
+ "url": "#{field} is not a #{type} type",
181
+ "string": "#{field} is not a #{type} type",
182
+ "number": "#{field} is not a #{type} type",
183
+ "array": "#{field} is not a #{type} type",
184
+ "object": "#{field} is not a #{type} type",
185
+ "boolean": "#{field} is not a #{type} type",
186
+ },
187
+ "number": {
188
+ "min": "`#{value}` is not greater than `#{min}`",
189
+ "max": "`#{value}` is not less than `#{max}`",
190
+ "equal": "`#{value}` is not equal to `#{equal}`",
191
+ "range": "`#{value}` is not in range `#{min} ~ #{max}`",
192
+ "positive": "`#{value}` is not a positive number",
193
+ "negative": "`#{value}` is not a negative number",
194
+ },
195
+ "string": {
196
+ "maxLength": "#{field} cannot be longer than #{maxLength} characters",
197
+ "minLength": "#{field} must be at least #{minLength} characters",
198
+ "length": "#{field} must be exactly #{length} characters",
199
+ "match": "`#{value}` does not match pattern #{pattern}",
200
+ "uppercase": "`#{value}` must be all uppercase",
201
+ "lowercase": "`#{value}` must be all lowercased",
202
+ },
203
+ "array": {
204
+ "length": "#{field} must be exactly #{length} in length",
205
+ "minLength": "#{field} cannot be less than #{minLength} in length",
206
+ "maxLength": "#{field} cannot be greater than #{maxLength} in length",
207
+ "includes": "#{field} is not includes #{includes}",
208
+ "deepEqual": "#{field} is not deep equal with #{deepEqual}",
209
+ "empty": "#{field} is not an empty array",
210
+ },
211
+ "object": {
212
+ "deepEqual": "#{field} is not deep equal to expected value",
213
+ "hasKeys": "#{field} does not contain required fields",
214
+ "empty": "#{field} is not an empty object",
215
+ },
216
+ "boolean": {
217
+ "true": "Expect true but got `#{value}`",
218
+ "false": "Expect false but got `#{value}`",
219
+ },
220
+ }
221
+ },
222
+ "colorPicker": {
223
+ "history": "History Colors",
224
+ "preset": "Preset Colors",
225
+ "empty": "Empty",
226
+ },
227
+ }
@@ -0,0 +1,224 @@
1
+ locale = {
2
+ "locale": "zh-CN",
3
+ "empty": {"description": "暂无数据"},
4
+ "drawer": {"okText": "确定", "cancelText": "取消"},
5
+ "popconfirm": {"okText": "确定", "cancelText": "取消"},
6
+ "modal": {"okText": "确定", "cancelText": "取消"},
7
+ "pagination": {
8
+ "goto": "前往",
9
+ "page": "页",
10
+ "countPerPage": "条/页",
11
+ "total": "共 {0} 条",
12
+ },
13
+ "table": {"okText": "确定", "resetText": "重置"},
14
+ "upload": {
15
+ "start": "开始",
16
+ "cancel": "取消",
17
+ "delete": "删除",
18
+ "retry": "点击重试",
19
+ "buttonText": "点击上传",
20
+ "preview": "预览",
21
+ "drag": "点击或拖拽文件到此处上传",
22
+ "dragHover": "释放文件并开始上传",
23
+ "error": "上传失败",
24
+ },
25
+ "calendar": {
26
+ "formatYear": "YYYY 年",
27
+ "formatMonth": "YYYY 年 MM 月",
28
+ "today": "今天",
29
+ "view": {"month": "月", "year": "年", "week": "周", "day": "日"},
30
+ "month": {
31
+ "long": {
32
+ "January": "一月",
33
+ "February": "二月",
34
+ "March": "三月",
35
+ "April": "四月",
36
+ "May": "五月",
37
+ "June": "六月",
38
+ "July": "七月",
39
+ "August": "八月",
40
+ "September": "九月",
41
+ "October": "十月",
42
+ "November": "十一月",
43
+ "December": "十二月",
44
+ },
45
+ "short": {
46
+ "January": "一月",
47
+ "February": "二月",
48
+ "March": "三月",
49
+ "April": "四月",
50
+ "May": "五月",
51
+ "June": "六月",
52
+ "July": "七月",
53
+ "August": "八月",
54
+ "September": "九月",
55
+ "October": "十月",
56
+ "November": "十一月",
57
+ "December": "十二月",
58
+ },
59
+ },
60
+ "week": {
61
+ "long": {
62
+ "self": "周",
63
+ "monday": "周一",
64
+ "tuesday": "周二",
65
+ "wednesday": "周三",
66
+ "thursday": "周四",
67
+ "friday": "周五",
68
+ "saturday": "周六",
69
+ "sunday": "周日",
70
+ },
71
+ "short": {
72
+ "self": "周",
73
+ "monday": "一",
74
+ "tuesday": "二",
75
+ "wednesday": "三",
76
+ "thursday": "四",
77
+ "friday": "五",
78
+ "saturday": "六",
79
+ "sunday": "日",
80
+ },
81
+ },
82
+ },
83
+ "datePicker": {
84
+ "view": {"month": "月", "year": "年", "week": "周", "day": "日"},
85
+ "month": {
86
+ "long": {
87
+ "January": "一月",
88
+ "February": "二月",
89
+ "March": "三月",
90
+ "April": "四月",
91
+ "May": "五月",
92
+ "June": "六月",
93
+ "July": "七月",
94
+ "August": "八月",
95
+ "September": "九月",
96
+ "October": "十月",
97
+ "November": "十一月",
98
+ "December": "十二月",
99
+ },
100
+ "short": {
101
+ "January": "一月",
102
+ "February": "二月",
103
+ "March": "三月",
104
+ "April": "四月",
105
+ "May": "五月",
106
+ "June": "六月",
107
+ "July": "七月",
108
+ "August": "八月",
109
+ "September": "九月",
110
+ "October": "十月",
111
+ "November": "十一月",
112
+ "December": "十二月",
113
+ },
114
+ },
115
+ "week": {
116
+ "long": {
117
+ "self": "周",
118
+ "monday": "周一",
119
+ "tuesday": "周二",
120
+ "wednesday": "周三",
121
+ "thursday": "周四",
122
+ "friday": "周五",
123
+ "saturday": "周六",
124
+ "sunday": "周日",
125
+ },
126
+ "short": {
127
+ "self": "周",
128
+ "monday": "一",
129
+ "tuesday": "二",
130
+ "wednesday": "三",
131
+ "thursday": "四",
132
+ "friday": "五",
133
+ "saturday": "六",
134
+ "sunday": "日",
135
+ },
136
+ },
137
+ "placeholder": {
138
+ "date": "请选择日期",
139
+ "week": "请选择周",
140
+ "month": "请选择月份",
141
+ "year": "请选择年份",
142
+ "quarter": "请选择季度",
143
+ "time": "请选择时间",
144
+ },
145
+ "rangePlaceholder": {
146
+ "date": ["开始日期", "结束日期"],
147
+ "week": ["开始周", "结束周"],
148
+ "month": ["开始月份", "结束月份"],
149
+ "year": ["开始年份", "结束年份"],
150
+ "quarter": ["开始季度", "结束季度"],
151
+ "time": ["开始时间", "结束时间"],
152
+ },
153
+ "selectTime": "选择时间",
154
+ "today": "今天",
155
+ "now": "此刻",
156
+ "ok": "确定",
157
+ },
158
+ "image": {"loading": "加载中"},
159
+ "imagePreview": {
160
+ "fullScreen": "全屏",
161
+ "rotateRight": "向右旋转",
162
+ "rotateLeft": "向左旋转",
163
+ "zoomIn": "放大",
164
+ "zoomOut": "缩小",
165
+ "originalSize": "原始尺寸",
166
+ },
167
+ "typography": {
168
+ "copied": "已复制",
169
+ "copy": "复制",
170
+ "expand": "展开",
171
+ "collapse": "折叠",
172
+ "edit": "编辑",
173
+ },
174
+ "form": {
175
+ "validateMessages": {
176
+ "required": "#{field} 是必填项",
177
+ "type": {
178
+ "string": "#{field} 不是合法的文本类型",
179
+ "number": "#{field} 不是合法的数字类型",
180
+ "boolean": "#{field} 不是合法的布尔类型",
181
+ "array": "#{field} 不是合法的数组类型",
182
+ "object": "#{field} 不是合法的对象类型",
183
+ "url": "#{field} 不是合法的 url 地址",
184
+ "email": "#{field} 不是合法的邮箱地址",
185
+ "ip": "#{field} 不是合法的 IP 地址",
186
+ },
187
+ "number": {
188
+ "min": "`#{value}` 小于最小值 `#{min}`",
189
+ "max": "`#{value}` 大于最大值 `#{max}`",
190
+ "equal": "`#{value}` 不等于 `#{equal}`",
191
+ "range": "`#{value}` 不在 `#{min} ~ #{max}` 范围内",
192
+ "positive": "`#{value}` 不是正数",
193
+ "negative": "`#{value}` 不是负数",
194
+ },
195
+ "array": {
196
+ "length": "`#{field}` 个数不等于 #{length}",
197
+ "minLength": "`#{field}` 个数最少为 #{minLength}",
198
+ "maxLength": "`#{field}` 个数最多为 #{maxLength}",
199
+ "includes": "#{field} 不包含 #{includes}",
200
+ "deepEqual": "#{field} 不等于 #{deepEqual}",
201
+ "empty": "`#{field}` 不是空数组",
202
+ },
203
+ "string": {
204
+ "minLength": "字符数最少为 #{minLength}",
205
+ "maxLength": "字符数最多为 #{maxLength}",
206
+ "length": "字符数必须是 #{length}",
207
+ "match": "`#{value}` 不符合模式 #{pattern}",
208
+ "uppercase": "`#{value}` 必须全大写",
209
+ "lowercase": "`#{value}` 必须全小写",
210
+ },
211
+ "object": {
212
+ "deepEqual": "`#{field}` 不等于期望值",
213
+ "hasKeys": "`#{field}` 不包含必须字段",
214
+ "empty": "`#{field}` 不是对象",
215
+ },
216
+ "boolean": {"true": "期望是 `true`", "false": "期望是 `false`"},
217
+ }
218
+ },
219
+ "colorPicker": {
220
+ "history": "最近使用颜色",
221
+ "preset": "系统预设颜色",
222
+ "empty": "暂无",
223
+ },
224
+ }
instaui/arco/setup.py ADDED
@@ -0,0 +1,36 @@
1
+ from pathlib import Path
2
+ from typing import Union
3
+ from instaui import ui
4
+ from instaui.dependencies.plugin_dependency import register_plugin
5
+ from instaui.arco.types import TLocale, TCustomizeLocale
6
+ from instaui.arco._settings import configure
7
+
8
+ static_folder = Path(__file__).parent / "static"
9
+
10
+ arco_css = static_folder / "instaui-arco.css"
11
+ arco_esm_js = static_folder / "instaui-arco.js"
12
+
13
+
14
+ def _register_arco():
15
+ register_plugin("InstauiArco", esm=arco_esm_js, css=[arco_css])
16
+
17
+
18
+ def use(*, locale: ui.TMaybeRef[Union[TLocale, TCustomizeLocale]] = "en-US"):
19
+ """Use arco ui.
20
+
21
+ Args:
22
+ locale (ui.TMaybeRef[Union[TLocale, TCustomizeLocale]], optional): The locale of arco ui. Defaults to "en-US".
23
+
24
+ Examples:
25
+ .. code-block:: python
26
+ from instaui import ui, arco
27
+
28
+ arco.use()
29
+
30
+ @ui.page("/")
31
+ def index_page():
32
+ arco.input(placeholder="input")
33
+ """
34
+
35
+ _register_arco()
36
+ configure(locale=locale)