@oneflowui/ui 0.4.1 → 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
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
function v(s) {
|
|
2
|
+
const g = s.regex, t = {
|
|
3
|
+
begin: /<\/?[A-Za-z_]/,
|
|
4
|
+
end: ">",
|
|
5
|
+
subLanguage: "xml",
|
|
6
|
+
relevance: 0
|
|
7
|
+
}, l = {
|
|
8
|
+
begin: "^[-\\*]{3,}",
|
|
9
|
+
end: "$"
|
|
10
|
+
}, d = {
|
|
11
|
+
className: "code",
|
|
12
|
+
variants: [
|
|
13
|
+
// TODO: fix to allow these to work with sublanguage also
|
|
14
|
+
{ begin: "(`{3,})[^`](.|\\n)*?\\1`*[ ]*" },
|
|
15
|
+
{ begin: "(~{3,})[^~](.|\\n)*?\\1~*[ ]*" },
|
|
16
|
+
// needed to allow markdown as a sublanguage to work
|
|
17
|
+
{
|
|
18
|
+
begin: "```",
|
|
19
|
+
end: "```+[ ]*$"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
begin: "~~~",
|
|
23
|
+
end: "~~~+[ ]*$"
|
|
24
|
+
},
|
|
25
|
+
{ begin: "`.+?`" },
|
|
26
|
+
{
|
|
27
|
+
begin: "(?=^( {4}|\\t))",
|
|
28
|
+
// use contains to gobble up multiple lines to allow the block to be whatever size
|
|
29
|
+
// but only have a single open/close tag vs one per line
|
|
30
|
+
contains: [
|
|
31
|
+
{
|
|
32
|
+
begin: "^( {4}|\\t)",
|
|
33
|
+
end: "(\\n)$"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
relevance: 0
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}, b = {
|
|
40
|
+
className: "bullet",
|
|
41
|
+
begin: "^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",
|
|
42
|
+
end: "\\s+",
|
|
43
|
+
excludeEnd: !0
|
|
44
|
+
}, u = {
|
|
45
|
+
begin: /^\[[^\n]+\]:/,
|
|
46
|
+
returnBegin: !0,
|
|
47
|
+
contains: [
|
|
48
|
+
{
|
|
49
|
+
className: "symbol",
|
|
50
|
+
begin: /\[/,
|
|
51
|
+
end: /\]/,
|
|
52
|
+
excludeBegin: !0,
|
|
53
|
+
excludeEnd: !0
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
className: "link",
|
|
57
|
+
begin: /:\s*/,
|
|
58
|
+
end: /$/,
|
|
59
|
+
excludeBegin: !0
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}, E = /[A-Za-z][A-Za-z0-9+.-]*/, c = {
|
|
63
|
+
variants: [
|
|
64
|
+
// too much like nested array access in so many languages
|
|
65
|
+
// to have any real relevance
|
|
66
|
+
{
|
|
67
|
+
begin: /\[.+?\]\[.*?\]/,
|
|
68
|
+
relevance: 0
|
|
69
|
+
},
|
|
70
|
+
// popular internet URLs
|
|
71
|
+
{
|
|
72
|
+
begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,
|
|
73
|
+
relevance: 2
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
begin: g.concat(/\[.+?\]\(/, E, /:\/\/.*?\)/),
|
|
77
|
+
relevance: 2
|
|
78
|
+
},
|
|
79
|
+
// relative urls
|
|
80
|
+
{
|
|
81
|
+
begin: /\[.+?\]\([./?&#].*?\)/,
|
|
82
|
+
relevance: 1
|
|
83
|
+
},
|
|
84
|
+
// whatever else, lower relevance (might not be a link at all)
|
|
85
|
+
{
|
|
86
|
+
begin: /\[.*?\]\(.*?\)/,
|
|
87
|
+
relevance: 0
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
returnBegin: !0,
|
|
91
|
+
contains: [
|
|
92
|
+
{
|
|
93
|
+
// empty strings for alt or link text
|
|
94
|
+
match: /\[(?=\])/
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
className: "string",
|
|
98
|
+
relevance: 0,
|
|
99
|
+
begin: "\\[",
|
|
100
|
+
end: "\\]",
|
|
101
|
+
excludeBegin: !0,
|
|
102
|
+
returnEnd: !0
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
className: "link",
|
|
106
|
+
relevance: 0,
|
|
107
|
+
begin: "\\]\\(",
|
|
108
|
+
end: "\\)",
|
|
109
|
+
excludeBegin: !0,
|
|
110
|
+
excludeEnd: !0
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
className: "symbol",
|
|
114
|
+
relevance: 0,
|
|
115
|
+
begin: "\\]\\[",
|
|
116
|
+
end: "\\]",
|
|
117
|
+
excludeBegin: !0,
|
|
118
|
+
excludeEnd: !0
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}, n = {
|
|
122
|
+
className: "strong",
|
|
123
|
+
contains: [],
|
|
124
|
+
// defined later
|
|
125
|
+
variants: [
|
|
126
|
+
{
|
|
127
|
+
begin: /_{2}(?!\s)/,
|
|
128
|
+
end: /_{2}/
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
begin: /\*{2}(?!\s)/,
|
|
132
|
+
end: /\*{2}/
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}, a = {
|
|
136
|
+
className: "emphasis",
|
|
137
|
+
contains: [],
|
|
138
|
+
// defined later
|
|
139
|
+
variants: [
|
|
140
|
+
{
|
|
141
|
+
begin: /\*(?![*\s])/,
|
|
142
|
+
end: /\*/
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
begin: /_(?![_\s])/,
|
|
146
|
+
end: /_/,
|
|
147
|
+
relevance: 0
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}, i = s.inherit(n, { contains: [] }), o = s.inherit(a, { contains: [] });
|
|
151
|
+
n.contains.push(o), a.contains.push(i);
|
|
152
|
+
let e = [
|
|
153
|
+
t,
|
|
154
|
+
c
|
|
155
|
+
];
|
|
156
|
+
return [
|
|
157
|
+
n,
|
|
158
|
+
a,
|
|
159
|
+
i,
|
|
160
|
+
o
|
|
161
|
+
].forEach((r) => {
|
|
162
|
+
r.contains = r.contains.concat(e);
|
|
163
|
+
}), e = e.concat(n, a), {
|
|
164
|
+
name: "Markdown",
|
|
165
|
+
aliases: [
|
|
166
|
+
"md",
|
|
167
|
+
"mkdown",
|
|
168
|
+
"mkd"
|
|
169
|
+
],
|
|
170
|
+
contains: [
|
|
171
|
+
{
|
|
172
|
+
className: "section",
|
|
173
|
+
variants: [
|
|
174
|
+
{
|
|
175
|
+
begin: "^#{1,6}",
|
|
176
|
+
end: "$",
|
|
177
|
+
contains: e
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
begin: "(?=^.+?\\n[=-]{2,}$)",
|
|
181
|
+
contains: [
|
|
182
|
+
{ begin: "^[=-]*$" },
|
|
183
|
+
{
|
|
184
|
+
begin: "^",
|
|
185
|
+
end: "\\n",
|
|
186
|
+
contains: e
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
t,
|
|
193
|
+
b,
|
|
194
|
+
n,
|
|
195
|
+
a,
|
|
196
|
+
{
|
|
197
|
+
className: "quote",
|
|
198
|
+
begin: "^>\\s+",
|
|
199
|
+
contains: e,
|
|
200
|
+
end: "$"
|
|
201
|
+
},
|
|
202
|
+
d,
|
|
203
|
+
l,
|
|
204
|
+
c,
|
|
205
|
+
u,
|
|
206
|
+
{
|
|
207
|
+
//https://spec.commonmark.org/0.31.2/#entity-references
|
|
208
|
+
scope: "literal",
|
|
209
|
+
match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
export {
|
|
215
|
+
v as default
|
|
216
|
+
};
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
function u(e) {
|
|
2
|
+
const g = e.regex, i = new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*", "u"), b = [
|
|
3
|
+
"and",
|
|
4
|
+
"as",
|
|
5
|
+
"assert",
|
|
6
|
+
"async",
|
|
7
|
+
"await",
|
|
8
|
+
"break",
|
|
9
|
+
"case",
|
|
10
|
+
"class",
|
|
11
|
+
"continue",
|
|
12
|
+
"def",
|
|
13
|
+
"del",
|
|
14
|
+
"elif",
|
|
15
|
+
"else",
|
|
16
|
+
"except",
|
|
17
|
+
"finally",
|
|
18
|
+
"for",
|
|
19
|
+
"from",
|
|
20
|
+
"global",
|
|
21
|
+
"if",
|
|
22
|
+
"import",
|
|
23
|
+
"in",
|
|
24
|
+
"is",
|
|
25
|
+
"lambda",
|
|
26
|
+
"match",
|
|
27
|
+
"nonlocal|10",
|
|
28
|
+
"not",
|
|
29
|
+
"or",
|
|
30
|
+
"pass",
|
|
31
|
+
"raise",
|
|
32
|
+
"return",
|
|
33
|
+
"try",
|
|
34
|
+
"while",
|
|
35
|
+
"with",
|
|
36
|
+
"yield"
|
|
37
|
+
], r = {
|
|
38
|
+
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
39
|
+
keyword: b,
|
|
40
|
+
built_in: [
|
|
41
|
+
"__import__",
|
|
42
|
+
"abs",
|
|
43
|
+
"all",
|
|
44
|
+
"any",
|
|
45
|
+
"ascii",
|
|
46
|
+
"bin",
|
|
47
|
+
"bool",
|
|
48
|
+
"breakpoint",
|
|
49
|
+
"bytearray",
|
|
50
|
+
"bytes",
|
|
51
|
+
"callable",
|
|
52
|
+
"chr",
|
|
53
|
+
"classmethod",
|
|
54
|
+
"compile",
|
|
55
|
+
"complex",
|
|
56
|
+
"delattr",
|
|
57
|
+
"dict",
|
|
58
|
+
"dir",
|
|
59
|
+
"divmod",
|
|
60
|
+
"enumerate",
|
|
61
|
+
"eval",
|
|
62
|
+
"exec",
|
|
63
|
+
"filter",
|
|
64
|
+
"float",
|
|
65
|
+
"format",
|
|
66
|
+
"frozenset",
|
|
67
|
+
"getattr",
|
|
68
|
+
"globals",
|
|
69
|
+
"hasattr",
|
|
70
|
+
"hash",
|
|
71
|
+
"help",
|
|
72
|
+
"hex",
|
|
73
|
+
"id",
|
|
74
|
+
"input",
|
|
75
|
+
"int",
|
|
76
|
+
"isinstance",
|
|
77
|
+
"issubclass",
|
|
78
|
+
"iter",
|
|
79
|
+
"len",
|
|
80
|
+
"list",
|
|
81
|
+
"locals",
|
|
82
|
+
"map",
|
|
83
|
+
"max",
|
|
84
|
+
"memoryview",
|
|
85
|
+
"min",
|
|
86
|
+
"next",
|
|
87
|
+
"object",
|
|
88
|
+
"oct",
|
|
89
|
+
"open",
|
|
90
|
+
"ord",
|
|
91
|
+
"pow",
|
|
92
|
+
"print",
|
|
93
|
+
"property",
|
|
94
|
+
"range",
|
|
95
|
+
"repr",
|
|
96
|
+
"reversed",
|
|
97
|
+
"round",
|
|
98
|
+
"set",
|
|
99
|
+
"setattr",
|
|
100
|
+
"slice",
|
|
101
|
+
"sorted",
|
|
102
|
+
"staticmethod",
|
|
103
|
+
"str",
|
|
104
|
+
"sum",
|
|
105
|
+
"super",
|
|
106
|
+
"tuple",
|
|
107
|
+
"type",
|
|
108
|
+
"vars",
|
|
109
|
+
"zip"
|
|
110
|
+
],
|
|
111
|
+
literal: [
|
|
112
|
+
"__debug__",
|
|
113
|
+
"Ellipsis",
|
|
114
|
+
"False",
|
|
115
|
+
"None",
|
|
116
|
+
"NotImplemented",
|
|
117
|
+
"True"
|
|
118
|
+
],
|
|
119
|
+
type: [
|
|
120
|
+
"Any",
|
|
121
|
+
"Callable",
|
|
122
|
+
"Coroutine",
|
|
123
|
+
"Dict",
|
|
124
|
+
"List",
|
|
125
|
+
"Literal",
|
|
126
|
+
"Generic",
|
|
127
|
+
"Optional",
|
|
128
|
+
"Sequence",
|
|
129
|
+
"Set",
|
|
130
|
+
"Tuple",
|
|
131
|
+
"Type",
|
|
132
|
+
"Union"
|
|
133
|
+
]
|
|
134
|
+
}, n = {
|
|
135
|
+
className: "meta",
|
|
136
|
+
begin: /^(>>>|\.\.\.) /
|
|
137
|
+
}, s = {
|
|
138
|
+
className: "subst",
|
|
139
|
+
begin: /\{/,
|
|
140
|
+
end: /\}/,
|
|
141
|
+
keywords: r,
|
|
142
|
+
illegal: /#/
|
|
143
|
+
}, o = {
|
|
144
|
+
begin: /\{\{/,
|
|
145
|
+
relevance: 0
|
|
146
|
+
}, c = {
|
|
147
|
+
className: "string",
|
|
148
|
+
contains: [e.BACKSLASH_ESCAPE],
|
|
149
|
+
variants: [
|
|
150
|
+
{
|
|
151
|
+
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
|
|
152
|
+
end: /'''/,
|
|
153
|
+
contains: [
|
|
154
|
+
e.BACKSLASH_ESCAPE,
|
|
155
|
+
n
|
|
156
|
+
],
|
|
157
|
+
relevance: 10
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
|
|
161
|
+
end: /"""/,
|
|
162
|
+
contains: [
|
|
163
|
+
e.BACKSLASH_ESCAPE,
|
|
164
|
+
n
|
|
165
|
+
],
|
|
166
|
+
relevance: 10
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
begin: /([fF][rR]|[rR][fF]|[fF])'''/,
|
|
170
|
+
end: /'''/,
|
|
171
|
+
contains: [
|
|
172
|
+
e.BACKSLASH_ESCAPE,
|
|
173
|
+
n,
|
|
174
|
+
o,
|
|
175
|
+
s
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
begin: /([fF][rR]|[rR][fF]|[fF])"""/,
|
|
180
|
+
end: /"""/,
|
|
181
|
+
contains: [
|
|
182
|
+
e.BACKSLASH_ESCAPE,
|
|
183
|
+
n,
|
|
184
|
+
o,
|
|
185
|
+
s
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
begin: /([uU]|[rR])'/,
|
|
190
|
+
end: /'/,
|
|
191
|
+
relevance: 10
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
begin: /([uU]|[rR])"/,
|
|
195
|
+
end: /"/,
|
|
196
|
+
relevance: 10
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
begin: /([bB]|[bB][rR]|[rR][bB])'/,
|
|
200
|
+
end: /'/
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
begin: /([bB]|[bB][rR]|[rR][bB])"/,
|
|
204
|
+
end: /"/
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
begin: /([fF][rR]|[rR][fF]|[fF])'/,
|
|
208
|
+
end: /'/,
|
|
209
|
+
contains: [
|
|
210
|
+
e.BACKSLASH_ESCAPE,
|
|
211
|
+
o,
|
|
212
|
+
s
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
begin: /([fF][rR]|[rR][fF]|[fF])"/,
|
|
217
|
+
end: /"/,
|
|
218
|
+
contains: [
|
|
219
|
+
e.BACKSLASH_ESCAPE,
|
|
220
|
+
o,
|
|
221
|
+
s
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
e.APOS_STRING_MODE,
|
|
225
|
+
e.QUOTE_STRING_MODE
|
|
226
|
+
]
|
|
227
|
+
}, t = "[0-9](_?[0-9])*", d = `(\\b(${t}))?\\.(${t})|\\b(${t})\\.`, a = `\\b|${b.join("|")}`, l = {
|
|
228
|
+
className: "number",
|
|
229
|
+
relevance: 0,
|
|
230
|
+
variants: [
|
|
231
|
+
// exponentfloat, pointfloat
|
|
232
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
|
|
233
|
+
// optionally imaginary
|
|
234
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
235
|
+
// Note: no leading \b because floats can start with a decimal point
|
|
236
|
+
// and we don't want to mishandle e.g. `fn(.5)`,
|
|
237
|
+
// no trailing \b for pointfloat because it can end with a decimal point
|
|
238
|
+
// and we don't want to mishandle e.g. `0..hex()`; this should be safe
|
|
239
|
+
// because both MUST contain a decimal point and so cannot be confused with
|
|
240
|
+
// the interior part of an identifier
|
|
241
|
+
{
|
|
242
|
+
begin: `(\\b(${t})|(${d}))[eE][+-]?(${t})[jJ]?(?=${a})`
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
begin: `(${d})[jJ]?`
|
|
246
|
+
},
|
|
247
|
+
// decinteger, bininteger, octinteger, hexinteger
|
|
248
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
|
|
249
|
+
// optionally "long" in Python 2
|
|
250
|
+
// https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
|
|
251
|
+
// decinteger is optionally imaginary
|
|
252
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
253
|
+
{
|
|
254
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${a})`
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${a})`
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${a})`
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${a})`
|
|
264
|
+
},
|
|
265
|
+
// imagnumber (digitpart-based)
|
|
266
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
267
|
+
{
|
|
268
|
+
begin: `\\b(${t})[jJ](?=${a})`
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}, _ = {
|
|
272
|
+
className: "comment",
|
|
273
|
+
begin: g.lookahead(/# type:/),
|
|
274
|
+
end: /$/,
|
|
275
|
+
keywords: r,
|
|
276
|
+
contains: [
|
|
277
|
+
{
|
|
278
|
+
// prevent keywords from coloring `type`
|
|
279
|
+
begin: /# type:/
|
|
280
|
+
},
|
|
281
|
+
// comment within a datatype comment includes no keywords
|
|
282
|
+
{
|
|
283
|
+
begin: /#/,
|
|
284
|
+
end: /\b\B/,
|
|
285
|
+
endsWithParent: !0
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}, p = {
|
|
289
|
+
className: "params",
|
|
290
|
+
variants: [
|
|
291
|
+
// Exclude params in functions without params
|
|
292
|
+
{
|
|
293
|
+
className: "",
|
|
294
|
+
begin: /\(\s*\)/,
|
|
295
|
+
skip: !0
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
begin: /\(/,
|
|
299
|
+
end: /\)/,
|
|
300
|
+
excludeBegin: !0,
|
|
301
|
+
excludeEnd: !0,
|
|
302
|
+
keywords: r,
|
|
303
|
+
contains: [
|
|
304
|
+
"self",
|
|
305
|
+
n,
|
|
306
|
+
l,
|
|
307
|
+
c,
|
|
308
|
+
e.HASH_COMMENT_MODE
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
};
|
|
313
|
+
return s.contains = [
|
|
314
|
+
c,
|
|
315
|
+
l,
|
|
316
|
+
n
|
|
317
|
+
], {
|
|
318
|
+
name: "Python",
|
|
319
|
+
aliases: [
|
|
320
|
+
"py",
|
|
321
|
+
"gyp",
|
|
322
|
+
"ipython"
|
|
323
|
+
],
|
|
324
|
+
unicodeRegex: !0,
|
|
325
|
+
keywords: r,
|
|
326
|
+
illegal: /(<\/|\?)|=>/,
|
|
327
|
+
contains: [
|
|
328
|
+
n,
|
|
329
|
+
l,
|
|
330
|
+
{
|
|
331
|
+
// very common convention
|
|
332
|
+
scope: "variable.language",
|
|
333
|
+
match: /\bself\b/
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
// eat "if" prior to string so that it won't accidentally be
|
|
337
|
+
// labeled as an f-string
|
|
338
|
+
beginKeywords: "if",
|
|
339
|
+
relevance: 0
|
|
340
|
+
},
|
|
341
|
+
{ match: /\bor\b/, scope: "keyword" },
|
|
342
|
+
c,
|
|
343
|
+
_,
|
|
344
|
+
e.HASH_COMMENT_MODE,
|
|
345
|
+
{
|
|
346
|
+
match: [
|
|
347
|
+
/\bdef/,
|
|
348
|
+
/\s+/,
|
|
349
|
+
i
|
|
350
|
+
],
|
|
351
|
+
scope: {
|
|
352
|
+
1: "keyword",
|
|
353
|
+
3: "title.function"
|
|
354
|
+
},
|
|
355
|
+
contains: [p]
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
variants: [
|
|
359
|
+
{
|
|
360
|
+
match: [
|
|
361
|
+
/\bclass/,
|
|
362
|
+
/\s+/,
|
|
363
|
+
i,
|
|
364
|
+
/\s*/,
|
|
365
|
+
/\(\s*/,
|
|
366
|
+
i,
|
|
367
|
+
/\s*\)/
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
match: [
|
|
372
|
+
/\bclass/,
|
|
373
|
+
/\s+/,
|
|
374
|
+
i
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
scope: {
|
|
379
|
+
1: "keyword",
|
|
380
|
+
3: "title.class",
|
|
381
|
+
6: "title.class.inherited"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
className: "meta",
|
|
386
|
+
begin: /^[\t ]*@/,
|
|
387
|
+
end: /(?=#)|$/,
|
|
388
|
+
contains: [
|
|
389
|
+
l,
|
|
390
|
+
p,
|
|
391
|
+
c
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
export {
|
|
398
|
+
u as default
|
|
399
|
+
};
|