@zolomedia/bifrost-client 1.7.74
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/L1_Foundation/L1_Foundation.js +13 -0
- package/L1_Foundation/bootstrap/bootstrap.js +11 -0
- package/L1_Foundation/bootstrap/bootstrap_hooks.js +123 -0
- package/L1_Foundation/bootstrap/bootstrap_index.js +15 -0
- package/L1_Foundation/bootstrap/bootstrap_logger.js +135 -0
- package/L1_Foundation/bootstrap/cdn_loader.js +217 -0
- package/L1_Foundation/bootstrap/module_registry.js +102 -0
- package/L1_Foundation/bootstrap/prism_loader.js +164 -0
- package/L1_Foundation/config/client_config.js +110 -0
- package/L1_Foundation/config/config.js +7 -0
- package/L1_Foundation/connection/connection.js +8 -0
- package/L1_Foundation/connection/websocket_connection.js +122 -0
- package/L1_Foundation/constants/bifrost_constants.js +284 -0
- package/L1_Foundation/constants/constants.js +7 -0
- package/L1_Foundation/logger/logger.js +10 -0
- package/L2_Handling/L2_Handling.js +15 -0
- package/L2_Handling/cache/cache.js +22 -0
- package/L2_Handling/cache/cache_constants.js +69 -0
- package/L2_Handling/cache/orchestration/cache_manager.js +299 -0
- package/L2_Handling/cache/orchestration/cache_orchestrator.js +260 -0
- package/L2_Handling/cache/orchestration/orchestration.js +12 -0
- package/L2_Handling/cache/storage/session_manager.js +289 -0
- package/L2_Handling/cache/storage/storage.js +10 -0
- package/L2_Handling/cache/storage/storage_manager.js +590 -0
- package/L2_Handling/display/composite/composite.js +13 -0
- package/L2_Handling/display/composite/dashboard_renderer.js +221 -0
- package/L2_Handling/display/composite/swiper_renderer.js +564 -0
- package/L2_Handling/display/composite/terminal_renderer.js +922 -0
- package/L2_Handling/display/composite/wizard_conditional_renderer.js +274 -0
- package/L2_Handling/display/display.js +30 -0
- package/L2_Handling/display/feedback/feedback.js +11 -0
- package/L2_Handling/display/feedback/progressbar_renderer.js +418 -0
- package/L2_Handling/display/feedback/spinner_renderer.js +246 -0
- package/L2_Handling/display/inputs/button_renderer.js +634 -0
- package/L2_Handling/display/inputs/form_renderer.js +583 -0
- package/L2_Handling/display/inputs/input_renderer.js +658 -0
- package/L2_Handling/display/inputs/inputs.js +12 -0
- package/L2_Handling/display/navigation/menu_renderer.js +206 -0
- package/L2_Handling/display/navigation/navigation.js +11 -0
- package/L2_Handling/display/navigation/navigation_renderer.js +703 -0
- package/L2_Handling/display/orchestration/orchestration.js +11 -0
- package/L2_Handling/display/orchestration/renderer.js +430 -0
- package/L2_Handling/display/orchestration/zdisplay_orchestrator.js +1759 -0
- package/L2_Handling/display/outputs/alert_renderer.js +161 -0
- package/L2_Handling/display/outputs/audio_renderer.js +94 -0
- package/L2_Handling/display/outputs/card_renderer.js +229 -0
- package/L2_Handling/display/outputs/code_renderer.js +66 -0
- package/L2_Handling/display/outputs/dl_renderer.js +131 -0
- package/L2_Handling/display/outputs/header_renderer.js +162 -0
- package/L2_Handling/display/outputs/icon_renderer.js +107 -0
- package/L2_Handling/display/outputs/image_renderer.js +145 -0
- package/L2_Handling/display/outputs/list_renderer.js +190 -0
- package/L2_Handling/display/outputs/outputs.js +19 -0
- package/L2_Handling/display/outputs/table_renderer.js +765 -0
- package/L2_Handling/display/outputs/text_renderer.js +818 -0
- package/L2_Handling/display/outputs/typography_renderer.js +293 -0
- package/L2_Handling/display/outputs/video_renderer.js +116 -0
- package/L2_Handling/display/primitives/document_structure_primitives.js +319 -0
- package/L2_Handling/display/primitives/form_primitives.js +526 -0
- package/L2_Handling/display/primitives/generic_containers.js +109 -0
- package/L2_Handling/display/primitives/interactive_primitives.js +305 -0
- package/L2_Handling/display/primitives/link_primitives.js +552 -0
- package/L2_Handling/display/primitives/lists_primitives.js +262 -0
- package/L2_Handling/display/primitives/media_primitives.js +383 -0
- package/L2_Handling/display/primitives/primitives.js +19 -0
- package/L2_Handling/display/primitives/semantic_element_primitive.js +226 -0
- package/L2_Handling/display/primitives/table_primitives.js +528 -0
- package/L2_Handling/display/primitives/typography_primitives.js +175 -0
- package/L2_Handling/display/specialized/input_request_renderer.js +467 -0
- package/L2_Handling/display/specialized/specialized.js +10 -0
- package/L2_Handling/hooks/hooks.js +9 -0
- package/L2_Handling/hooks/menu_integration.js +57 -0
- package/L2_Handling/hooks/widget_hook_manager.js +292 -0
- package/L2_Handling/message/message.js +8 -0
- package/L2_Handling/message/message_handler.js +701 -0
- package/L2_Handling/navigation/navigation.js +8 -0
- package/L2_Handling/navigation/navigation_manager.js +403 -0
- package/L2_Handling/zhooks/features/cache_live.js +287 -0
- package/L2_Handling/zhooks/features/crumbs_live.js +292 -0
- package/L2_Handling/zhooks/zhooks_manager.js +65 -0
- package/L2_Handling/zvaf/zvaf.js +8 -0
- package/L2_Handling/zvaf/zvaf_manager.js +334 -0
- package/L3_Abstraction/L3_Abstraction.js +12 -0
- package/L3_Abstraction/orchestrator/container_unwrapper.js +101 -0
- package/L3_Abstraction/orchestrator/group_renderer.js +698 -0
- package/L3_Abstraction/orchestrator/input_event_handler.js +797 -0
- package/L3_Abstraction/orchestrator/metadata_processor.js +249 -0
- package/L3_Abstraction/orchestrator/navbar_builder.js +201 -0
- package/L3_Abstraction/orchestrator/orchestrator.js +13 -0
- package/L3_Abstraction/orchestrator/wizard_gate_handler.js +360 -0
- package/L3_Abstraction/renderer/renderer.js +1 -0
- package/L3_Abstraction/session/session.js +1 -0
- package/L4_Orchestration/L4_Orchestration.js +11 -0
- package/L4_Orchestration/client/client.js +1 -0
- package/L4_Orchestration/facade/facade.js +9 -0
- package/L4_Orchestration/facade/manager_registry.js +118 -0
- package/L4_Orchestration/facade/renderer_registry.js +274 -0
- package/L4_Orchestration/lifecycle/asset_loader.js +255 -0
- package/L4_Orchestration/lifecycle/initializer.js +135 -0
- package/L4_Orchestration/lifecycle/lifecycle.js +8 -0
- package/L4_Orchestration/rendering/facade.js +94 -0
- package/L4_Orchestration/rendering/rendering.js +7 -0
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/bifrost_client.js +204 -0
- package/bifrost_core.js +1686 -0
- package/docs/ARCHITECTURE.md +111 -0
- package/docs/PROTOCOL.md +106 -0
- package/docs/RENDERERS.md +101 -0
- package/docs/SECURITY.md +92 -0
- package/package.json +24 -0
- package/syntax/prism-zconfig.js +41 -0
- package/syntax/prism-zenv.js +69 -0
- package/syntax/prism-zolo-theme.css +288 -0
- package/syntax/prism-zolo.js +380 -0
- package/syntax/prism-zschema.js +38 -0
- package/syntax/prism-zspark.js +25 -0
- package/syntax/prism-zui.js +68 -0
- package/zSys/accessibility/accessibility.js +10 -0
- package/zSys/accessibility/emoji_accessibility.js +173 -0
- package/zSys/dom/block_utils.js +122 -0
- package/zSys/dom/container_utils.js +370 -0
- package/zSys/dom/dom.js +13 -0
- package/zSys/dom/dom_utils.js +328 -0
- package/zSys/dom/encoding_utils.js +117 -0
- package/zSys/dom/style_utils.js +71 -0
- package/zSys/errors/error_display.js +299 -0
- package/zSys/errors/errors.js +10 -0
- package/zSys/theme/color_utils.js +274 -0
- package/zSys/theme/dark_mode_utils.js +272 -0
- package/zSys/theme/size_utils.js +256 -0
- package/zSys/theme/spacing_utils.js +405 -0
- package/zSys/theme/theme.js +14 -0
- package/zSys/theme/zbase.css +1735 -0
- package/zSys/theme/zbase_inject.js +161 -0
- package/zSys/theme/ztheme_utils.js +305 -0
- package/zSys/validation/error_boundary.js +201 -0
- package/zSys/validation/validation.js +11 -0
- package/zSys/validation/validation_utils.js +238 -0
- package/zSys/zSys.js +14 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prism.js CSS Theme for .zolo syntax highlighting
|
|
3
|
+
*
|
|
4
|
+
* AUTO-GENERATED by zlsp/themes/generators/prism.py
|
|
5
|
+
* DO NOT EDIT MANUALLY - Changes will be overwritten!
|
|
6
|
+
*
|
|
7
|
+
* Generated: 2026-06-08 19:00:23
|
|
8
|
+
* Source: zlsp/themes/zolo_default.yaml (SSOT)
|
|
9
|
+
* Maintainer: Run from zlsp to regenerate
|
|
10
|
+
*
|
|
11
|
+
* Colors are derived from the canonical zlsp theme to ensure
|
|
12
|
+
* consistency between IDE and web syntax highlighting.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* zMeta root key in zUI/zSchema files (Zolo convention) */
|
|
16
|
+
.language-zolo .token.special-key,
|
|
17
|
+
.language-zspark .token.special-key {
|
|
18
|
+
color: #87d787 !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* zMeta root key in zUI/zSchema files (Zolo convention) */
|
|
22
|
+
.language-zolo .token.builtin,
|
|
23
|
+
.language-zspark .token.builtin {
|
|
24
|
+
color: #87d787 !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Top-level keys in non-zOS files (app_name, server, features) */
|
|
28
|
+
.language-zolo .token.root-key,
|
|
29
|
+
.language-zspark .token.root-key {
|
|
30
|
+
color: #87d700 !important;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Top-level keys in non-zOS files (app_name, server, features) */
|
|
35
|
+
.language-zolo .token.class-name,
|
|
36
|
+
.language-zspark .token.class-name {
|
|
37
|
+
color: #87d700 !important;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Bifrost underscore keys in zUI files (_zClass, _zId) */
|
|
42
|
+
.language-zolo .token.metadata,
|
|
43
|
+
.language-zspark .token.metadata {
|
|
44
|
+
color: #00ffff !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Bifrost underscore keys in zUI files (_zClass, _zId) */
|
|
48
|
+
.language-zolo .token.keyword,
|
|
49
|
+
.language-zspark .token.keyword {
|
|
50
|
+
color: #00ffff !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* zDispatch event keys (zDialog, zData, zCRUD, zLogin) */
|
|
54
|
+
.language-zolo .token.zdispatch-event,
|
|
55
|
+
.language-zspark .token.zdispatch-event {
|
|
56
|
+
color: #ffd787 !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* zDispatch event keys (zDialog, zData, zCRUD, zLogin) */
|
|
60
|
+
.language-zolo .token.dispatch-event,
|
|
61
|
+
.language-zspark .token.dispatch-event {
|
|
62
|
+
color: #ffd787 !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* UI element keys in zUI files (zImage, zText, zURL, zH1-zH6, zNavBar, zUL, zOL, zDL) */
|
|
66
|
+
.language-zolo .token.display-event,
|
|
67
|
+
.language-zspark .token.display-event {
|
|
68
|
+
color: #ff5f00 !important;
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* UI element keys in zUI files (zImage, zText, zURL, zH1-zH6, zNavBar, zUL, zOL, zDL) */
|
|
73
|
+
.language-zolo .token.function,
|
|
74
|
+
.language-zspark .token.function {
|
|
75
|
+
color: #ff5f00 !important;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Property keys inside UI elements (src, label, color) */
|
|
80
|
+
.language-zolo .token.ui-property,
|
|
81
|
+
.language-zspark .token.ui-property {
|
|
82
|
+
color: #af87ff !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Property keys inside UI elements (src, label, color) */
|
|
86
|
+
.language-zolo .token.variable,
|
|
87
|
+
.language-zspark .token.variable {
|
|
88
|
+
color: #af87ff !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Standard nested keys (host, port, ssl) */
|
|
92
|
+
.language-zolo .token.property,
|
|
93
|
+
.language-zspark .token.property {
|
|
94
|
+
color: #87ffaf !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Standard string values */
|
|
98
|
+
.language-zolo .token.string,
|
|
99
|
+
.language-zspark .token.string {
|
|
100
|
+
color: #fffbcb !important;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Standard string values */
|
|
104
|
+
.language-zolo .token.unquoted-value,
|
|
105
|
+
.language-zspark .token.unquoted-value {
|
|
106
|
+
color: #fffbcb !important;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Boolean values (true, false) */
|
|
110
|
+
.language-zolo .token.boolean,
|
|
111
|
+
.language-zspark .token.boolean {
|
|
112
|
+
color: #d7d7ff !important;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Numeric values (8080, 100, 3.14, -42) */
|
|
116
|
+
.language-zolo .token.number,
|
|
117
|
+
.language-zspark .token.number {
|
|
118
|
+
color: #FF8C00 !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Numeric values (8080, 100, 3.14, -42) */
|
|
122
|
+
.language-zolo .token.number-value,
|
|
123
|
+
.language-zspark .token.number-value {
|
|
124
|
+
color: #FF8C00 !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Null values (null) */
|
|
128
|
+
.language-zolo .token.null,
|
|
129
|
+
.language-zspark .token.null {
|
|
130
|
+
color: #d7d7ff !important;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Single-line comments (#) and inline comments */
|
|
134
|
+
.language-zolo .token.comment,
|
|
135
|
+
.language-zspark .token.comment {
|
|
136
|
+
color: #626262 !important;
|
|
137
|
+
font-style: italic;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Type hint text (int, bool, float, str, list, dict) */
|
|
141
|
+
.language-zolo .token.type,
|
|
142
|
+
.language-zspark .token.type {
|
|
143
|
+
color: #87d7ff !important;
|
|
144
|
+
font-style: italic;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Escape sequences in strings (\n, \t, \uXXXX) */
|
|
148
|
+
.language-zolo .token.escape-sequence,
|
|
149
|
+
.language-zspark .token.escape-sequence {
|
|
150
|
+
color: #ff0000 !important;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Colon separator (:) after root/nested keys */
|
|
154
|
+
.language-zolo .token.punctuation,
|
|
155
|
+
.language-zspark .token.punctuation {
|
|
156
|
+
color: #ffffff !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Colon separator (:) after root/nested keys */
|
|
160
|
+
.language-zolo .token.modifier,
|
|
161
|
+
.language-zspark .token.modifier {
|
|
162
|
+
color: #ffffff !important;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Colon separator (:) after root/nested keys */
|
|
166
|
+
.language-zolo .token.operator,
|
|
167
|
+
.language-zspark .token.operator {
|
|
168
|
+
color: #ffffff !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* ============================================================================
|
|
172
|
+
* Multi-Language Support (zspark, zui, zschema, zconfig, zenv)
|
|
173
|
+
* Language-specific token styling from zlsp SSOT
|
|
174
|
+
* ============================================================================ */
|
|
175
|
+
|
|
176
|
+
/* zUI-specific tokens (from SSOT: semantic-colors.json) */
|
|
177
|
+
.language-zui .token.function {
|
|
178
|
+
/* zui-element: zH1, zText, zURL → uiElementKey */
|
|
179
|
+
color: #ff5f00 !important;
|
|
180
|
+
font-weight: 500;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.language-zui .token.variable {
|
|
184
|
+
/* zui-element-property: label, color, href → uiElementPropertyKey */
|
|
185
|
+
color: #af87ff !important;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.language-zui .token.keyword {
|
|
189
|
+
/* metadata: _zClass, _zId → bifrostKey */
|
|
190
|
+
color: #00ffff !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.language-zui .token.class-name {
|
|
194
|
+
/* root-key: Main_Page, Getting_Started → rootKey */
|
|
195
|
+
color: #87d700 !important;
|
|
196
|
+
font-weight: 600;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.language-zui .token.property {
|
|
200
|
+
/* Nested keys like Header, Actions → nestedKey */
|
|
201
|
+
color: #87ffaf !important;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.language-zui .token.constant {
|
|
205
|
+
/* zRBAC key → zrbacKey */
|
|
206
|
+
color: #ff0000 !important;
|
|
207
|
+
font-weight: 600;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* zEnv-specific tokens */
|
|
211
|
+
.language-zenv .token.constant {
|
|
212
|
+
/* zRBAC key in zEnv files → zrbacKey */
|
|
213
|
+
color: #ff0000 !important;
|
|
214
|
+
font-weight: 600;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.language-zenv .token.variable {
|
|
218
|
+
/* Prefix modifiers (^, ~) in zEnv → zrbacOptionKey */
|
|
219
|
+
color: #af87ff !important;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* zSpark uses base zolo styles (no overrides) */
|
|
223
|
+
|
|
224
|
+
/* Generic multi-language aliases (fallback for all languages) */
|
|
225
|
+
.token.function {
|
|
226
|
+
color: #ff5f00 !important;
|
|
227
|
+
font-weight: 600;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.token.class-name {
|
|
231
|
+
color: #87d700 !important;
|
|
232
|
+
font-weight: 600;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* SSOT: Type hints split into TWO tokens (value_emitters.py:352-362) */
|
|
236
|
+
.token.type-hint {
|
|
237
|
+
/* Container for type hint - inherits from nested tokens */
|
|
238
|
+
color: #87d7ff !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.token.type-hint-paren {
|
|
242
|
+
/* SSOT: TokenType.TYPE_HINT_PAREN → typeHintParen → lavender */
|
|
243
|
+
color: #ffffff !important;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.token.type-hint-text {
|
|
247
|
+
/* SSOT: TokenType.TYPE_HINT → typeHint → dark_cyan */
|
|
248
|
+
color: #87d7ff !important;
|
|
249
|
+
font-style: italic;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Legacy support: OLD .token.type selector (before nested tokenization) */
|
|
253
|
+
.token.type {
|
|
254
|
+
color: #87d7ff !important;
|
|
255
|
+
font-style: italic;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.token.boolean {
|
|
259
|
+
color: #d7d7ff !important;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.token.number {
|
|
263
|
+
color: #FF8C00 !important;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.token.string {
|
|
267
|
+
color: #fffbcb !important;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.token.punctuation {
|
|
271
|
+
color: #ffffff !important;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.token.operator {
|
|
275
|
+
color: #ffffff !important;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* Structural brackets and braces (from Prism.js patterns) */
|
|
279
|
+
.token.bracket,
|
|
280
|
+
.language-zolo .token.bracket {
|
|
281
|
+
color: #ff00ff !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.token.brace,
|
|
285
|
+
.language-zolo .token.brace {
|
|
286
|
+
color: #ffff00 !important;
|
|
287
|
+
}
|
|
288
|
+
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prism.js base language definition for zolo
|
|
3
|
+
* Generic .zolo syntax - string-first philosophy
|
|
4
|
+
*
|
|
5
|
+
* This is the foundation for all specialized zolo languages.
|
|
6
|
+
* Other languages extend this base with file-type-specific patterns.
|
|
7
|
+
*
|
|
8
|
+
* Generated by zlsp/zlsp/generators/generate_prism_zolo.py
|
|
9
|
+
* DO NOT EDIT MANUALLY - regenerate with: python3 -m zlsp.generators.generate_prism_zolo
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
Prism.languages.zolo = {
|
|
13
|
+
'comment': {
|
|
14
|
+
pattern: /(^[ \t]*#(?!>).*|#>[\s\S]*?<#)/m,
|
|
15
|
+
alias: 'comment',
|
|
16
|
+
greedy: true,
|
|
17
|
+
},
|
|
18
|
+
'root-key': {
|
|
19
|
+
pattern: /(^|\n)([a-zA-Z][a-zA-Z0-9_]*)(?=\s*(?:\([^)]+\))?[*!^~]?:)/m,
|
|
20
|
+
alias: 'class-name',
|
|
21
|
+
lookbehind: true,
|
|
22
|
+
},
|
|
23
|
+
'property': {
|
|
24
|
+
pattern: /(?<=\n)[ \t]+[a-zA-Z][a-zA-Z0-9_]*(?=\s*(?:\([^)]+\))?[*!]?:)/m,
|
|
25
|
+
lookbehind: true,
|
|
26
|
+
},
|
|
27
|
+
'type-hint': {
|
|
28
|
+
pattern: /\([^)]+\)(?=\s*:)/,
|
|
29
|
+
inside: {
|
|
30
|
+
'type-hint-paren': {
|
|
31
|
+
pattern: /[()]/,
|
|
32
|
+
alias: 'punctuation',
|
|
33
|
+
},
|
|
34
|
+
'type-hint-text': {
|
|
35
|
+
pattern: /[^()]+/,
|
|
36
|
+
alias: 'type',
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
'dash-list': {
|
|
41
|
+
pattern: /(?<=\n)[ \t]*-(?:\s+[^\n]+)?/,
|
|
42
|
+
alias: 'language-zolo',
|
|
43
|
+
lookbehind: true,
|
|
44
|
+
inside: {
|
|
45
|
+
'dash': {
|
|
46
|
+
pattern: /^[ \t]*-\s*/,
|
|
47
|
+
alias: 'bracket',
|
|
48
|
+
},
|
|
49
|
+
'object': {
|
|
50
|
+
pattern: /\{(?:[^{}]|\{[^{}]*\})*\}/,
|
|
51
|
+
alias: 'language-zolo',
|
|
52
|
+
greedy: true,
|
|
53
|
+
inside: {
|
|
54
|
+
'brace': {
|
|
55
|
+
pattern: /[{}]/,
|
|
56
|
+
alias: 'brace',
|
|
57
|
+
},
|
|
58
|
+
'comma': {
|
|
59
|
+
pattern: /,/,
|
|
60
|
+
alias: 'punctuation',
|
|
61
|
+
},
|
|
62
|
+
'property': {
|
|
63
|
+
pattern: /[a-zA-Z][a-zA-Z0-9_]*(?=\s*:)/,
|
|
64
|
+
alias: 'property',
|
|
65
|
+
},
|
|
66
|
+
'colon': {
|
|
67
|
+
pattern: /:/,
|
|
68
|
+
alias: 'punctuation',
|
|
69
|
+
},
|
|
70
|
+
'array': {
|
|
71
|
+
pattern: /\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\]/,
|
|
72
|
+
alias: 'language-zolo',
|
|
73
|
+
greedy: true,
|
|
74
|
+
inside: {
|
|
75
|
+
'bracket': {
|
|
76
|
+
pattern: /[\[\]]/,
|
|
77
|
+
alias: 'bracket',
|
|
78
|
+
},
|
|
79
|
+
'comma': {
|
|
80
|
+
pattern: /,/,
|
|
81
|
+
alias: 'punctuation',
|
|
82
|
+
},
|
|
83
|
+
'string': {
|
|
84
|
+
pattern: /[^\[\],\s]+(?:\s+[^\[\],\s]+)*/,
|
|
85
|
+
alias: 'string',
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
'boolean': {
|
|
90
|
+
pattern: /\b(?:true|false|True|False)\b/,
|
|
91
|
+
alias: 'boolean',
|
|
92
|
+
},
|
|
93
|
+
'null': {
|
|
94
|
+
pattern: /\bnull\b/,
|
|
95
|
+
alias: 'null',
|
|
96
|
+
},
|
|
97
|
+
'number': {
|
|
98
|
+
pattern: /(?<![a-zA-Z0-9_])-?(?:0(?!\d)|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?(?![a-zA-Z0-9_])/,
|
|
99
|
+
alias: 'number',
|
|
100
|
+
},
|
|
101
|
+
'string': {
|
|
102
|
+
pattern: /[^{}\[\],:\s]+(?:\s+[^{}\[\],:\s]+)*/,
|
|
103
|
+
alias: 'string',
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
'array': {
|
|
108
|
+
pattern: /\[[^\[\]]*(?:\[[^\[\]]*\][^\[\]]*)*\]/,
|
|
109
|
+
alias: 'language-zolo',
|
|
110
|
+
inside: {
|
|
111
|
+
'bracket': {
|
|
112
|
+
pattern: /[\[\]]/,
|
|
113
|
+
alias: 'bracket',
|
|
114
|
+
},
|
|
115
|
+
'comma': {
|
|
116
|
+
pattern: /,/,
|
|
117
|
+
alias: 'punctuation',
|
|
118
|
+
},
|
|
119
|
+
'string': {
|
|
120
|
+
pattern: /[^\[\],\s]+(?:\s+[^\[\],\s]+)*/,
|
|
121
|
+
alias: 'string',
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
'string': {
|
|
126
|
+
pattern: /[^\s]+(?:\s+[^\s]+)*/,
|
|
127
|
+
alias: 'string',
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
'array': {
|
|
132
|
+
pattern: /(?<=:\s*)\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\](?=\s*(?:\n|$))/ms,
|
|
133
|
+
alias: 'language-zolo',
|
|
134
|
+
lookbehind: true,
|
|
135
|
+
greedy: true,
|
|
136
|
+
inside: {
|
|
137
|
+
'bracket': {
|
|
138
|
+
pattern: /[\[\]]/,
|
|
139
|
+
alias: 'bracket',
|
|
140
|
+
},
|
|
141
|
+
'comma': {
|
|
142
|
+
pattern: /,/,
|
|
143
|
+
alias: 'punctuation',
|
|
144
|
+
},
|
|
145
|
+
'object': {
|
|
146
|
+
pattern: /\{(?:[^{}]|\{[^{}]*\})*\}/,
|
|
147
|
+
alias: 'language-zolo',
|
|
148
|
+
greedy: true,
|
|
149
|
+
inside: {
|
|
150
|
+
'brace': {
|
|
151
|
+
pattern: /[{}]/,
|
|
152
|
+
alias: 'brace',
|
|
153
|
+
},
|
|
154
|
+
'comma': {
|
|
155
|
+
pattern: /,/,
|
|
156
|
+
alias: 'punctuation',
|
|
157
|
+
},
|
|
158
|
+
'property': {
|
|
159
|
+
pattern: /[a-zA-Z][a-zA-Z0-9_]*(?=\s*:)/,
|
|
160
|
+
alias: 'property',
|
|
161
|
+
},
|
|
162
|
+
'colon': {
|
|
163
|
+
pattern: /:/,
|
|
164
|
+
alias: 'punctuation',
|
|
165
|
+
},
|
|
166
|
+
'array': {
|
|
167
|
+
pattern: /\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\]/,
|
|
168
|
+
alias: 'language-zolo',
|
|
169
|
+
greedy: true,
|
|
170
|
+
inside: {
|
|
171
|
+
'bracket': {
|
|
172
|
+
pattern: /[\[\]]/,
|
|
173
|
+
alias: 'bracket',
|
|
174
|
+
},
|
|
175
|
+
'comma': {
|
|
176
|
+
pattern: /,/,
|
|
177
|
+
alias: 'punctuation',
|
|
178
|
+
},
|
|
179
|
+
'string': {
|
|
180
|
+
pattern: /[^\[\],\s]+(?:\s+[^\[\],\s]+)*/,
|
|
181
|
+
alias: 'string',
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
'boolean': {
|
|
186
|
+
pattern: /\b(?:true|false|True|False)\b/,
|
|
187
|
+
alias: 'boolean',
|
|
188
|
+
},
|
|
189
|
+
'null': {
|
|
190
|
+
pattern: /\bnull\b/,
|
|
191
|
+
alias: 'null',
|
|
192
|
+
},
|
|
193
|
+
'number': {
|
|
194
|
+
pattern: /(?<![a-zA-Z0-9_])-?(?:0(?!\d)|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?(?![a-zA-Z0-9_])/,
|
|
195
|
+
alias: 'number',
|
|
196
|
+
},
|
|
197
|
+
'string': {
|
|
198
|
+
pattern: /[^{}\[\],:\s]+(?:\s+[^{}\[\],:\s]+)*/,
|
|
199
|
+
alias: 'string',
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
'nested-array': {
|
|
204
|
+
pattern: /\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\]/,
|
|
205
|
+
alias: 'language-zolo',
|
|
206
|
+
greedy: true,
|
|
207
|
+
inside: {
|
|
208
|
+
'bracket': {
|
|
209
|
+
pattern: /[\[\]]/,
|
|
210
|
+
alias: 'bracket',
|
|
211
|
+
},
|
|
212
|
+
'comma': {
|
|
213
|
+
pattern: /,/,
|
|
214
|
+
alias: 'punctuation',
|
|
215
|
+
},
|
|
216
|
+
'string': {
|
|
217
|
+
pattern: /[^\[\],\s]+(?:\s+[^\[\],\s]+)*/,
|
|
218
|
+
alias: 'string',
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
'boolean': {
|
|
223
|
+
pattern: /\b(?:true|false|True|False)\b/,
|
|
224
|
+
alias: 'boolean',
|
|
225
|
+
},
|
|
226
|
+
'null': {
|
|
227
|
+
pattern: /\bnull\b/,
|
|
228
|
+
alias: 'null',
|
|
229
|
+
},
|
|
230
|
+
'number': {
|
|
231
|
+
pattern: /(?<![a-zA-Z0-9_])-?(?:0(?!\d)|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?(?![a-zA-Z0-9_])/,
|
|
232
|
+
alias: 'number',
|
|
233
|
+
},
|
|
234
|
+
'string': {
|
|
235
|
+
pattern: /[^\[\],\s]+(?:\s+[^\[\],\s]+)*/,
|
|
236
|
+
alias: 'string',
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
'object': {
|
|
241
|
+
pattern: /(?<=:\s*)\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})*\}(?=\s*(?:\n|$))/m,
|
|
242
|
+
alias: 'language-zolo',
|
|
243
|
+
lookbehind: true,
|
|
244
|
+
greedy: true,
|
|
245
|
+
inside: {
|
|
246
|
+
'brace': {
|
|
247
|
+
pattern: /[{}]/,
|
|
248
|
+
alias: 'brace',
|
|
249
|
+
},
|
|
250
|
+
'comma': {
|
|
251
|
+
pattern: /,/,
|
|
252
|
+
alias: 'punctuation',
|
|
253
|
+
},
|
|
254
|
+
'property': {
|
|
255
|
+
pattern: /[a-zA-Z][a-zA-Z0-9_]*(?=\s*(?:\([^)]+\))?\s*:)/,
|
|
256
|
+
alias: 'property',
|
|
257
|
+
},
|
|
258
|
+
'type-hint': {
|
|
259
|
+
pattern: /\([^)]+\)(?=\s*:)/,
|
|
260
|
+
inside: {
|
|
261
|
+
'type-hint-paren': {
|
|
262
|
+
pattern: /[()]/,
|
|
263
|
+
alias: 'punctuation',
|
|
264
|
+
},
|
|
265
|
+
'type-hint-text': {
|
|
266
|
+
pattern: /[^()]+/,
|
|
267
|
+
alias: 'type',
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
'colon': {
|
|
272
|
+
pattern: /:/,
|
|
273
|
+
alias: 'punctuation',
|
|
274
|
+
},
|
|
275
|
+
'nested-array': {
|
|
276
|
+
pattern: /\[(?:[^\[\]]|\[(?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*\])*\]/,
|
|
277
|
+
alias: 'language-zolo',
|
|
278
|
+
greedy: true,
|
|
279
|
+
inside: {
|
|
280
|
+
'bracket': {
|
|
281
|
+
pattern: /[\[\]]/,
|
|
282
|
+
alias: 'bracket',
|
|
283
|
+
},
|
|
284
|
+
'comma': {
|
|
285
|
+
pattern: /,/,
|
|
286
|
+
alias: 'punctuation',
|
|
287
|
+
},
|
|
288
|
+
'boolean': {
|
|
289
|
+
pattern: /\b(?:true|false|True|False)\b/,
|
|
290
|
+
alias: 'boolean',
|
|
291
|
+
},
|
|
292
|
+
'null': {
|
|
293
|
+
pattern: /\bnull\b/,
|
|
294
|
+
alias: 'null',
|
|
295
|
+
},
|
|
296
|
+
'number': {
|
|
297
|
+
pattern: /(?<![a-zA-Z0-9_])-?(?:0(?!\d)|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?(?![a-zA-Z0-9_])/,
|
|
298
|
+
alias: 'number',
|
|
299
|
+
},
|
|
300
|
+
'string': {
|
|
301
|
+
pattern: /[^\[\],\s]+(?:\s+[^\[\],\s]+)*/,
|
|
302
|
+
alias: 'string',
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
'nested-object': {
|
|
307
|
+
pattern: /\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})*\}/,
|
|
308
|
+
alias: 'language-zolo',
|
|
309
|
+
greedy: true,
|
|
310
|
+
inside: Prism.languages.zolo,
|
|
311
|
+
},
|
|
312
|
+
'boolean': {
|
|
313
|
+
pattern: /\b(?:true|false|True|False)\b/,
|
|
314
|
+
alias: 'boolean',
|
|
315
|
+
},
|
|
316
|
+
'null': {
|
|
317
|
+
pattern: /\bnull\b/,
|
|
318
|
+
alias: 'null',
|
|
319
|
+
},
|
|
320
|
+
'number': {
|
|
321
|
+
pattern: /(?<![a-zA-Z0-9_])-?(?:0(?!\d)|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?(?![a-zA-Z0-9_])/,
|
|
322
|
+
alias: 'number',
|
|
323
|
+
},
|
|
324
|
+
'string': {
|
|
325
|
+
pattern: /[^{},:\s]+(?:\s+[^{},:\s]+)*/,
|
|
326
|
+
alias: 'string',
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
'boolean': {
|
|
331
|
+
pattern: /(?<=:\s+)(?:true|false|True|False)(?=\s*$)/m,
|
|
332
|
+
alias: 'boolean',
|
|
333
|
+
lookbehind: true,
|
|
334
|
+
},
|
|
335
|
+
'number': {
|
|
336
|
+
pattern: /(?<=:\s+)-?(?:0(?!\d)|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?(?=\s*$)/m,
|
|
337
|
+
alias: 'number',
|
|
338
|
+
lookbehind: true,
|
|
339
|
+
},
|
|
340
|
+
'null': {
|
|
341
|
+
pattern: /(?<=:\s+)null(?=\s*$)/m,
|
|
342
|
+
alias: 'null',
|
|
343
|
+
lookbehind: true,
|
|
344
|
+
},
|
|
345
|
+
'timestamp-string': {
|
|
346
|
+
pattern: /(?<=:\s+)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[^\s]*/m,
|
|
347
|
+
alias: 'string',
|
|
348
|
+
lookbehind: true,
|
|
349
|
+
},
|
|
350
|
+
'time-string': {
|
|
351
|
+
pattern: /(?<=:\s+)\d{2}:\d{2}(?::\d{2})?(?=\s*$)/m,
|
|
352
|
+
alias: 'string',
|
|
353
|
+
lookbehind: true,
|
|
354
|
+
},
|
|
355
|
+
'version-string': {
|
|
356
|
+
pattern: /(?<=:\s+)\d+\.\d+(?:\.\d+|\.\*)+(?=\s*$)/m,
|
|
357
|
+
alias: 'string',
|
|
358
|
+
lookbehind: true,
|
|
359
|
+
},
|
|
360
|
+
'ratio-string': {
|
|
361
|
+
pattern: /(?<=:\s+)\d{1,3}:\d{1,3}(?=\s*$)/m,
|
|
362
|
+
alias: 'string',
|
|
363
|
+
lookbehind: true,
|
|
364
|
+
},
|
|
365
|
+
'string-unquoted': {
|
|
366
|
+
pattern: /(?<=:\s*)\S+(?:\s+\S+)*/m,
|
|
367
|
+
alias: 'string',
|
|
368
|
+
lookbehind: true,
|
|
369
|
+
inside: {
|
|
370
|
+
'escape-sequence': {
|
|
371
|
+
pattern: /\\[nrt\\\\"']|\\u[0-9A-Fa-f]{4}|\\U[0-9A-Fa-f]{4,8}/,
|
|
372
|
+
alias: 'constant',
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
'colon': {
|
|
377
|
+
pattern: /:/,
|
|
378
|
+
alias: 'punctuation',
|
|
379
|
+
}
|
|
380
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prism.js language definition for zschema
|
|
3
|
+
* zSchema.*.zolo - Data schema definition files
|
|
4
|
+
*
|
|
5
|
+
* Extends base 'zolo' language with file-type-specific patterns.
|
|
6
|
+
*
|
|
7
|
+
* Generated by zlsp/zlsp/generators/generate_prism_zolo.py
|
|
8
|
+
* DO NOT EDIT MANUALLY - regenerate with: python3 -m zlsp.generators.generate_prism_zolo
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
Prism.languages.zschema = Prism.languages.extend('zolo', {
|
|
12
|
+
'zschema-zmeta-root': {
|
|
13
|
+
pattern: /((?:^|\n)[ \t]*)zMeta(?=\s*:)/m,
|
|
14
|
+
alias: 'function',
|
|
15
|
+
lookbehind: true,
|
|
16
|
+
},
|
|
17
|
+
'root-key': {
|
|
18
|
+
pattern: /((?:^|\n)[ \t]*)[A-Z][a-zA-Z0-9_]*(?=\s*(?:\([^)]+\))?[*!^~]?:)/m,
|
|
19
|
+
alias: 'class-name',
|
|
20
|
+
lookbehind: true,
|
|
21
|
+
},
|
|
22
|
+
'zschema-zos-data': {
|
|
23
|
+
pattern: /(?<=\n)[ \t]{1}(?:Schema_Name|Data_Label|zMigration|Data_Source|zMigrationVersion|zUIVersion|zUITracking|Data_Type)(?=\s*:)/m,
|
|
24
|
+
alias: 'keyword',
|
|
25
|
+
lookbehind: true,
|
|
26
|
+
},
|
|
27
|
+
'zschema-property': {
|
|
28
|
+
pattern: /(?<=\n)[ \t]{2,}(?:unique|default|format|required|pattern|rules|max|pk|auto_increment|type|zHash|comment|max_length|min_length|min)(?=\s*:)/m,
|
|
29
|
+
alias: 'keyword',
|
|
30
|
+
lookbehind: true,
|
|
31
|
+
},
|
|
32
|
+
'property': {
|
|
33
|
+
pattern: /\b[a-zA-Z][a-zA-Z0-9_]*(?=\s*(?:\([^)]+\))?[*!]?:)/,
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Support both ```zschema and ```zSchema code fences
|
|
38
|
+
Prism.languages.zSchema = Prism.languages.zschema;
|