@aquera/nile-elements 0.0.101 → 0.0.103
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/README.md +8 -0
- package/dist/{gdresource-f3b2ce0c.esm.js → gdresource-6d1fa09f.esm.js} +1 -1
- package/dist/{gdresource-a87092f3.cjs.js → gdresource-94dcf330.cjs.js} +2 -2
- package/dist/{gdresource-a87092f3.cjs.js.map → gdresource-94dcf330.cjs.js.map} +1 -1
- package/dist/gdscript-00144682.esm.js +1 -0
- package/dist/gdscript-ffbf4a9f.cjs.js +2 -0
- package/dist/gdscript-ffbf4a9f.cjs.js.map +1 -0
- package/dist/mdx-61c0b1c2.cjs.js +2 -0
- package/dist/mdx-61c0b1c2.cjs.js.map +1 -0
- package/dist/mdx-878bd7c0.esm.js +1 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +2 -2
- package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
- package/dist/nile-highlighter/nile-highlighter.cjs.js.map +1 -1
- package/dist/nile-highlighter/nile-highlighter.esm.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +2 -2
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +19 -3
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +8 -5
- package/dist/src/nile-code-editor/nile-code-editor.js +63 -41
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-tab/nile-tab.js +2 -0
- package/dist/src/nile-tab/nile-tab.js.map +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.d.ts +5 -5
- package/dist/src/nile-tab-group/nile-tab-group.js +92 -92
- package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-button-toggle-group/nile-button-toggle-group.ts +16 -8
- package/src/nile-code-editor/nile-code-editor.ts +63 -52
- package/src/nile-tab/nile-tab.ts +2 -1
- package/src/nile-tab-group/nile-tab-group.ts +98 -97
- package/dist/gdscript-b291189b.esm.js +0 -1
- package/dist/gdscript-f553f938.cjs.js +0 -2
- package/dist/gdscript-f553f938.cjs.js.map +0 -1
- package/dist/mdx-35b64539.cjs.js +0 -2
- package/dist/mdx-35b64539.cjs.js.map +0 -1
- package/dist/mdx-8b360abb.esm.js +0 -1
package/package.json
CHANGED
@@ -26,19 +26,18 @@ export class NileButtonToggleGroup extends NileElement {
|
|
26
26
|
return [styles];
|
27
27
|
}
|
28
28
|
|
29
|
-
@queryAll('nile-button-toggle')
|
30
|
-
private toggles!: NodeListOf<NileButtonToggle>;
|
29
|
+
@queryAll('nile-button-toggle') private toggles!: NodeListOf<NileButtonToggle>;
|
31
30
|
|
32
|
-
@query('slot:not([name])')
|
33
|
-
private defaultSlot!: HTMLSlotElement;
|
31
|
+
@query('slot:not([name])') private defaultSlot!: HTMLSlotElement;
|
34
32
|
|
35
|
-
@property({ type: Boolean, reflect: true })
|
36
|
-
public disabled: boolean = false;
|
33
|
+
@property({ type: Boolean, reflect: true }) public disabled: boolean = false;
|
37
34
|
|
38
|
-
@property(
|
35
|
+
@property() value:String[]|String='';
|
39
36
|
|
40
37
|
@property({type:Boolean}) multiple:boolean=false;
|
41
38
|
|
39
|
+
@property({type:Boolean}) emptyDefault:boolean=false;
|
40
|
+
|
42
41
|
connectedCallback() {
|
43
42
|
super.connectedCallback();
|
44
43
|
}
|
@@ -49,7 +48,16 @@ export class NileButtonToggleGroup extends NileElement {
|
|
49
48
|
);
|
50
49
|
this.addEventListener('nile-toggle-change', this.handleToggle);
|
51
50
|
this.updateTogglePositions();
|
52
|
-
if(!this.value)
|
51
|
+
if (!this.value) {
|
52
|
+
if (!this.multiple) {
|
53
|
+
const toggles = Array.from(this.querySelectorAll<NileButtonToggle>('nile-button-toggle'));
|
54
|
+
const activeToggle = toggles.find(e => e.active && !e.disabled);
|
55
|
+
if (activeToggle) this.value = activeToggle.value;
|
56
|
+
else if(toggles.length && !this.emptyDefault && !this.disabled) this.value = toggles[0].value;
|
57
|
+
else this.value = '';
|
58
|
+
}
|
59
|
+
else this.value = [];
|
60
|
+
}
|
53
61
|
this.setBtnState()
|
54
62
|
}
|
55
63
|
|
@@ -20,12 +20,7 @@ import { EditorView } from 'codemirror';
|
|
20
20
|
import { ViewUpdate } from '@codemirror/view';
|
21
21
|
import {
|
22
22
|
Compartment,
|
23
|
-
type EditorSelection,
|
24
23
|
EditorState,
|
25
|
-
Transaction,
|
26
|
-
type Extension,
|
27
|
-
type Text,
|
28
|
-
type ChangeSpec,
|
29
24
|
} from '@codemirror/state';
|
30
25
|
|
31
26
|
import { lineNumbers } from '@codemirror/view';
|
@@ -33,18 +28,15 @@ import {
|
|
33
28
|
javascript,
|
34
29
|
javascriptLanguage,
|
35
30
|
scopeCompletionSource,
|
36
|
-
completionPath,
|
37
31
|
} from '@codemirror/lang-javascript';
|
38
32
|
import { sql } from '@codemirror/lang-sql';
|
39
33
|
import { autocompletion } from '@codemirror/autocomplete';
|
40
|
-
import { CompletionContext, Completion } from '@codemirror/autocomplete';
|
41
34
|
import NileElement from '../internal/nile-element';
|
42
35
|
import { basicSetup } from './extensionSetup';
|
43
|
-
import { watch } from '../internal/watch';
|
44
|
-
import { PropertyValues } from 'lit';
|
45
36
|
import { classMap } from 'lit/directives/class-map.js';
|
46
37
|
import { Theme } from './theme';
|
47
38
|
|
39
|
+
const TIME_OUT_DURATION=200;
|
48
40
|
// Choose the appropriate mode for your use case
|
49
41
|
|
50
42
|
/**
|
@@ -80,7 +72,10 @@ export class NileCodeEditor extends NileElement {
|
|
80
72
|
|
81
73
|
@property({ type: Boolean, reflect: true , attribute: true}) readonly: boolean = false;
|
82
74
|
|
75
|
+
@property({ type: Boolean, reflect: true , attribute: true}) debounce: boolean = false;
|
76
|
+
|
83
77
|
public view: EditorView;
|
78
|
+
private timeOut: any = null;
|
84
79
|
|
85
80
|
// Compartments for initialiazing and switching extensions
|
86
81
|
private lineNumbersComp = new Compartment();
|
@@ -98,56 +93,22 @@ export class NileCodeEditor extends NileElement {
|
|
98
93
|
|
99
94
|
connectedCallback(): void {
|
100
95
|
super.connectedCallback();
|
101
|
-
this.emit('nile-init');
|
96
|
+
this.emit('nile-init',undefined,false);
|
102
97
|
}
|
103
98
|
|
104
99
|
disconnectedCallback(): void {
|
105
100
|
super.disconnectedCallback();
|
106
101
|
this.view.destroy()
|
107
|
-
this.emit('nile-destroy');
|
102
|
+
this.emit('nile-destroy',undefined,false);
|
108
103
|
}
|
109
104
|
|
110
105
|
firstUpdated() {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
})
|
117
|
-
const language = this.language == "sql" ? sql() : javascript()
|
118
|
-
let startState = EditorState.create({
|
119
|
-
doc: !this.multiline ? this.convertToSingleLine(this.value) : this.value,
|
120
|
-
extensions: [
|
121
|
-
basicSetup({
|
122
|
-
lineNumbers: this.lineNumbers || this.multiline,
|
123
|
-
highlightActiveLine: false,
|
124
|
-
foldGutter: false,
|
125
|
-
}),
|
126
|
-
lineNumbersExtension,
|
127
|
-
readOnlyExtension,
|
128
|
-
restrictSingleLineExtension,
|
129
|
-
customAutoCompletions,
|
130
|
-
autocompletion(),
|
131
|
-
language,
|
132
|
-
EditorView.theme(Theme),
|
133
|
-
EditorView.updateListener.of((v: ViewUpdate) => {
|
134
|
-
if (v.docChanged) {
|
135
|
-
this.emit('nile-change', { value: this.view.state.doc.toString() })
|
136
|
-
}
|
137
|
-
}),
|
138
|
-
EditorView.domEventHandlers({
|
139
|
-
focus: () => this.dispatchEvent(new Event('nile-focus')),
|
140
|
-
blur: () => this.dispatchEvent(new Event('nile-blur')),
|
141
|
-
}),
|
142
|
-
],
|
143
|
-
});
|
144
|
-
|
145
|
-
this.view = new EditorView({
|
146
|
-
state: startState,
|
147
|
-
parent: this.codeEditor
|
148
|
-
});
|
149
|
-
|
150
|
-
this.emit('nile-after-init',{ codeMirrorInstance: this.view, insertAtCursor: this.insertBetweenCode } )
|
106
|
+
this.createNewView()
|
107
|
+
this.emit('nile-after-init',{
|
108
|
+
codeMirrorInstance: this.view,
|
109
|
+
createNewView: this.createNewView,
|
110
|
+
insertAtCursor: this.insertBetweenCode
|
111
|
+
}, false )
|
151
112
|
}
|
152
113
|
|
153
114
|
protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{
|
@@ -225,6 +186,50 @@ export class NileCodeEditor extends NileElement {
|
|
225
186
|
: ``}`;
|
226
187
|
}
|
227
188
|
|
189
|
+
createNewView(){
|
190
|
+
if(this.view) this.view.destroy();
|
191
|
+
const lineNumbersExtension = this.lineNumbersComp.of(this.getLineNumbersExension());
|
192
|
+
const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());
|
193
|
+
const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())
|
194
|
+
const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({
|
195
|
+
autocomplete: scopeCompletionSource(this.customAutoCompletions),
|
196
|
+
}));
|
197
|
+
const language = this.language == "sql" ? sql() : javascript()
|
198
|
+
let startState = EditorState.create({
|
199
|
+
doc: !this.multiline ? this.convertToSingleLine(this.value) : this.value,
|
200
|
+
extensions: [
|
201
|
+
basicSetup({
|
202
|
+
lineNumbers: this.lineNumbers || this.multiline,
|
203
|
+
highlightActiveLine: false,
|
204
|
+
foldGutter: false,
|
205
|
+
}),
|
206
|
+
lineNumbersExtension,
|
207
|
+
readOnlyExtension,
|
208
|
+
restrictSingleLineExtension,
|
209
|
+
customAutoCompletions,
|
210
|
+
autocompletion(),
|
211
|
+
language,
|
212
|
+
EditorView.theme(Theme),
|
213
|
+
EditorView.updateListener.of((v: ViewUpdate) => {
|
214
|
+
if (v.docChanged) {
|
215
|
+
this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })
|
216
|
+
}
|
217
|
+
}),
|
218
|
+
EditorView.domEventHandlers({
|
219
|
+
focus: () => this.dispatchEvent(new Event('nile-focus')),
|
220
|
+
blur: () => this.dispatchEvent(new Event('nile-blur')),
|
221
|
+
}),
|
222
|
+
],
|
223
|
+
});
|
224
|
+
|
225
|
+
this.view = new EditorView({
|
226
|
+
state: startState,
|
227
|
+
parent: this.codeEditor
|
228
|
+
});
|
229
|
+
|
230
|
+
this.emit('nile-after-update',{ codeMirrorInstance: this.view }, false )
|
231
|
+
}
|
232
|
+
|
228
233
|
singleLineMultiLineToggle() {
|
229
234
|
this.view.dispatch({
|
230
235
|
changes: {
|
@@ -243,6 +248,11 @@ export class NileCodeEditor extends NileElement {
|
|
243
248
|
return code.replace(/\s+/g, ' ').trim();
|
244
249
|
}
|
245
250
|
|
251
|
+
emitAfterTimeout(value:any){
|
252
|
+
if(this.timeOut) clearTimeout(this.timeOut);
|
253
|
+
this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), TIME_OUT_DURATION)
|
254
|
+
}
|
255
|
+
|
246
256
|
public insertBetweenCode=(text: string) => {
|
247
257
|
const transaction = this.view.state.changeByRange(range => {
|
248
258
|
const { from, to } = range;
|
@@ -273,7 +283,8 @@ export class NileCodeEditor extends NileElement {
|
|
273
283
|
}
|
274
284
|
|
275
285
|
emitNileExpand() {
|
276
|
-
this.emit('nile-expand', { expand: true });
|
286
|
+
this.emit('nile-expand', { expand: true },false);
|
287
|
+
this.createNewView()
|
277
288
|
}
|
278
289
|
|
279
290
|
/* #endregion */
|
package/src/nile-tab/nile-tab.ts
CHANGED
@@ -14,7 +14,7 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
14
14
|
import { query } from 'lit/decorators.js';
|
15
15
|
import { watch } from '../internal/watch';
|
16
16
|
import NileElement from '../internal/nile-element';
|
17
|
-
import type { CSSResultGroup } from 'lit';
|
17
|
+
import type { CSSResultGroup, PropertyValueMap } from 'lit';
|
18
18
|
|
19
19
|
let id = 0;
|
20
20
|
|
@@ -69,6 +69,7 @@ export class NileTab extends NileElement {
|
|
69
69
|
|
70
70
|
@watch('active')
|
71
71
|
handleActiveChange() {
|
72
|
+
if(this.active) this.emit('nile-toggle-change',{ value: this.panel })
|
72
73
|
this.setAttribute('aria-selected', this.active ? 'true' : 'false');
|
73
74
|
}
|
74
75
|
|
@@ -135,6 +135,10 @@ export class NileTabGroup extends NileElement {
|
|
135
135
|
this.mutationObserver.disconnect();
|
136
136
|
this.resizeObserver.unobserve(this.nav);
|
137
137
|
}
|
138
|
+
|
139
|
+
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
|
140
|
+
this.addEventListener('nile-toggle-change', this.handleToggleFromTab);
|
141
|
+
}
|
138
142
|
|
139
143
|
protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
|
140
144
|
if(_changedProperties.has('activeTabName')){
|
@@ -144,6 +148,96 @@ export class NileTabGroup extends NileElement {
|
|
144
148
|
}
|
145
149
|
}
|
146
150
|
|
151
|
+
@watch('noScrollControls', { waitUntilFirstUpdate: true })
|
152
|
+
updateScrollControls() {
|
153
|
+
if (this.noScrollControls) {
|
154
|
+
this.hasScrollControls = false;
|
155
|
+
} else {
|
156
|
+
this.hasScrollControls =
|
157
|
+
['top', 'bottom'].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth;
|
158
|
+
this.hasScrollControls = false;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
@watch('placement', { waitUntilFirstUpdate: true })
|
163
|
+
syncIndicator() {
|
164
|
+
if(!this.indicator) return;
|
165
|
+
const tab = this.getActiveTab();
|
166
|
+
|
167
|
+
if (tab) {
|
168
|
+
this.indicator.style.display = 'block';
|
169
|
+
this.repositionIndicator();
|
170
|
+
} else {
|
171
|
+
this.indicator.style.display = 'none';
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
render() {
|
176
|
+
const isRtl = true;
|
177
|
+
|
178
|
+
return html`
|
179
|
+
<div
|
180
|
+
part="base"
|
181
|
+
class=${classMap({
|
182
|
+
'tab-group': true,
|
183
|
+
'tab-group--top': this.placement === 'top',
|
184
|
+
'tab-group--bottom': this.placement === 'bottom',
|
185
|
+
'tab-group--start': this.placement === 'start',
|
186
|
+
'tab-group--end': this.placement === 'end',
|
187
|
+
'tab-group--rtl': true,
|
188
|
+
'tab-group--has-scroll-controls': this.hasScrollControls,
|
189
|
+
'hide__track':this.noTrack
|
190
|
+
})}
|
191
|
+
@click=${this.handleClick}
|
192
|
+
@keydown=${this.handleKeyDown}
|
193
|
+
>
|
194
|
+
<div class="tab-group__nav-container" part="nav">
|
195
|
+
${this.hasScrollControls
|
196
|
+
? html`
|
197
|
+
<nile-icon-button
|
198
|
+
part="scroll-button scroll-button--start"
|
199
|
+
exportparts="base:scroll-button__base"
|
200
|
+
class="tab-group__scroll-button tab-group__scroll-button--start"
|
201
|
+
name='arrowright'
|
202
|
+
library="system"
|
203
|
+
label="scrollToStart"
|
204
|
+
@click=${this.handleScrollToStart}
|
205
|
+
></nile-icon-button>
|
206
|
+
`
|
207
|
+
: ''}
|
208
|
+
|
209
|
+
<div class="tab-group__nav">
|
210
|
+
<div part="tabs" class="tab-group__tabs" role="tablist">
|
211
|
+
<div
|
212
|
+
part="active-tab-indicator"
|
213
|
+
class=${classMap({
|
214
|
+
'tab-group__indicator': !this.noTrack,
|
215
|
+
})}
|
216
|
+
></div>
|
217
|
+
<slot name="nav" @slotchange=${this.syncTabsAndPanels}></slot>
|
218
|
+
</div>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
${this.hasScrollControls
|
222
|
+
? html`
|
223
|
+
<nile-icon-button
|
224
|
+
part="scroll-button scroll-button--end"
|
225
|
+
exportparts="base:scroll-button__base"
|
226
|
+
class="tab-group__scroll-button tab-group__scroll-button--end"
|
227
|
+
name='arrowleft'
|
228
|
+
library="system"
|
229
|
+
label="scrollToEnd"
|
230
|
+
@click=${this.handleScrollToEnd}
|
231
|
+
></nile-icon-button>
|
232
|
+
`
|
233
|
+
: ''}
|
234
|
+
</div>
|
235
|
+
|
236
|
+
<slot part="body" class="tab-group__body" @slotchange=${this.syncTabsAndPanels}></slot>
|
237
|
+
</div>
|
238
|
+
`;
|
239
|
+
}
|
240
|
+
|
147
241
|
private getAllTabs(options: { includeDisabled: boolean } = { includeDisabled: true }) {
|
148
242
|
const slot = this.shadowRoot!.querySelector<HTMLSlotElement>('slot[name="nav"]')!;
|
149
243
|
|
@@ -358,105 +452,12 @@ export class NileTabGroup extends NileElement {
|
|
358
452
|
// After updating, show or hide scroll controls as needed
|
359
453
|
this.updateComplete.then(() => this.updateScrollControls());
|
360
454
|
}
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
this.hasScrollControls = false;
|
366
|
-
} else {
|
367
|
-
this.hasScrollControls =
|
368
|
-
['top', 'bottom'].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth;
|
369
|
-
this.hasScrollControls = false;
|
370
|
-
}
|
371
|
-
}
|
372
|
-
|
373
|
-
@watch('placement', { waitUntilFirstUpdate: true })
|
374
|
-
syncIndicator() {
|
375
|
-
if(!this.indicator) return;
|
376
|
-
const tab = this.getActiveTab();
|
377
|
-
|
378
|
-
if (tab) {
|
379
|
-
this.indicator.style.display = 'block';
|
380
|
-
this.repositionIndicator();
|
381
|
-
} else {
|
382
|
-
this.indicator.style.display = 'none';
|
383
|
-
}
|
384
|
-
}
|
385
|
-
|
386
|
-
/** Shows the specified tab panel. */
|
387
|
-
show(panel: string) {
|
388
|
-
const tab = this.tabs.find(el => el.panel === panel);
|
389
|
-
|
390
|
-
if (tab) {
|
391
|
-
this.activeTabName=tab.panel;
|
392
|
-
}
|
455
|
+
|
456
|
+
private handleToggleFromTab(e:CustomEvent){
|
457
|
+
e.stopPropagation();
|
458
|
+
this.activeTabName=e.detail.value;
|
393
459
|
}
|
394
460
|
|
395
|
-
render() {
|
396
|
-
const isRtl = true;
|
397
|
-
|
398
|
-
return html`
|
399
|
-
<div
|
400
|
-
part="base"
|
401
|
-
class=${classMap({
|
402
|
-
'tab-group': true,
|
403
|
-
'tab-group--top': this.placement === 'top',
|
404
|
-
'tab-group--bottom': this.placement === 'bottom',
|
405
|
-
'tab-group--start': this.placement === 'start',
|
406
|
-
'tab-group--end': this.placement === 'end',
|
407
|
-
'tab-group--rtl': true,
|
408
|
-
'tab-group--has-scroll-controls': this.hasScrollControls,
|
409
|
-
'hide__track':this.noTrack
|
410
|
-
})}
|
411
|
-
@click=${this.handleClick}
|
412
|
-
@keydown=${this.handleKeyDown}
|
413
|
-
>
|
414
|
-
<div class="tab-group__nav-container" part="nav">
|
415
|
-
${this.hasScrollControls
|
416
|
-
? html`
|
417
|
-
<nile-icon-button
|
418
|
-
part="scroll-button scroll-button--start"
|
419
|
-
exportparts="base:scroll-button__base"
|
420
|
-
class="tab-group__scroll-button tab-group__scroll-button--start"
|
421
|
-
name='arrowright'
|
422
|
-
library="system"
|
423
|
-
label="scrollToStart"
|
424
|
-
@click=${this.handleScrollToStart}
|
425
|
-
></nile-icon-button>
|
426
|
-
`
|
427
|
-
: ''}
|
428
|
-
|
429
|
-
<div class="tab-group__nav">
|
430
|
-
<div part="tabs" class="tab-group__tabs" role="tablist">
|
431
|
-
<div
|
432
|
-
part="active-tab-indicator"
|
433
|
-
class=${classMap({
|
434
|
-
'tab-group__indicator': !this.noTrack,
|
435
|
-
})}
|
436
|
-
></div>
|
437
|
-
<slot name="nav" @slotchange=${this.syncTabsAndPanels}></slot>
|
438
|
-
</div>
|
439
|
-
</div>
|
440
|
-
|
441
|
-
${this.hasScrollControls
|
442
|
-
? html`
|
443
|
-
<nile-icon-button
|
444
|
-
part="scroll-button scroll-button--end"
|
445
|
-
exportparts="base:scroll-button__base"
|
446
|
-
class="tab-group__scroll-button tab-group__scroll-button--end"
|
447
|
-
name='arrowleft'
|
448
|
-
library="system"
|
449
|
-
label="scrollToEnd"
|
450
|
-
@click=${this.handleScrollToEnd}
|
451
|
-
></nile-icon-button>
|
452
|
-
`
|
453
|
-
: ''}
|
454
|
-
</div>
|
455
|
-
|
456
|
-
<slot part="body" class="tab-group__body" @slotchange=${this.syncTabsAndPanels}></slot>
|
457
|
-
</div>
|
458
|
-
`;
|
459
|
-
}
|
460
461
|
}
|
461
462
|
|
462
463
|
export default NileTabGroup;
|
@@ -1 +0,0 @@
|
|
1
|
-
var e=[Object.freeze({displayName:"GDScript",fileTypes:["gd"],name:"gdscript",patterns:[{include:"#statement"},{include:"#expression"}],repository:{annotated_parameter:{begin:"\\s*([a-zA-Z_]\\w*)\\s*(:)\\s*([a-zA-Z_]\\w*)?",beginCaptures:{1:{name:"variable.parameter.function.language.gdscript"},2:{name:"punctuation.separator.annotation.gdscript"},3:{name:"entity.name.type.class.gdscript"}},end:"(,)|(?=\\))",endCaptures:{1:{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"},{match:"=(?!=)",name:"keyword.operator.assignment.gdscript"}]},annotations:{captures:{1:{name:"entity.name.function.decorator.gdscript"},2:{name:"entity.name.function.decorator.gdscript"}},match:"(@)(export|export_color_no_alpha|export_dir|export_enum|export_exp_easing|export_file|export_flags|export_flags_2d_navigation|export_flags_2d_physics|export_flags_2d_render|export_flags_3d_navigation|export_flags_3d_physics|export_flags_3d_render|export_global_dir|export_global_file|export_multiline|export_node_path|export_placeholder|export_range|icon|onready|rpc|tool|warning_ignore|abstract)\\b"},any_method:{match:"\\b([A-Za-z_]\\w*)\\b(?=\\s*(?:[(]))",name:"entity.name.function.other.gdscript"},any_property:{captures:{1:{name:"punctuation.accessor.gdscript"},2:{name:"constant.language.gdscript"},3:{name:"variable.other.property.gdscript"}},match:"\\b(\\.)\\s*(?<![@\\$#%])(?:([A-Z_][A-Z_0-9]*)|([A-Za-z_]\\w*))\\b(?![(])"},any_variable:{match:"\\b(?<![@\\$#%])([A-Za-z_]\\w*)\\b(?![(])",name:"variable.other.gdscript"},arithmetic_operator:{match:"->|\\+=|-=|\\*=|\\^=|/=|%=|&=|~=|\\|=|\\*\\*|\\*|/|%|\\+|-",name:"keyword.operator.arithmetic.gdscript"},assignment_operator:{match:"=",name:"keyword.operator.assignment.gdscript"},base_expression:{patterns:[{include:"#builtin_get_node_shorthand"},{include:"#nodepath_object"},{include:"#nodepath_function"},{include:"#strings"},{include:"#builtin_classes"},{include:"#const_vars"},{include:"#keywords"},{include:"#operators"},{include:"#lambda_declaration"},{include:"#class_declaration"},{include:"#variable_declaration"},{include:"#signal_declaration_bare"},{include:"#signal_declaration"},{include:"#function_declaration"},{include:"#statement_keyword"},{include:"#assignment_operator"},{include:"#in_keyword"},{include:"#control_flow"},{include:"#match_keyword"},{include:"#curly_braces"},{include:"#square_braces"},{include:"#round_braces"},{include:"#function_call"},{include:"#comment"},{include:"#self"},{include:"#func"},{include:"#letter"},{include:"#numbers"},{include:"#pascal_case_class"},{include:"#line_continuation"}]},bitwise_operator:{match:"&|\\||<<=|>>=|<<|>>|\\^|~",name:"keyword.operator.bitwise.gdscript"},boolean_operator:{match:"(&&|\\|\\|)",name:"keyword.operator.boolean.gdscript"},builtin_classes:{match:"(?<![^.]\\.|:)\\b(OS|GDScript|Vector2|Vector2i|Vector3|Vector3i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|Object|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|StringName|Quaternion|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedColorArray|super)\\b",name:"entity.name.type.class.builtin.gdscript"},builtin_get_node_shorthand:{patterns:[{include:"#builtin_get_node_shorthand_quoted"},{include:"#builtin_get_node_shorthand_bare"},{include:"#builtin_get_node_shorthand_bare_multi"}]},builtin_get_node_shorthand_bare:{captures:{1:{name:"keyword.control.flow.gdscript"},2:{name:"constant.character.escape.gdscript"},3:{name:"constant.character.escape.gdscript"}},match:"(?<!/\\s*)(\\$|%|\\$%)([a-zA-Z_]\\w*)\\b(?!\\s*/)",name:"meta.literal.nodepath.gdscript"},builtin_get_node_shorthand_bare_multi:{begin:"(\\$|%|\\$%)([a-zA-Z_]\\w*)",beginCaptures:{1:{name:"keyword.control.flow.gdscript"},2:{name:"constant.character.escape.gdscript"}},end:"(?!\\s*/\\s*%?\\s*[a-zA-Z_]\\w*)",name:"meta.literal.nodepath.gdscript",patterns:[{captures:{1:{name:"constant.character.escape.gdscript"},2:{name:"keyword.control.flow.gdscript"},3:{name:"constant.character.escape.gdscript"}},match:"(/)\\s*(%)?\\s*([a-zA-Z_]\\w*)\\s*"}]},builtin_get_node_shorthand_quoted:{begin:"(?:(\\$)|(&|\\^|@))(\"|')",beginCaptures:{1:{name:"keyword.control.flow.gdscript"},2:{name:"variable.other.enummember.gdscript"}},end:"(\\3)",name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape.gdscript",patterns:[{match:"%",name:"keyword.control.flow"}]},class_declaration:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"class.other.gdscript"}},match:"(?<=^class)\\s+([a-zA-Z_]\\w*)\\s*(?=:)"},class_enum:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"constant.language.gdscript"}},match:"\\b([A-Z][a-zA-Z_0-9]*)\\.([A-Z_0-9]+)"},class_is:{captures:{1:{name:"storage.type.is.gdscript"},2:{name:"entity.name.type.class.gdscript"}},match:"\\s+(is)\\s+([a-zA-Z_]\\w*)"},class_name:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"class.other.gdscript"}},match:"(?<=class_name)\\s+([a-zA-Z_]\\w*(\\.([a-zA-Z_]\\w*))?)"},class_new:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"storage.type.new.gdscript"},3:{name:"punctuation.parenthesis.begin.gdscript"}},match:"\\b([a-zA-Z_]\\w*).(new)\\("},comment:{captures:{1:{name:"punctuation.definition.comment.number-sign.gdscript"}},match:"(##|#).*$\\n?",name:"comment.line.number-sign.gdscript"},compare_operator:{match:"<=|>=|==|<|>|!=|!",name:"keyword.operator.comparison.gdscript"},const_vars:{match:"\\b([A-Z_][A-Z_0-9]*)\\b",name:"constant.language.gdscript"},control_flow:{match:"\\b(?:if|elif|else|while|break|continue|pass|return|when|yield|await)\\b",name:"keyword.control.gdscript"},curly_braces:{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.dict.begin.gdscript"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.dict.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},expression:{patterns:[{include:"#base_expression"},{include:"#getter_setter_godot4"},{include:"#assignment_operator"},{include:"#annotations"},{include:"#class_name"},{include:"#builtin_classes"},{include:"#class_new"},{include:"#class_is"},{include:"#class_enum"},{include:"#any_method"},{include:"#any_variable"},{include:"#any_property"}]},extends_statement:{captures:{1:{name:"keyword.language.gdscript"},2:{name:"entity.other.inherited-class.gdscript"}},match:"(extends)\\s+([a-zA-Z_]\\w*\\.[a-zA-Z_]\\w*)?"},func:{match:"\\bfunc\\b",name:"keyword.language.gdscript"},function_arguments:{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:"(?=\\))(?!\\)\\s*\\()",patterns:[{match:"(,)",name:"punctuation.separator.arguments.gdscript"},{captures:{1:{name:"variable.parameter.function-call.gdscript"},2:{name:"keyword.operator.assignment.gdscript"}},match:"\\b([a-zA-Z_]\\w*)\\s*(=)(?!=)"},{match:"=(?!=)",name:"keyword.operator.assignment.gdscript"},{include:"#base_expression"},{captures:{1:{name:"punctuation.definition.arguments.end.gdscript"},2:{name:"punctuation.definition.arguments.begin.gdscript"}},match:"\\s*(\\))\\s*(\\()"},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},function_call:{begin:"(?=\\b[a-zA-Z_]\\w*\\b\\()",comment:'Regular function call of the type "name(args)"',end:"(\\))",endCaptures:{1:{name:"punctuation.definition.arguments.end.gdscript"}},name:"meta.function-call.gdscript",patterns:[{include:"#function_name"},{include:"#function_arguments"}]},function_declaration:{begin:"\\s*(func)\\s+([a-zA-Z_]\\w*)\\s*(?=\\()",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},end:"(:|(?=[#'\"\\n]))",end2:"(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",endCaptures2:{1:{name:"punctuation.separator.annotation.result.gdscript"},2:{name:"keyword.language.void.gdscript"},3:{name:"entity.name.type.class.gdscript markup.italic"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"}]},function_name:{patterns:[{include:"#builtin_classes"},{match:"\\b(preload)\\b",name:"keyword.language.gdscript"},{comment:"Some color schemas support meta.function-call.generic scope",match:"\\b([a-zA-Z_]\\w*)\\b",name:"entity.name.function.gdscript"}]},getter_setter_godot4:{patterns:[{captures:{1:{name:"entity.name.function.gdscript"}},match:"\\b(get):"},{begin:"\\s+(set)\\s*(?=\\()",beginCaptures:{1:{name:"entity.name.function.gdscript"}},end:"(:|(?=[#'\"\\n]))",name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]}]},in_keyword:{patterns:[{begin:"\\b(for)\\b",captures:{1:{name:"keyword.control.gdscript"}},end:":",patterns:[{match:"\\bin\\b",name:"keyword.control.gdscript"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},{match:"\\bin\\b",name:"keyword.operator.wordlike.gdscript"}]},keywords:{match:"\\b(?:class|class_name|is|onready|tool|static|export|as|void|enum|assert|breakpoint|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\\b",name:"keyword.language.gdscript"},lambda_declaration:{begin:"(func)\\s?(?=\\()",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},end:"(:|(?=[#'\"\\n]))",end2:"(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",endCaptures2:{1:{name:"punctuation.separator.annotation.result.gdscript"},2:{name:"keyword.language.void.gdscript"},3:{name:"entity.name.type.class.gdscript markup.italic"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},letter:{match:"\\b(?:true|false|null)\\b",name:"constant.language.gdscript"},line_continuation:{patterns:[{captures:{1:{name:"punctuation.separator.continuation.line.gdscript"},2:{name:"invalid.illegal.line.continuation.gdscript"}},match:"(\\\\)\\s*(\\S.*$\\n?)"},{begin:"(\\\\)\\s*$\\n?",beginCaptures:{1:{name:"punctuation.separator.continuation.line.gdscript"}},end:"(?=^\\s*$)|(?!(\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))|(\\G$))",patterns:[{include:"#base_expression"}]}]},loose_default:{begin:"(=)",beginCaptures:{1:{name:"keyword.operator.gdscript"}},end:"(,)|(?=\\))",endCaptures:{1:{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"}]},match_keyword:{captures:{1:{name:"keyword.control.gdscript"}},match:"^\n\\s*(match)"},nodepath_function:{begin:"(get_node_or_null|has_node|has_node_and_resource|find_node|get_node)\\s*(\\()",beginCaptures:{1:{name:"entity.name.function.gdscript"},2:{name:"punctuation.definition.parameters.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:"(\\))",endCaptures:{1:{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.gdscript",patterns:[{begin:"(\"|')",end:"\\1",name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape",patterns:[{match:"%",name:"keyword.control.flow"}]},{include:"#base_expression"}]},nodepath_object:{begin:"(NodePath)\\s*(?:\\()",beginCaptures:{1:{name:"support.class.library.gdscript"}},end:"(?:\\))",name:"meta.literal.nodepath.gdscript",patterns:[{begin:"(\"|')",end:"\\1",name:"string.quoted.gdscript constant.character.escape.gdscript",patterns:[{match:"%",name:"keyword.control.flow.gdscript"}]}]},numbers:{patterns:[{match:"0b[01_]+",name:"constant.numeric.integer.binary.gdscript"},{match:"0x[0-9A-Fa-f_]+",name:"constant.numeric.integer.hexadecimal.gdscript"},{match:"[-]?(\\d[0-9_]+\\.[0-9_]*(e[\\-\\+]?[0-9_]+)?)",name:"constant.numeric.float.gdscript"},{match:"[-]?(\\.\\d[0-9_]*(e[\\-\\+]?[0-9_]+)?)",name:"constant.numeric.float.gdscript"},{match:"[-]?(\\d[0-9_]*e[\\-\\+]?\\[0-9_])",name:"constant.numeric.float.gdscript"},{match:"[-]?\\d[0-9_]*",name:"constant.numeric.integer.gdscript"}]},operators:{patterns:[{include:"#wordlike_operator"},{include:"#boolean_operator"},{include:"#arithmetic_operator"},{include:"#bitwise_operator"},{include:"#compare_operator"}]},parameters:{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.parameters.begin.gdscript"}},end:"(\\))",endCaptures:{1:{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.parameters.gdscript",patterns:[{include:"#annotated_parameter"},{captures:{1:{name:"variable.parameter.function.language.gdscript"},2:{name:"punctuation.separator.parameters.gdscript"}},match:"([a-zA-Z_]\\w*)\\s*(?:(,)|(?=[)#\\n=]))"},{include:"#comment"},{include:"#loose_default"}]},pascal_case_class:{match:"\\b([A-Z]+[a-z_0-9]*([A-Z]?[a-z_0-9]+)*[A-Z]?)\\b",name:"entity.name.type.class.gdscript"},round_braces:{begin:"\\(",beginCaptures:{0:{name:"punctuation.parenthesis.begin.gdscript"}},end:"\\)",endCaptures:{0:{name:"punctuation.parenthesis.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},self:{match:"\\bself\\b",name:"variable.language.gdscript"},signal_declaration:{begin:"\\s*(signal)\\s+([a-zA-Z_]\\w*)\\s*(?=\\()",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},end:"((?=[#'\"\\n]))",name:"meta.signal.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]},signal_declaration_bare:{captures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},match:"\\s*(signal)\\s+([a-zA-Z_]\\w*)(?=[\\n\\s])",name:"meta.signal.gdscript"},square_braces:{begin:"\\[",beginCaptures:{0:{name:"punctuation.definition.list.begin.gdscript"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.list.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},statement:{patterns:[{include:"#extends_statement"}]},statement_keyword:{patterns:[{match:"\\b(?<!\\.)(continue|assert|break|elif|else|if|pass|return|while)\\b",name:"keyword.control.flow.gdscript"},{match:"\\b(?<!\\.)(class)\\b",name:"storage.type.class.gdscript"},{captures:{1:{name:"keyword.control.flow.gdscript"}},match:"^\\s*(case|match)(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b"}]},string_bracket_placeholders:{patterns:[{captures:{1:{name:"constant.character.format.placeholder.other.gdscript"},3:{name:"storage.type.format.gdscript"},4:{name:"storage.type.format.gdscript"}},match:"({{|}}|(?:{\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:\\w?[<>=^]?[-+ ]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)?}))",name:"meta.format.brace.gdscript"},{captures:{1:{name:"constant.character.format.placeholder.other.gdscript"},3:{name:"storage.type.format.gdscript"},4:{name:"storage.type.format.gdscript"}},match:"({\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:)[^'\"{}\\n]*(?:\\{[^'\"}\\n]*?\\}[^'\"{}\\n]*)*})",name:"meta.format.brace.gdscript"}]},string_percent_placeholders:{captures:{1:{name:"constant.character.format.placeholder.other.gdscript"}},match:"(%(\\([\\w\\s]*\\))?[-+#0 ]*(\\d+|\\*)?(\\.(\\d+|\\*))?([hlL])?[diouxXeEfFgGcrsab%])",name:"meta.format.percent.gdscript"},strings:{begin:"(r)?(\"\"\"|'''|\"|')",beginCaptures:{1:{name:"constant.character.escape.gdscript"}},end:"\\2",name:"string.quoted.gdscript",patterns:[{match:"\\\\.",name:"constant.character.escape.gdscript"},{include:"#string_percent_placeholders"},{include:"#string_bracket_placeholders"}]},variable_declaration:{begin:"\\b(?:(var)|(const))\\b",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.var.gdscript"},2:{name:"keyword.language.gdscript storage.type.const.gdscript"}},end:"$|;",name:"meta.variable.declaration.gdscript",patterns:[{captures:{1:{name:"punctuation.separator.annotation.gdscript"},2:{name:"keyword.language.gdscript storage.type.const.gdscript"},3:{name:"entity.name.function.gdscript"}},match:"(:)?\\s*(set|get)\\s+=\\s+([a-zA-Z_]\\w*)"},{match:":=|=(?!=)",name:"keyword.operator.assignment.gdscript"},{captures:{1:{name:"punctuation.separator.annotation.gdscript"},2:{name:"entity.name.type.class.gdscript"}},match:"(:)\\s*([a-zA-Z_]\\w*)?"},{captures:{1:{name:"keyword.language.gdscript storage.type.const.gdscript"},2:{name:"entity.name.function.gdscript"},3:{name:"entity.name.function.gdscript"}},match:"(setget)\\s+([a-zA-Z_]\\w*)(?:[,]\\s*([a-zA-Z_]\\w*))?"},{include:"#expression"},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},wordlike_operator:{match:"\\b(and|or|not)\\b",name:"keyword.operator.wordlike.gdscript"}},scopeName:"source.gdscript"})];export{e as default};
|
@@ -1,2 +0,0 @@
|
|
1
|
-
System.register([],function(_export,_context){"use strict";var e;return{setters:[],execute:function execute(){_export("default",e=[Object.freeze({displayName:"GDScript",fileTypes:["gd"],name:"gdscript",patterns:[{include:"#statement"},{include:"#expression"}],repository:{annotated_parameter:{begin:"\\s*([a-zA-Z_]\\w*)\\s*(:)\\s*([a-zA-Z_]\\w*)?",beginCaptures:{1:{name:"variable.parameter.function.language.gdscript"},2:{name:"punctuation.separator.annotation.gdscript"},3:{name:"entity.name.type.class.gdscript"}},end:"(,)|(?=\\))",endCaptures:{1:{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"},{match:"=(?!=)",name:"keyword.operator.assignment.gdscript"}]},annotations:{captures:{1:{name:"entity.name.function.decorator.gdscript"},2:{name:"entity.name.function.decorator.gdscript"}},match:"(@)(export|export_color_no_alpha|export_dir|export_enum|export_exp_easing|export_file|export_flags|export_flags_2d_navigation|export_flags_2d_physics|export_flags_2d_render|export_flags_3d_navigation|export_flags_3d_physics|export_flags_3d_render|export_global_dir|export_global_file|export_multiline|export_node_path|export_placeholder|export_range|icon|onready|rpc|tool|warning_ignore|abstract)\\b"},any_method:{match:"\\b([A-Za-z_]\\w*)\\b(?=\\s*(?:[(]))",name:"entity.name.function.other.gdscript"},any_property:{captures:{1:{name:"punctuation.accessor.gdscript"},2:{name:"constant.language.gdscript"},3:{name:"variable.other.property.gdscript"}},match:"\\b(\\.)\\s*(?<![@\\$#%])(?:([A-Z_][A-Z_0-9]*)|([A-Za-z_]\\w*))\\b(?![(])"},any_variable:{match:"\\b(?<![@\\$#%])([A-Za-z_]\\w*)\\b(?![(])",name:"variable.other.gdscript"},arithmetic_operator:{match:"->|\\+=|-=|\\*=|\\^=|/=|%=|&=|~=|\\|=|\\*\\*|\\*|/|%|\\+|-",name:"keyword.operator.arithmetic.gdscript"},assignment_operator:{match:"=",name:"keyword.operator.assignment.gdscript"},base_expression:{patterns:[{include:"#builtin_get_node_shorthand"},{include:"#nodepath_object"},{include:"#nodepath_function"},{include:"#strings"},{include:"#builtin_classes"},{include:"#const_vars"},{include:"#keywords"},{include:"#operators"},{include:"#lambda_declaration"},{include:"#class_declaration"},{include:"#variable_declaration"},{include:"#signal_declaration_bare"},{include:"#signal_declaration"},{include:"#function_declaration"},{include:"#statement_keyword"},{include:"#assignment_operator"},{include:"#in_keyword"},{include:"#control_flow"},{include:"#match_keyword"},{include:"#curly_braces"},{include:"#square_braces"},{include:"#round_braces"},{include:"#function_call"},{include:"#comment"},{include:"#self"},{include:"#func"},{include:"#letter"},{include:"#numbers"},{include:"#pascal_case_class"},{include:"#line_continuation"}]},bitwise_operator:{match:"&|\\||<<=|>>=|<<|>>|\\^|~",name:"keyword.operator.bitwise.gdscript"},boolean_operator:{match:"(&&|\\|\\|)",name:"keyword.operator.boolean.gdscript"},builtin_classes:{match:"(?<![^.]\\.|:)\\b(OS|GDScript|Vector2|Vector2i|Vector3|Vector3i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|Object|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|StringName|Quaternion|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedColorArray|super)\\b",name:"entity.name.type.class.builtin.gdscript"},builtin_get_node_shorthand:{patterns:[{include:"#builtin_get_node_shorthand_quoted"},{include:"#builtin_get_node_shorthand_bare"},{include:"#builtin_get_node_shorthand_bare_multi"}]},builtin_get_node_shorthand_bare:{captures:{1:{name:"keyword.control.flow.gdscript"},2:{name:"constant.character.escape.gdscript"},3:{name:"constant.character.escape.gdscript"}},match:"(?<!/\\s*)(\\$|%|\\$%)([a-zA-Z_]\\w*)\\b(?!\\s*/)",name:"meta.literal.nodepath.gdscript"},builtin_get_node_shorthand_bare_multi:{begin:"(\\$|%|\\$%)([a-zA-Z_]\\w*)",beginCaptures:{1:{name:"keyword.control.flow.gdscript"},2:{name:"constant.character.escape.gdscript"}},end:"(?!\\s*/\\s*%?\\s*[a-zA-Z_]\\w*)",name:"meta.literal.nodepath.gdscript",patterns:[{captures:{1:{name:"constant.character.escape.gdscript"},2:{name:"keyword.control.flow.gdscript"},3:{name:"constant.character.escape.gdscript"}},match:"(/)\\s*(%)?\\s*([a-zA-Z_]\\w*)\\s*"}]},builtin_get_node_shorthand_quoted:{begin:"(?:(\\$)|(&|\\^|@))(\"|')",beginCaptures:{1:{name:"keyword.control.flow.gdscript"},2:{name:"variable.other.enummember.gdscript"}},end:"(\\3)",name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape.gdscript",patterns:[{match:"%",name:"keyword.control.flow"}]},class_declaration:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"class.other.gdscript"}},match:"(?<=^class)\\s+([a-zA-Z_]\\w*)\\s*(?=:)"},class_enum:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"constant.language.gdscript"}},match:"\\b([A-Z][a-zA-Z_0-9]*)\\.([A-Z_0-9]+)"},class_is:{captures:{1:{name:"storage.type.is.gdscript"},2:{name:"entity.name.type.class.gdscript"}},match:"\\s+(is)\\s+([a-zA-Z_]\\w*)"},class_name:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"class.other.gdscript"}},match:"(?<=class_name)\\s+([a-zA-Z_]\\w*(\\.([a-zA-Z_]\\w*))?)"},class_new:{captures:{1:{name:"entity.name.type.class.gdscript"},2:{name:"storage.type.new.gdscript"},3:{name:"punctuation.parenthesis.begin.gdscript"}},match:"\\b([a-zA-Z_]\\w*).(new)\\("},comment:{captures:{1:{name:"punctuation.definition.comment.number-sign.gdscript"}},match:"(##|#).*$\\n?",name:"comment.line.number-sign.gdscript"},compare_operator:{match:"<=|>=|==|<|>|!=|!",name:"keyword.operator.comparison.gdscript"},const_vars:{match:"\\b([A-Z_][A-Z_0-9]*)\\b",name:"constant.language.gdscript"},control_flow:{match:"\\b(?:if|elif|else|while|break|continue|pass|return|when|yield|await)\\b",name:"keyword.control.gdscript"},curly_braces:{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.dict.begin.gdscript"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.dict.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},expression:{patterns:[{include:"#base_expression"},{include:"#getter_setter_godot4"},{include:"#assignment_operator"},{include:"#annotations"},{include:"#class_name"},{include:"#builtin_classes"},{include:"#class_new"},{include:"#class_is"},{include:"#class_enum"},{include:"#any_method"},{include:"#any_variable"},{include:"#any_property"}]},extends_statement:{captures:{1:{name:"keyword.language.gdscript"},2:{name:"entity.other.inherited-class.gdscript"}},match:"(extends)\\s+([a-zA-Z_]\\w*\\.[a-zA-Z_]\\w*)?"},func:{match:"\\bfunc\\b",name:"keyword.language.gdscript"},function_arguments:{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.arguments.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:"(?=\\))(?!\\)\\s*\\()",patterns:[{match:"(,)",name:"punctuation.separator.arguments.gdscript"},{captures:{1:{name:"variable.parameter.function-call.gdscript"},2:{name:"keyword.operator.assignment.gdscript"}},match:"\\b([a-zA-Z_]\\w*)\\s*(=)(?!=)"},{match:"=(?!=)",name:"keyword.operator.assignment.gdscript"},{include:"#base_expression"},{captures:{1:{name:"punctuation.definition.arguments.end.gdscript"},2:{name:"punctuation.definition.arguments.begin.gdscript"}},match:"\\s*(\\))\\s*(\\()"},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},function_call:{begin:"(?=\\b[a-zA-Z_]\\w*\\b\\()",comment:'Regular function call of the type "name(args)"',end:"(\\))",endCaptures:{1:{name:"punctuation.definition.arguments.end.gdscript"}},name:"meta.function-call.gdscript",patterns:[{include:"#function_name"},{include:"#function_arguments"}]},function_declaration:{begin:"\\s*(func)\\s+([a-zA-Z_]\\w*)\\s*(?=\\()",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},end:"(:|(?=[#'\"\\n]))",end2:"(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",endCaptures2:{1:{name:"punctuation.separator.annotation.result.gdscript"},2:{name:"keyword.language.void.gdscript"},3:{name:"entity.name.type.class.gdscript markup.italic"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"}]},function_name:{patterns:[{include:"#builtin_classes"},{match:"\\b(preload)\\b",name:"keyword.language.gdscript"},{comment:"Some color schemas support meta.function-call.generic scope",match:"\\b([a-zA-Z_]\\w*)\\b",name:"entity.name.function.gdscript"}]},getter_setter_godot4:{patterns:[{captures:{1:{name:"entity.name.function.gdscript"}},match:"\\b(get):"},{begin:"\\s+(set)\\s*(?=\\()",beginCaptures:{1:{name:"entity.name.function.gdscript"}},end:"(:|(?=[#'\"\\n]))",name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]}]},in_keyword:{patterns:[{begin:"\\b(for)\\b",captures:{1:{name:"keyword.control.gdscript"}},end:":",patterns:[{match:"\\bin\\b",name:"keyword.control.gdscript"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},{match:"\\bin\\b",name:"keyword.operator.wordlike.gdscript"}]},keywords:{match:"\\b(?:class|class_name|is|onready|tool|static|export|as|void|enum|assert|breakpoint|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\\b",name:"keyword.language.gdscript"},lambda_declaration:{begin:"(func)\\s?(?=\\()",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},end:"(:|(?=[#'\"\\n]))",end2:"(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",endCaptures2:{1:{name:"punctuation.separator.annotation.result.gdscript"},2:{name:"keyword.language.void.gdscript"},3:{name:"entity.name.type.class.gdscript markup.italic"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},letter:{match:"\\b(?:true|false|null)\\b",name:"constant.language.gdscript"},line_continuation:{patterns:[{captures:{1:{name:"punctuation.separator.continuation.line.gdscript"},2:{name:"invalid.illegal.line.continuation.gdscript"}},match:"(\\\\)\\s*(\\S.*$\\n?)"},{begin:"(\\\\)\\s*$\\n?",beginCaptures:{1:{name:"punctuation.separator.continuation.line.gdscript"}},end:"(?=^\\s*$)|(?!(\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))|(\\G$))",patterns:[{include:"#base_expression"}]}]},loose_default:{begin:"(=)",beginCaptures:{1:{name:"keyword.operator.gdscript"}},end:"(,)|(?=\\))",endCaptures:{1:{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"}]},match_keyword:{captures:{1:{name:"keyword.control.gdscript"}},match:"^\n\\s*(match)"},nodepath_function:{begin:"(get_node_or_null|has_node|has_node_and_resource|find_node|get_node)\\s*(\\()",beginCaptures:{1:{name:"entity.name.function.gdscript"},2:{name:"punctuation.definition.parameters.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:"(\\))",endCaptures:{1:{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.gdscript",patterns:[{begin:"(\"|')",end:"\\1",name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape",patterns:[{match:"%",name:"keyword.control.flow"}]},{include:"#base_expression"}]},nodepath_object:{begin:"(NodePath)\\s*(?:\\()",beginCaptures:{1:{name:"support.class.library.gdscript"}},end:"(?:\\))",name:"meta.literal.nodepath.gdscript",patterns:[{begin:"(\"|')",end:"\\1",name:"string.quoted.gdscript constant.character.escape.gdscript",patterns:[{match:"%",name:"keyword.control.flow.gdscript"}]}]},numbers:{patterns:[{match:"0b[01_]+",name:"constant.numeric.integer.binary.gdscript"},{match:"0x[0-9A-Fa-f_]+",name:"constant.numeric.integer.hexadecimal.gdscript"},{match:"[-]?(\\d[0-9_]+\\.[0-9_]*(e[\\-\\+]?[0-9_]+)?)",name:"constant.numeric.float.gdscript"},{match:"[-]?(\\.\\d[0-9_]*(e[\\-\\+]?[0-9_]+)?)",name:"constant.numeric.float.gdscript"},{match:"[-]?(\\d[0-9_]*e[\\-\\+]?\\[0-9_])",name:"constant.numeric.float.gdscript"},{match:"[-]?\\d[0-9_]*",name:"constant.numeric.integer.gdscript"}]},operators:{patterns:[{include:"#wordlike_operator"},{include:"#boolean_operator"},{include:"#arithmetic_operator"},{include:"#bitwise_operator"},{include:"#compare_operator"}]},parameters:{begin:"(\\()",beginCaptures:{1:{name:"punctuation.definition.parameters.begin.gdscript"}},end:"(\\))",endCaptures:{1:{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.parameters.gdscript",patterns:[{include:"#annotated_parameter"},{captures:{1:{name:"variable.parameter.function.language.gdscript"},2:{name:"punctuation.separator.parameters.gdscript"}},match:"([a-zA-Z_]\\w*)\\s*(?:(,)|(?=[)#\\n=]))"},{include:"#comment"},{include:"#loose_default"}]},pascal_case_class:{match:"\\b([A-Z]+[a-z_0-9]*([A-Z]?[a-z_0-9]+)*[A-Z]?)\\b",name:"entity.name.type.class.gdscript"},round_braces:{begin:"\\(",beginCaptures:{0:{name:"punctuation.parenthesis.begin.gdscript"}},end:"\\)",endCaptures:{0:{name:"punctuation.parenthesis.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},self:{match:"\\bself\\b",name:"variable.language.gdscript"},signal_declaration:{begin:"\\s*(signal)\\s+([a-zA-Z_]\\w*)\\s*(?=\\()",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},end:"((?=[#'\"\\n]))",name:"meta.signal.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]},signal_declaration_bare:{captures:{1:{name:"keyword.language.gdscript storage.type.function.gdscript"},2:{name:"entity.name.function.gdscript"}},match:"\\s*(signal)\\s+([a-zA-Z_]\\w*)(?=[\\n\\s])",name:"meta.signal.gdscript"},square_braces:{begin:"\\[",beginCaptures:{0:{name:"punctuation.definition.list.begin.gdscript"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.list.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},statement:{patterns:[{include:"#extends_statement"}]},statement_keyword:{patterns:[{match:"\\b(?<!\\.)(continue|assert|break|elif|else|if|pass|return|while)\\b",name:"keyword.control.flow.gdscript"},{match:"\\b(?<!\\.)(class)\\b",name:"storage.type.class.gdscript"},{captures:{1:{name:"keyword.control.flow.gdscript"}},match:"^\\s*(case|match)(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b"}]},string_bracket_placeholders:{patterns:[{captures:{1:{name:"constant.character.format.placeholder.other.gdscript"},3:{name:"storage.type.format.gdscript"},4:{name:"storage.type.format.gdscript"}},match:"({{|}}|(?:{\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:\\w?[<>=^]?[-+ ]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)?}))",name:"meta.format.brace.gdscript"},{captures:{1:{name:"constant.character.format.placeholder.other.gdscript"},3:{name:"storage.type.format.gdscript"},4:{name:"storage.type.format.gdscript"}},match:"({\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:)[^'\"{}\\n]*(?:\\{[^'\"}\\n]*?\\}[^'\"{}\\n]*)*})",name:"meta.format.brace.gdscript"}]},string_percent_placeholders:{captures:{1:{name:"constant.character.format.placeholder.other.gdscript"}},match:"(%(\\([\\w\\s]*\\))?[-+#0 ]*(\\d+|\\*)?(\\.(\\d+|\\*))?([hlL])?[diouxXeEfFgGcrsab%])",name:"meta.format.percent.gdscript"},strings:{begin:"(r)?(\"\"\"|'''|\"|')",beginCaptures:{1:{name:"constant.character.escape.gdscript"}},end:"\\2",name:"string.quoted.gdscript",patterns:[{match:"\\\\.",name:"constant.character.escape.gdscript"},{include:"#string_percent_placeholders"},{include:"#string_bracket_placeholders"}]},variable_declaration:{begin:"\\b(?:(var)|(const))\\b",beginCaptures:{1:{name:"keyword.language.gdscript storage.type.var.gdscript"},2:{name:"keyword.language.gdscript storage.type.const.gdscript"}},end:"$|;",name:"meta.variable.declaration.gdscript",patterns:[{captures:{1:{name:"punctuation.separator.annotation.gdscript"},2:{name:"keyword.language.gdscript storage.type.const.gdscript"},3:{name:"entity.name.function.gdscript"}},match:"(:)?\\s*(set|get)\\s+=\\s+([a-zA-Z_]\\w*)"},{match:":=|=(?!=)",name:"keyword.operator.assignment.gdscript"},{captures:{1:{name:"punctuation.separator.annotation.gdscript"},2:{name:"entity.name.type.class.gdscript"}},match:"(:)\\s*([a-zA-Z_]\\w*)?"},{captures:{1:{name:"keyword.language.gdscript storage.type.const.gdscript"},2:{name:"entity.name.function.gdscript"},3:{name:"entity.name.function.gdscript"}},match:"(setget)\\s+([a-zA-Z_]\\w*)(?:[,]\\s*([a-zA-Z_]\\w*))?"},{include:"#expression"},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},wordlike_operator:{match:"\\b(and|or|not)\\b",name:"keyword.operator.wordlike.gdscript"}},scopeName:"source.gdscript"})]);}};});
|
2
|
-
//# sourceMappingURL=gdscript-f553f938.cjs.js.map
|