@designbasekorea/ui-wc 0.5.6 → 0.6.0
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/chunks/lottie-0e23d630.js +1 -0
- package/dist/esm/components/animation-background/canvas-controller.js +1 -121
- package/dist/esm/components/animation-background/controls.js +1 -180
- package/dist/esm/components/animation-background/graphite-controller.js +1 -196
- package/dist/esm/components/animation-background/graphite-presets.js +1 -42
- package/dist/esm/components/animation-background/graphite-shader.js +1 -111
- package/dist/esm/components/animation-background/layers.js +1 -369
- package/dist/esm/components/animation-background/lumina-presets.js +1 -53
- package/dist/esm/components/animation-background/lumina-shaders.js +1 -181
- package/dist/esm/components/animation-background/lumina-utils.js +1 -60
- package/dist/esm/components/animation-background/particle-defaults.js +1 -36
- package/dist/esm/components/animation-background/renderers.js +1 -167
- package/dist/esm/components/animation-background/shader-controller.js +1 -154
- package/dist/esm/components/color-picker-utils.js +1 -134
- package/dist/esm/components/date-picker-utils.js +1 -140
- package/dist/esm/components/db-accordion.js +1 -304
- package/dist/esm/components/db-ad-banner.js +1 -455
- package/dist/esm/components/db-ai-chat-list.d.ts +43 -0
- package/dist/esm/components/db-ai-chat-list.js +1 -0
- package/dist/esm/components/db-ai-chat.d.ts +159 -0
- package/dist/esm/components/db-ai-chat.js +1 -0
- package/dist/esm/components/db-alert.js +1 -149
- package/dist/esm/components/db-animation-background.js +1 -486
- package/dist/esm/components/db-animation-text.js +1 -601
- package/dist/esm/components/db-app-badge.js +1 -88
- package/dist/esm/components/db-audio-player.js +1 -752
- package/dist/esm/components/db-avatar.js +1 -188
- package/dist/esm/components/db-backdrop.js +1 -139
- package/dist/esm/components/db-badge.js +1 -91
- package/dist/esm/components/db-banner.js +1 -188
- package/dist/esm/components/db-bottom-navigation.js +1 -146
- package/dist/esm/components/db-bottom-sheet.js +1 -481
- package/dist/esm/components/db-breadcrumbs.js +1 -329
- package/dist/esm/components/db-button.js +1 -316
- package/dist/esm/components/db-calendar.js +1 -675
- package/dist/esm/components/db-card.js +1 -265
- package/dist/esm/components/db-carousel.js +1 -264
- package/dist/esm/components/db-chat-composer.d.ts +134 -0
- package/dist/esm/components/db-chat-composer.js +1 -0
- package/dist/esm/components/db-chat-list.d.ts +47 -0
- package/dist/esm/components/db-chat-list.js +1 -0
- package/dist/esm/components/db-chat-message.d.ts +39 -0
- package/dist/esm/components/db-chat-message.js +1 -0
- package/dist/esm/components/db-chat-orb.d.ts +99 -0
- package/dist/esm/components/db-chat-orb.js +1 -0
- package/dist/esm/components/db-chat-room.d.ts +71 -0
- package/dist/esm/components/db-chat-room.js +1 -0
- package/dist/esm/components/db-chat-suggestions.d.ts +44 -0
- package/dist/esm/components/db-chat-suggestions.js +1 -0
- package/dist/esm/components/db-chat-typing.d.ts +22 -0
- package/dist/esm/components/db-chat-typing.js +1 -0
- package/dist/esm/components/db-chat-welcome.d.ts +32 -0
- package/dist/esm/components/db-chat-welcome.js +1 -0
- package/dist/esm/components/db-chat-widget.d.ts +146 -0
- package/dist/esm/components/db-chat-widget.js +1 -0
- package/dist/esm/components/db-checkbox.js +1 -202
- package/dist/esm/components/db-chip.js +1 -104
- package/dist/esm/components/db-code-block.js +1 -304
- package/dist/esm/components/db-color-picker.js +1 -746
- package/dist/esm/components/db-confirm.js +1 -191
- package/dist/esm/components/db-container.js +1 -39
- package/dist/esm/components/db-context-menu.js +1 -265
- package/dist/esm/components/db-countdown.js +1 -146
- package/dist/esm/components/db-cursor-follower.js +1 -173
- package/dist/esm/components/db-date-picker.js +1 -837
- package/dist/esm/components/db-divider.js +1 -66
- package/dist/esm/components/db-download-progress.d.ts +89 -0
- package/dist/esm/components/db-download-progress.js +1 -0
- package/dist/esm/components/db-drawer.js +1 -245
- package/dist/esm/components/db-dropdown.js +1 -493
- package/dist/esm/components/db-dropzone.js +1 -266
- package/dist/esm/components/db-email-verify.d.ts +62 -0
- package/dist/esm/components/db-email-verify.js +1 -0
- package/dist/esm/components/db-empty-state.js +1 -97
- package/dist/esm/components/db-file-uploader.js +1 -256
- package/dist/esm/components/db-floating-action-button.js +1 -139
- package/dist/esm/components/db-footer.js +1 -385
- package/dist/esm/components/db-form.js +1 -566
- package/dist/esm/components/db-gantt.js +1 -882
- package/dist/esm/components/db-gradient.js +1 -133
- package/dist/esm/components/db-grid-background.js +1 -909
- package/dist/esm/components/db-grid.js +1 -73
- package/dist/esm/components/db-icons.d.ts +3 -0
- package/dist/esm/components/db-icons.js +1 -82
- package/dist/esm/components/db-image-list.js +1 -214
- package/dist/esm/components/db-image-placeholder.js +1 -96
- package/dist/esm/components/db-image.js +1 -289
- package/dist/esm/components/db-indicator.js +1 -517
- package/dist/esm/components/db-input.js +1 -420
- package/dist/esm/components/db-kanban.js +1 -538
- package/dist/esm/components/db-label.js +1 -66
- package/dist/esm/components/db-lightbox.js +1 -372
- package/dist/esm/components/db-list.js +1 -340
- package/dist/esm/components/db-logo-svg.js +1 -72
- package/dist/esm/components/db-logo.js +1 -106
- package/dist/esm/components/db-lottie.js +1 -109
- package/dist/esm/components/db-markdown-editor.js +1 -458
- package/dist/esm/components/db-marquee.js +1 -402
- package/dist/esm/components/db-masonry.js +1 -94
- package/dist/esm/components/db-menu-item.js +1 -211
- package/dist/esm/components/db-modal.js +1 -522
- package/dist/esm/components/db-navbar.js +1 -680
- package/dist/esm/components/db-onboarding-modal.js +1 -322
- package/dist/esm/components/db-otp-input.d.ts +53 -0
- package/dist/esm/components/db-otp-input.js +1 -0
- package/dist/esm/components/db-page-header.js +1 -312
- package/dist/esm/components/db-pagination.js +1 -271
- package/dist/esm/components/db-phone-verify.d.ts +61 -0
- package/dist/esm/components/db-phone-verify.js +1 -0
- package/dist/esm/components/db-popover.js +1 -580
- package/dist/esm/components/db-progress-step.js +1 -166
- package/dist/esm/components/db-progress.js +1 -171
- package/dist/esm/components/db-progressbar.js +1 -72
- package/dist/esm/components/db-radio.js +1 -172
- package/dist/esm/components/db-random-gradient.js +1 -121
- package/dist/esm/components/db-range-slider.js +1 -811
- package/dist/esm/components/db-rating.js +1 -325
- package/dist/esm/components/db-reorder.js +1 -286
- package/dist/esm/components/db-resizable-panels.js +1 -282
- package/dist/esm/components/db-scroll-area.js +1 -126
- package/dist/esm/components/db-search-bar.js +1 -668
- package/dist/esm/components/db-section-app-download.js +1 -101
- package/dist/esm/components/db-section-contact.js +1 -102
- package/dist/esm/components/db-section-cta.js +1 -150
- package/dist/esm/components/db-section-faq.js +1 -120
- package/dist/esm/components/db-section-feature-grid.js +1 -137
- package/dist/esm/components/db-section-feature.js +1 -179
- package/dist/esm/components/db-section-hero.js +1 -243
- package/dist/esm/components/db-section-logo-cloud.js +1 -138
- package/dist/esm/components/db-section-pricing.js +1 -166
- package/dist/esm/components/db-section-stats.js +1 -129
- package/dist/esm/components/db-section-testimonials.js +1 -252
- package/dist/esm/components/db-section.js +1 -385
- package/dist/esm/components/db-segment-control.js +1 -231
- package/dist/esm/components/db-select.js +1 -571
- package/dist/esm/components/db-share-icons.js +1 -40
- package/dist/esm/components/db-share.js +1 -489
- package/dist/esm/components/db-sidebar.js +1 -1068
- package/dist/esm/components/db-skeleton.js +1 -94
- package/dist/esm/components/db-spinner.js +1 -102
- package/dist/esm/components/db-split-view.js +1 -297
- package/dist/esm/components/db-stack.js +1 -46
- package/dist/esm/components/db-stat.js +1 -218
- package/dist/esm/components/db-stepper.js +1 -398
- package/dist/esm/components/db-table.js +1 -412
- package/dist/esm/components/db-tabs.js +1 -335
- package/dist/esm/components/db-testimonial.d.ts +2 -0
- package/dist/esm/components/db-testimonial.js +1 -162
- package/dist/esm/components/db-textarea.js +1 -233
- package/dist/esm/components/db-time-picker.js +1 -523
- package/dist/esm/components/db-timeline.js +1 -174
- package/dist/esm/components/db-toast.js +1 -158
- package/dist/esm/components/db-toggle.js +1 -162
- package/dist/esm/components/db-toolbar.js +1 -94
- package/dist/esm/components/db-tooltip.js +1 -440
- package/dist/esm/components/db-top-banner.js +1 -121
- package/dist/esm/components/db-tutorial.js +1 -324
- package/dist/esm/components/db-two-factor.d.ts +60 -0
- package/dist/esm/components/db-two-factor.js +1 -0
- package/dist/esm/components/db-video-player.js +1 -503
- package/dist/esm/components/db-youtube-player.js +1 -194
- package/dist/esm/components/highlight-code.js +1 -65
- package/dist/esm/components/input-validation.js +1 -50
- package/dist/esm/components/marketing-block-host-utils.js +1 -9
- package/dist/esm/components/number-scrub.js +1 -117
- package/dist/esm/components/random-gradient-palettes.js +1 -67
- package/dist/esm/components/section-block-header-utils.js +1 -48
- package/dist/esm/helpers/confirm.js +1 -52
- package/dist/esm/helpers/toast.js +1 -73
- package/dist/esm/index.d.ts +16 -0
- package/dist/esm/index.js +1 -111
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-bash.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-clike.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-css.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-javascript.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-json.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-jsx.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markup.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-scss.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-tsx.js +1 -0
- package/dist/esm/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-typescript.js +1 -0
- package/dist/index.cjs +1 -55414
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1091 -2
- package/dist/index.esm.js +1 -38284
- package/dist/react/chunks/lottie-14e7addb.js +1 -0
- package/dist/react/index.cjs +1 -56503
- package/dist/react/index.d.ts +1620 -54
- package/dist/react/index.esm.js +1 -39373
- package/package.json +1 -1
- package/dist/chunks/lottie-e273b936.js +0 -17032
- package/dist/esm/node_modules/prismjs/components/prism-bash.js +0 -235
- package/dist/esm/node_modules/prismjs/components/prism-clike.js +0 -31
- package/dist/esm/node_modules/prismjs/components/prism-css.js +0 -64
- package/dist/esm/node_modules/prismjs/components/prism-javascript.js +0 -172
- package/dist/esm/node_modules/prismjs/components/prism-json.js +0 -27
- package/dist/esm/node_modules/prismjs/components/prism-jsx.js +0 -143
- package/dist/esm/node_modules/prismjs/components/prism-markup.js +0 -186
- package/dist/esm/node_modules/prismjs/components/prism-scss.js +0 -81
- package/dist/esm/node_modules/prismjs/components/prism-tsx.js +0 -15
- package/dist/esm/node_modules/prismjs/components/prism-typescript.js +0 -60
- package/dist/react/chunks/lottie-72a4c6d4.js +0 -17032
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
Prism.languages.markup = {
|
|
2
|
-
'comment': {
|
|
3
|
-
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
4
|
-
greedy: true
|
|
5
|
-
},
|
|
6
|
-
'prolog': {
|
|
7
|
-
pattern: /<\?[\s\S]+?\?>/,
|
|
8
|
-
greedy: true
|
|
9
|
-
},
|
|
10
|
-
'doctype': {
|
|
11
|
-
// https://www.w3.org/TR/xml/#NT-doctypedecl
|
|
12
|
-
pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
|
|
13
|
-
greedy: true,
|
|
14
|
-
inside: {
|
|
15
|
-
'internal-subset': {
|
|
16
|
-
pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
|
|
17
|
-
lookbehind: true,
|
|
18
|
-
greedy: true,
|
|
19
|
-
inside: null // see below
|
|
20
|
-
},
|
|
21
|
-
'string': {
|
|
22
|
-
pattern: /"[^"]*"|'[^']*'/,
|
|
23
|
-
greedy: true
|
|
24
|
-
},
|
|
25
|
-
'punctuation': /^<!|>$|[[\]]/,
|
|
26
|
-
'doctype-tag': /^DOCTYPE/i,
|
|
27
|
-
'name': /[^\s<>'"]+/
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
'cdata': {
|
|
31
|
-
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
32
|
-
greedy: true
|
|
33
|
-
},
|
|
34
|
-
'tag': {
|
|
35
|
-
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
|
|
36
|
-
greedy: true,
|
|
37
|
-
inside: {
|
|
38
|
-
'tag': {
|
|
39
|
-
pattern: /^<\/?[^\s>\/]+/,
|
|
40
|
-
inside: {
|
|
41
|
-
'punctuation': /^<\/?/,
|
|
42
|
-
'namespace': /^[^\s>\/:]+:/
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
'special-attr': [],
|
|
46
|
-
'attr-value': {
|
|
47
|
-
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
|
|
48
|
-
inside: {
|
|
49
|
-
'punctuation': [
|
|
50
|
-
{
|
|
51
|
-
pattern: /^=/,
|
|
52
|
-
alias: 'attr-equals'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
pattern: /^(\s*)["']|["']$/,
|
|
56
|
-
lookbehind: true
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
'punctuation': /\/?>/,
|
|
62
|
-
'attr-name': {
|
|
63
|
-
pattern: /[^\s>\/]+/,
|
|
64
|
-
inside: {
|
|
65
|
-
'namespace': /^[^\s>\/:]+:/
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
'entity': [
|
|
72
|
-
{
|
|
73
|
-
pattern: /&[\da-z]{1,8};/i,
|
|
74
|
-
alias: 'named-entity'
|
|
75
|
-
},
|
|
76
|
-
/&#x?[\da-f]{1,8};/i
|
|
77
|
-
]
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] =
|
|
81
|
-
Prism.languages.markup['entity'];
|
|
82
|
-
Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup;
|
|
83
|
-
|
|
84
|
-
// Plugin to make entity title show the real entity, idea by Roman Komarov
|
|
85
|
-
Prism.hooks.add('wrap', function (env) {
|
|
86
|
-
|
|
87
|
-
if (env.type === 'entity') {
|
|
88
|
-
env.attributes['title'] = env.content.replace(/&/, '&');
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {
|
|
93
|
-
/**
|
|
94
|
-
* Adds an inlined language to markup.
|
|
95
|
-
*
|
|
96
|
-
* An example of an inlined language is CSS with `<style>` tags.
|
|
97
|
-
*
|
|
98
|
-
* @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
|
|
99
|
-
* case insensitive.
|
|
100
|
-
* @param {string} lang The language key.
|
|
101
|
-
* @example
|
|
102
|
-
* addInlined('style', 'css');
|
|
103
|
-
*/
|
|
104
|
-
value: function addInlined(tagName, lang) {
|
|
105
|
-
var includedCdataInside = {};
|
|
106
|
-
includedCdataInside['language-' + lang] = {
|
|
107
|
-
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
108
|
-
lookbehind: true,
|
|
109
|
-
inside: Prism.languages[lang]
|
|
110
|
-
};
|
|
111
|
-
includedCdataInside['cdata'] = /^<!\[CDATA\[|\]\]>$/i;
|
|
112
|
-
|
|
113
|
-
var inside = {
|
|
114
|
-
'included-cdata': {
|
|
115
|
-
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
116
|
-
inside: includedCdataInside
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
inside['language-' + lang] = {
|
|
120
|
-
pattern: /[\s\S]+/,
|
|
121
|
-
inside: Prism.languages[lang]
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
var def = {};
|
|
125
|
-
def[tagName] = {
|
|
126
|
-
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'),
|
|
127
|
-
lookbehind: true,
|
|
128
|
-
greedy: true,
|
|
129
|
-
inside: inside
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
Prism.languages.insertBefore('markup', 'cdata', def);
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', {
|
|
136
|
-
/**
|
|
137
|
-
* Adds an pattern to highlight languages embedded in HTML attributes.
|
|
138
|
-
*
|
|
139
|
-
* An example of an inlined language is CSS with `style` attributes.
|
|
140
|
-
*
|
|
141
|
-
* @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
|
|
142
|
-
* case insensitive.
|
|
143
|
-
* @param {string} lang The language key.
|
|
144
|
-
* @example
|
|
145
|
-
* addAttribute('style', 'css');
|
|
146
|
-
*/
|
|
147
|
-
value: function (attrName, lang) {
|
|
148
|
-
Prism.languages.markup.tag.inside['special-attr'].push({
|
|
149
|
-
pattern: RegExp(
|
|
150
|
-
/(^|["'\s])/.source + '(?:' + attrName + ')' + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
|
151
|
-
'i'
|
|
152
|
-
),
|
|
153
|
-
lookbehind: true,
|
|
154
|
-
inside: {
|
|
155
|
-
'attr-name': /^[^\s=]+/,
|
|
156
|
-
'attr-value': {
|
|
157
|
-
pattern: /=[\s\S]+/,
|
|
158
|
-
inside: {
|
|
159
|
-
'value': {
|
|
160
|
-
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
161
|
-
lookbehind: true,
|
|
162
|
-
alias: [lang, 'language-' + lang],
|
|
163
|
-
inside: Prism.languages[lang]
|
|
164
|
-
},
|
|
165
|
-
'punctuation': [
|
|
166
|
-
{
|
|
167
|
-
pattern: /^=/,
|
|
168
|
-
alias: 'attr-equals'
|
|
169
|
-
},
|
|
170
|
-
/"|'/
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
Prism.languages.html = Prism.languages.markup;
|
|
180
|
-
Prism.languages.mathml = Prism.languages.markup;
|
|
181
|
-
Prism.languages.svg = Prism.languages.markup;
|
|
182
|
-
|
|
183
|
-
Prism.languages.xml = Prism.languages.extend('markup', {});
|
|
184
|
-
Prism.languages.ssml = Prism.languages.xml;
|
|
185
|
-
Prism.languages.atom = Prism.languages.xml;
|
|
186
|
-
Prism.languages.rss = Prism.languages.xml;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
Prism.languages.scss = Prism.languages.extend('css', {
|
|
2
|
-
'comment': {
|
|
3
|
-
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
|
|
4
|
-
lookbehind: true
|
|
5
|
-
},
|
|
6
|
-
'atrule': {
|
|
7
|
-
pattern: /@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,
|
|
8
|
-
inside: {
|
|
9
|
-
'rule': /@[\w-]+/
|
|
10
|
-
// See rest below
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
// url, compassified
|
|
14
|
-
'url': /(?:[-a-z]+-)?url(?=\()/i,
|
|
15
|
-
// CSS selector regex is not appropriate for Sass
|
|
16
|
-
// since there can be lot more things (var, @ directive, nesting..)
|
|
17
|
-
// a selector must start at the end of a property or after a brace (end of other rules or nesting)
|
|
18
|
-
// it can contain some characters that aren't used for defining rules or end of selector, & (parent selector), or interpolated variable
|
|
19
|
-
// the end of a selector is found when there is no rules in it ( {} or {\s}) or if there is a property (because an interpolated var
|
|
20
|
-
// can "pass" as a selector- e.g: proper#{$erty})
|
|
21
|
-
// this one was hard to do, so please be careful if you edit this one :)
|
|
22
|
-
'selector': {
|
|
23
|
-
// Initial look-ahead is used to prevent matching of blank selectors
|
|
24
|
-
pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,
|
|
25
|
-
inside: {
|
|
26
|
-
'parent': {
|
|
27
|
-
pattern: /&/,
|
|
28
|
-
alias: 'important'
|
|
29
|
-
},
|
|
30
|
-
'placeholder': /%[-\w]+/,
|
|
31
|
-
'variable': /\$[-\w]+|#\{\$[-\w]+\}/
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
'property': {
|
|
35
|
-
pattern: /(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,
|
|
36
|
-
inside: {
|
|
37
|
-
'variable': /\$[-\w]+|#\{\$[-\w]+\}/
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
Prism.languages.insertBefore('scss', 'atrule', {
|
|
43
|
-
'keyword': [
|
|
44
|
-
/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,
|
|
45
|
-
{
|
|
46
|
-
pattern: /( )(?:from|through)(?= )/,
|
|
47
|
-
lookbehind: true
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
Prism.languages.insertBefore('scss', 'important', {
|
|
53
|
-
// var and interpolated vars
|
|
54
|
-
'variable': /\$[-\w]+|#\{\$[-\w]+\}/
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
Prism.languages.insertBefore('scss', 'function', {
|
|
58
|
-
'module-modifier': {
|
|
59
|
-
pattern: /\b(?:as|hide|show|with)\b/i,
|
|
60
|
-
alias: 'keyword'
|
|
61
|
-
},
|
|
62
|
-
'placeholder': {
|
|
63
|
-
pattern: /%[-\w]+/,
|
|
64
|
-
alias: 'selector'
|
|
65
|
-
},
|
|
66
|
-
'statement': {
|
|
67
|
-
pattern: /\B!(?:default|optional)\b/i,
|
|
68
|
-
alias: 'keyword'
|
|
69
|
-
},
|
|
70
|
-
'boolean': /\b(?:false|true)\b/,
|
|
71
|
-
'null': {
|
|
72
|
-
pattern: /\bnull\b/,
|
|
73
|
-
alias: 'keyword'
|
|
74
|
-
},
|
|
75
|
-
'operator': {
|
|
76
|
-
pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,
|
|
77
|
-
lookbehind: true
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
Prism.languages.scss['atrule'].inside.rest = Prism.languages.scss;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
(function (Prism) {
|
|
2
|
-
var typescript = Prism.util.clone(Prism.languages.typescript);
|
|
3
|
-
Prism.languages.tsx = Prism.languages.extend('jsx', typescript);
|
|
4
|
-
|
|
5
|
-
// doesn't work with TS because TS is too complex
|
|
6
|
-
delete Prism.languages.tsx['parameter'];
|
|
7
|
-
delete Prism.languages.tsx['literal-property'];
|
|
8
|
-
|
|
9
|
-
// This will prevent collisions between TSX tags and TS generic types.
|
|
10
|
-
// Idea by https://github.com/karlhorky
|
|
11
|
-
// Discussion: https://github.com/PrismJS/prism/issues/2594#issuecomment-710666928
|
|
12
|
-
var tag = Prism.languages.tsx.tag;
|
|
13
|
-
tag.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + '(?:' + tag.pattern.source + ')', tag.pattern.flags);
|
|
14
|
-
tag.lookbehind = true;
|
|
15
|
-
}(Prism));
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
(function (Prism) {
|
|
2
|
-
|
|
3
|
-
Prism.languages.typescript = Prism.languages.extend('javascript', {
|
|
4
|
-
'class-name': {
|
|
5
|
-
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
|
|
6
|
-
lookbehind: true,
|
|
7
|
-
greedy: true,
|
|
8
|
-
inside: null // see below
|
|
9
|
-
},
|
|
10
|
-
'builtin': /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// The keywords TypeScript adds to JavaScript
|
|
14
|
-
Prism.languages.typescript.keyword.push(
|
|
15
|
-
/\b(?:abstract|declare|is|keyof|readonly|require)\b/,
|
|
16
|
-
// keywords that have to be followed by an identifier
|
|
17
|
-
/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
|
|
18
|
-
// This is for `import type *, {}`
|
|
19
|
-
/\btype\b(?=\s*(?:[\{*]|$))/
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
// doesn't work with TS because TS is too complex
|
|
23
|
-
delete Prism.languages.typescript['parameter'];
|
|
24
|
-
delete Prism.languages.typescript['literal-property'];
|
|
25
|
-
|
|
26
|
-
// a version of typescript specifically for highlighting types
|
|
27
|
-
var typeInside = Prism.languages.extend('typescript', {});
|
|
28
|
-
delete typeInside['class-name'];
|
|
29
|
-
|
|
30
|
-
Prism.languages.typescript['class-name'].inside = typeInside;
|
|
31
|
-
|
|
32
|
-
Prism.languages.insertBefore('typescript', 'function', {
|
|
33
|
-
'decorator': {
|
|
34
|
-
pattern: /@[$\w\xA0-\uFFFF]+/,
|
|
35
|
-
inside: {
|
|
36
|
-
'at': {
|
|
37
|
-
pattern: /^@/,
|
|
38
|
-
alias: 'operator'
|
|
39
|
-
},
|
|
40
|
-
'function': /^[\s\S]+/
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
'generic-function': {
|
|
44
|
-
// e.g. foo<T extends "bar" | "baz">( ...
|
|
45
|
-
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
|
|
46
|
-
greedy: true,
|
|
47
|
-
inside: {
|
|
48
|
-
'function': /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
|
|
49
|
-
'generic': {
|
|
50
|
-
pattern: /<[\s\S]+/, // everything after the first <
|
|
51
|
-
alias: 'class-name',
|
|
52
|
-
inside: typeInside
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
Prism.languages.ts = Prism.languages.typescript;
|
|
59
|
-
|
|
60
|
-
}(Prism));
|