@matdata/yasqe 5.2.0 → 5.4.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/README.md +128 -144
- package/build/ts/grammar/tokenizer.d.ts +8 -0
- package/build/ts/grammar/tokenizer.js +21 -1
- package/build/ts/grammar/tokenizer.js.map +1 -1
- package/build/ts/src/defaults.d.ts +4 -0
- package/build/ts/src/defaults.js +32 -2
- package/build/ts/src/defaults.js.map +1 -1
- package/build/ts/src/imgs.d.ts +3 -0
- package/build/ts/src/imgs.js +3 -0
- package/build/ts/src/imgs.js.map +1 -1
- package/build/ts/src/index.d.ts +26 -0
- package/build/ts/src/index.js +261 -2
- package/build/ts/src/index.js.map +1 -1
- package/build/ts/src/prefixFold.js +2 -0
- package/build/ts/src/prefixFold.js.map +1 -1
- package/build/ts/src/prefixUtils.js.map +1 -1
- package/build/yasqe.min.css +1 -1
- package/build/yasqe.min.css.map +3 -3
- package/build/yasqe.min.js +95 -46
- package/build/yasqe.min.js.map +4 -4
- package/grammar/_tokenizer-table.d.ts +9 -0
- package/grammar/tokenizer.ts +27 -1
- package/package.json +3 -2
- package/src/autocompleters/show-hint.scss +1 -2
- package/src/defaults.ts +32 -2
- package/src/imgs.ts +6 -0
- package/src/index.ts +353 -3
- package/src/prefixFold.ts +1 -0
- package/src/prefixUtils.ts +5 -2
- package/src/scss/buttons.scss +126 -0
- package/src/scss/yasqe.scss +12 -0
- package/src/sparql-formatter.d.ts +10 -0
package/src/scss/buttons.scss
CHANGED
|
@@ -212,6 +212,26 @@
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
.yasqe_formatButton {
|
|
216
|
+
display: inline-block;
|
|
217
|
+
border: none;
|
|
218
|
+
background: none;
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
padding: 0;
|
|
221
|
+
margin-left: 5px;
|
|
222
|
+
|
|
223
|
+
svg {
|
|
224
|
+
height: 25px;
|
|
225
|
+
width: 25px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&:hover {
|
|
229
|
+
svg {
|
|
230
|
+
fill: #337ab7;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
215
235
|
.yasqe_fullscreenButton {
|
|
216
236
|
display: inline-block;
|
|
217
237
|
border: none;
|
|
@@ -272,4 +292,110 @@
|
|
|
272
292
|
height: calc(100vh - 150px) !important;
|
|
273
293
|
}
|
|
274
294
|
}
|
|
295
|
+
|
|
296
|
+
.yasqe_snippetsBar {
|
|
297
|
+
position: relative;
|
|
298
|
+
display: flex;
|
|
299
|
+
flex-wrap: wrap;
|
|
300
|
+
gap: 5px;
|
|
301
|
+
padding: 5px 10px;
|
|
302
|
+
background-color: var(--yasgui-bg-primary, #fff);
|
|
303
|
+
border-bottom: 1px solid var(--yasgui-border-color, #e3e3e3);
|
|
304
|
+
order: -1; // Place before CodeMirror in flex layout
|
|
305
|
+
|
|
306
|
+
.yasqe_snippetButton {
|
|
307
|
+
padding: 4px 10px;
|
|
308
|
+
font-size: 12px;
|
|
309
|
+
border: 1px solid var(--yasgui-border-color, #ccc);
|
|
310
|
+
background-color: var(--yasgui-bg-primary, #fff);
|
|
311
|
+
border-radius: 3px;
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
white-space: nowrap;
|
|
314
|
+
color: var(--yasgui-text-primary, #333);
|
|
315
|
+
|
|
316
|
+
&:hover {
|
|
317
|
+
background-color: var(--yasgui-bg-secondary, #f0f0f0);
|
|
318
|
+
border-color: var(--yasgui-text-muted, #999);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
&:active {
|
|
322
|
+
background-color: var(--yasgui-bg-tertiary, #e0e0e0);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.yasqe_snippetDropdown {
|
|
327
|
+
position: relative;
|
|
328
|
+
display: inline-block;
|
|
329
|
+
|
|
330
|
+
.yasqe_snippetDropdownButton {
|
|
331
|
+
padding: 4px 10px;
|
|
332
|
+
font-size: 12px;
|
|
333
|
+
border: 1px solid var(--yasgui-border-color, #ccc);
|
|
334
|
+
background-color: var(--yasgui-bg-primary, #fff);
|
|
335
|
+
border-radius: 3px;
|
|
336
|
+
cursor: pointer;
|
|
337
|
+
white-space: nowrap;
|
|
338
|
+
color: var(--yasgui-text-primary, #333);
|
|
339
|
+
display: flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
gap: 4px;
|
|
342
|
+
|
|
343
|
+
.chevronIcon {
|
|
344
|
+
width: 16px;
|
|
345
|
+
height: 16px;
|
|
346
|
+
svg {
|
|
347
|
+
width: 16px;
|
|
348
|
+
height: 16px;
|
|
349
|
+
fill: var(--yasgui-text-secondary, #505050);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
&:hover {
|
|
354
|
+
background-color: var(--yasgui-bg-secondary, #f0f0f0);
|
|
355
|
+
border-color: var(--yasgui-text-muted, #999);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
&[aria-expanded="true"] {
|
|
359
|
+
background-color: var(--yasgui-bg-tertiary, #e0e0e0);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.yasqe_snippetDropdownContent {
|
|
364
|
+
display: none;
|
|
365
|
+
position: absolute;
|
|
366
|
+
top: 100%;
|
|
367
|
+
left: 0;
|
|
368
|
+
margin-top: 2px;
|
|
369
|
+
background-color: var(--yasgui-bg-primary, #fff);
|
|
370
|
+
border: 1px solid var(--yasgui-border-color, #ccc);
|
|
371
|
+
border-radius: 3px;
|
|
372
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
373
|
+
z-index: 100;
|
|
374
|
+
min-width: 150px;
|
|
375
|
+
max-height: 300px;
|
|
376
|
+
overflow-y: auto;
|
|
377
|
+
|
|
378
|
+
.yasqe_snippetDropdownItem {
|
|
379
|
+
display: block;
|
|
380
|
+
width: 100%;
|
|
381
|
+
padding: 6px 12px;
|
|
382
|
+
border: none;
|
|
383
|
+
background: none;
|
|
384
|
+
text-align: left;
|
|
385
|
+
cursor: pointer;
|
|
386
|
+
font-size: 12px;
|
|
387
|
+
color: var(--yasgui-text-primary, #333);
|
|
388
|
+
white-space: nowrap;
|
|
389
|
+
|
|
390
|
+
&:hover {
|
|
391
|
+
background-color: var(--yasgui-bg-secondary, #f0f0f0);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
&:active {
|
|
395
|
+
background-color: var(--yasgui-bg-tertiary, #e0e0e0);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
275
401
|
}
|
package/src/scss/yasqe.scss
CHANGED
|
@@ -49,6 +49,18 @@
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
.constructVariableWarning {
|
|
53
|
+
width: 13px;
|
|
54
|
+
height: 13px;
|
|
55
|
+
margin-top: 2px;
|
|
56
|
+
margin-left: 2px;
|
|
57
|
+
svg {
|
|
58
|
+
g {
|
|
59
|
+
fill: orange;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
52
64
|
.yasqe_tooltip {
|
|
53
65
|
background: #333;
|
|
54
66
|
background: rgba(0, 0, 0, 0.8);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare module "sparql-formatter" {
|
|
2
|
+
export interface SpfmtFormatter {
|
|
3
|
+
format: (sparql: string, formattingMode?: string, indentDepth?: number) => string;
|
|
4
|
+
parseSparql: (sparql: string) => unknown;
|
|
5
|
+
parseSparqlAsCompact: (sparql: string) => unknown;
|
|
6
|
+
formatAst: (ast: unknown, indentDepth?: number) => string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const spfmt: SpfmtFormatter;
|
|
10
|
+
}
|