@oneflowui/ui 0.4.2 → 0.4.3
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/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/ContextMenu/index.vue.js +7 -0
- package/dist/components/ContextMenu/index.vue2.js +91 -0
- package/dist/components/Dashboard/charts/BarChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/BarChart.vue2.js +43 -0
- package/dist/components/Dashboard/charts/DoughnutChart.vue.js +23 -0
- package/dist/components/Dashboard/charts/DoughnutChart.vue2.js +4 -0
- package/dist/components/Dashboard/charts/NumberCard.vue.js +7 -0
- package/dist/components/Dashboard/charts/NumberCard.vue2.js +41 -0
- package/dist/components/Dashboard/charts/PieChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/PieChart.vue2.js +53 -0
- package/dist/components/Dashboard/charts/TableChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/TableChart.vue2.js +50 -0
- package/dist/components/Dashboard/index.vue.js +7 -0
- package/dist/components/Dashboard/index.vue2.js +104 -0
- package/dist/components/ai/AiMessageBubble.vue.js +7 -0
- package/dist/components/ai/AiMessageBubble.vue2.js +47 -0
- package/dist/components/ai/AiMessageList.vue.js +7 -0
- package/dist/components/ai/AiMessageList.vue2.js +78 -0
- package/dist/components/ai/AiSender.vue.js +7 -0
- package/dist/components/ai/AiSender.vue2.js +86 -0
- package/dist/components/ai/AiStreamingCursor.vue.js +7 -0
- package/dist/components/ai/AiStreamingCursor.vue2.js +16 -0
- package/dist/components/ai/AiThinking.vue.js +7 -0
- package/dist/components/ai/AiThinking.vue2.js +19 -0
- package/dist/components/ai/UserMessageBubble.vue.js +7 -0
- package/dist/components/ai/UserMessageBubble.vue2.js +34 -0
- package/dist/components/auxiliary/ColorPanel.vue.js +7 -0
- package/dist/components/auxiliary/ColorPanel.vue2.js +65 -0
- package/dist/components/auxiliary/FileUpload.vue.js +7 -0
- package/dist/components/auxiliary/FileUpload.vue2.js +90 -0
- package/dist/components/auxiliary/PersonPanel.vue.js +7 -0
- package/dist/components/auxiliary/PersonPanel.vue2.js +66 -0
- package/dist/components/base/Accordion.vue.js +7 -0
- package/dist/components/base/Accordion.vue2.js +78 -0
- package/dist/components/base/AddViewBtn.vue.js +7 -0
- package/dist/components/base/AddViewBtn.vue2.js +25 -0
- package/dist/components/base/Avatar.vue.js +7 -0
- package/dist/components/base/Avatar.vue2.js +72 -0
- package/dist/components/base/Badge.vue.js +7 -0
- package/dist/components/base/Badge.vue2.js +70 -0
- package/dist/components/base/ButtonGroup.vue.js +7 -0
- package/dist/components/base/ButtonGroup.vue2.js +40 -0
- package/dist/components/base/ChainItem.vue.js +7 -0
- package/dist/components/base/ChainItem.vue2.js +68 -0
- package/dist/components/base/DescBlock.vue.js +7 -0
- package/dist/components/base/DescBlock.vue2.js +13 -0
- package/dist/components/base/DropdownMenu.vue.js +7 -0
- package/dist/components/base/DropdownMenu.vue2.js +92 -0
- package/dist/components/base/EmptyState.vue.js +7 -0
- package/dist/components/base/EmptyState.vue2.js +38 -0
- package/dist/components/base/InfoCard.vue.js +7 -0
- package/dist/components/base/InfoCard.vue2.js +167 -0
- package/dist/components/base/MonitorItem.vue.js +7 -0
- package/dist/components/base/MonitorItem.vue2.js +56 -0
- package/dist/components/base/PersonaCard.vue.js +7 -0
- package/dist/components/base/PersonaCard.vue2.js +173 -0
- package/dist/components/base/ProgressBar.vue.js +7 -0
- package/dist/components/base/ProgressBar.vue2.js +49 -0
- package/dist/components/base/RangeSlider.vue.js +7 -0
- package/dist/components/base/RangeSlider.vue2.js +35 -0
- package/dist/components/base/RefTag.vue.js +7 -0
- package/dist/components/base/RefTag.vue2.js +52 -0
- package/dist/components/base/SectionBlock.vue.js +7 -0
- package/dist/components/base/SectionBlock.vue2.js +115 -0
- package/dist/components/base/SelectBadge.vue.js +7 -0
- package/dist/components/base/SelectBadge.vue2.js +81 -0
- package/dist/components/base/StatisticCard.vue.js +7 -0
- package/dist/components/base/StatisticCard.vue2.js +57 -0
- package/dist/components/base/StatusIndicator.vue.js +7 -0
- package/dist/components/base/StatusIndicator.vue2.js +54 -0
- package/dist/components/base/StatusSummary.vue.js +7 -0
- package/dist/components/base/StatusSummary.vue2.js +64 -0
- package/dist/components/base/Stepper.vue.js +7 -0
- package/dist/components/base/Stepper.vue2.js +70 -0
- package/dist/components/base/Switch.vue.js +7 -0
- package/dist/components/base/Switch.vue2.js +43 -0
- package/dist/components/base/ToolbarBtn.vue.js +7 -0
- package/dist/components/base/ToolbarBtn.vue2.js +30 -0
- package/dist/components/base/ViewModeGroup.vue.js +7 -0
- package/dist/components/base/ViewModeGroup.vue2.js +32 -0
- package/dist/components/base/ViewSwitcher.vue.js +7 -0
- package/dist/components/base/ViewSwitcher.vue2.js +73 -0
- package/dist/components/base/ViewTab.vue.js +7 -0
- package/dist/components/base/ViewTab.vue2.js +42 -0
- package/dist/components/breadcrumb/Breadcrumb.vue.js +7 -0
- package/dist/components/breadcrumb/Breadcrumb.vue2.js +52 -0
- package/dist/components/breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/dist/components/breadcrumb/BreadcrumbItem.vue2.js +35 -0
- package/dist/components/detail/CommentItem.vue.js +7 -0
- package/dist/components/detail/CommentItem.vue2.js +29 -0
- package/dist/components/detail/DetailLayout.vue.js +7 -0
- package/dist/components/detail/DetailLayout.vue2.js +118 -0
- package/dist/components/detail/PropPanel.vue.js +7 -0
- package/dist/components/detail/PropPanel.vue2.js +51 -0
- package/dist/components/detail/PropRow.vue.js +7 -0
- package/dist/components/detail/PropRow.vue2.js +51 -0
- package/dist/components/editor/BlockQuote.vue.js +7 -0
- package/dist/components/editor/BlockQuote.vue2.js +45 -0
- package/dist/components/editor/CodeBlock.vue.js +7 -0
- package/dist/components/editor/CodeBlock.vue2.js +48 -0
- package/dist/components/editor/ContentBlock.vue.js +7 -0
- package/dist/components/editor/ContentBlock.vue2.js +49 -0
- package/dist/components/editor/RefLink.vue.js +7 -0
- package/dist/components/editor/RefLink.vue2.js +37 -0
- package/dist/components/editor/RichTextEditor.vue.js +7 -0
- package/dist/components/editor/RichTextEditor.vue2.js +132 -0
- package/dist/components/field/FieldCheckbox.vue.js +7 -0
- package/dist/{FieldCheckbox-CV3QtQ4Y.js → components/field/FieldCheckbox.vue2.js} +8 -9
- package/dist/components/field/FieldDate.vue.js +7 -0
- package/dist/{FieldDate-Bljx4jb7.js → components/field/FieldDate.vue2.js} +9 -10
- package/dist/components/field/FieldDatetime.vue.js +7 -0
- package/dist/{FieldDatetime-B52GfWrK.js → components/field/FieldDatetime.vue2.js} +11 -12
- package/dist/components/field/FieldEmail.vue.js +7 -0
- package/dist/{FieldEmail-UREMoue-.js → components/field/FieldEmail.vue2.js} +12 -13
- package/dist/components/field/FieldMultiSelect.vue.js +7 -0
- package/dist/{FieldMultiSelect-Dlay1Fop.js → components/field/FieldMultiSelect.vue2.js} +32 -33
- package/dist/components/field/FieldNumber.vue.js +7 -0
- package/dist/{FieldNumber-BjhfFhs6.js → components/field/FieldNumber.vue2.js} +8 -9
- package/dist/components/field/FieldRating.vue.js +7 -0
- package/dist/components/field/FieldRating.vue2.js +31 -0
- package/dist/components/field/FieldSelect.vue.js +7 -0
- package/dist/{FieldSelect-B39Ad8VH.js → components/field/FieldSelect.vue2.js} +34 -35
- package/dist/components/field/FieldText.vue.js +7 -0
- package/dist/{FieldText-Ry7f72Ug.js → components/field/FieldText.vue2.js} +13 -14
- package/dist/components/field/FieldUrl.vue.js +7 -0
- package/dist/components/field/FieldUrl.vue2.js +33 -0
- package/dist/components/form/FormDesigner.vue.js +7 -0
- package/dist/components/form/FormDesigner.vue2.js +245 -0
- package/dist/components/gallery/GalleryCard.vue.js +7 -0
- package/dist/components/gallery/GalleryCard.vue2.js +87 -0
- package/dist/components/gallery/GalleryView.vue.js +7 -0
- package/dist/components/gallery/GalleryView.vue2.js +48 -0
- package/dist/components/kanban/KanbanBoard.vue.js +7 -0
- package/dist/components/kanban/KanbanBoard.vue2.js +86 -0
- package/dist/components/kanban/KanbanCard.vue.js +7 -0
- package/dist/components/kanban/KanbanCard.vue2.js +56 -0
- package/dist/components/kanban/KanbanColumn.vue.js +7 -0
- package/dist/components/kanban/KanbanColumn.vue2.js +103 -0
- package/dist/components/kanban/QuickAddRow.vue.js +7 -0
- package/dist/components/kanban/QuickAddRow.vue2.js +58 -0
- package/dist/components/layout/AppLayout.vue.js +7 -0
- package/dist/components/layout/AppLayout.vue2.js +98 -0
- package/dist/components/layout/Navbar.vue.js +7 -0
- package/dist/components/layout/Navbar.vue2.js +70 -0
- package/dist/components/layout/Sidebar.vue.js +7 -0
- package/dist/components/layout/Sidebar.vue2.js +88 -0
- package/dist/components/layout/StatusBar.vue.js +7 -0
- package/dist/components/layout/StatusBar.vue2.js +37 -0
- package/dist/components/mermaid/MermaidChart.vue.js +7 -0
- package/dist/components/mermaid/MermaidChart.vue2.js +75 -0
- package/dist/components/overlay/Dialog.vue.js +7 -0
- package/dist/components/overlay/Dialog.vue2.js +89 -0
- package/dist/components/overlay/Drawer.vue.js +7 -0
- package/dist/components/overlay/Drawer.vue2.js +112 -0
- package/dist/components/overlay/Modal.vue.js +7 -0
- package/dist/components/overlay/Modal.vue2.js +115 -0
- package/dist/components/overlay/SidePanel.vue.js +7 -0
- package/dist/components/overlay/SidePanel.vue2.js +137 -0
- package/dist/components/split/SplitPane.vue.js +8 -0
- package/dist/components/split/SplitPane.vue2.js +68 -0
- package/dist/components/table/DataTable.vue.js +7 -0
- package/dist/components/table/DataTable.vue2.js +234 -0
- package/dist/components/table/FieldCell.vue.js +7 -0
- package/dist/components/table/FieldCell.vue2.js +71 -0
- package/dist/components/table/NewRowBtn.vue.js +7 -0
- package/dist/components/table/NewRowBtn.vue2.js +22 -0
- package/dist/components/table/TableColumnManager.vue.js +7 -0
- package/dist/components/table/TableColumnManager.vue2.js +100 -0
- package/dist/components/table/TableDataRow.vue.js +7 -0
- package/dist/components/table/TableDataRow.vue2.js +115 -0
- package/dist/components/table/TableFilterPanel.vue.js +7 -0
- package/dist/components/table/TableFilterPanel.vue2.js +142 -0
- package/dist/components/table/TableGroupRow.vue.js +7 -0
- package/dist/components/table/TableGroupRow.vue2.js +48 -0
- package/dist/components/table/TableHeaderRow.vue.js +7 -0
- package/dist/components/table/TableHeaderRow.vue2.js +69 -0
- package/dist/components/tabs/TabPanel.vue.js +7 -0
- package/dist/components/tabs/TabPanel.vue2.js +26 -0
- package/dist/components/tabs/Tabs.vue.js +7 -0
- package/dist/components/tabs/Tabs.vue2.js +87 -0
- package/dist/components/timeline/ActivityTimeline.vue.js +7 -0
- package/dist/components/timeline/ActivityTimeline.vue2.js +104 -0
- package/dist/components/timeline/GanttRow.vue.js +7 -0
- package/dist/components/timeline/GanttRow.vue2.js +110 -0
- package/dist/components/timeline/GanttTimeline.vue.js +7 -0
- package/dist/components/timeline/GanttTimeline.vue2.js +185 -0
- package/dist/components/toast/ToastContainer.vue.js +34 -0
- package/dist/components/toast/ToastContainer.vue3.js +5 -0
- package/dist/components/toast/ToastItem.vue.js +7 -0
- package/dist/components/toast/ToastItem.vue2.js +78 -0
- package/dist/composables/useAiChat.js +103 -0
- package/dist/composables/useBadge.js +76 -0
- package/dist/composables/useBreakpoint.js +16 -0
- package/dist/composables/useInlineEdit.js +28 -0
- package/dist/composables/useMarkdown.js +69 -0
- package/dist/composables/useStream.js +80 -0
- package/dist/composables/useTable.js +115 -0
- package/dist/composables/useTableColumns.js +24 -0
- package/dist/composables/useTableData.js +16 -0
- package/dist/composables/useTableFilter.js +97 -0
- package/dist/composables/useTableGroup.js +46 -0
- package/dist/composables/useToast.js +38 -0
- package/dist/composables/useTypewriter.js +56 -0
- package/dist/composables/useVirtualList.js +117 -0
- package/dist/constants/table.js +11 -0
- package/dist/index.js +301 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js +377 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js +923 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js +151 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js +240 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js +658 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js +38 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js +216 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js +13 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js +399 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js +305 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js +615 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js +753 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js +219 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js +183 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
- package/dist/style.css +1 -1
- package/dist/types/index.js +77 -0
- package/dist/utils/icon.js +15 -0
- package/package.json +13 -6
- package/dist/FieldRating-BKHUu-A1.js +0 -32
- package/dist/FieldUrl-bv0EB9sh.js +0 -34
- package/dist/index-DQph5iTq.js +0 -12936
- package/dist/oneflow-ui.js +0 -111
- package/dist/oneflow-ui.umd.cjs +0 -13
package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
function b(e) {
|
|
2
|
+
const n = e.regex, i = /(r#)?/, t = n.concat(i, e.UNDERSCORE_IDENT_RE), o = n.concat(i, e.IDENT_RE), c = {
|
|
3
|
+
className: "title.function.invoke",
|
|
4
|
+
relevance: 0,
|
|
5
|
+
begin: n.concat(
|
|
6
|
+
/\b/,
|
|
7
|
+
/(?!let|for|while|if|else|match\b)/,
|
|
8
|
+
o,
|
|
9
|
+
n.lookahead(/\s*\(/)
|
|
10
|
+
)
|
|
11
|
+
}, a = "([ui](8|16|32|64|128|size)|f(32|64))?", l = [
|
|
12
|
+
"abstract",
|
|
13
|
+
"as",
|
|
14
|
+
"async",
|
|
15
|
+
"await",
|
|
16
|
+
"become",
|
|
17
|
+
"box",
|
|
18
|
+
"break",
|
|
19
|
+
"const",
|
|
20
|
+
"continue",
|
|
21
|
+
"crate",
|
|
22
|
+
"do",
|
|
23
|
+
"dyn",
|
|
24
|
+
"else",
|
|
25
|
+
"enum",
|
|
26
|
+
"extern",
|
|
27
|
+
"false",
|
|
28
|
+
"final",
|
|
29
|
+
"fn",
|
|
30
|
+
"for",
|
|
31
|
+
"if",
|
|
32
|
+
"impl",
|
|
33
|
+
"in",
|
|
34
|
+
"let",
|
|
35
|
+
"loop",
|
|
36
|
+
"macro",
|
|
37
|
+
"match",
|
|
38
|
+
"mod",
|
|
39
|
+
"move",
|
|
40
|
+
"mut",
|
|
41
|
+
"override",
|
|
42
|
+
"priv",
|
|
43
|
+
"pub",
|
|
44
|
+
"ref",
|
|
45
|
+
"return",
|
|
46
|
+
"self",
|
|
47
|
+
"Self",
|
|
48
|
+
"static",
|
|
49
|
+
"struct",
|
|
50
|
+
"super",
|
|
51
|
+
"trait",
|
|
52
|
+
"true",
|
|
53
|
+
"try",
|
|
54
|
+
"type",
|
|
55
|
+
"typeof",
|
|
56
|
+
"union",
|
|
57
|
+
"unsafe",
|
|
58
|
+
"unsized",
|
|
59
|
+
"use",
|
|
60
|
+
"virtual",
|
|
61
|
+
"where",
|
|
62
|
+
"while",
|
|
63
|
+
"yield"
|
|
64
|
+
], u = [
|
|
65
|
+
"true",
|
|
66
|
+
"false",
|
|
67
|
+
"Some",
|
|
68
|
+
"None",
|
|
69
|
+
"Ok",
|
|
70
|
+
"Err"
|
|
71
|
+
], s = [
|
|
72
|
+
// functions
|
|
73
|
+
"drop ",
|
|
74
|
+
// traits
|
|
75
|
+
"Copy",
|
|
76
|
+
"Send",
|
|
77
|
+
"Sized",
|
|
78
|
+
"Sync",
|
|
79
|
+
"Drop",
|
|
80
|
+
"Fn",
|
|
81
|
+
"FnMut",
|
|
82
|
+
"FnOnce",
|
|
83
|
+
"ToOwned",
|
|
84
|
+
"Clone",
|
|
85
|
+
"Debug",
|
|
86
|
+
"PartialEq",
|
|
87
|
+
"PartialOrd",
|
|
88
|
+
"Eq",
|
|
89
|
+
"Ord",
|
|
90
|
+
"AsRef",
|
|
91
|
+
"AsMut",
|
|
92
|
+
"Into",
|
|
93
|
+
"From",
|
|
94
|
+
"Default",
|
|
95
|
+
"Iterator",
|
|
96
|
+
"Extend",
|
|
97
|
+
"IntoIterator",
|
|
98
|
+
"DoubleEndedIterator",
|
|
99
|
+
"ExactSizeIterator",
|
|
100
|
+
"SliceConcatExt",
|
|
101
|
+
"ToString",
|
|
102
|
+
// macros
|
|
103
|
+
"assert!",
|
|
104
|
+
"assert_eq!",
|
|
105
|
+
"bitflags!",
|
|
106
|
+
"bytes!",
|
|
107
|
+
"cfg!",
|
|
108
|
+
"col!",
|
|
109
|
+
"concat!",
|
|
110
|
+
"concat_idents!",
|
|
111
|
+
"debug_assert!",
|
|
112
|
+
"debug_assert_eq!",
|
|
113
|
+
"env!",
|
|
114
|
+
"eprintln!",
|
|
115
|
+
"panic!",
|
|
116
|
+
"file!",
|
|
117
|
+
"format!",
|
|
118
|
+
"format_args!",
|
|
119
|
+
"include_bytes!",
|
|
120
|
+
"include_str!",
|
|
121
|
+
"line!",
|
|
122
|
+
"local_data_key!",
|
|
123
|
+
"module_path!",
|
|
124
|
+
"option_env!",
|
|
125
|
+
"print!",
|
|
126
|
+
"println!",
|
|
127
|
+
"select!",
|
|
128
|
+
"stringify!",
|
|
129
|
+
"try!",
|
|
130
|
+
"unimplemented!",
|
|
131
|
+
"unreachable!",
|
|
132
|
+
"vec!",
|
|
133
|
+
"write!",
|
|
134
|
+
"writeln!",
|
|
135
|
+
"macro_rules!",
|
|
136
|
+
"assert_ne!",
|
|
137
|
+
"debug_assert_ne!"
|
|
138
|
+
], r = [
|
|
139
|
+
"i8",
|
|
140
|
+
"i16",
|
|
141
|
+
"i32",
|
|
142
|
+
"i64",
|
|
143
|
+
"i128",
|
|
144
|
+
"isize",
|
|
145
|
+
"u8",
|
|
146
|
+
"u16",
|
|
147
|
+
"u32",
|
|
148
|
+
"u64",
|
|
149
|
+
"u128",
|
|
150
|
+
"usize",
|
|
151
|
+
"f32",
|
|
152
|
+
"f64",
|
|
153
|
+
"str",
|
|
154
|
+
"char",
|
|
155
|
+
"bool",
|
|
156
|
+
"Box",
|
|
157
|
+
"Option",
|
|
158
|
+
"Result",
|
|
159
|
+
"String",
|
|
160
|
+
"Vec"
|
|
161
|
+
];
|
|
162
|
+
return {
|
|
163
|
+
name: "Rust",
|
|
164
|
+
aliases: ["rs"],
|
|
165
|
+
keywords: {
|
|
166
|
+
$pattern: e.IDENT_RE + "!?",
|
|
167
|
+
type: r,
|
|
168
|
+
keyword: l,
|
|
169
|
+
literal: u,
|
|
170
|
+
built_in: s
|
|
171
|
+
},
|
|
172
|
+
illegal: "</",
|
|
173
|
+
contains: [
|
|
174
|
+
e.C_LINE_COMMENT_MODE,
|
|
175
|
+
e.COMMENT("/\\*", "\\*/", { contains: ["self"] }),
|
|
176
|
+
e.inherit(e.QUOTE_STRING_MODE, {
|
|
177
|
+
begin: /b?"/,
|
|
178
|
+
illegal: null
|
|
179
|
+
}),
|
|
180
|
+
{
|
|
181
|
+
className: "symbol",
|
|
182
|
+
// negative lookahead to avoid matching `'`
|
|
183
|
+
begin: /'[a-zA-Z_][a-zA-Z0-9_]*(?!')/
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
scope: "string",
|
|
187
|
+
variants: [
|
|
188
|
+
{ begin: /b?r(#*)"(.|\n)*?"\1(?!#)/ },
|
|
189
|
+
{
|
|
190
|
+
begin: /b?'/,
|
|
191
|
+
end: /'/,
|
|
192
|
+
contains: [
|
|
193
|
+
{
|
|
194
|
+
scope: "char.escape",
|
|
195
|
+
match: /\\('|\w|x\w{2}|u\w{4}|U\w{8})/
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
className: "number",
|
|
203
|
+
variants: [
|
|
204
|
+
{ begin: "\\b0b([01_]+)" + a },
|
|
205
|
+
{ begin: "\\b0o([0-7_]+)" + a },
|
|
206
|
+
{ begin: "\\b0x([A-Fa-f0-9_]+)" + a },
|
|
207
|
+
{ begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)" + a }
|
|
208
|
+
],
|
|
209
|
+
relevance: 0
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
begin: [
|
|
213
|
+
/fn/,
|
|
214
|
+
/\s+/,
|
|
215
|
+
t
|
|
216
|
+
],
|
|
217
|
+
className: {
|
|
218
|
+
1: "keyword",
|
|
219
|
+
3: "title.function"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
className: "meta",
|
|
224
|
+
begin: "#!?\\[",
|
|
225
|
+
end: "\\]",
|
|
226
|
+
contains: [
|
|
227
|
+
{
|
|
228
|
+
className: "string",
|
|
229
|
+
begin: /"/,
|
|
230
|
+
end: /"/,
|
|
231
|
+
contains: [
|
|
232
|
+
e.BACKSLASH_ESCAPE
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
begin: [
|
|
239
|
+
/let/,
|
|
240
|
+
/\s+/,
|
|
241
|
+
/(?:mut\s+)?/,
|
|
242
|
+
t
|
|
243
|
+
],
|
|
244
|
+
className: {
|
|
245
|
+
1: "keyword",
|
|
246
|
+
3: "keyword",
|
|
247
|
+
4: "variable"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
// must come before impl/for rule later
|
|
251
|
+
{
|
|
252
|
+
begin: [
|
|
253
|
+
/for/,
|
|
254
|
+
/\s+/,
|
|
255
|
+
t,
|
|
256
|
+
/\s+/,
|
|
257
|
+
/in/
|
|
258
|
+
],
|
|
259
|
+
className: {
|
|
260
|
+
1: "keyword",
|
|
261
|
+
3: "variable",
|
|
262
|
+
5: "keyword"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
begin: [
|
|
267
|
+
/type/,
|
|
268
|
+
/\s+/,
|
|
269
|
+
t
|
|
270
|
+
],
|
|
271
|
+
className: {
|
|
272
|
+
1: "keyword",
|
|
273
|
+
3: "title.class"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
begin: [
|
|
278
|
+
/(?:trait|enum|struct|union|impl|for)/,
|
|
279
|
+
/\s+/,
|
|
280
|
+
t
|
|
281
|
+
],
|
|
282
|
+
className: {
|
|
283
|
+
1: "keyword",
|
|
284
|
+
3: "title.class"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
begin: e.IDENT_RE + "::",
|
|
289
|
+
keywords: {
|
|
290
|
+
keyword: "Self",
|
|
291
|
+
built_in: s,
|
|
292
|
+
type: r
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
className: "punctuation",
|
|
297
|
+
begin: "->"
|
|
298
|
+
},
|
|
299
|
+
c
|
|
300
|
+
]
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
export {
|
|
304
|
+
b as default
|
|
305
|
+
};
|