vunor 0.1.2 → 0.1.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/README.md +6 -11
- package/dist/AppLayout.mjs +0 -0
- package/dist/AppToasts.mjs +4 -8
- package/dist/Button.mjs +5 -10
- package/dist/ButtonBase.mjs +4 -8
- package/dist/Calendar.mjs +10 -14
- package/dist/Card.mjs +4 -9
- package/dist/CardHeader.mjs +5 -10
- package/dist/CardInner.mjs +4 -9
- package/dist/Checkbox.mjs +4 -8
- package/dist/Combobox.d.mts +9 -9
- package/dist/Combobox.mjs +5 -9
- package/dist/DatePicker.d.mts +9 -9
- package/dist/DatePicker.mjs +12 -17
- package/dist/DatePickerBase.d.mts +9 -9
- package/dist/DatePickerBase.mjs +13 -17
- package/dist/DatePickerInner.mjs +5 -9
- package/dist/DatePickerPopup.mjs +4 -8
- package/dist/DelayedSwitch.mjs +4 -9
- package/dist/DevTools.mjs +583 -150
- package/dist/Dialog.d.mts +6 -6
- package/dist/Dialog.mjs +4 -8
- package/dist/Icon.mjs +4 -9
- package/dist/InnerLoading.mjs +4 -8
- package/dist/Input.d.mts +13 -13
- package/dist/Input.mjs +4 -8
- package/dist/InputBase.d.mts +9 -9
- package/dist/InputBase.mjs +4 -8
- package/dist/Label.mjs +1 -4
- package/dist/LoadingIndicator.mjs +4 -8
- package/dist/Menu.d.mts +2 -2
- package/dist/Menu.mjs +5 -14
- package/dist/MenuItem.mjs +4 -9
- package/dist/OverflowContainer.mjs +4 -8
- package/dist/Pagination.mjs +4 -9
- package/dist/Popover.mjs +4 -9
- package/dist/ProgressBar.mjs +4 -9
- package/dist/RadioGroup.mjs +4 -8
- package/dist/Select.d.mts +9 -9
- package/dist/Select.mjs +4 -9
- package/dist/SelectBase.mjs +4 -8
- package/dist/Slider.mjs +4 -8
- package/dist/Tabs.mjs +4 -9
- package/dist/nuxt.mjs +1 -3
- package/dist/theme.d.mts +35 -0
- package/dist/theme.mjs +289 -336
- package/dist/utils-6bTTIoaw.js +40 -0
- package/dist/utils.d.mts +2 -2
- package/dist/utils.mjs +1 -4
- package/dist/vite.mjs +1 -2
- package/dist/vunor.d.mts +13 -13
- package/dist/vunor.mjs +1 -6
- package/package.json +30 -37
- package/scripts/setup-skills.js +0 -78
- package/skills/vunor/SKILL.md +0 -115
- package/skills/vunor/components.md +0 -320
- package/skills/vunor/core.md +0 -173
- package/skills/vunor/forms.md +0 -348
- package/skills/vunor/palette.md +0 -223
- package/skills/vunor/rules.md +0 -263
- package/skills/vunor/shortcuts.md +0 -239
- package/skills/vunor/typography.md +0 -204
package/dist/DevTools.mjs
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onMounted, openBlock, reactive, ref, renderList, unref, useModel, vModelText, withCtx, withDirectives, withModifiers } from "vue";
|
|
1
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onMounted, openBlock, reactive, ref, renderList, toDisplayString, unref, useModel, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
3
2
|
import VuButton$1 from "vunor/Button";
|
|
4
3
|
import VuCard$1 from "vunor/Card";
|
|
5
|
-
import "vunor/
|
|
6
|
-
import VuInput$1 from "vunor/Input";
|
|
4
|
+
import VuCheckbox from "vunor/Checkbox";
|
|
7
5
|
import VuCardHeader$1 from "vunor/CardHeader";
|
|
8
6
|
import VuCardInner from "vunor/CardInner";
|
|
9
7
|
import VuSlider from "vunor/Slider";
|
|
10
8
|
import VuTabs from "vunor/Tabs";
|
|
11
9
|
import { color, palitra } from "@prostojs/palitra";
|
|
12
10
|
import defu from "defu";
|
|
13
|
-
|
|
14
11
|
//#region src/theme/palitra.ts
|
|
15
12
|
const defaultOpts = {
|
|
16
13
|
colors: {
|
|
@@ -62,6 +59,7 @@ const defaultOpts = {
|
|
|
62
59
|
lightest: .97,
|
|
63
60
|
darkest: .24,
|
|
64
61
|
layersDepth: .08,
|
|
62
|
+
flatness: 1,
|
|
65
63
|
mainPalette: {
|
|
66
64
|
preserveInputColor: false,
|
|
67
65
|
luminance: {
|
|
@@ -224,6 +222,7 @@ function generatePalette(_opts) {
|
|
|
224
222
|
const bgOptions = {
|
|
225
223
|
count: 5,
|
|
226
224
|
preserveInputColor: false,
|
|
225
|
+
flatness: opts.layerPalette.flatness ?? opts.flatness,
|
|
227
226
|
luminance: {
|
|
228
227
|
dark: opts.layerPalette.luminance?.dark ?? opts.darkest,
|
|
229
228
|
light: opts.layerPalette.luminance?.light ?? opts.darkest + opts.layersDepth,
|
|
@@ -247,8 +246,9 @@ function generatePalette(_opts) {
|
|
|
247
246
|
"light-3",
|
|
248
247
|
"light-4"
|
|
249
248
|
].toReversed();
|
|
249
|
+
const lumDark = bgOptions.luminance?.dark ?? opts.darkest;
|
|
250
250
|
bgOptions.luminance = {
|
|
251
|
-
dark: 1 - (bgOptions.luminance
|
|
251
|
+
dark: 1 - ((bgOptions.luminance?.light ?? opts.darkest + opts.layersDepth) - lumDark),
|
|
252
252
|
light: 1,
|
|
253
253
|
useMiddle: false
|
|
254
254
|
};
|
|
@@ -264,6 +264,7 @@ function generatePalette(_opts) {
|
|
|
264
264
|
}, {
|
|
265
265
|
count: 10,
|
|
266
266
|
preserveInputColor: opts.mainPalette.preserveInputColor,
|
|
267
|
+
flatness: opts.mainPalette.flatness ?? opts.flatness,
|
|
267
268
|
luminance: {
|
|
268
269
|
dark: opts.mainPalette.luminance?.dark ?? opts.darkest + opts.layersDepth + .02,
|
|
269
270
|
light: opts.mainPalette.luminance?.light ?? opts.lightest,
|
|
@@ -294,12 +295,32 @@ function multiplySaturation(colors, m = .5) {
|
|
|
294
295
|
}
|
|
295
296
|
return newObj;
|
|
296
297
|
}
|
|
297
|
-
|
|
298
298
|
//#endregion
|
|
299
299
|
//#region src/components/DevTools/DevTools.vue?vue&type=script&setup=true&lang.ts
|
|
300
300
|
const _hoisted_1 = { key: 0 };
|
|
301
|
-
const _hoisted_2 =
|
|
302
|
-
|
|
301
|
+
const _hoisted_2 = { class: "flex items-center gap-$xs mb-$xs" };
|
|
302
|
+
const _hoisted_3 = ["id", "onUpdate:modelValue"];
|
|
303
|
+
const _hoisted_4 = ["onUpdate:modelValue"];
|
|
304
|
+
const _hoisted_5 = { class: "w-6em truncate" };
|
|
305
|
+
const _hoisted_6 = {
|
|
306
|
+
key: 0,
|
|
307
|
+
class: "pl-$m grid grid-cols-2 gap-$xs"
|
|
308
|
+
};
|
|
309
|
+
const _hoisted_7 = {
|
|
310
|
+
key: 1,
|
|
311
|
+
class: "grid grid-cols-2 gap-$xs"
|
|
312
|
+
};
|
|
313
|
+
const _hoisted_8 = {
|
|
314
|
+
key: 2,
|
|
315
|
+
class: "grid grid-cols-2 gap-$xs"
|
|
316
|
+
};
|
|
317
|
+
const _hoisted_9 = {
|
|
318
|
+
key: 3,
|
|
319
|
+
class: "grid grid-cols-1 gap-$xs"
|
|
320
|
+
};
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region src/components/DevTools/DevTools.vue
|
|
323
|
+
var DevTools_default = /* @__PURE__ */ defineComponent({
|
|
303
324
|
__name: "DevTools",
|
|
304
325
|
props: /* @__PURE__ */ mergeModels({ defaultOpen: {
|
|
305
326
|
type: Boolean,
|
|
@@ -311,7 +332,7 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
311
332
|
emits: ["update:open"],
|
|
312
333
|
setup(__props) {
|
|
313
334
|
function colorToRgbWithOpacity(c) {
|
|
314
|
-
const [r, g, b
|
|
335
|
+
const [r, g, b] = color(c).rgba();
|
|
315
336
|
return `${r} ${g} ${b}`;
|
|
316
337
|
}
|
|
317
338
|
function debounce(func, wait) {
|
|
@@ -327,126 +348,217 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
327
348
|
const modelValue = useModel(__props, "open");
|
|
328
349
|
modelValue.value = !!props.defaultOpen;
|
|
329
350
|
const colors = ref([]);
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
const misc = ref(
|
|
333
|
-
darkest: .24,
|
|
334
|
-
lightest: .97,
|
|
335
|
-
layersDepth: .08
|
|
336
|
-
});
|
|
337
|
-
const mainSlider = ref([
|
|
338
|
-
0,
|
|
339
|
-
0,
|
|
340
|
-
0
|
|
341
|
-
]);
|
|
351
|
+
const main = ref(null);
|
|
352
|
+
const layer = ref(null);
|
|
353
|
+
const misc = ref(null);
|
|
342
354
|
function cleanup() {
|
|
343
355
|
const s = document.head.querySelector("style#vunor-palette-sandbox");
|
|
344
356
|
if (s) s.remove();
|
|
345
357
|
}
|
|
346
|
-
|
|
347
|
-
|
|
358
|
+
function buildOpts() {
|
|
359
|
+
if (!main.value || !layer.value || !misc.value) return {};
|
|
360
|
+
const m = main.value;
|
|
361
|
+
const l = layer.value;
|
|
362
|
+
const x = misc.value;
|
|
348
363
|
const opts = {
|
|
349
|
-
darkest:
|
|
350
|
-
lightest:
|
|
351
|
-
|
|
364
|
+
darkest: x.darkest[0],
|
|
365
|
+
lightest: x.lightest[0],
|
|
366
|
+
layersDepth: x.layersDepth[0],
|
|
367
|
+
flatness: x.flatness[0],
|
|
368
|
+
mainPalette: {
|
|
369
|
+
preserveInputColor: m.preserveInputColor[0],
|
|
370
|
+
flatness: m.flatness[0],
|
|
371
|
+
luminance: {
|
|
372
|
+
dark: m.lumDark[0],
|
|
373
|
+
light: m.lumLight[0],
|
|
374
|
+
middle: m.lumMiddle[0],
|
|
375
|
+
useMiddle: m.useMiddle[0]
|
|
376
|
+
},
|
|
377
|
+
saturate: {
|
|
378
|
+
dark: m.saturateDark[0],
|
|
379
|
+
light: m.saturateLight[0]
|
|
380
|
+
},
|
|
381
|
+
vivid: {
|
|
382
|
+
dark: m.vividDark[0],
|
|
383
|
+
light: m.vividLight[0]
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
layerPalette: {
|
|
387
|
+
desaturate: l.desaturate[0],
|
|
388
|
+
flatness: l.flatness[0],
|
|
389
|
+
luminance: {
|
|
390
|
+
dark: l.lumDark[0],
|
|
391
|
+
light: l.lumLight[0]
|
|
392
|
+
},
|
|
393
|
+
saturate: {
|
|
394
|
+
dark: l.saturateDark[0],
|
|
395
|
+
light: l.saturateLight[0]
|
|
396
|
+
},
|
|
397
|
+
vivid: {
|
|
398
|
+
dark: l.vividDark[0],
|
|
399
|
+
light: l.vividLight[0]
|
|
400
|
+
}
|
|
401
|
+
},
|
|
352
402
|
colors: {}
|
|
353
403
|
};
|
|
354
|
-
for (const c of colors.value) opts.colors[c.name] =
|
|
355
|
-
|
|
404
|
+
for (const c of colors.value) opts.colors[c.name] = {
|
|
405
|
+
color: c.color,
|
|
406
|
+
preserveInputColor: c.preserveInputColor[0],
|
|
407
|
+
saturate: {
|
|
408
|
+
dark: c.saturateDark[0],
|
|
409
|
+
light: c.saturateLight[0]
|
|
410
|
+
},
|
|
411
|
+
vivid: {
|
|
412
|
+
dark: c.vividDark[0],
|
|
413
|
+
light: c.vividLight[0]
|
|
414
|
+
},
|
|
415
|
+
flatness: c.flatness[0]
|
|
416
|
+
};
|
|
417
|
+
return opts;
|
|
418
|
+
}
|
|
419
|
+
const SUFFIXES = [
|
|
420
|
+
"50",
|
|
421
|
+
"100",
|
|
422
|
+
"200",
|
|
423
|
+
"300",
|
|
424
|
+
"400",
|
|
425
|
+
"500",
|
|
426
|
+
"600",
|
|
427
|
+
"700",
|
|
428
|
+
"800",
|
|
429
|
+
"900"
|
|
430
|
+
];
|
|
431
|
+
const LD = [
|
|
432
|
+
"light-0",
|
|
433
|
+
"light-1",
|
|
434
|
+
"light-2",
|
|
435
|
+
"light-3",
|
|
436
|
+
"light-4",
|
|
437
|
+
"dark-0",
|
|
438
|
+
"dark-1",
|
|
439
|
+
"dark-2",
|
|
440
|
+
"dark-3",
|
|
441
|
+
"dark-4"
|
|
442
|
+
];
|
|
443
|
+
const COLOR_NAMES = [
|
|
444
|
+
"primary",
|
|
445
|
+
"secondary",
|
|
446
|
+
"grey",
|
|
447
|
+
"neutral",
|
|
448
|
+
"good",
|
|
449
|
+
"warn",
|
|
450
|
+
"error"
|
|
451
|
+
];
|
|
452
|
+
const apply = debounce(() => {
|
|
453
|
+
cleanup();
|
|
454
|
+
const { colors: result } = generatePalette(buildOpts());
|
|
356
455
|
const newS = document.createElement("style");
|
|
357
456
|
newS.id = "vunor-palette-sandbox";
|
|
358
|
-
const
|
|
359
|
-
"50",
|
|
360
|
-
"100",
|
|
361
|
-
"200",
|
|
362
|
-
"300",
|
|
363
|
-
"400",
|
|
364
|
-
"500",
|
|
365
|
-
"600",
|
|
366
|
-
"700",
|
|
367
|
-
"800",
|
|
368
|
-
"900"
|
|
369
|
-
];
|
|
370
|
-
const ld = [
|
|
371
|
-
"light-0",
|
|
372
|
-
"light-1",
|
|
373
|
-
"light-2",
|
|
374
|
-
"light-3",
|
|
375
|
-
"light-4",
|
|
376
|
-
"dark-0",
|
|
377
|
-
"dark-1",
|
|
378
|
-
"dark-2",
|
|
379
|
-
"dark-3",
|
|
380
|
-
"dark-4"
|
|
381
|
-
];
|
|
382
|
-
for (const c of [
|
|
383
|
-
"primary",
|
|
384
|
-
"secondary",
|
|
385
|
-
"grey",
|
|
386
|
-
"neutral",
|
|
387
|
-
"good",
|
|
388
|
-
"warn",
|
|
389
|
-
"error"
|
|
390
|
-
]) {
|
|
391
|
-
newS.textContent += `.scope-${c} {\n`;
|
|
457
|
+
for (const c of COLOR_NAMES) {
|
|
392
458
|
const col = result[c];
|
|
393
|
-
|
|
459
|
+
if (!col) continue;
|
|
460
|
+
newS.textContent += `.scope-${c} {\n`;
|
|
461
|
+
for (const s of SUFFIXES) {
|
|
462
|
+
const v = result[`${c}-${s}`];
|
|
463
|
+
newS.textContent += `--scope-color-${s}: ${v ? colorToRgbWithOpacity(v) : ""};\n`;
|
|
464
|
+
}
|
|
394
465
|
newS.textContent += `--scope-color: ${colorToRgbWithOpacity(col)};\n`;
|
|
395
|
-
|
|
396
|
-
|
|
466
|
+
const v500 = result[`${c}-500`];
|
|
467
|
+
newS.textContent += `--current-hl: ${v500 ? colorToRgbWithOpacity(v500) : ""};\n`;
|
|
468
|
+
for (const s of LD) {
|
|
469
|
+
const v = result[`${c}-${s}`];
|
|
470
|
+
newS.textContent += `--scope-${s}: ${v ? colorToRgbWithOpacity(v) : ""};\n`;
|
|
471
|
+
}
|
|
397
472
|
newS.textContent += "}\n";
|
|
398
|
-
for (const s of
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
newS.textContent += `.
|
|
403
|
-
newS.textContent += `.
|
|
404
|
-
newS.textContent += `.current-
|
|
405
|
-
newS.textContent += `.current-
|
|
473
|
+
for (const s of SUFFIXES) {
|
|
474
|
+
const v = result[`${c}-${s}`];
|
|
475
|
+
if (!v) continue;
|
|
476
|
+
const rgb = colorToRgbWithOpacity(v);
|
|
477
|
+
newS.textContent += `.text-${c}-${s}{color:rgb(${rgb} / var(--un-text-opacity))}\n`;
|
|
478
|
+
newS.textContent += `.bg-${c}-${s}{background-color:rgb(${rgb} / var(--un-bg-opacity))}\n`;
|
|
479
|
+
newS.textContent += `.current-outline-${c}-${s}{--current-outline:${rgb};}\n`;
|
|
480
|
+
newS.textContent += `.current-text-${c}-${s}{--current-text:${rgb};}\n`;
|
|
481
|
+
newS.textContent += `.current-bg-${c}-${s}{--current-bg:${rgb};}\n`;
|
|
482
|
+
newS.textContent += `.current-border-${c}-${s}{--current-border:${rgb};}\n`;
|
|
483
|
+
newS.textContent += `.current-icon-${c}-${s}{--current-icon:${rgb};}\n`;
|
|
406
484
|
}
|
|
407
485
|
}
|
|
408
486
|
document.head.append(newS);
|
|
409
487
|
}, 100);
|
|
488
|
+
function buildMisc(p) {
|
|
489
|
+
return {
|
|
490
|
+
darkest: [p.darkest],
|
|
491
|
+
lightest: [p.lightest],
|
|
492
|
+
layersDepth: [p.layersDepth],
|
|
493
|
+
flatness: [p.flatness ?? 1]
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function buildMain(p) {
|
|
497
|
+
const m = p.mainPalette;
|
|
498
|
+
return {
|
|
499
|
+
preserveInputColor: [m.preserveInputColor ?? false],
|
|
500
|
+
flatness: [m.flatness ?? p.flatness ?? 1],
|
|
501
|
+
lumDark: [m.luminance?.dark ?? p.darkest + p.layersDepth + .02],
|
|
502
|
+
lumLight: [m.luminance?.light ?? p.lightest],
|
|
503
|
+
lumMiddle: [m.luminance?.middle ?? .62],
|
|
504
|
+
useMiddle: [m.luminance?.useMiddle ?? true],
|
|
505
|
+
saturateDark: [m.saturate?.dark ?? -.25],
|
|
506
|
+
saturateLight: [m.saturate?.light ?? -.25],
|
|
507
|
+
vividDark: [m.vivid?.dark ?? .1],
|
|
508
|
+
vividLight: [m.vivid?.light ?? .2]
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
function buildLayer(p) {
|
|
512
|
+
const l = p.layerPalette;
|
|
513
|
+
return {
|
|
514
|
+
desaturate: [l.desaturate ?? .2],
|
|
515
|
+
flatness: [l.flatness ?? p.flatness ?? 1],
|
|
516
|
+
lumDark: [l.luminance?.dark ?? p.darkest],
|
|
517
|
+
lumLight: [l.luminance?.light ?? p.darkest + p.layersDepth],
|
|
518
|
+
saturateDark: [l.saturate?.dark ?? -.2],
|
|
519
|
+
saturateLight: [l.saturate?.light ?? -.2],
|
|
520
|
+
vividDark: [l.vivid?.dark ?? 0],
|
|
521
|
+
vividLight: [l.vivid?.light ?? 0]
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
function buildColor(name, val, p) {
|
|
525
|
+
const m = p.mainPalette;
|
|
526
|
+
return {
|
|
527
|
+
name,
|
|
528
|
+
color: val.color ?? "#000000",
|
|
529
|
+
preserveInputColor: [val.preserveInputColor ?? m.preserveInputColor ?? false],
|
|
530
|
+
saturateDark: [val.saturate?.dark ?? m.saturate?.dark ?? -.25],
|
|
531
|
+
saturateLight: [val.saturate?.light ?? m.saturate?.light ?? -.25],
|
|
532
|
+
vividDark: [val.vivid?.dark ?? m.vivid?.dark ?? .1],
|
|
533
|
+
vividLight: [val.vivid?.light ?? m.vivid?.light ?? .2],
|
|
534
|
+
flatness: [val.flatness ?? m.flatness ?? p.flatness ?? 1]
|
|
535
|
+
};
|
|
536
|
+
}
|
|
410
537
|
function reset() {
|
|
411
|
-
if (document?.head)
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
darkest: paletteOpts.darkest,
|
|
423
|
-
lightest: paletteOpts.lightest,
|
|
424
|
-
layersDepth: paletteOpts.layersDepth
|
|
425
|
-
};
|
|
426
|
-
mainSlider.value = [
|
|
427
|
-
misc.value.darkest,
|
|
428
|
-
mainPalette.value.luminance.middle,
|
|
429
|
-
misc.value.lightest
|
|
430
|
-
];
|
|
431
|
-
for (const [name, val] of Object.entries(paletteOpts.colors)) colors.value.push({
|
|
432
|
-
color: val.color,
|
|
433
|
-
preserveInputColor: val.preserveInputColor === paletteOpts.mainPalette.preserveInputColor ? val.preserveInputColor : void 0,
|
|
434
|
-
saturate: {
|
|
435
|
-
dark: val.saturate?.dark === paletteOpts.mainPalette.saturate?.dark ? val.saturate?.dark : void 0,
|
|
436
|
-
light: val.saturate?.light === paletteOpts.mainPalette.saturate?.light ? val.saturate?.light : void 0
|
|
437
|
-
},
|
|
438
|
-
vivid: {
|
|
439
|
-
dark: val.vivid?.dark === paletteOpts.mainPalette.vivid?.dark ? val.vivid?.dark : void 0,
|
|
440
|
-
light: val.vivid?.light === paletteOpts.mainPalette.vivid?.light ? val.vivid?.light : void 0
|
|
441
|
-
},
|
|
442
|
-
name
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
}
|
|
538
|
+
if (!document?.head) return;
|
|
539
|
+
cleanup();
|
|
540
|
+
const s = document.head.querySelector("style[data-vite-dev-id=\"\\/__uno.css\"]")?.textContent;
|
|
541
|
+
if (!s) return;
|
|
542
|
+
const base64 = /__vunor_palette_options\s\{background-image:\surl\("data:image\/gif;base64,([^"]+)/.exec(s)?.[1];
|
|
543
|
+
if (!base64) return;
|
|
544
|
+
const paletteOpts = JSON.parse(atob(base64));
|
|
545
|
+
misc.value = buildMisc(paletteOpts);
|
|
546
|
+
main.value = buildMain(paletteOpts);
|
|
547
|
+
layer.value = buildLayer(paletteOpts);
|
|
548
|
+
colors.value = Object.entries(paletteOpts.colors).map(([name, val]) => buildColor(name, val, paletteOpts));
|
|
447
549
|
}
|
|
448
550
|
onMounted(reset);
|
|
551
|
+
watch(misc, (m) => {
|
|
552
|
+
if (!m || !main.value || !layer.value) return;
|
|
553
|
+
main.value.lumDark = [m.darkest[0] + m.layersDepth[0] + .02];
|
|
554
|
+
main.value.lumLight = [m.lightest[0]];
|
|
555
|
+
main.value.flatness = [m.flatness[0]];
|
|
556
|
+
layer.value.lumDark = [m.darkest[0]];
|
|
557
|
+
layer.value.lumLight = [m.darkest[0] + m.layersDepth[0]];
|
|
558
|
+
layer.value.flatness = [m.flatness[0]];
|
|
559
|
+
}, { deep: true });
|
|
449
560
|
const tab = ref("colors");
|
|
561
|
+
const expandedColor = ref(null);
|
|
450
562
|
const down = ref(false);
|
|
451
563
|
const offset = reactive({
|
|
452
564
|
x: 12,
|
|
@@ -482,12 +594,15 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
482
594
|
offset.x = prevPos.x + event.screenX - grabbedAt.x;
|
|
483
595
|
offset.y = prevPos.y + event.screenY - grabbedAt.y;
|
|
484
596
|
}
|
|
597
|
+
function fmt(v) {
|
|
598
|
+
return v === void 0 ? "" : Number(v).toFixed(2);
|
|
599
|
+
}
|
|
485
600
|
return (_ctx, _cache) => {
|
|
486
601
|
return colors.value?.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
487
602
|
key: 0,
|
|
488
603
|
style: normalizeStyle({ transform: `translate(${offset.x}px, ${offset.y}px)` }),
|
|
489
604
|
class: normalizeClass(["fingertip-[2em] fixed left-0 top-0 max-w-screen max-h-screen text-11px", {
|
|
490
|
-
"w-[
|
|
605
|
+
"w-[34em] h-[44em]": modelValue.value,
|
|
491
606
|
"w-[3em] h-[3em]": !modelValue.value
|
|
492
607
|
}])
|
|
493
608
|
}, [
|
|
@@ -495,7 +610,7 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
495
610
|
"no-padding": "",
|
|
496
611
|
rounded: "",
|
|
497
612
|
level: "h6",
|
|
498
|
-
class: normalizeClass(["layer-0 transition-all-200 w-[
|
|
613
|
+
class: normalizeClass(["layer-0 transition-all-200 w-[34em] h-[44em] border border-grey-500/50 overflow-clip flex flex-col transform-origin-tl", {
|
|
499
614
|
"scale-100 shadow-md opacity-50 hover:opacity-100": modelValue.value,
|
|
500
615
|
"scale-20 opacity-0 pointer-events-none": !modelValue.value
|
|
501
616
|
}])
|
|
@@ -509,7 +624,7 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
509
624
|
}, "layer-2 flex justify-between items-center fingertip-[1em] select-none"])
|
|
510
625
|
}, {
|
|
511
626
|
default: withCtx(() => [createVNode(unref(VuCardHeader$1), { class: "text-mb-0 text-mt-0" }, {
|
|
512
|
-
default: withCtx(() => [..._cache[
|
|
627
|
+
default: withCtx(() => [..._cache[27] || (_cache[27] = [createTextVNode("Vunor Palette Sandbox", -1)])]),
|
|
513
628
|
_: 1
|
|
514
629
|
}), createVNode(unref(VuButton$1), {
|
|
515
630
|
icon: "i--clear",
|
|
@@ -527,15 +642,19 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
527
642
|
tabs: [
|
|
528
643
|
{
|
|
529
644
|
value: "colors",
|
|
530
|
-
label: "Colors
|
|
645
|
+
label: "Colors"
|
|
531
646
|
},
|
|
532
647
|
{
|
|
533
648
|
value: "main",
|
|
534
|
-
label: "Main
|
|
649
|
+
label: "Main"
|
|
535
650
|
},
|
|
536
651
|
{
|
|
537
652
|
value: "layers",
|
|
538
|
-
label: "Layers
|
|
653
|
+
label: "Layers"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
value: "misc",
|
|
657
|
+
label: "Misc"
|
|
539
658
|
}
|
|
540
659
|
]
|
|
541
660
|
}, null, 8, ["modelValue"])]),
|
|
@@ -543,38 +662,357 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
543
662
|
}),
|
|
544
663
|
createVNode(unref(VuCardInner), { class: "layer-0 flex-grow overflow-auto pt-$l" }, {
|
|
545
664
|
default: withCtx(() => [
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
tab.value === "colors" ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(VuSlider, {
|
|
549
|
-
label: "Darkest | Middle | Brightest",
|
|
550
|
-
min: 0,
|
|
551
|
-
max: 1,
|
|
552
|
-
step: .01,
|
|
553
|
-
thumbs: 3,
|
|
554
|
-
modelValue: mainSlider.value,
|
|
555
|
-
"onUpdate:modelValue": [_cache[3] || (_cache[3] = ($event) => mainSlider.value = $event), unref(apply)],
|
|
556
|
-
class: "mb-$l"
|
|
557
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]), (openBlock(true), createElementBlock(Fragment, null, renderList(colors.value, (c) => {
|
|
665
|
+
createCommentVNode(" COLORS TAB "),
|
|
666
|
+
tab.value === "colors" ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(colors.value, (c) => {
|
|
558
667
|
return openBlock(), createElementBlock("div", {
|
|
559
668
|
key: c.name,
|
|
560
|
-
class: "
|
|
561
|
-
}, [
|
|
562
|
-
|
|
563
|
-
"onUpdate:modelValue": [($event) => c.color = $event, unref(apply)],
|
|
564
|
-
"stack-label": "",
|
|
565
|
-
design: "filled",
|
|
566
|
-
class: "w-12em"
|
|
567
|
-
}, {
|
|
568
|
-
before: withCtx(() => [withDirectives(createElementVNode("input", {
|
|
669
|
+
class: "border-b border-grey-500/30 pb-$xs mb-$xs"
|
|
670
|
+
}, [createElementVNode("div", _hoisted_2, [
|
|
671
|
+
withDirectives(createElementVNode("input", {
|
|
569
672
|
type: "color",
|
|
570
673
|
id: `vunor-color-${c.name}`,
|
|
571
674
|
"onUpdate:modelValue": ($event) => c.color = $event,
|
|
572
|
-
class: "p-0 size-[2em] bg-transparent",
|
|
573
|
-
onInput: _cache[
|
|
574
|
-
}, null, 40,
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
675
|
+
class: "p-0 size-[2em] bg-transparent border-0",
|
|
676
|
+
onInput: _cache[3] || (_cache[3] = (...args) => unref(apply) && unref(apply)(...args))
|
|
677
|
+
}, null, 40, _hoisted_3), [[vModelText, c.color]]),
|
|
678
|
+
withDirectives(createElementVNode("input", {
|
|
679
|
+
"onUpdate:modelValue": ($event) => c.color = $event,
|
|
680
|
+
onInput: _cache[4] || (_cache[4] = (...args) => unref(apply) && unref(apply)(...args)),
|
|
681
|
+
class: "flex-grow bg-transparent border border-grey-500/30 px-$xs py-1 rounded text-mono"
|
|
682
|
+
}, null, 40, _hoisted_4), [[vModelText, c.color]]),
|
|
683
|
+
createElementVNode("strong", _hoisted_5, toDisplayString(c.name), 1),
|
|
684
|
+
createVNode(unref(VuButton$1), {
|
|
685
|
+
icon: expandedColor.value === c.name ? "i--chevron-up" : "i--chevron-down",
|
|
686
|
+
class: "c8-flat btn-square rounded",
|
|
687
|
+
onClick: ($event) => expandedColor.value = expandedColor.value === c.name ? null : c.name
|
|
688
|
+
}, null, 8, ["icon", "onClick"])
|
|
689
|
+
]), expandedColor.value === c.name ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
690
|
+
createVNode(VuSlider, {
|
|
691
|
+
label: `saturate.dark ${fmt(c.saturateDark[0])}`,
|
|
692
|
+
min: -1,
|
|
693
|
+
max: 1,
|
|
694
|
+
step: .05,
|
|
695
|
+
modelValue: c.saturateDark,
|
|
696
|
+
"onUpdate:modelValue": [($event) => c.saturateDark = $event, unref(apply)]
|
|
697
|
+
}, null, 8, [
|
|
698
|
+
"label",
|
|
699
|
+
"modelValue",
|
|
700
|
+
"onUpdate:modelValue"
|
|
701
|
+
]),
|
|
702
|
+
createVNode(VuSlider, {
|
|
703
|
+
label: `saturate.light ${fmt(c.saturateLight[0])}`,
|
|
704
|
+
min: -1,
|
|
705
|
+
max: 1,
|
|
706
|
+
step: .05,
|
|
707
|
+
modelValue: c.saturateLight,
|
|
708
|
+
"onUpdate:modelValue": [($event) => c.saturateLight = $event, unref(apply)]
|
|
709
|
+
}, null, 8, [
|
|
710
|
+
"label",
|
|
711
|
+
"modelValue",
|
|
712
|
+
"onUpdate:modelValue"
|
|
713
|
+
]),
|
|
714
|
+
createVNode(VuSlider, {
|
|
715
|
+
label: `vivid.dark ${fmt(c.vividDark[0])}`,
|
|
716
|
+
min: 0,
|
|
717
|
+
max: 1,
|
|
718
|
+
step: .05,
|
|
719
|
+
modelValue: c.vividDark,
|
|
720
|
+
"onUpdate:modelValue": [($event) => c.vividDark = $event, unref(apply)]
|
|
721
|
+
}, null, 8, [
|
|
722
|
+
"label",
|
|
723
|
+
"modelValue",
|
|
724
|
+
"onUpdate:modelValue"
|
|
725
|
+
]),
|
|
726
|
+
createVNode(VuSlider, {
|
|
727
|
+
label: `vivid.light ${fmt(c.vividLight[0])}`,
|
|
728
|
+
min: 0,
|
|
729
|
+
max: 1,
|
|
730
|
+
step: .05,
|
|
731
|
+
modelValue: c.vividLight,
|
|
732
|
+
"onUpdate:modelValue": [($event) => c.vividLight = $event, unref(apply)]
|
|
733
|
+
}, null, 8, [
|
|
734
|
+
"label",
|
|
735
|
+
"modelValue",
|
|
736
|
+
"onUpdate:modelValue"
|
|
737
|
+
]),
|
|
738
|
+
createVNode(VuSlider, {
|
|
739
|
+
label: `flatness ${fmt(c.flatness[0])}`,
|
|
740
|
+
min: 0,
|
|
741
|
+
max: 1,
|
|
742
|
+
step: .01,
|
|
743
|
+
modelValue: c.flatness,
|
|
744
|
+
"onUpdate:modelValue": [($event) => c.flatness = $event, unref(apply)]
|
|
745
|
+
}, null, 8, [
|
|
746
|
+
"label",
|
|
747
|
+
"modelValue",
|
|
748
|
+
"onUpdate:modelValue"
|
|
749
|
+
]),
|
|
750
|
+
createVNode(VuCheckbox, {
|
|
751
|
+
modelValue: c.preserveInputColor[0],
|
|
752
|
+
"onUpdate:modelValue": [($event) => c.preserveInputColor[0] = $event, unref(apply)],
|
|
753
|
+
label: "preserveInputColor"
|
|
754
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
755
|
+
])) : createCommentVNode("v-if", true)]);
|
|
756
|
+
}), 128))])) : createCommentVNode("v-if", true),
|
|
757
|
+
createCommentVNode(" MAIN PALETTE TAB "),
|
|
758
|
+
tab.value === "main" && main.value ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
759
|
+
createVNode(VuSlider, {
|
|
760
|
+
label: `luminance.dark ${fmt(main.value.lumDark[0])}`,
|
|
761
|
+
min: 0,
|
|
762
|
+
max: 1,
|
|
763
|
+
step: .01,
|
|
764
|
+
modelValue: main.value.lumDark,
|
|
765
|
+
"onUpdate:modelValue": [_cache[5] || (_cache[5] = ($event) => main.value.lumDark = $event), unref(apply)]
|
|
766
|
+
}, null, 8, [
|
|
767
|
+
"label",
|
|
768
|
+
"modelValue",
|
|
769
|
+
"onUpdate:modelValue"
|
|
770
|
+
]),
|
|
771
|
+
createVNode(VuSlider, {
|
|
772
|
+
label: `luminance.light ${fmt(main.value.lumLight[0])}`,
|
|
773
|
+
min: 0,
|
|
774
|
+
max: 1,
|
|
775
|
+
step: .01,
|
|
776
|
+
modelValue: main.value.lumLight,
|
|
777
|
+
"onUpdate:modelValue": [_cache[6] || (_cache[6] = ($event) => main.value.lumLight = $event), unref(apply)]
|
|
778
|
+
}, null, 8, [
|
|
779
|
+
"label",
|
|
780
|
+
"modelValue",
|
|
781
|
+
"onUpdate:modelValue"
|
|
782
|
+
]),
|
|
783
|
+
createVNode(VuSlider, {
|
|
784
|
+
label: `luminance.middle ${fmt(main.value.lumMiddle[0])}`,
|
|
785
|
+
min: 0,
|
|
786
|
+
max: 1,
|
|
787
|
+
step: .01,
|
|
788
|
+
modelValue: main.value.lumMiddle,
|
|
789
|
+
"onUpdate:modelValue": [_cache[7] || (_cache[7] = ($event) => main.value.lumMiddle = $event), unref(apply)]
|
|
790
|
+
}, null, 8, [
|
|
791
|
+
"label",
|
|
792
|
+
"modelValue",
|
|
793
|
+
"onUpdate:modelValue"
|
|
794
|
+
]),
|
|
795
|
+
createVNode(VuCheckbox, {
|
|
796
|
+
modelValue: main.value.useMiddle[0],
|
|
797
|
+
"onUpdate:modelValue": [_cache[8] || (_cache[8] = ($event) => main.value.useMiddle[0] = $event), unref(apply)],
|
|
798
|
+
label: "luminance.useMiddle"
|
|
799
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
800
|
+
createVNode(VuSlider, {
|
|
801
|
+
label: `saturate.dark ${fmt(main.value.saturateDark[0])}`,
|
|
802
|
+
min: -1,
|
|
803
|
+
max: 1,
|
|
804
|
+
step: .05,
|
|
805
|
+
modelValue: main.value.saturateDark,
|
|
806
|
+
"onUpdate:modelValue": [_cache[9] || (_cache[9] = ($event) => main.value.saturateDark = $event), unref(apply)]
|
|
807
|
+
}, null, 8, [
|
|
808
|
+
"label",
|
|
809
|
+
"modelValue",
|
|
810
|
+
"onUpdate:modelValue"
|
|
811
|
+
]),
|
|
812
|
+
createVNode(VuSlider, {
|
|
813
|
+
label: `saturate.light ${fmt(main.value.saturateLight[0])}`,
|
|
814
|
+
min: -1,
|
|
815
|
+
max: 1,
|
|
816
|
+
step: .05,
|
|
817
|
+
modelValue: main.value.saturateLight,
|
|
818
|
+
"onUpdate:modelValue": [_cache[10] || (_cache[10] = ($event) => main.value.saturateLight = $event), unref(apply)]
|
|
819
|
+
}, null, 8, [
|
|
820
|
+
"label",
|
|
821
|
+
"modelValue",
|
|
822
|
+
"onUpdate:modelValue"
|
|
823
|
+
]),
|
|
824
|
+
createVNode(VuSlider, {
|
|
825
|
+
label: `vivid.dark ${fmt(main.value.vividDark[0])}`,
|
|
826
|
+
min: 0,
|
|
827
|
+
max: 1,
|
|
828
|
+
step: .05,
|
|
829
|
+
modelValue: main.value.vividDark,
|
|
830
|
+
"onUpdate:modelValue": [_cache[11] || (_cache[11] = ($event) => main.value.vividDark = $event), unref(apply)]
|
|
831
|
+
}, null, 8, [
|
|
832
|
+
"label",
|
|
833
|
+
"modelValue",
|
|
834
|
+
"onUpdate:modelValue"
|
|
835
|
+
]),
|
|
836
|
+
createVNode(VuSlider, {
|
|
837
|
+
label: `vivid.light ${fmt(main.value.vividLight[0])}`,
|
|
838
|
+
min: 0,
|
|
839
|
+
max: 1,
|
|
840
|
+
step: .05,
|
|
841
|
+
modelValue: main.value.vividLight,
|
|
842
|
+
"onUpdate:modelValue": [_cache[12] || (_cache[12] = ($event) => main.value.vividLight = $event), unref(apply)]
|
|
843
|
+
}, null, 8, [
|
|
844
|
+
"label",
|
|
845
|
+
"modelValue",
|
|
846
|
+
"onUpdate:modelValue"
|
|
847
|
+
]),
|
|
848
|
+
createVNode(VuSlider, {
|
|
849
|
+
label: `flatness ${fmt(main.value.flatness[0])}`,
|
|
850
|
+
min: 0,
|
|
851
|
+
max: 1,
|
|
852
|
+
step: .01,
|
|
853
|
+
modelValue: main.value.flatness,
|
|
854
|
+
"onUpdate:modelValue": [_cache[13] || (_cache[13] = ($event) => main.value.flatness = $event), unref(apply)]
|
|
855
|
+
}, null, 8, [
|
|
856
|
+
"label",
|
|
857
|
+
"modelValue",
|
|
858
|
+
"onUpdate:modelValue"
|
|
859
|
+
]),
|
|
860
|
+
createVNode(VuCheckbox, {
|
|
861
|
+
modelValue: main.value.preserveInputColor[0],
|
|
862
|
+
"onUpdate:modelValue": [_cache[14] || (_cache[14] = ($event) => main.value.preserveInputColor[0] = $event), unref(apply)],
|
|
863
|
+
label: "preserveInputColor"
|
|
864
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
865
|
+
])) : createCommentVNode("v-if", true),
|
|
866
|
+
createCommentVNode(" LAYERS PALETTE TAB "),
|
|
867
|
+
tab.value === "layers" && layer.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
868
|
+
createVNode(VuSlider, {
|
|
869
|
+
label: `desaturate ${fmt(layer.value.desaturate[0])}`,
|
|
870
|
+
min: 0,
|
|
871
|
+
max: 1,
|
|
872
|
+
step: .05,
|
|
873
|
+
modelValue: layer.value.desaturate,
|
|
874
|
+
"onUpdate:modelValue": [_cache[15] || (_cache[15] = ($event) => layer.value.desaturate = $event), unref(apply)]
|
|
875
|
+
}, null, 8, [
|
|
876
|
+
"label",
|
|
877
|
+
"modelValue",
|
|
878
|
+
"onUpdate:modelValue"
|
|
879
|
+
]),
|
|
880
|
+
createVNode(VuSlider, {
|
|
881
|
+
label: `flatness ${fmt(layer.value.flatness[0])}`,
|
|
882
|
+
min: 0,
|
|
883
|
+
max: 1,
|
|
884
|
+
step: .01,
|
|
885
|
+
modelValue: layer.value.flatness,
|
|
886
|
+
"onUpdate:modelValue": [_cache[16] || (_cache[16] = ($event) => layer.value.flatness = $event), unref(apply)]
|
|
887
|
+
}, null, 8, [
|
|
888
|
+
"label",
|
|
889
|
+
"modelValue",
|
|
890
|
+
"onUpdate:modelValue"
|
|
891
|
+
]),
|
|
892
|
+
createVNode(VuSlider, {
|
|
893
|
+
label: `luminance.dark ${fmt(layer.value.lumDark[0])}`,
|
|
894
|
+
min: 0,
|
|
895
|
+
max: 1,
|
|
896
|
+
step: .01,
|
|
897
|
+
modelValue: layer.value.lumDark,
|
|
898
|
+
"onUpdate:modelValue": [_cache[17] || (_cache[17] = ($event) => layer.value.lumDark = $event), unref(apply)]
|
|
899
|
+
}, null, 8, [
|
|
900
|
+
"label",
|
|
901
|
+
"modelValue",
|
|
902
|
+
"onUpdate:modelValue"
|
|
903
|
+
]),
|
|
904
|
+
createVNode(VuSlider, {
|
|
905
|
+
label: `luminance.light ${fmt(layer.value.lumLight[0])}`,
|
|
906
|
+
min: 0,
|
|
907
|
+
max: 1,
|
|
908
|
+
step: .01,
|
|
909
|
+
modelValue: layer.value.lumLight,
|
|
910
|
+
"onUpdate:modelValue": [_cache[18] || (_cache[18] = ($event) => layer.value.lumLight = $event), unref(apply)]
|
|
911
|
+
}, null, 8, [
|
|
912
|
+
"label",
|
|
913
|
+
"modelValue",
|
|
914
|
+
"onUpdate:modelValue"
|
|
915
|
+
]),
|
|
916
|
+
createVNode(VuSlider, {
|
|
917
|
+
label: `saturate.dark ${fmt(layer.value.saturateDark[0])}`,
|
|
918
|
+
min: -1,
|
|
919
|
+
max: 1,
|
|
920
|
+
step: .05,
|
|
921
|
+
modelValue: layer.value.saturateDark,
|
|
922
|
+
"onUpdate:modelValue": [_cache[19] || (_cache[19] = ($event) => layer.value.saturateDark = $event), unref(apply)]
|
|
923
|
+
}, null, 8, [
|
|
924
|
+
"label",
|
|
925
|
+
"modelValue",
|
|
926
|
+
"onUpdate:modelValue"
|
|
927
|
+
]),
|
|
928
|
+
createVNode(VuSlider, {
|
|
929
|
+
label: `saturate.light ${fmt(layer.value.saturateLight[0])}`,
|
|
930
|
+
min: -1,
|
|
931
|
+
max: 1,
|
|
932
|
+
step: .05,
|
|
933
|
+
modelValue: layer.value.saturateLight,
|
|
934
|
+
"onUpdate:modelValue": [_cache[20] || (_cache[20] = ($event) => layer.value.saturateLight = $event), unref(apply)]
|
|
935
|
+
}, null, 8, [
|
|
936
|
+
"label",
|
|
937
|
+
"modelValue",
|
|
938
|
+
"onUpdate:modelValue"
|
|
939
|
+
]),
|
|
940
|
+
createVNode(VuSlider, {
|
|
941
|
+
label: `vivid.dark ${fmt(layer.value.vividDark[0])}`,
|
|
942
|
+
min: 0,
|
|
943
|
+
max: 1,
|
|
944
|
+
step: .05,
|
|
945
|
+
modelValue: layer.value.vividDark,
|
|
946
|
+
"onUpdate:modelValue": [_cache[21] || (_cache[21] = ($event) => layer.value.vividDark = $event), unref(apply)]
|
|
947
|
+
}, null, 8, [
|
|
948
|
+
"label",
|
|
949
|
+
"modelValue",
|
|
950
|
+
"onUpdate:modelValue"
|
|
951
|
+
]),
|
|
952
|
+
createVNode(VuSlider, {
|
|
953
|
+
label: `vivid.light ${fmt(layer.value.vividLight[0])}`,
|
|
954
|
+
min: 0,
|
|
955
|
+
max: 1,
|
|
956
|
+
step: .05,
|
|
957
|
+
modelValue: layer.value.vividLight,
|
|
958
|
+
"onUpdate:modelValue": [_cache[22] || (_cache[22] = ($event) => layer.value.vividLight = $event), unref(apply)]
|
|
959
|
+
}, null, 8, [
|
|
960
|
+
"label",
|
|
961
|
+
"modelValue",
|
|
962
|
+
"onUpdate:modelValue"
|
|
963
|
+
])
|
|
964
|
+
])) : createCommentVNode("v-if", true),
|
|
965
|
+
createCommentVNode(" MISC TAB "),
|
|
966
|
+
tab.value === "misc" && misc.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
967
|
+
createVNode(VuSlider, {
|
|
968
|
+
label: `darkest ${fmt(misc.value.darkest[0])}`,
|
|
969
|
+
min: 0,
|
|
970
|
+
max: 1,
|
|
971
|
+
step: .01,
|
|
972
|
+
modelValue: misc.value.darkest,
|
|
973
|
+
"onUpdate:modelValue": [_cache[23] || (_cache[23] = ($event) => misc.value.darkest = $event), unref(apply)]
|
|
974
|
+
}, null, 8, [
|
|
975
|
+
"label",
|
|
976
|
+
"modelValue",
|
|
977
|
+
"onUpdate:modelValue"
|
|
978
|
+
]),
|
|
979
|
+
createVNode(VuSlider, {
|
|
980
|
+
label: `lightest ${fmt(misc.value.lightest[0])}`,
|
|
981
|
+
min: 0,
|
|
982
|
+
max: 1,
|
|
983
|
+
step: .01,
|
|
984
|
+
modelValue: misc.value.lightest,
|
|
985
|
+
"onUpdate:modelValue": [_cache[24] || (_cache[24] = ($event) => misc.value.lightest = $event), unref(apply)]
|
|
986
|
+
}, null, 8, [
|
|
987
|
+
"label",
|
|
988
|
+
"modelValue",
|
|
989
|
+
"onUpdate:modelValue"
|
|
990
|
+
]),
|
|
991
|
+
createVNode(VuSlider, {
|
|
992
|
+
label: `layersDepth ${fmt(misc.value.layersDepth[0])}`,
|
|
993
|
+
min: 0,
|
|
994
|
+
max: .5,
|
|
995
|
+
step: .01,
|
|
996
|
+
modelValue: misc.value.layersDepth,
|
|
997
|
+
"onUpdate:modelValue": [_cache[25] || (_cache[25] = ($event) => misc.value.layersDepth = $event), unref(apply)]
|
|
998
|
+
}, null, 8, [
|
|
999
|
+
"label",
|
|
1000
|
+
"modelValue",
|
|
1001
|
+
"onUpdate:modelValue"
|
|
1002
|
+
]),
|
|
1003
|
+
createVNode(VuSlider, {
|
|
1004
|
+
label: `flatness (top-level) ${fmt(misc.value.flatness[0])}`,
|
|
1005
|
+
min: 0,
|
|
1006
|
+
max: 1,
|
|
1007
|
+
step: .01,
|
|
1008
|
+
modelValue: misc.value.flatness,
|
|
1009
|
+
"onUpdate:modelValue": [_cache[26] || (_cache[26] = ($event) => misc.value.flatness = $event), unref(apply)]
|
|
1010
|
+
}, null, 8, [
|
|
1011
|
+
"label",
|
|
1012
|
+
"modelValue",
|
|
1013
|
+
"onUpdate:modelValue"
|
|
1014
|
+
])
|
|
1015
|
+
])) : createCommentVNode("v-if", true)
|
|
578
1016
|
]),
|
|
579
1017
|
_: 1
|
|
580
1018
|
}),
|
|
@@ -598,15 +1036,10 @@ var DevTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
598
1036
|
}]),
|
|
599
1037
|
title: "Vunor Palette Sandbox",
|
|
600
1038
|
onMousedown: onMouseDown
|
|
601
|
-
}, [..._cache[
|
|
1039
|
+
}, [..._cache[28] || (_cache[28] = [createElementVNode("strong", { class: "text-16px text-mb-0" }, "V", -1)])], 34)
|
|
602
1040
|
], 6)) : createCommentVNode("v-if", true);
|
|
603
1041
|
};
|
|
604
1042
|
}
|
|
605
1043
|
});
|
|
606
|
-
|
|
607
|
-
//#endregion
|
|
608
|
-
//#region src/components/DevTools/DevTools.vue
|
|
609
|
-
var DevTools_default = DevTools_vue_vue_type_script_setup_true_lang_default;
|
|
610
|
-
|
|
611
1044
|
//#endregion
|
|
612
|
-
export { DevTools_default as default };
|
|
1045
|
+
export { DevTools_default as default };
|