@customviews-js/customviews 1.4.1-beta.2 → 1.4.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-views.cjs.js +580 -192
- package/dist/custom-views.cjs.js.map +1 -1
- package/dist/custom-views.esm.js +580 -192
- package/dist/custom-views.esm.js.map +1 -1
- package/dist/custom-views.min.js +2 -2
- package/dist/custom-views.min.js.map +1 -1
- package/dist/types/browser.d.ts +2 -2
- package/dist/types/browser.d.ts.map +1 -1
- package/dist/types/core/settings.d.ts +79 -0
- package/dist/types/core/settings.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/config.d.ts +41 -18
- package/dist/types/types/config.d.ts.map +1 -1
- package/dist/types/utils/icons.d.ts +1 -1
- package/dist/types/utils/init-utils.d.ts +3 -3
- package/dist/types/utils/init-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/core/widget.d.ts +0 -37
- package/dist/types/core/widget.d.ts.map +0 -1
- package/dist/types/types/global.d.ts +0 -17
- package/dist/types/types/global.d.ts.map +0 -1
package/dist/custom-views.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @customviews-js/customviews v1.4.1-beta.
|
|
2
|
+
* @customviews-js/customviews v1.4.1-beta.4
|
|
3
3
|
* (c) 2026 Chan Ger Teck
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -7160,6 +7160,26 @@ function get_binding_group_value(group, __value, checked) {
|
|
|
7160
7160
|
return Array.from(value);
|
|
7161
7161
|
}
|
|
7162
7162
|
|
|
7163
|
+
/**
|
|
7164
|
+
* Makes an `export`ed (non-prop) variable available on the `$$props` object
|
|
7165
|
+
* so that consumers can do `bind:x` on the component.
|
|
7166
|
+
* @template V
|
|
7167
|
+
* @param {Record<string, unknown>} props
|
|
7168
|
+
* @param {string} prop
|
|
7169
|
+
* @param {V} value
|
|
7170
|
+
* @returns {void}
|
|
7171
|
+
*/
|
|
7172
|
+
function bind_prop(props, prop, value) {
|
|
7173
|
+
var desc = get_descriptor(props, prop);
|
|
7174
|
+
|
|
7175
|
+
if (desc && desc.set) {
|
|
7176
|
+
props[prop] = value;
|
|
7177
|
+
teardown(() => {
|
|
7178
|
+
props[prop] = null;
|
|
7179
|
+
});
|
|
7180
|
+
}
|
|
7181
|
+
}
|
|
7182
|
+
|
|
7163
7183
|
/**
|
|
7164
7184
|
* @param {any} bound_value
|
|
7165
7185
|
* @param {Element} element_or_component
|
|
@@ -9385,31 +9405,58 @@ class CustomViewsCore {
|
|
|
9385
9405
|
}
|
|
9386
9406
|
}
|
|
9387
9407
|
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
var root$a = from_html(`<div role="button" tabindex="0" aria-label="Open Custom Views">⚙</div>`);
|
|
9408
|
+
var root$a = from_html(`<div><div role="alert"><button class="close-btn svelte-1jgbyi0" aria-label="Dismiss intro">×</button> <p class="text svelte-1jgbyi0"> </p></div></div>`);
|
|
9391
9409
|
|
|
9392
9410
|
const $$css$e = {
|
|
9393
|
-
hash: 'svelte-
|
|
9394
|
-
code: '
|
|
9411
|
+
hash: 'svelte-1jgbyi0',
|
|
9412
|
+
code: '\n /* Animation */\n @keyframes svelte-1jgbyi0-popIn {\n 0% { opacity: 0; transform: scale(0.9) translateY(-50%); }\n 100% { opacity: 1; transform: scale(1) translateY(-50%); }\n }\n\n /* Reset transform for top/bottom positions */\n @keyframes svelte-1jgbyi0-popInVertical {\n 0% { opacity: 0; transform: scale(0.9); }\n 100% { opacity: 1; transform: scale(1); }\n }\n\n /* Simplified Pulse Animation - Shadow Only */\n @keyframes svelte-1jgbyi0-pulse {\n 0% { transform: scale(1); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(62, 132, 244, 0.7); }\n 50% { transform: scale(1); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 10px rgba(62, 132, 244, 0); }\n 100% { transform: scale(1); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(62, 132, 244, 0); }\n }\n\n /* Wrapper handles Positioning & Entry Animation */.callout-wrapper.svelte-1jgbyi0 {position:fixed;z-index:9999;\n \n /* Default animation (centered ones) */\n animation: svelte-1jgbyi0-popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;}\n\n /* Inner handles Visuals & Pulse Animation */.callout.svelte-1jgbyi0 {background:var(--cv-callout-bg, white);padding:1rem 1.25rem;border-radius:0.5rem;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);max-width:250px;font-size:0.9rem;line-height:1.5;color:var(--cv-callout-text, #1a1a1a);display:flex;align-items:flex-start;gap:0.75rem;font-family:inherit;border:2px solid rgba(0,0,0,0.1); /* Subtle border */}\n\n /* Apply pulse to inner callout if enabled */.callout.cv-pulse.svelte-1jgbyi0 {\n animation: svelte-1jgbyi0-pulse 2s infinite 0.5s;}\n\n /* Arrow Base */.callout.svelte-1jgbyi0::before {content:\'\';position:absolute;width:1rem;height:1rem;background:var(--cv-callout-bg, white);transform:rotate(45deg);border:2px solid rgba(0,0,0,0.1);z-index:-1;}.close-btn.svelte-1jgbyi0 {background:transparent;border:none;color:currentColor;opacity:0.7;font-size:1.25rem;line-height:1;cursor:pointer;padding:0;margin:-0.25rem -0.5rem 0 0;transition:opacity 0.15s;flex-shrink:0;}.close-btn.svelte-1jgbyi0:hover {color:currentColor;opacity:1;}.text.svelte-1jgbyi0 {margin:0;flex:1;font-weight:500;}\n\n /* \n Position Specifics (Applied to Wrapper)\n */\n\n /* Right-side positions (Icon on Right -> Callout on Left) */.pos-top-right.svelte-1jgbyi0, .pos-middle-right.svelte-1jgbyi0, .pos-bottom-right.svelte-1jgbyi0 {right:80px;}.pos-top-right.svelte-1jgbyi0, .pos-bottom-right.svelte-1jgbyi0 {\n animation-name: svelte-1jgbyi0-popInVertical;}\n \n /* X Button Spacing Adjustments */.pos-top-right.svelte-1jgbyi0 .close-btn:where(.svelte-1jgbyi0), \n .pos-middle-right.svelte-1jgbyi0 .close-btn:where(.svelte-1jgbyi0), \n .pos-bottom-right.svelte-1jgbyi0 .close-btn:where(.svelte-1jgbyi0) {margin-right:0;margin-left:-0.5rem;}\n\n /* Left-side positions (Icon on Left -> Callout on Right) */.pos-top-left.svelte-1jgbyi0, .pos-middle-left.svelte-1jgbyi0, .pos-bottom-left.svelte-1jgbyi0 {left:80px;}.pos-top-left.svelte-1jgbyi0 .close-btn:where(.svelte-1jgbyi0), \n .pos-middle-left.svelte-1jgbyi0 .close-btn:where(.svelte-1jgbyi0), \n .pos-bottom-left.svelte-1jgbyi0 .close-btn:where(.svelte-1jgbyi0) {order:2; /* Move to end */margin-right:-0.5rem;margin-left:0;}.pos-top-left.svelte-1jgbyi0, .pos-bottom-left.svelte-1jgbyi0 {\n animation-name: svelte-1jgbyi0-popInVertical;}\n\n /* Vertical Alignment */.pos-middle-right.svelte-1jgbyi0, .pos-middle-left.svelte-1jgbyi0 {top:50%;\n /* transform handled by popIn animation (translateY -50%) */}.pos-top-right.svelte-1jgbyi0, .pos-top-left.svelte-1jgbyi0 {top:20px;}.pos-bottom-right.svelte-1jgbyi0, .pos-bottom-left.svelte-1jgbyi0 {bottom:20px;}\n\n\n /* Arrow Positioning (Child of .callout, dependent on Wrapper .pos-*) */\n \n /* Pointing Right */.pos-top-right.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before, \n .pos-middle-right.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before, \n .pos-bottom-right.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before {right:-0.5rem;border-left:none;border-bottom:none;}\n\n /* Pointing Left */.pos-top-left.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before, \n .pos-middle-left.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before, \n .pos-bottom-left.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before {left:-0.5rem;border-right:none;border-top:none;}\n\n /* Vertical placement of arrow */.pos-middle-right.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before, .pos-middle-left.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before {top:50%;margin-top:-0.5rem;}.pos-top-right.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before, .pos-top-left.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before {top:1.25rem;}.pos-bottom-right.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before, .pos-bottom-left.svelte-1jgbyi0 .callout:where(.svelte-1jgbyi0)::before {bottom:1.25rem;}\n\n\n /* Dark Theme */.cv-settings-theme-dark .callout.svelte-1jgbyi0 {background:#1f2937;color:#e5e7eb;border-color:rgba(255,255,255,0.2);}.cv-settings-theme-dark .callout.svelte-1jgbyi0::before {background:#1f2937;border-color:rgba(255,255,255,0.2);}.cv-settings-theme-dark .close-btn.svelte-1jgbyi0 {color:#9ca3af;}.cv-settings-theme-dark .close-btn.svelte-1jgbyi0:hover {color:#f3f4f6;}'
|
|
9395
9413
|
};
|
|
9396
9414
|
|
|
9397
|
-
function
|
|
9415
|
+
function IntroCallout($$anchor, $$props) {
|
|
9398
9416
|
append_styles$1($$anchor, $$css$e);
|
|
9399
9417
|
|
|
9400
|
-
let position = prop($$props, 'position',
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9418
|
+
let position = prop($$props, 'position', 3, 'middle-left'),
|
|
9419
|
+
message = prop($$props, 'message', 3, 'Customize your reading experience here.'),
|
|
9420
|
+
onclose = prop($$props, 'onclose', 3, () => {}),
|
|
9421
|
+
enablePulse = prop($$props, 'enablePulse', 3, true),
|
|
9422
|
+
backgroundColor = prop($$props, 'backgroundColor', 3, undefined),
|
|
9423
|
+
textColor = prop($$props, 'textColor', 3, undefined);
|
|
9405
9424
|
|
|
9406
|
-
|
|
9407
|
-
|
|
9425
|
+
var // Map widget position to callout position logic
|
|
9426
|
+
/*
|
|
9427
|
+
Positions need to be adjusted based on the widget icon location.
|
|
9428
|
+
"right" positions -> callout appears to the left of the icon
|
|
9429
|
+
"left" positions -> callout appears to the right of the icon
|
|
9430
|
+
"top" -> aligned top
|
|
9431
|
+
"bottom" -> aligned bottom
|
|
9432
|
+
*/
|
|
9433
|
+
div = root$a();
|
|
9434
|
+
|
|
9435
|
+
var div_1 = child(div);
|
|
9436
|
+
let styles;
|
|
9437
|
+
var button = child(div_1);
|
|
9438
|
+
|
|
9439
|
+
button.__click = function (...$$args) {
|
|
9440
|
+
onclose()?.apply(this, $$args);
|
|
9408
9441
|
};
|
|
9409
9442
|
|
|
9443
|
+
var p = sibling(button, 2);
|
|
9444
|
+
var text = child(p, true);
|
|
9445
|
+
|
|
9446
|
+
reset(p);
|
|
9447
|
+
reset(div_1);
|
|
9448
|
+
reset(div);
|
|
9449
|
+
|
|
9410
9450
|
template_effect(() => {
|
|
9411
|
-
set_class(div, 1, `
|
|
9412
|
-
|
|
9451
|
+
set_class(div, 1, `callout-wrapper pos-${position() ?? ''}`, 'svelte-1jgbyi0');
|
|
9452
|
+
set_class(div_1, 1, `callout ${enablePulse() ? 'cv-pulse' : ''}`, 'svelte-1jgbyi0');
|
|
9453
|
+
|
|
9454
|
+
styles = set_style(div_1, '', styles, {
|
|
9455
|
+
'--cv-callout-bg': backgroundColor(),
|
|
9456
|
+
'--cv-callout-text': textColor()
|
|
9457
|
+
});
|
|
9458
|
+
|
|
9459
|
+
set_text(text, message());
|
|
9413
9460
|
});
|
|
9414
9461
|
|
|
9415
9462
|
append($$anchor, div);
|
|
@@ -9417,6 +9464,207 @@ function WidgetIcon($$anchor, $$props) {
|
|
|
9417
9464
|
|
|
9418
9465
|
delegate(['click']);
|
|
9419
9466
|
|
|
9467
|
+
enable_legacy_mode_flag();
|
|
9468
|
+
|
|
9469
|
+
var root$9 = from_html(`<div role="button" tabindex="0" aria-label="Open Custom Views Settings"><span class="cv-gear svelte-11erbyi">⚙</span></div>`);
|
|
9470
|
+
|
|
9471
|
+
const $$css$d = {
|
|
9472
|
+
hash: 'svelte-11erbyi',
|
|
9473
|
+
code: '.cv-settings-icon.svelte-11erbyi {position:fixed;background:var(--cv-icon-bg, rgba(255, 255, 255, 0.92));color:var(--cv-icon-color, rgba(0, 0, 0, 0.9));opacity:var(--cv-icon-opacity, 0.6);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:bold;cursor:grab; /* Default cursor */box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);border:2px solid rgba(0, 0, 0, 0.2);z-index:9998;transition:width 0.3s ease, background 0.3s ease, color 0.3s ease, opacity 0.3s ease, border-color 0.3s ease; /* Removed transform transition to allow smooth dragging */touch-action:none; /* Crucial for touch dragging */font-family:-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif;box-sizing:border-box;user-select:none; /* Prevent text selection while dragging */}.cv-settings-icon.svelte-11erbyi:active {cursor:grabbing;}.cv-settings-icon.svelte-11erbyi:hover {background:var(--cv-icon-bg, rgba(255, 255, 255, 1));color:var(--cv-icon-color, rgba(0, 0, 0, 1));opacity:1;border-color:rgba(0, 0, 0, 0.3);}\n\n /* Top-right */.cv-settings-top-right.svelte-11erbyi {top:20px;right:0;border-radius:18px 0 0 18px;padding-left:6px;justify-content:flex-start;border-right:none;}\n\n /* Top-left */.cv-settings-top-left.svelte-11erbyi {top:20px;left:0;border-radius:0 18px 18px 0;padding-right:6px;justify-content:flex-end;border-left:none;}\n\n /* Bottom-right */.cv-settings-bottom-right.svelte-11erbyi {bottom:20px;right:0;border-radius:18px 0 0 18px;padding-left:6px;justify-content:flex-start;border-right:none;}\n\n /* Bottom-left */.cv-settings-bottom-left.svelte-11erbyi {bottom:20px;left:0;border-radius:0 18px 18px 0;padding-right:6px;justify-content:flex-end;border-left:none;}\n\n /* Middle-left */.cv-settings-middle-left.svelte-11erbyi {top:50%;left:0;\n /* transform handled by inline style now */border-radius:0 18px 18px 0;padding-right:6px;justify-content:flex-end;border-left:none;}\n\n /* Middle-right */.cv-settings-middle-right.svelte-11erbyi {top:50%;right:0;\n /* transform handled by inline style now */border-radius:18px 0 0 18px;padding-left:6px;justify-content:flex-start;border-right:none;}.cv-settings-top-right.svelte-11erbyi,\n .cv-settings-middle-right.svelte-11erbyi,\n .cv-settings-bottom-right.svelte-11erbyi,\n .cv-settings-top-left.svelte-11erbyi,\n .cv-settings-middle-left.svelte-11erbyi,\n .cv-settings-bottom-left.svelte-11erbyi {height:36px;width:36px;}.cv-settings-middle-right.svelte-11erbyi:hover,\n .cv-settings-top-right.svelte-11erbyi:hover,\n .cv-settings-bottom-right.svelte-11erbyi:hover,\n .cv-settings-top-left.svelte-11erbyi:hover,\n .cv-settings-middle-left.svelte-11erbyi:hover,\n .cv-settings-bottom-left.svelte-11erbyi:hover {width:55px;}.cv-pulse {\n animation: svelte-11erbyi-pulse 2s infinite;}\n\n @keyframes svelte-11erbyi-pulse {\n 0% {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(62, 132, 244, 0.7);\n }\n 70% {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(62, 132, 244, 0);\n }\n 100% {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(62, 132, 244, 0);\n }\n }\n\n @media (max-width: 768px) {.cv-settings-top-right.svelte-11erbyi,\n .cv-settings-top-left.svelte-11erbyi {top:10px;}.cv-settings-bottom-right.svelte-11erbyi,\n .cv-settings-bottom-left.svelte-11erbyi {bottom:10px;}.cv-settings-top-right.svelte-11erbyi,\n .cv-settings-bottom-right.svelte-11erbyi,\n .cv-settings-middle-right.svelte-11erbyi {right:0;}.cv-settings-top-left.svelte-11erbyi,\n .cv-settings-bottom-left.svelte-11erbyi,\n .cv-settings-middle-left.svelte-11erbyi {left:0;}.cv-settings-icon.svelte-11erbyi {width:60px;height:32px;}.cv-settings-icon.svelte-11erbyi:hover {width:75px;}\n }'
|
|
9474
|
+
};
|
|
9475
|
+
|
|
9476
|
+
function SettingsIcon($$anchor, $$props) {
|
|
9477
|
+
push($$props, false);
|
|
9478
|
+
append_styles$1($$anchor, $$css$d);
|
|
9479
|
+
|
|
9480
|
+
let position = prop($$props, 'position', 8, 'middle-left');
|
|
9481
|
+
let title = prop($$props, 'title', 8, 'Customize View');
|
|
9482
|
+
let pulse = prop($$props, 'pulse', 8, false);
|
|
9483
|
+
let onclick = prop($$props, 'onclick', 8, undefined);
|
|
9484
|
+
|
|
9485
|
+
// Custom Styles
|
|
9486
|
+
let iconColor = prop($$props, 'iconColor', 8, undefined);
|
|
9487
|
+
|
|
9488
|
+
let backgroundColor = prop($$props, 'backgroundColor', 8, undefined);
|
|
9489
|
+
let opacity = prop($$props, 'opacity', 8, undefined);
|
|
9490
|
+
let scale = prop($$props, 'scale', 8, undefined);
|
|
9491
|
+
|
|
9492
|
+
function resetPosition() {
|
|
9493
|
+
set(currentOffset, 0);
|
|
9494
|
+
startOffset = 0;
|
|
9495
|
+
localStorage.removeItem(STORAGE_KEY);
|
|
9496
|
+
}
|
|
9497
|
+
|
|
9498
|
+
let isDragging = mutable_source(false);
|
|
9499
|
+
let startY = 0;
|
|
9500
|
+
let startOffset = 0;
|
|
9501
|
+
let currentOffset = mutable_source(0);
|
|
9502
|
+
const STORAGE_KEY = 'cv-settings-icon-offset';
|
|
9503
|
+
|
|
9504
|
+
onMount(() => {
|
|
9505
|
+
// Load persisted offset
|
|
9506
|
+
const saved = localStorage.getItem(STORAGE_KEY);
|
|
9507
|
+
|
|
9508
|
+
if (saved) {
|
|
9509
|
+
set(currentOffset, parseFloat(saved));
|
|
9510
|
+
}
|
|
9511
|
+
|
|
9512
|
+
// Global event listeners to handle drag leaving the element
|
|
9513
|
+
window.addEventListener('mousemove', onGlobalMove);
|
|
9514
|
+
|
|
9515
|
+
window.addEventListener('mouseup', onGlobalEnd);
|
|
9516
|
+
window.addEventListener('touchmove', onGlobalMove, { passive: false });
|
|
9517
|
+
window.addEventListener('touchend', onGlobalEnd);
|
|
9518
|
+
|
|
9519
|
+
return () => {
|
|
9520
|
+
window.removeEventListener('mousemove', onGlobalMove);
|
|
9521
|
+
window.removeEventListener('mouseup', onGlobalEnd);
|
|
9522
|
+
window.removeEventListener('touchmove', onGlobalMove);
|
|
9523
|
+
window.removeEventListener('touchend', onGlobalEnd);
|
|
9524
|
+
};
|
|
9525
|
+
});
|
|
9526
|
+
|
|
9527
|
+
// Refined Click Logic:
|
|
9528
|
+
// We'll capture the specific startY of the interaction.
|
|
9529
|
+
// If at mouseup (which happens before click), the delta is > 5, we set a flag 'suppressClick'.
|
|
9530
|
+
// On click, if suppressClick is true, we reset it and return.
|
|
9531
|
+
let suppressClick = false;
|
|
9532
|
+
|
|
9533
|
+
function onMouseDown(e) {
|
|
9534
|
+
if (e.button !== 0) return;
|
|
9535
|
+
|
|
9536
|
+
handleRefinedStart(e.clientY);
|
|
9537
|
+
}
|
|
9538
|
+
|
|
9539
|
+
function onTouchStart(e) {
|
|
9540
|
+
if (e.touches.length !== 1) return;
|
|
9541
|
+
|
|
9542
|
+
handleRefinedStart(e.touches[0].clientY);
|
|
9543
|
+
}
|
|
9544
|
+
|
|
9545
|
+
function handleRefinedStart(clientY) {
|
|
9546
|
+
set(isDragging, true);
|
|
9547
|
+
startY = clientY;
|
|
9548
|
+
startOffset = get$1(currentOffset);
|
|
9549
|
+
suppressClick = false;
|
|
9550
|
+
}
|
|
9551
|
+
|
|
9552
|
+
function onGlobalMove(e) {
|
|
9553
|
+
if (!get$1(isDragging)) return;
|
|
9554
|
+
|
|
9555
|
+
let clientY;
|
|
9556
|
+
|
|
9557
|
+
// Safer type check and access
|
|
9558
|
+
if (window.TouchEvent && e instanceof TouchEvent && e.touches.length > 0) {
|
|
9559
|
+
clientY = e.touches[0].clientY;
|
|
9560
|
+
} else if (e instanceof MouseEvent) {
|
|
9561
|
+
clientY = e.clientY;
|
|
9562
|
+
} else {
|
|
9563
|
+
return;
|
|
9564
|
+
}
|
|
9565
|
+
|
|
9566
|
+
const deltaY = clientY - startY;
|
|
9567
|
+
|
|
9568
|
+
set(currentOffset, startOffset + deltaY);
|
|
9569
|
+
|
|
9570
|
+
if (Math.abs(deltaY) > 5) {
|
|
9571
|
+
suppressClick = true;
|
|
9572
|
+
}
|
|
9573
|
+
}
|
|
9574
|
+
|
|
9575
|
+
function onGlobalEnd() {
|
|
9576
|
+
if (!get$1(isDragging)) return;
|
|
9577
|
+
|
|
9578
|
+
set(isDragging, false);
|
|
9579
|
+
localStorage.setItem(STORAGE_KEY, get$1(currentOffset).toString());
|
|
9580
|
+
}
|
|
9581
|
+
|
|
9582
|
+
function onClick(e) {
|
|
9583
|
+
if (suppressClick) {
|
|
9584
|
+
e.stopImmediatePropagation();
|
|
9585
|
+
e.preventDefault();
|
|
9586
|
+
suppressClick = false;
|
|
9587
|
+
|
|
9588
|
+
return;
|
|
9589
|
+
}
|
|
9590
|
+
|
|
9591
|
+
if (onclick()) onclick()();
|
|
9592
|
+
}
|
|
9593
|
+
|
|
9594
|
+
// Key handler for accessibility
|
|
9595
|
+
function onKeyDown(e) {
|
|
9596
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
9597
|
+
e.preventDefault();
|
|
9598
|
+
|
|
9599
|
+
if (onclick()) onclick()();
|
|
9600
|
+
}
|
|
9601
|
+
}
|
|
9602
|
+
|
|
9603
|
+
// Helper for transforms
|
|
9604
|
+
function getTransform(pos, offset, s) {
|
|
9605
|
+
const isMiddle = pos && pos.includes('middle');
|
|
9606
|
+
let t = '';
|
|
9607
|
+
|
|
9608
|
+
if (isMiddle) {
|
|
9609
|
+
t = `translateY(calc(-50% + ${offset}px))`;
|
|
9610
|
+
} else {
|
|
9611
|
+
t = `translateY(${offset}px)`;
|
|
9612
|
+
}
|
|
9613
|
+
|
|
9614
|
+
if (s && s !== 1) {
|
|
9615
|
+
t += ` scale(${s})`;
|
|
9616
|
+
}
|
|
9617
|
+
|
|
9618
|
+
return t;
|
|
9619
|
+
}
|
|
9620
|
+
|
|
9621
|
+
var $$exports = { resetPosition };
|
|
9622
|
+
|
|
9623
|
+
init();
|
|
9624
|
+
|
|
9625
|
+
var div = root$9();
|
|
9626
|
+
|
|
9627
|
+
event('mousemove', $window, onGlobalMove);
|
|
9628
|
+
event('mouseup', $window, onGlobalEnd);
|
|
9629
|
+
event('touchmove', $window, onGlobalMove, void 0, false);
|
|
9630
|
+
event('touchend', $window, onGlobalEnd);
|
|
9631
|
+
|
|
9632
|
+
let styles;
|
|
9633
|
+
|
|
9634
|
+
template_effect(
|
|
9635
|
+
($0) => {
|
|
9636
|
+
set_class(div, 1, `cv-settings-icon cv-settings-${position() ?? ''} ${pulse() ? 'cv-pulse' : ''}`, 'svelte-11erbyi');
|
|
9637
|
+
set_attribute(div, 'title', title());
|
|
9638
|
+
styles = set_style(div, '', styles, $0);
|
|
9639
|
+
},
|
|
9640
|
+
[
|
|
9641
|
+
() => ({
|
|
9642
|
+
'--cv-icon-color': iconColor(),
|
|
9643
|
+
'--cv-icon-bg': backgroundColor(),
|
|
9644
|
+
'--cv-icon-opacity': opacity(),
|
|
9645
|
+
|
|
9646
|
+
transform: (
|
|
9647
|
+
deep_read_state(position()),
|
|
9648
|
+
get$1(currentOffset),
|
|
9649
|
+
deep_read_state(scale()),
|
|
9650
|
+
untrack(() => getTransform(position(), get$1(currentOffset), scale()))
|
|
9651
|
+
),
|
|
9652
|
+
|
|
9653
|
+
cursor: get$1(isDragging) ? 'grabbing' : 'grab'
|
|
9654
|
+
})
|
|
9655
|
+
]
|
|
9656
|
+
);
|
|
9657
|
+
|
|
9658
|
+
event('mousedown', div, onMouseDown);
|
|
9659
|
+
event('touchstart', div, onTouchStart, void 0, false);
|
|
9660
|
+
event('click', div, onClick);
|
|
9661
|
+
event('keydown', div, onKeyDown);
|
|
9662
|
+
append($$anchor, div);
|
|
9663
|
+
bind_prop($$props, 'resetPosition', resetPosition);
|
|
9664
|
+
|
|
9665
|
+
return pop($$exports);
|
|
9666
|
+
}
|
|
9667
|
+
|
|
9420
9668
|
/** @import { BlurParams, CrossfadeParams, DrawParams, FadeParams, FlyParams, ScaleParams, SlideParams, TransitionConfig } from './public' */
|
|
9421
9669
|
|
|
9422
9670
|
|
|
@@ -9554,7 +9802,7 @@ function scale(
|
|
|
9554
9802
|
}
|
|
9555
9803
|
|
|
9556
9804
|
/**
|
|
9557
|
-
* Icon utilities for CustomViews
|
|
9805
|
+
* Icon utilities for CustomViews settings
|
|
9558
9806
|
* Centralized SVG icons for better maintainability and reusability
|
|
9559
9807
|
*/
|
|
9560
9808
|
/**
|
|
@@ -9690,16 +9938,16 @@ function getChevronUpIcon() {
|
|
|
9690
9938
|
}
|
|
9691
9939
|
|
|
9692
9940
|
var root_1$8 = from_html(`<p class="description svelte-dp7a9f"> </p>`);
|
|
9693
|
-
var root$
|
|
9941
|
+
var root$8 = from_html(`<div class="card svelte-dp7a9f"><div class="content svelte-dp7a9f"><div><p class="title svelte-dp7a9f"> </p> <!></div> <div class="radios svelte-dp7a9f"><label class="radio-label svelte-dp7a9f" title="Hide"><input class="toggle-input svelte-dp7a9f" type="radio"/> <span>Hide</span></label> <label class="radio-label svelte-dp7a9f" title="Peek"><input class="toggle-input svelte-dp7a9f" type="radio"/> <span>Peek</span></label> <label class="radio-label svelte-dp7a9f" title="Show"><input class="toggle-input svelte-dp7a9f" type="radio"/> <span>Show</span></label></div></div></div>`);
|
|
9694
9942
|
|
|
9695
|
-
const $$css$
|
|
9943
|
+
const $$css$c = {
|
|
9696
9944
|
hash: 'svelte-dp7a9f',
|
|
9697
|
-
code: '.card.svelte-dp7a9f {background:white;}.content.svelte-dp7a9f {display:flex;align-items:center;justify-content:space-between;padding:0.75rem;}.title.svelte-dp7a9f {font-weight:500;font-size:0.875rem;color:rgba(0, 0, 0, 0.9);margin:0;}.description.svelte-dp7a9f {font-size:0.75rem;color:rgba(0, 0, 0, 0.6);margin:0.125rem 0 0 0;}.radios.svelte-dp7a9f {display:flex;gap:8px;}.radio-label.svelte-dp7a9f {display:flex;align-items:center;gap:4px;font-size:0.85rem;cursor:pointer;}.toggle-input.svelte-dp7a9f {margin:0;opacity:1;width:auto;height:auto;}.cv-
|
|
9945
|
+
code: '.card.svelte-dp7a9f {background:white;}.content.svelte-dp7a9f {display:flex;align-items:center;justify-content:space-between;padding:0.75rem;}.title.svelte-dp7a9f {font-weight:500;font-size:0.875rem;color:rgba(0, 0, 0, 0.9);margin:0;}.description.svelte-dp7a9f {font-size:0.75rem;color:rgba(0, 0, 0, 0.6);margin:0.125rem 0 0 0;}.radios.svelte-dp7a9f {display:flex;gap:8px;}.radio-label.svelte-dp7a9f {display:flex;align-items:center;gap:4px;font-size:0.85rem;cursor:pointer;}.toggle-input.svelte-dp7a9f {margin:0;opacity:1;width:auto;height:auto;}.cv-settings-theme-dark .card.svelte-dp7a9f {background:#101722;}.cv-settings-theme-dark .title.svelte-dp7a9f {color:#e2e8f0;}.cv-settings-theme-dark .description.svelte-dp7a9f {color:rgba(255, 255, 255, 0.6);}'
|
|
9698
9946
|
};
|
|
9699
9947
|
|
|
9700
9948
|
function ToggleItem($$anchor, $$props) {
|
|
9701
9949
|
push($$props, false);
|
|
9702
|
-
append_styles$1($$anchor, $$css$
|
|
9950
|
+
append_styles$1($$anchor, $$css$c);
|
|
9703
9951
|
|
|
9704
9952
|
const binding_group = [];
|
|
9705
9953
|
let toggle = prop($$props, 'toggle', 8);
|
|
@@ -9708,7 +9956,7 @@ function ToggleItem($$anchor, $$props) {
|
|
|
9708
9956
|
|
|
9709
9957
|
init();
|
|
9710
9958
|
|
|
9711
|
-
var div = root$
|
|
9959
|
+
var div = root$8();
|
|
9712
9960
|
var div_1 = child(div);
|
|
9713
9961
|
var div_2 = child(div_1);
|
|
9714
9962
|
var p = child(div_2);
|
|
@@ -9806,17 +10054,17 @@ function ToggleItem($$anchor, $$props) {
|
|
|
9806
10054
|
delegate(['change']);
|
|
9807
10055
|
|
|
9808
10056
|
var root_1$7 = from_html(`<p class="description svelte-741mad"> </p>`);
|
|
9809
|
-
var root_2$
|
|
9810
|
-
var root$
|
|
10057
|
+
var root_2$4 = from_html(`<option> </option>`);
|
|
10058
|
+
var root$7 = from_html(`<div class="root svelte-741mad"><div class="header svelte-741mad"><label class="label svelte-741mad"> </label> <!></div> <select class="select svelte-741mad"></select></div>`);
|
|
9811
10059
|
|
|
9812
|
-
const $$css$
|
|
10060
|
+
const $$css$b = {
|
|
9813
10061
|
hash: 'svelte-741mad',
|
|
9814
|
-
code: '.root.svelte-741mad {display:flex;flex-direction:column;gap:0.75rem;padding:0.75rem;background:white;border:1px solid rgba(0, 0, 0, 0.1);border-radius:0.5rem;}\n\n /* Remove special handling for last child since they are now separate cards */.root.svelte-741mad:last-child {border-bottom:1px solid rgba(0, 0, 0, 0.1);}.header.svelte-741mad {display:flex;flex-direction:column;gap:0.25rem;}.label.svelte-741mad {font-size:0.875rem;color:rgba(0, 0, 0, 0.8);margin:0;line-height:1.4;font-weight:500;display:block;cursor:pointer;}.description.svelte-741mad {font-size:0.75rem;color:rgba(0, 0, 0, 0.6);margin:0;line-height:1.4;}.select.svelte-741mad {width:100%;border-radius:0.5rem;background:white;border:1px solid rgba(0, 0, 0, 0.15);color:rgba(0, 0, 0, 0.9);padding:0.5rem 0.75rem;font-size:0.875rem;cursor:pointer;transition:all 0.15s ease;font-family:inherit;}.select.svelte-741mad:hover {border-color:rgba(0, 0, 0, 0.25);}.select.svelte-741mad:focus {outline:none;border-color:#3e84f4;box-shadow:0 0 0 2px rgba(62, 132, 244, 0.2);}\n\n /* Dark Theme */.cv-
|
|
10062
|
+
code: '.root.svelte-741mad {display:flex;flex-direction:column;gap:0.75rem;padding:0.75rem;background:white;border:1px solid rgba(0, 0, 0, 0.1);border-radius:0.5rem;}\n\n /* Remove special handling for last child since they are now separate cards */.root.svelte-741mad:last-child {border-bottom:1px solid rgba(0, 0, 0, 0.1);}.header.svelte-741mad {display:flex;flex-direction:column;gap:0.25rem;}.label.svelte-741mad {font-size:0.875rem;color:rgba(0, 0, 0, 0.8);margin:0;line-height:1.4;font-weight:500;display:block;cursor:pointer;}.description.svelte-741mad {font-size:0.75rem;color:rgba(0, 0, 0, 0.6);margin:0;line-height:1.4;}.select.svelte-741mad {width:100%;border-radius:0.5rem;background:white;border:1px solid rgba(0, 0, 0, 0.15);color:rgba(0, 0, 0, 0.9);padding:0.5rem 0.75rem;font-size:0.875rem;cursor:pointer;transition:all 0.15s ease;font-family:inherit;}.select.svelte-741mad:hover {border-color:rgba(0, 0, 0, 0.25);}.select.svelte-741mad:focus {outline:none;border-color:#3e84f4;box-shadow:0 0 0 2px rgba(62, 132, 244, 0.2);}\n\n /* Dark Theme */.cv-settings-theme-dark .root.svelte-741mad {background:#101722;border-color:rgba(255, 255, 255, 0.1);}.cv-settings-theme-dark .label.svelte-741mad {color:#e2e8f0;}.cv-settings-theme-dark .description.svelte-741mad {color:rgba(255, 255, 255, 0.6);}.cv-settings-theme-dark .select.svelte-741mad {background:#101722;border-color:rgba(255, 255, 255, 0.2);color:#e2e8f0;}'
|
|
9815
10063
|
};
|
|
9816
10064
|
|
|
9817
10065
|
function TabGroupItem($$anchor, $$props) {
|
|
9818
10066
|
push($$props, false);
|
|
9819
|
-
append_styles$1($$anchor, $$css$
|
|
10067
|
+
append_styles$1($$anchor, $$css$b);
|
|
9820
10068
|
|
|
9821
10069
|
let group = prop($$props, 'group', 8);
|
|
9822
10070
|
let activeTabId = prop($$props, 'activeTabId', 12, '');
|
|
@@ -9831,7 +10079,7 @@ function TabGroupItem($$anchor, $$props) {
|
|
|
9831
10079
|
|
|
9832
10080
|
init();
|
|
9833
10081
|
|
|
9834
|
-
var div = root$
|
|
10082
|
+
var div = root$7();
|
|
9835
10083
|
var div_1 = child(div);
|
|
9836
10084
|
var label = child(div_1);
|
|
9837
10085
|
var text = child(label, true);
|
|
@@ -9870,7 +10118,7 @@ function TabGroupItem($$anchor, $$props) {
|
|
|
9870
10118
|
select.__change = onChange;
|
|
9871
10119
|
|
|
9872
10120
|
each(select, 5, () => (deep_read_state(group()), untrack(() => group().tabs)), index, ($$anchor, tab) => {
|
|
9873
|
-
var option = root_2$
|
|
10121
|
+
var option = root_2$4();
|
|
9874
10122
|
var text_2 = child(option, true);
|
|
9875
10123
|
|
|
9876
10124
|
reset(option);
|
|
@@ -9922,23 +10170,23 @@ function TabGroupItem($$anchor, $$props) {
|
|
|
9922
10170
|
|
|
9923
10171
|
delegate(['change']);
|
|
9924
10172
|
|
|
9925
|
-
var
|
|
9926
|
-
var root_3 = from_html(`<div class="section svelte-1tduk3b"><div class="section-heading svelte-1tduk3b">Toggles</div> <div class="toggles-container svelte-1tduk3b"></div></div>`);
|
|
10173
|
+
var root_2$3 = from_html(`<p class="description svelte-1tduk3b"> </p>`);
|
|
10174
|
+
var root_3$1 = from_html(`<div class="section svelte-1tduk3b"><div class="section-heading svelte-1tduk3b">Toggles</div> <div class="toggles-container svelte-1tduk3b"></div></div>`);
|
|
9927
10175
|
var root_5 = from_html(`<div class="section svelte-1tduk3b"><div class="section-heading svelte-1tduk3b">Tab Groups</div> <div class="tabgroups-container svelte-1tduk3b"><div class="tabgroup-card header-card svelte-1tduk3b" role="group"><div class="tabgroup-row svelte-1tduk3b"><div class="logo-box svelte-1tduk3b" id="cv-nav-icon-box"><div class="nav-icon svelte-1tduk3b"><!></div></div> <div class="tabgroup-info svelte-1tduk3b"><div class="tabgroup-title-container"><p class="tabgroup-title svelte-1tduk3b">Show only the selected tab</p></div> <p class="tabgroup-description svelte-1tduk3b">Hide the navigation headers</p></div> <label class="toggle-switch nav-toggle svelte-1tduk3b"><input class="nav-pref-input svelte-1tduk3b" type="checkbox" aria-label="Show only the selected tab"/> <span class="switch-bg svelte-1tduk3b"></span> <span class="switch-knob svelte-1tduk3b"></span></label></div></div> <div class="tab-groups-list svelte-1tduk3b"></div></div></div>`);
|
|
9928
|
-
var
|
|
10176
|
+
var root_1$6 = from_html(`<div class="tab-content active svelte-1tduk3b"><!> <!> <!></div>`);
|
|
9929
10177
|
var root_7 = from_html(`<div class="tab-content active svelte-1tduk3b"><div class="share-content svelte-1tduk3b"><div class="share-instruction svelte-1tduk3b">Create a shareable link for your current customization, or select specific parts of the page to share.</div> <button class="share-action-btn primary start-share-btn svelte-1tduk3b"><span class="btn-icon svelte-1tduk3b"><!></span> <span>Select elements to share</span></button> <button class="share-action-btn copy-url-btn svelte-1tduk3b"><span class="btn-icon svelte-1tduk3b"><!></span> <span><!></span></button></div></div>`);
|
|
9930
10178
|
var root_12 = from_html(`<button class="reset-btn svelte-1tduk3b" title="Reset to Default"><span><!></span> <span>Reset</span></button>`);
|
|
9931
10179
|
var root_13 = from_html(`<div></div>`);
|
|
9932
|
-
var root$
|
|
10180
|
+
var root$6 = from_html(`<div class="modal-overlay svelte-1tduk3b" role="presentation"><div class="modal-box cv-custom-state-modal svelte-1tduk3b" role="dialog" aria-modal="true"><header class="header svelte-1tduk3b"><div class="header-content svelte-1tduk3b"><div class="modal-icon svelte-1tduk3b"><!></div> <div class="title svelte-1tduk3b"> </div></div> <button class="close-btn svelte-1tduk3b" aria-label="Close modal"><!></button></header> <main class="main svelte-1tduk3b"><div class="tabs svelte-1tduk3b"><button>Customize</button> <button>Share</button></div> <!></main> <footer class="footer svelte-1tduk3b"><!> <a href="https://github.com/customviews-js/customviews" target="_blank" class="footer-link svelte-1tduk3b"><!> <span>View on GitHub</span></a> <button class="done-btn svelte-1tduk3b">Done</button></footer></div></div>`);
|
|
9933
10181
|
|
|
9934
|
-
const $$css$
|
|
10182
|
+
const $$css$a = {
|
|
9935
10183
|
hash: 'svelte-1tduk3b',
|
|
9936
|
-
code: '\n/* \n Styles from widget.ts/widget-styles.ts \n Adapted for Svelte\n*/\n\n/* Modal Overlay & Modal Frame */.modal-overlay.svelte-1tduk3b {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:10002;}.modal-box.svelte-1tduk3b {background:white;border-radius:0.75rem;box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25);max-width:32rem;width:90vw;max-height:80vh;display:flex;flex-direction:column;}.header.svelte-1tduk3b {display:flex;align-items:center;justify-content:space-between;padding:0.5rem 1rem;border-bottom:1px solid rgba(0, 0, 0, 0.1);}.header-content.svelte-1tduk3b {display:flex;align-items:center;gap:0.75rem;}.modal-icon.svelte-1tduk3b {position:relative;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;}.title.svelte-1tduk3b {font-size:1.125rem;font-weight:bold;color:rgba(0, 0, 0, 0.9);margin:0;}.close-btn.svelte-1tduk3b {width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:transparent;border:none;color:rgba(0, 0, 0, 0.6);cursor:pointer;transition:all 0.2s ease;}.close-btn.svelte-1tduk3b:hover {background:rgba(62, 132, 244, 0.1);color:#3e84f4;}.main.svelte-1tduk3b {padding:1rem;flex:1;display:flex;flex-direction:column;overflow-y:auto;max-height:calc(80vh - 8rem);}.description.svelte-1tduk3b {font-size:0.875rem;color:rgba(0, 0, 0, 0.8);margin:0 0 1rem 0;line-height:1.4;}\n\n/* Tabs */.tabs.svelte-1tduk3b {display:flex;margin-bottom:1rem;border-bottom:2px solid #eee;}.tab.svelte-1tduk3b {background:transparent;border:none;padding:0.5rem 1rem;font-size:0.9rem;font-weight:600;color:#666;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;}.tab.active.svelte-1tduk3b {color:#3e84f4;border-bottom-color:#3e84f4;}.tab-content.svelte-1tduk3b {display:none;}.tab-content.active.svelte-1tduk3b {display:block;}\n\n/* Section Styling */.section.svelte-1tduk3b {display:flex;flex-direction:column;gap:0.75rem;margin-bottom:1.5rem;}.section-heading.svelte-1tduk3b {font-size:1rem;font-weight:bold;color:rgba(0, 0, 0, 0.9);margin:0;}.toggles-container.svelte-1tduk3b {display:flex;flex-direction:column;gap:0.5rem;overflow:hidden;}\n\n/* Tab Groups Section specific */.tabgroups-container.svelte-1tduk3b {border-radius:0.5rem;}\n\n/* Nav Toggle Card */.tabgroup-card.svelte-1tduk3b {background:white;border-bottom:1px solid rgba(0, 0, 0, 0.1);}.tabgroup-card.header-card.svelte-1tduk3b {display:flex;align-items:center;justify-content:space-between;padding:0.75rem;border:1px solid rgba(0, 0, 0, 0.1);border-radius:0.5rem;margin-bottom:0.75rem;}.tabgroup-row.svelte-1tduk3b {display:flex;align-items:center;justify-content:space-between;width:100%;gap:1rem;}.logo-box.svelte-1tduk3b {width:3rem;height:3rem;background:rgba(0, 0, 0, 0.08);border-radius:0.5rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;}.nav-icon.svelte-1tduk3b {width:2rem;height:2rem;color:rgba(0, 0, 0, 0.8);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color 0.2s ease;}.tabgroup-info.svelte-1tduk3b {flex:1;display:flex;flex-direction:column;gap:0.25rem;}.tabgroup-title.svelte-1tduk3b {font-weight:500;font-size:0.875rem;color:rgba(0, 0, 0, 0.9);margin:0 0 0 0;}.tabgroup-description.svelte-1tduk3b {font-size:0.75rem;color:rgba(0, 0, 0, 0.6);margin:0;line-height:1.3;}\n\n/* Toggle Switch */.toggle-switch.svelte-1tduk3b {position:relative;display:inline-flex;align-items:center;width:44px;height:24px;background:rgba(0, 0, 0, 0.1);border-radius:9999px;padding:2px;box-sizing:border-box;cursor:pointer;transition:background-color 0.2s ease;border:none;}.toggle-switch.svelte-1tduk3b input:where(.svelte-1tduk3b) {display:none;}.toggle-switch.svelte-1tduk3b .switch-bg:where(.svelte-1tduk3b) {position:absolute;inset:0;border-radius:9999px;background:rgba(0, 0, 0, 0.1);transition:background-color 0.2s ease;pointer-events:none;}.toggle-switch.svelte-1tduk3b .switch-knob:where(.svelte-1tduk3b) {position:relative;width:20px;height:20px;background:white;border-radius:50%;box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);transition:transform 0.2s ease;transform:translateX(0);}.toggle-switch.svelte-1tduk3b input:where(.svelte-1tduk3b):checked ~ .switch-knob:where(.svelte-1tduk3b) {transform:translateX(20px);}.toggle-switch.svelte-1tduk3b input:where(.svelte-1tduk3b):checked ~ .switch-bg:where(.svelte-1tduk3b) {background:#3e84f4;}\n\n/* Tab Groups List */.tab-groups-list.svelte-1tduk3b {display:flex;flex-direction:column;gap:0.75rem;}\n\n/* Footer */.footer.svelte-1tduk3b {padding:1rem;border-top:1px solid rgba(0, 0, 0, 0.1);display:flex;align-items:center;justify-content:space-between;background:#f8f9fa;border-bottom-left-radius:0.75rem;border-bottom-right-radius:0.75rem;}.footer-link.svelte-1tduk3b {display:flex;align-items:center;gap:0.5rem;color:rgba(0, 0, 0, 0.5);text-decoration:none;font-size:0.875rem;font-weight:500;transition:color 0.15s ease;}.footer-link.svelte-1tduk3b:hover {color:rgba(0, 0, 0, 0.8);}.reset-btn.svelte-1tduk3b {display:flex;align-items:center;gap:0.5rem;background:transparent;border:none;font-size:0.875rem;font-weight:500;color:#dc2626;cursor:pointer;padding:0.5rem 0.75rem;border-radius:0.375rem;transition:background-color 0.15s ease;}.reset-btn.svelte-1tduk3b:hover {background:rgba(220, 38, 38, 0.1);}.done-btn.svelte-1tduk3b {background:#3e84f4;color:white;border:none;padding:0.5rem 1rem;border-radius:0.375rem;font-weight:600;font-size:0.875rem;cursor:pointer;transition:background-color 0.15s ease;}.done-btn.svelte-1tduk3b:hover {background:#2563eb;}.reset-btn-icon.svelte-1tduk3b {display:flex;align-items:center;width:1.25rem;height:1.25rem;}.spinning {\n animation: svelte-1tduk3b-spin 1s linear infinite;}\n\n@keyframes svelte-1tduk3b-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n/* Share Tab Styles */.share-content.svelte-1tduk3b {display:flex;flex-direction:column;gap:1rem;align-items:center;text-align:center;padding:1rem 0;}.share-instruction.svelte-1tduk3b {font-size:0.95rem;color:#666;margin-bottom:0.5rem;}.share-action-btn.svelte-1tduk3b {display:flex;align-items:center;justify-content:center;gap:0.75rem;width:100%;max-width:320px;padding:0.75rem 1rem;border-radius:0.5rem;font-weight:500;font-size:0.95rem;cursor:pointer;transition:all 0.2s ease;border:1px solid #ddd;background:white;color:#333;}.share-action-btn.svelte-1tduk3b:hover {border-color:#3e84f4;color:#3e84f4;background:#f8fbfd;}.share-action-btn.primary.svelte-1tduk3b {background:#3e84f4;border-color:#3e84f4;color:white;}.share-action-btn.primary.svelte-1tduk3b:hover {background:#2563eb;border-color:#2563eb;}.btn-icon.svelte-1tduk3b {display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;}\n\n/* Dark Theme Overrides */.cv-
|
|
10184
|
+
code: '\n/* \n Styles from widget.ts/widget-styles.ts \n Adapted for Svelte\n*/\n\n/* Modal Overlay & Modal Frame */.modal-overlay.svelte-1tduk3b {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:10002;}.modal-box.svelte-1tduk3b {background:white;border-radius:0.75rem;box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25);max-width:32rem;width:90vw;max-height:80vh;display:flex;flex-direction:column;}.header.svelte-1tduk3b {display:flex;align-items:center;justify-content:space-between;padding:0.5rem 1rem;border-bottom:1px solid rgba(0, 0, 0, 0.1);}.header-content.svelte-1tduk3b {display:flex;align-items:center;gap:0.75rem;}.modal-icon.svelte-1tduk3b {position:relative;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;}.title.svelte-1tduk3b {font-size:1.125rem;font-weight:bold;color:rgba(0, 0, 0, 0.9);margin:0;}.close-btn.svelte-1tduk3b {width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:transparent;border:none;color:rgba(0, 0, 0, 0.6);cursor:pointer;transition:all 0.2s ease;}.close-btn.svelte-1tduk3b:hover {background:rgba(62, 132, 244, 0.1);color:#3e84f4;}.main.svelte-1tduk3b {padding:1rem;flex:1;display:flex;flex-direction:column;overflow-y:auto;max-height:calc(80vh - 8rem);}.description.svelte-1tduk3b {font-size:0.875rem;color:rgba(0, 0, 0, 0.8);margin:0 0 1rem 0;line-height:1.4;}\n\n/* Tabs */.tabs.svelte-1tduk3b {display:flex;margin-bottom:1rem;border-bottom:2px solid #eee;}.tab.svelte-1tduk3b {background:transparent;border:none;padding:0.5rem 1rem;font-size:0.9rem;font-weight:600;color:#666;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;}.tab.active.svelte-1tduk3b {color:#3e84f4;border-bottom-color:#3e84f4;}.tab-content.svelte-1tduk3b {display:none;}.tab-content.active.svelte-1tduk3b {display:block;}\n\n/* Section Styling */.section.svelte-1tduk3b {display:flex;flex-direction:column;gap:0.75rem;margin-bottom:1.5rem;}.section-heading.svelte-1tduk3b {font-size:1rem;font-weight:bold;color:rgba(0, 0, 0, 0.9);margin:0;}.toggles-container.svelte-1tduk3b {display:flex;flex-direction:column;gap:0.5rem;overflow:hidden;}\n\n/* Tab Groups Section specific */.tabgroups-container.svelte-1tduk3b {border-radius:0.5rem;}\n\n/* Nav Toggle Card */.tabgroup-card.svelte-1tduk3b {background:white;border-bottom:1px solid rgba(0, 0, 0, 0.1);}.tabgroup-card.header-card.svelte-1tduk3b {display:flex;align-items:center;justify-content:space-between;padding:0.75rem;border:1px solid rgba(0, 0, 0, 0.1);border-radius:0.5rem;margin-bottom:0.75rem;}.tabgroup-row.svelte-1tduk3b {display:flex;align-items:center;justify-content:space-between;width:100%;gap:1rem;}.logo-box.svelte-1tduk3b {width:3rem;height:3rem;background:rgba(0, 0, 0, 0.08);border-radius:0.5rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;}.nav-icon.svelte-1tduk3b {width:2rem;height:2rem;color:rgba(0, 0, 0, 0.8);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color 0.2s ease;}.tabgroup-info.svelte-1tduk3b {flex:1;display:flex;flex-direction:column;gap:0.25rem;}.tabgroup-title.svelte-1tduk3b {font-weight:500;font-size:0.875rem;color:rgba(0, 0, 0, 0.9);margin:0 0 0 0;}.tabgroup-description.svelte-1tduk3b {font-size:0.75rem;color:rgba(0, 0, 0, 0.6);margin:0;line-height:1.3;}\n\n/* Toggle Switch */.toggle-switch.svelte-1tduk3b {position:relative;display:inline-flex;align-items:center;width:44px;height:24px;background:rgba(0, 0, 0, 0.1);border-radius:9999px;padding:2px;box-sizing:border-box;cursor:pointer;transition:background-color 0.2s ease;border:none;}.toggle-switch.svelte-1tduk3b input:where(.svelte-1tduk3b) {display:none;}.toggle-switch.svelte-1tduk3b .switch-bg:where(.svelte-1tduk3b) {position:absolute;inset:0;border-radius:9999px;background:rgba(0, 0, 0, 0.1);transition:background-color 0.2s ease;pointer-events:none;}.toggle-switch.svelte-1tduk3b .switch-knob:where(.svelte-1tduk3b) {position:relative;width:20px;height:20px;background:white;border-radius:50%;box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);transition:transform 0.2s ease;transform:translateX(0);}.toggle-switch.svelte-1tduk3b input:where(.svelte-1tduk3b):checked ~ .switch-knob:where(.svelte-1tduk3b) {transform:translateX(20px);}.toggle-switch.svelte-1tduk3b input:where(.svelte-1tduk3b):checked ~ .switch-bg:where(.svelte-1tduk3b) {background:#3e84f4;}\n\n/* Tab Groups List */.tab-groups-list.svelte-1tduk3b {display:flex;flex-direction:column;gap:0.75rem;}\n\n/* Footer */.footer.svelte-1tduk3b {padding:1rem;border-top:1px solid rgba(0, 0, 0, 0.1);display:flex;align-items:center;justify-content:space-between;background:#f8f9fa;border-bottom-left-radius:0.75rem;border-bottom-right-radius:0.75rem;}.footer-link.svelte-1tduk3b {display:flex;align-items:center;gap:0.5rem;color:rgba(0, 0, 0, 0.5);text-decoration:none;font-size:0.875rem;font-weight:500;transition:color 0.15s ease;}.footer-link.svelte-1tduk3b:hover {color:rgba(0, 0, 0, 0.8);}.reset-btn.svelte-1tduk3b {display:flex;align-items:center;gap:0.5rem;background:transparent;border:none;font-size:0.875rem;font-weight:500;color:#dc2626;cursor:pointer;padding:0.5rem 0.75rem;border-radius:0.375rem;transition:background-color 0.15s ease;}.reset-btn.svelte-1tduk3b:hover {background:rgba(220, 38, 38, 0.1);}.done-btn.svelte-1tduk3b {background:#3e84f4;color:white;border:none;padding:0.5rem 1rem;border-radius:0.375rem;font-weight:600;font-size:0.875rem;cursor:pointer;transition:background-color 0.15s ease;}.done-btn.svelte-1tduk3b:hover {background:#2563eb;}.reset-btn-icon.svelte-1tduk3b {display:flex;align-items:center;width:1.25rem;height:1.25rem;}.spinning {\n animation: svelte-1tduk3b-spin 1s linear infinite;}\n\n@keyframes svelte-1tduk3b-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n/* Share Tab Styles */.share-content.svelte-1tduk3b {display:flex;flex-direction:column;gap:1rem;align-items:center;text-align:center;padding:1rem 0;}.share-instruction.svelte-1tduk3b {font-size:0.95rem;color:#666;margin-bottom:0.5rem;}.share-action-btn.svelte-1tduk3b {display:flex;align-items:center;justify-content:center;gap:0.75rem;width:100%;max-width:320px;padding:0.75rem 1rem;border-radius:0.5rem;font-weight:500;font-size:0.95rem;cursor:pointer;transition:all 0.2s ease;border:1px solid #ddd;background:white;color:#333;}.share-action-btn.svelte-1tduk3b:hover {border-color:#3e84f4;color:#3e84f4;background:#f8fbfd;}.share-action-btn.primary.svelte-1tduk3b {background:#3e84f4;border-color:#3e84f4;color:white;}.share-action-btn.primary.svelte-1tduk3b:hover {background:#2563eb;border-color:#2563eb;}.btn-icon.svelte-1tduk3b {display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;}\n\n/* Dark Theme Overrides */.cv-settings-theme-dark .modal-box.svelte-1tduk3b {background:#101722;color:#e2e8f0;}.cv-settings-theme-dark .header.svelte-1tduk3b {border-color:rgba(255, 255, 255, 0.1);}.cv-settings-theme-dark .title.svelte-1tduk3b {color:#e2e8f0;}.cv-settings-theme-dark .close-btn.svelte-1tduk3b {color:rgba(255, 255, 255, 0.6);}.cv-settings-theme-dark .close-btn.svelte-1tduk3b:hover {background:rgba(62, 132, 244, 0.2);color:#3e84f4;}.cv-settings-theme-dark .description.svelte-1tduk3b {color:rgba(255, 255, 255, 0.8);}.cv-settings-theme-dark .section-heading.svelte-1tduk3b {color:#e2e8f0;}.cv-settings-theme-dark .toggles-container.svelte-1tduk3b,\n.cv-settings-theme-dark .tabgroups-container.svelte-1tduk3b {border-color:rgba(255, 255, 255, 0.1);}.cv-settings-theme-dark .tabgroup-card.svelte-1tduk3b {background:#101722;border-color:rgba(255, 255, 255, 0.1);}.cv-settings-theme-dark .tabgroup-title.svelte-1tduk3b {color:#e2e8f0;}.cv-settings-theme-dark .tabgroup-description.svelte-1tduk3b {color:rgba(255, 255, 255, 0.6);}.cv-settings-theme-dark .footer.svelte-1tduk3b {border-color:rgba(255, 255, 255, 0.1);background:#101722;}.cv-settings-theme-dark .footer-link.svelte-1tduk3b {color:rgba(255, 255, 255, 0.6);}.cv-settings-theme-dark .reset-btn.svelte-1tduk3b {color:#f87171;}.cv-settings-theme-dark .reset-btn.svelte-1tduk3b:hover {background:rgba(248, 113, 113, 0.1);}.cv-settings-theme-dark .tab-groups-list.svelte-1tduk3b {border-color:rgba(255, 255, 255, 0.1);}.cv-settings-theme-dark .nav-icon.svelte-1tduk3b {color:rgba(255, 255, 255, 0.8);}'
|
|
9937
10185
|
};
|
|
9938
10186
|
|
|
9939
10187
|
function Modal($$anchor, $$props) {
|
|
9940
10188
|
push($$props, false);
|
|
9941
|
-
append_styles$1($$anchor, $$css$
|
|
10189
|
+
append_styles$1($$anchor, $$css$a);
|
|
9942
10190
|
|
|
9943
10191
|
let title = prop($$props, 'title', 8, 'Customize View');
|
|
9944
10192
|
let description = prop($$props, 'description', 8, '');
|
|
@@ -10021,7 +10269,7 @@ function Modal($$anchor, $$props) {
|
|
|
10021
10269
|
legacy_pre_effect_reset();
|
|
10022
10270
|
init();
|
|
10023
10271
|
|
|
10024
|
-
var div = root$
|
|
10272
|
+
var div = root$6();
|
|
10025
10273
|
|
|
10026
10274
|
div.__click = (e) => {
|
|
10027
10275
|
if (e.target === e.currentTarget) onclose()();
|
|
@@ -10055,24 +10303,7 @@ function Modal($$anchor, $$props) {
|
|
|
10055
10303
|
reset(header);
|
|
10056
10304
|
|
|
10057
10305
|
var main = sibling(header, 2);
|
|
10058
|
-
var
|
|
10059
|
-
|
|
10060
|
-
{
|
|
10061
|
-
var consequent = ($$anchor) => {
|
|
10062
|
-
var p = root_1$6();
|
|
10063
|
-
var text_1 = child(p, true);
|
|
10064
|
-
|
|
10065
|
-
reset(p);
|
|
10066
|
-
template_effect(() => set_text(text_1, description()));
|
|
10067
|
-
append($$anchor, p);
|
|
10068
|
-
};
|
|
10069
|
-
|
|
10070
|
-
if_block(node_2, ($$render) => {
|
|
10071
|
-
if (description()) $$render(consequent);
|
|
10072
|
-
});
|
|
10073
|
-
}
|
|
10074
|
-
|
|
10075
|
-
var div_5 = sibling(node_2, 2);
|
|
10306
|
+
var div_5 = child(main);
|
|
10076
10307
|
var button_1 = child(div_5);
|
|
10077
10308
|
|
|
10078
10309
|
button_1.__click = () => set(activeTab, 'customize');
|
|
@@ -10082,16 +10313,33 @@ function Modal($$anchor, $$props) {
|
|
|
10082
10313
|
button_2.__click = () => set(activeTab, 'share');
|
|
10083
10314
|
reset(div_5);
|
|
10084
10315
|
|
|
10085
|
-
var
|
|
10316
|
+
var node_2 = sibling(div_5, 2);
|
|
10086
10317
|
|
|
10087
10318
|
{
|
|
10088
10319
|
var consequent_3 = ($$anchor) => {
|
|
10089
|
-
var div_6 =
|
|
10090
|
-
var
|
|
10320
|
+
var div_6 = root_1$6();
|
|
10321
|
+
var node_3 = child(div_6);
|
|
10322
|
+
|
|
10323
|
+
{
|
|
10324
|
+
var consequent = ($$anchor) => {
|
|
10325
|
+
var p = root_2$3();
|
|
10326
|
+
var text_1 = child(p, true);
|
|
10327
|
+
|
|
10328
|
+
reset(p);
|
|
10329
|
+
template_effect(() => set_text(text_1, description()));
|
|
10330
|
+
append($$anchor, p);
|
|
10331
|
+
};
|
|
10332
|
+
|
|
10333
|
+
if_block(node_3, ($$render) => {
|
|
10334
|
+
if (description()) $$render(consequent);
|
|
10335
|
+
});
|
|
10336
|
+
}
|
|
10337
|
+
|
|
10338
|
+
var node_4 = sibling(node_3, 2);
|
|
10091
10339
|
|
|
10092
10340
|
{
|
|
10093
10341
|
var consequent_1 = ($$anchor) => {
|
|
10094
|
-
var div_7 = root_3();
|
|
10342
|
+
var div_7 = root_3$1();
|
|
10095
10343
|
var div_8 = sibling(child(div_7), 2);
|
|
10096
10344
|
|
|
10097
10345
|
each(div_8, 5, toggles, (toggle) => toggle.toggleId, ($$anchor, toggle) => {
|
|
@@ -10280,7 +10528,7 @@ function Modal($$anchor, $$props) {
|
|
|
10280
10528
|
append($$anchor, div_16);
|
|
10281
10529
|
};
|
|
10282
10530
|
|
|
10283
|
-
if_block(
|
|
10531
|
+
if_block(node_2, ($$render) => {
|
|
10284
10532
|
if (get$1(activeTab) === 'customize') $$render(consequent_3); else $$render(alternate_2, false);
|
|
10285
10533
|
});
|
|
10286
10534
|
}
|
|
@@ -10351,62 +10599,6 @@ function Modal($$anchor, $$props) {
|
|
|
10351
10599
|
|
|
10352
10600
|
delegate(['click', 'change']);
|
|
10353
10601
|
|
|
10354
|
-
var root$6 = from_html(`<div role="alert"><button class="close-btn svelte-ixixmj" aria-label="Dismiss intro">×</button> <p class="text svelte-ixixmj"> </p></div>`);
|
|
10355
|
-
|
|
10356
|
-
const $$css$a = {
|
|
10357
|
-
hash: 'svelte-ixixmj',
|
|
10358
|
-
code: '.callout.svelte-ixixmj {position:fixed;background:white;padding:12px 16px;border-radius:8px;box-shadow:0 4px 15px rgba(0, 0, 0, 0.15);z-index:9999;max-width:260px;font-size:14px;line-height:1.5;color:#333;display:flex;align-items:flex-start;gap:10px;font-family:-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif;}.close-btn.svelte-ixixmj {background:transparent;border:none;color:#999;font-size:18px;line-height:1;cursor:pointer;padding:0;margin-right:-4px;margin-top:-2px;}.close-btn.svelte-ixixmj:hover {color:#333;}.text.svelte-ixixmj {margin:0;flex:1;}\n\n /* Position specifics */.pos-top-right.svelte-ixixmj {top:20px;right:60px; /* offset from icon */}.pos-top-left.svelte-ixixmj {top:20px;left:60px;}.pos-bottom-right.svelte-ixixmj {bottom:20px;right:60px;}.pos-bottom-left.svelte-ixixmj {bottom:20px;left:60px;}.pos-middle-right.svelte-ixixmj {top:50%;right:60px;transform:translateY(-50%);}.pos-middle-left.svelte-ixixmj {top:50%;left:60px;transform:translateY(-50%);}.cv-widget-theme-dark .callout.svelte-ixixmj {background:#101722;color:#e2e8f0;border:1px solid rgba(255, 255, 255, 0.1);}.cv-widget-theme-dark .close-btn.svelte-ixixmj {color:rgba(255, 255, 255, 0.5);}.cv-widget-theme-dark .close-btn.svelte-ixixmj:hover {color:rgba(255, 255, 255, 0.9);}'
|
|
10359
|
-
};
|
|
10360
|
-
|
|
10361
|
-
function IntroCallout($$anchor, $$props) {
|
|
10362
|
-
push($$props, false);
|
|
10363
|
-
append_styles$1($$anchor, $$css$a);
|
|
10364
|
-
|
|
10365
|
-
let position = prop($$props, 'position', 8, 'middle-left');
|
|
10366
|
-
let message = prop($$props, 'message', 8, 'Customize your reading experience here.');
|
|
10367
|
-
let onclose = prop($$props, 'onclose', 8, () => {});
|
|
10368
|
-
|
|
10369
|
-
// Map widget position to callout position logic
|
|
10370
|
-
/*
|
|
10371
|
-
Positions need to be adjusted based on the widget icon location.
|
|
10372
|
-
"right" positions -> callout appears to the left of the icon
|
|
10373
|
-
"left" positions -> callout appears to the right of the icon
|
|
10374
|
-
"top" -> aligned top
|
|
10375
|
-
"bottom" -> aligned bottom
|
|
10376
|
-
*/
|
|
10377
|
-
function getTransitionParams() {
|
|
10378
|
-
if (position() && position().includes('right')) return { x: 20, duration: 300 };
|
|
10379
|
-
|
|
10380
|
-
return { x: -20, duration: 300 };
|
|
10381
|
-
}
|
|
10382
|
-
|
|
10383
|
-
init();
|
|
10384
|
-
|
|
10385
|
-
var div = root$6();
|
|
10386
|
-
var button = child(div);
|
|
10387
|
-
|
|
10388
|
-
button.__click = function (...$$args) {
|
|
10389
|
-
onclose()?.apply(this, $$args);
|
|
10390
|
-
};
|
|
10391
|
-
|
|
10392
|
-
var p = sibling(button, 2);
|
|
10393
|
-
var text = child(p, true);
|
|
10394
|
-
|
|
10395
|
-
reset(p);
|
|
10396
|
-
reset(div);
|
|
10397
|
-
|
|
10398
|
-
template_effect(() => {
|
|
10399
|
-
set_class(div, 1, `callout pos-${position() ?? ''}`, 'svelte-ixixmj');
|
|
10400
|
-
set_text(text, message());
|
|
10401
|
-
});
|
|
10402
|
-
|
|
10403
|
-
transition(3, div, () => fly, getTransitionParams);
|
|
10404
|
-
append($$anchor, div);
|
|
10405
|
-
pop();
|
|
10406
|
-
}
|
|
10407
|
-
|
|
10408
|
-
delegate(['click']);
|
|
10409
|
-
|
|
10410
10602
|
const SELECTED_CLASS = 'cv-share-selected';
|
|
10411
10603
|
const HIGHLIGHT_TARGET_CLASS = 'cv-highlight-target';
|
|
10412
10604
|
const CV_CUSTOM_ELEMENTS = 'cv-tabgroup, cv-toggle';
|
|
@@ -10720,7 +10912,7 @@ function ShareToolbar($$anchor, $$props) {
|
|
|
10720
10912
|
|
|
10721
10913
|
delegate(['click']);
|
|
10722
10914
|
|
|
10723
|
-
var root_2$
|
|
10915
|
+
var root_2$2 = from_html(`<button class="action-btn up svelte-2rmv56" title="Select Parent">↰</button>`);
|
|
10724
10916
|
var root_1$4 = from_html(`<div class="hover-helper svelte-2rmv56"><span class="tag svelte-2rmv56"> </span> <button> </button> <!></div>`);
|
|
10725
10917
|
|
|
10726
10918
|
const $$css$7 = {
|
|
@@ -10823,7 +11015,7 @@ function HoverHelper($$anchor, $$props) {
|
|
|
10823
11015
|
|
|
10824
11016
|
{
|
|
10825
11017
|
var consequent = ($$anchor) => {
|
|
10826
|
-
var button_1 = root_2$
|
|
11018
|
+
var button_1 = root_2$2();
|
|
10827
11019
|
|
|
10828
11020
|
button_1.__click = handleUp;
|
|
10829
11021
|
append($$anchor, button_1);
|
|
@@ -11112,7 +11304,7 @@ function scrollToElement(element) {
|
|
|
11112
11304
|
|
|
11113
11305
|
var root_1$2 = from_html(`<!> <!> <!> <!> <!> <!>`, 1);
|
|
11114
11306
|
|
|
11115
|
-
function
|
|
11307
|
+
function Settings($$anchor, $$props) {
|
|
11116
11308
|
push($$props, true);
|
|
11117
11309
|
|
|
11118
11310
|
const $shareStore = () => store_get(shareStore, '$shareStore', $$stores);
|
|
@@ -11127,6 +11319,7 @@ function MainWidget($$anchor, $$props) {
|
|
|
11127
11319
|
let showCallout = state(false);
|
|
11128
11320
|
let isResetting = state(false);
|
|
11129
11321
|
let showPulse = state(false);
|
|
11322
|
+
let settingsIcon = state(void 0);
|
|
11130
11323
|
|
|
11131
11324
|
// Nav Visibility
|
|
11132
11325
|
let navsVisible = state(true);
|
|
@@ -11152,7 +11345,7 @@ function MainWidget($$anchor, $$props) {
|
|
|
11152
11345
|
// Init
|
|
11153
11346
|
onMount(() => {
|
|
11154
11347
|
// Check for callout
|
|
11155
|
-
if ($$props.options.
|
|
11348
|
+
if ($$props.options.callout?.show && get$1(store).hasActiveComponents) {
|
|
11156
11349
|
checkIntro();
|
|
11157
11350
|
}
|
|
11158
11351
|
|
|
@@ -11202,6 +11395,7 @@ function MainWidget($$anchor, $$props) {
|
|
|
11202
11395
|
function handleReset() {
|
|
11203
11396
|
set(isResetting, true);
|
|
11204
11397
|
$$props.core.resetToDefault();
|
|
11398
|
+
get$1(settingsIcon)?.resetPosition();
|
|
11205
11399
|
|
|
11206
11400
|
// Sync local state
|
|
11207
11401
|
set(navsVisible, true);
|
|
@@ -11277,17 +11471,36 @@ function MainWidget($$anchor, $$props) {
|
|
|
11277
11471
|
|
|
11278
11472
|
{
|
|
11279
11473
|
var consequent = ($$anchor) => {
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11474
|
+
{
|
|
11475
|
+
let $0 = user_derived(() => $$props.options.callout?.message);
|
|
11476
|
+
let $1 = user_derived(() => $$props.options.callout?.enablePulse);
|
|
11477
|
+
let $2 = user_derived(() => $$props.options.callout?.backgroundColor);
|
|
11478
|
+
let $3 = user_derived(() => $$props.options.callout?.textColor);
|
|
11479
|
+
|
|
11480
|
+
IntroCallout($$anchor, {
|
|
11481
|
+
get position() {
|
|
11482
|
+
return $$props.options.icon.position;
|
|
11483
|
+
},
|
|
11484
|
+
|
|
11485
|
+
get message() {
|
|
11486
|
+
return get$1($0);
|
|
11487
|
+
},
|
|
11488
|
+
|
|
11489
|
+
get enablePulse() {
|
|
11490
|
+
return get$1($1);
|
|
11491
|
+
},
|
|
11492
|
+
|
|
11493
|
+
get backgroundColor() {
|
|
11494
|
+
return get$1($2);
|
|
11495
|
+
},
|
|
11496
|
+
|
|
11497
|
+
get textColor() {
|
|
11498
|
+
return get$1($3);
|
|
11499
|
+
},
|
|
11500
|
+
|
|
11501
|
+
onclose: dismissCallout
|
|
11502
|
+
});
|
|
11503
|
+
}
|
|
11291
11504
|
};
|
|
11292
11505
|
|
|
11293
11506
|
if_block(node_1, ($$render) => {
|
|
@@ -11325,21 +11538,48 @@ function MainWidget($$anchor, $$props) {
|
|
|
11325
11538
|
|
|
11326
11539
|
var node_5 = sibling(node_4, 2);
|
|
11327
11540
|
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11541
|
+
{
|
|
11542
|
+
let $0 = user_derived(() => $$props.options.icon?.color);
|
|
11543
|
+
let $1 = user_derived(() => $$props.options.icon?.backgroundColor);
|
|
11544
|
+
let $2 = user_derived(() => $$props.options.icon?.opacity);
|
|
11545
|
+
let $3 = user_derived(() => $$props.options.icon?.scale);
|
|
11332
11546
|
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11547
|
+
bind_this(
|
|
11548
|
+
SettingsIcon(node_5, {
|
|
11549
|
+
get position() {
|
|
11550
|
+
return $$props.options.icon.position;
|
|
11551
|
+
},
|
|
11336
11552
|
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11553
|
+
get title() {
|
|
11554
|
+
return $$props.options.panel.title;
|
|
11555
|
+
},
|
|
11340
11556
|
|
|
11341
|
-
|
|
11342
|
-
|
|
11557
|
+
get pulse() {
|
|
11558
|
+
return get$1(showPulse);
|
|
11559
|
+
},
|
|
11560
|
+
|
|
11561
|
+
onclick: openModal,
|
|
11562
|
+
|
|
11563
|
+
get iconColor() {
|
|
11564
|
+
return get$1($0);
|
|
11565
|
+
},
|
|
11566
|
+
|
|
11567
|
+
get backgroundColor() {
|
|
11568
|
+
return get$1($1);
|
|
11569
|
+
},
|
|
11570
|
+
|
|
11571
|
+
get opacity() {
|
|
11572
|
+
return get$1($2);
|
|
11573
|
+
},
|
|
11574
|
+
|
|
11575
|
+
get scale() {
|
|
11576
|
+
return get$1($3);
|
|
11577
|
+
}
|
|
11578
|
+
}),
|
|
11579
|
+
($$value) => set(settingsIcon, $$value, true),
|
|
11580
|
+
() => get$1(settingsIcon)
|
|
11581
|
+
);
|
|
11582
|
+
}
|
|
11343
11583
|
|
|
11344
11584
|
var node_6 = sibling(node_5, 2);
|
|
11345
11585
|
|
|
@@ -11347,19 +11587,19 @@ function MainWidget($$anchor, $$props) {
|
|
|
11347
11587
|
var consequent_2 = ($$anchor) => {
|
|
11348
11588
|
Modal($$anchor, {
|
|
11349
11589
|
get title() {
|
|
11350
|
-
return $$props.options.title;
|
|
11590
|
+
return $$props.options.panel.title;
|
|
11351
11591
|
},
|
|
11352
11592
|
|
|
11353
11593
|
get description() {
|
|
11354
|
-
return $$props.options.description;
|
|
11594
|
+
return $$props.options.panel.description;
|
|
11355
11595
|
},
|
|
11356
11596
|
|
|
11357
11597
|
get showReset() {
|
|
11358
|
-
return $$props.options.showReset;
|
|
11598
|
+
return $$props.options.panel.showReset;
|
|
11359
11599
|
},
|
|
11360
11600
|
|
|
11361
11601
|
get showTabGroups() {
|
|
11362
|
-
return $$props.options.showTabGroups;
|
|
11602
|
+
return $$props.options.panel.showTabGroups;
|
|
11363
11603
|
},
|
|
11364
11604
|
|
|
11365
11605
|
get toggles() {
|
|
@@ -11418,33 +11658,46 @@ function MainWidget($$anchor, $$props) {
|
|
|
11418
11658
|
$$cleanup();
|
|
11419
11659
|
}
|
|
11420
11660
|
|
|
11421
|
-
class
|
|
11661
|
+
class CustomViewsSettings {
|
|
11422
11662
|
app = null;
|
|
11423
11663
|
options;
|
|
11424
11664
|
constructor(options) {
|
|
11425
11665
|
// Set defaults
|
|
11426
11666
|
this.options = {
|
|
11427
|
-
core: options.core,
|
|
11667
|
+
core: options.core, // 'core' is a required property and must be explicitly passed
|
|
11428
11668
|
container: options.container || document.body,
|
|
11429
|
-
position: options.position || 'middle-left',
|
|
11430
11669
|
theme: options.theme || 'light',
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11670
|
+
panel: {
|
|
11671
|
+
title: options.panel?.title || 'Customize View',
|
|
11672
|
+
description: options.panel?.description || '',
|
|
11673
|
+
showTabGroups: options.panel?.showTabGroups ?? true,
|
|
11674
|
+
showReset: options.panel?.showReset ?? true
|
|
11675
|
+
},
|
|
11676
|
+
callout: {
|
|
11677
|
+
show: options.callout?.show ?? false,
|
|
11678
|
+
message: options.callout?.message || 'Customize your reading experience here.',
|
|
11679
|
+
enablePulse: options.callout?.enablePulse ?? true,
|
|
11680
|
+
backgroundColor: options.callout?.backgroundColor,
|
|
11681
|
+
textColor: options.callout?.textColor
|
|
11682
|
+
},
|
|
11683
|
+
icon: {
|
|
11684
|
+
position: options.icon?.position || 'middle-left',
|
|
11685
|
+
color: options.icon?.color,
|
|
11686
|
+
backgroundColor: options.icon?.backgroundColor,
|
|
11687
|
+
opacity: options.icon?.opacity,
|
|
11688
|
+
scale: options.icon?.scale ?? 1
|
|
11689
|
+
}
|
|
11437
11690
|
};
|
|
11438
11691
|
}
|
|
11439
11692
|
/**
|
|
11440
|
-
* Render the widget
|
|
11693
|
+
* Render the settings widget
|
|
11441
11694
|
*/
|
|
11442
11695
|
renderModalIcon() {
|
|
11443
11696
|
if (this.app) {
|
|
11444
11697
|
return;
|
|
11445
11698
|
}
|
|
11446
11699
|
// Mount Svelte App using Svelte 5 API
|
|
11447
|
-
this.app = mount(
|
|
11700
|
+
this.app = mount(Settings, {
|
|
11448
11701
|
target: this.options.container,
|
|
11449
11702
|
props: {
|
|
11450
11703
|
core: this.options.core,
|
|
@@ -11453,7 +11706,7 @@ class CustomViewsWidget {
|
|
|
11453
11706
|
});
|
|
11454
11707
|
}
|
|
11455
11708
|
/**
|
|
11456
|
-
* Remove the widget from DOM
|
|
11709
|
+
* Remove the settings widget from DOM
|
|
11457
11710
|
*/
|
|
11458
11711
|
destroy() {
|
|
11459
11712
|
if (this.app) {
|
|
@@ -11605,12 +11858,13 @@ function renderAssetInto(el, assetId, assetsManager) {
|
|
|
11605
11858
|
}
|
|
11606
11859
|
}
|
|
11607
11860
|
|
|
11608
|
-
var root_1$1 = from_html(`<
|
|
11609
|
-
var
|
|
11861
|
+
var root_1$1 = from_html(`<div class="cv-toggle-label svelte-1x95rqi"> </div>`);
|
|
11862
|
+
var root_2$1 = from_html(`<button class="cv-expand-btn svelte-1x95rqi"><!></button>`);
|
|
11863
|
+
var root$2 = from_html(`<div><!> <div class="cv-toggle-content svelte-1x95rqi"><div class="cv-toggle-inner svelte-1x95rqi"><!></div></div> <!></div>`);
|
|
11610
11864
|
|
|
11611
11865
|
const $$css$4 = {
|
|
11612
11866
|
hash: 'svelte-1x95rqi',
|
|
11613
|
-
code: ':host {display:block;
|
|
11867
|
+
code: ':host {display:block;position:relative;z-index:1;overflow:visible;}\n\n /* Host visibility control */:host([hidden]) {display:none;}.cv-toggle-wrapper.svelte-1x95rqi {position:relative;width:100%;transition:all 0.3s ease;margin-bottom:4px;}.cv-toggle-wrapper.hidden.svelte-1x95rqi {margin-bottom:0;}.cv-toggle-wrapper.peek-mode.svelte-1x95rqi {margin-bottom:24px;}.cv-toggle-content.svelte-1x95rqi {overflow:hidden;transition:max-height 0.3s ease, opacity 0.3s ease, overflow 0s 0s;\n /* CSS max-height defaults are handled by inline styles now */}.cv-toggle-inner.svelte-1x95rqi {display:flow-root; /* Ensures margins of children are contained */}\n\n /* Hidden State */.hidden.svelte-1x95rqi .cv-toggle-content:where(.svelte-1x95rqi) {opacity:0;pointer-events:none;}\n\n /* Bordered State */.has-border.svelte-1x95rqi {box-sizing:border-box; /* Ensure padding/border doesn\'t increase width */\n \n /* Dashed border */border:2px dashed rgba(0, 0, 0, 0.15);border-bottom:none;\n \n /* Inner shadow to look like it\'s going into something + outer shadow */box-shadow:0 2px 8px rgba(0, 0, 0, 0.05), /* Subtle outer */\n inset 0 -15px 10px -10px rgba(0, 0, 0, 0.1); /* Inner bottom shadow */border-radius:8px 8px 0 0;padding:12px 0 0 0; /* bottom 0 px until expanded */margin-top:4px;}\n \n /* Visible / Expanded State */.expanded.svelte-1x95rqi .cv-toggle-content:where(.svelte-1x95rqi) {opacity:1;transform:translateY(0);overflow:visible;transition:max-height 0.3s ease, opacity 0.3s ease, overflow 0s 0.3s;}\n\n /* When expanded, complete the border */.has-border.expanded.svelte-1x95rqi {border-bottom:2px dashed rgba(0, 0, 0, 0.15);border-radius:8px; /* Round all corners */padding-bottom:12px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.05); /* Remove inner shadow when expanded */}\n\n /* Peek State */.peeking.svelte-1x95rqi .cv-toggle-content:where(.svelte-1x95rqi) {opacity:1;\n /* Mask for fade out effect */mask-image:linear-gradient(to bottom, black 50%, transparent 100%);-webkit-mask-image:linear-gradient(to bottom, black 50%, transparent 100%);}\n \n /* Label Style */.cv-toggle-label.svelte-1x95rqi {position:absolute;top:-12px;left:0;background:#e0e0e0;color:#333;font-size:0.75rem;font-weight:600;padding:2px 8px;border-radius:4px;z-index:10;pointer-events:auto;box-shadow:0 1px 2px rgba(0,0,0,0.1);}\n\n /* Adjust label position if bordered */.has-border.svelte-1x95rqi .cv-toggle-label:where(.svelte-1x95rqi) {top:-10px;left:0;}\n\n /* Expand Button */.cv-expand-btn.svelte-1x95rqi {position:absolute;bottom:-24px;left:50%;transform:translateX(-50%);display:flex;background:transparent;border:none;border-radius:50%;padding:4px;width:32px;height:32px;cursor:pointer;z-index:100;align-items:center;justify-content:center;color:#888;transition:all 0.2s ease;}.cv-expand-btn.svelte-1x95rqi:hover {background:rgba(0, 0, 0, 0.05);color:#000;transform:translateX(-50%) scale(1.1);}\n\n /* Accessing SVG inside button - might need :global if SVG is injected as HTML or just plain styles since it adheres to current scope */.cv-expand-btn.svelte-1x95rqi svg {display:block;opacity:0.6;width:24px;height:24px;transition:opacity 0.2s;}.cv-expand-btn.svelte-1x95rqi:hover svg {opacity:1;}'
|
|
11614
11868
|
};
|
|
11615
11869
|
|
|
11616
11870
|
function Toggle($$anchor, $$props) {
|
|
@@ -11619,18 +11873,32 @@ function Toggle($$anchor, $$props) {
|
|
|
11619
11873
|
|
|
11620
11874
|
// Props using Svelte 5 runes
|
|
11621
11875
|
let toggleId = prop($$props, 'toggleId', 7, ''),
|
|
11622
|
-
assetId = prop($$props, 'assetId', 7, '')
|
|
11876
|
+
assetId = prop($$props, 'assetId', 7, ''),
|
|
11877
|
+
showPeekBorder = prop($$props, 'showPeekBorder', 7, false),
|
|
11878
|
+
showLabel = prop($$props, 'showLabel', 7, false);
|
|
11623
11879
|
|
|
11624
11880
|
// Derive toggle IDs from toggle-id prop (can have multiple space-separated IDs)
|
|
11625
11881
|
let toggleIds = user_derived(() => (toggleId() || '').split(/\s+/).filter(Boolean));
|
|
11626
11882
|
|
|
11883
|
+
let toggleConfig = user_derived(() => store.config.toggles?.find((t) => t.toggleId === get$1(toggleIds)[0]));
|
|
11884
|
+
|
|
11627
11885
|
user_effect(() => {
|
|
11628
11886
|
get$1(toggleIds).forEach((id) => store.registerToggle(id));
|
|
11629
11887
|
});
|
|
11630
11888
|
|
|
11889
|
+
// Derive label text from config
|
|
11890
|
+
let labelText = user_derived(() => {
|
|
11891
|
+
if (!get$1(toggleConfig)) return '';
|
|
11892
|
+
|
|
11893
|
+
return get$1(toggleConfig).label || get$1(toggleIds)[0];
|
|
11894
|
+
});
|
|
11895
|
+
|
|
11631
11896
|
let localExpanded = state(false);
|
|
11897
|
+
let isUnconstrained = state(false /* New state to track if we can release max-height */);
|
|
11632
11898
|
let hasRendered = state(false);
|
|
11633
11899
|
let contentEl;
|
|
11900
|
+
let innerEl;
|
|
11901
|
+
let scrollHeight = state(0);
|
|
11634
11902
|
|
|
11635
11903
|
// Derive visibility from store state
|
|
11636
11904
|
let showState = user_derived(() => {
|
|
@@ -11649,21 +11917,77 @@ function Toggle($$anchor, $$props) {
|
|
|
11649
11917
|
const PEEK_HEIGHT = 70;
|
|
11650
11918
|
let isSmallContent = state(false);
|
|
11651
11919
|
|
|
11652
|
-
//
|
|
11920
|
+
// Setup ResizeObserver to track content height changes (e.g. images loading, window resize)
|
|
11653
11921
|
user_effect(() => {
|
|
11654
|
-
if (contentEl
|
|
11655
|
-
|
|
11656
|
-
|
|
11922
|
+
if (!contentEl) return;
|
|
11923
|
+
|
|
11924
|
+
const observer = new ResizeObserver(() => {
|
|
11925
|
+
// We measure the inner element's height
|
|
11926
|
+
// contentEl is the window, innerEl is the content
|
|
11927
|
+
if (innerEl) {
|
|
11928
|
+
set(scrollHeight, innerEl.offsetHeight, true);
|
|
11929
|
+
}
|
|
11930
|
+
|
|
11931
|
+
// Always track small content state to avoid race conditions/stale state
|
|
11932
|
+
if (get$1(scrollHeight) > 0) {
|
|
11933
|
+
if (get$1(scrollHeight) <= PEEK_HEIGHT) {
|
|
11934
|
+
set(isSmallContent, true);
|
|
11935
|
+
} else if (!get$1(isSmallContent)) {
|
|
11936
|
+
// Only set to false if it wasn't already true (latch behavior)
|
|
11937
|
+
// This ensures if it STARTS small, growing won't add the button.
|
|
11938
|
+
set(isSmallContent, false);
|
|
11939
|
+
}
|
|
11940
|
+
}
|
|
11941
|
+
});
|
|
11942
|
+
|
|
11943
|
+
if (innerEl) {
|
|
11944
|
+
observer.observe(innerEl);
|
|
11945
|
+
set(scrollHeight, innerEl.offsetHeight, true);
|
|
11657
11946
|
}
|
|
11947
|
+
|
|
11948
|
+
return () => {
|
|
11949
|
+
observer.disconnect();
|
|
11950
|
+
};
|
|
11658
11951
|
});
|
|
11659
11952
|
|
|
11660
|
-
let showFullContent = user_derived(() => get$1(showState) || get$1(peekState) && get$1(localExpanded));
|
|
11953
|
+
let showFullContent = user_derived(() => get$1(showState) || get$1(peekState) && get$1(localExpanded) || get$1(peekState) && get$1(isSmallContent));
|
|
11954
|
+
|
|
11955
|
+
// Reset unconstrained state when toggling
|
|
11956
|
+
user_effect(() => {
|
|
11957
|
+
if (get$1(showFullContent)) {
|
|
11958
|
+
// Expanding: start constrained (to animate), will unlock on transitionend
|
|
11959
|
+
set(isUnconstrained, false);
|
|
11960
|
+
} else {
|
|
11961
|
+
// Collapsing: must recapture height immediately (snap) or stay constrained
|
|
11962
|
+
set(isUnconstrained, false);
|
|
11963
|
+
}
|
|
11964
|
+
});
|
|
11661
11965
|
|
|
11662
11966
|
// Only show peek styling (mask) if it's peeking, not expanded locally, AND content is actually taller than peek height
|
|
11663
11967
|
let showPeekContent = user_derived(() => !get$1(showState) && get$1(peekState) && !get$1(localExpanded) && !get$1(isSmallContent));
|
|
11664
11968
|
|
|
11665
11969
|
let isHidden = user_derived(() => !get$1(showState) && !get$1(peekState));
|
|
11666
11970
|
|
|
11971
|
+
// Calculate dynamic max-height for animation
|
|
11972
|
+
let currentMaxHeight = user_derived(() => {
|
|
11973
|
+
if (get$1(isHidden)) return '0px';
|
|
11974
|
+
if (get$1(isUnconstrained) && get$1(showFullContent)) return 'none'; /* Release constraint when stable */
|
|
11975
|
+
if (get$1(showPeekContent)) return `${PEEK_HEIGHT}px`;
|
|
11976
|
+
if (get$1(showFullContent)) return get$1(scrollHeight) > 0 ? `${get$1(scrollHeight)}px` : '9999px';
|
|
11977
|
+
|
|
11978
|
+
return '0px';
|
|
11979
|
+
});
|
|
11980
|
+
|
|
11981
|
+
function handleTransitionEnd(e) {
|
|
11982
|
+
// Only care about max-height transitions on the content element
|
|
11983
|
+
if (e.propertyName !== 'max-height' || e.target !== contentEl) return;
|
|
11984
|
+
|
|
11985
|
+
// If we finished expanding, release the height constraint
|
|
11986
|
+
if (get$1(showFullContent)) {
|
|
11987
|
+
set(isUnconstrained, true);
|
|
11988
|
+
}
|
|
11989
|
+
}
|
|
11990
|
+
|
|
11667
11991
|
function toggleExpand(e) {
|
|
11668
11992
|
e.stopPropagation();
|
|
11669
11993
|
set(localExpanded, !get$1(localExpanded));
|
|
@@ -11694,47 +12018,93 @@ function Toggle($$anchor, $$props) {
|
|
|
11694
12018
|
set assetId($$value = '') {
|
|
11695
12019
|
assetId($$value);
|
|
11696
12020
|
flushSync();
|
|
12021
|
+
},
|
|
12022
|
+
|
|
12023
|
+
get showPeekBorder() {
|
|
12024
|
+
return showPeekBorder();
|
|
12025
|
+
},
|
|
12026
|
+
|
|
12027
|
+
set showPeekBorder($$value = false) {
|
|
12028
|
+
showPeekBorder($$value);
|
|
12029
|
+
flushSync();
|
|
12030
|
+
},
|
|
12031
|
+
|
|
12032
|
+
get showLabel() {
|
|
12033
|
+
return showLabel();
|
|
12034
|
+
},
|
|
12035
|
+
|
|
12036
|
+
set showLabel($$value = false) {
|
|
12037
|
+
showLabel($$value);
|
|
12038
|
+
flushSync();
|
|
11697
12039
|
}
|
|
11698
12040
|
};
|
|
11699
12041
|
|
|
11700
12042
|
var div = root$2();
|
|
11701
12043
|
let classes;
|
|
11702
|
-
var
|
|
11703
|
-
var node = child(div_1);
|
|
12044
|
+
var node = child(div);
|
|
11704
12045
|
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
12046
|
+
{
|
|
12047
|
+
var consequent = ($$anchor) => {
|
|
12048
|
+
var div_1 = root_1$1();
|
|
12049
|
+
var text = child(div_1, true);
|
|
12050
|
+
|
|
12051
|
+
reset(div_1);
|
|
12052
|
+
template_effect(() => set_text(text, get$1(labelText)));
|
|
12053
|
+
append($$anchor, div_1);
|
|
12054
|
+
};
|
|
11708
12055
|
|
|
11709
|
-
|
|
12056
|
+
if_block(node, ($$render) => {
|
|
12057
|
+
if (showLabel() && get$1(labelText) && !get$1(isHidden)) $$render(consequent);
|
|
12058
|
+
});
|
|
12059
|
+
}
|
|
12060
|
+
|
|
12061
|
+
var div_2 = sibling(node, 2);
|
|
12062
|
+
let styles;
|
|
12063
|
+
var div_3 = child(div_2);
|
|
12064
|
+
var node_1 = child(div_3);
|
|
12065
|
+
|
|
12066
|
+
slot(node_1, $$props, 'default', {});
|
|
12067
|
+
reset(div_3);
|
|
12068
|
+
bind_this(div_3, ($$value) => innerEl = $$value, () => innerEl);
|
|
12069
|
+
reset(div_2);
|
|
12070
|
+
bind_this(div_2, ($$value) => contentEl = $$value, () => contentEl);
|
|
12071
|
+
|
|
12072
|
+
var node_2 = sibling(div_2, 2);
|
|
11710
12073
|
|
|
11711
12074
|
{
|
|
11712
|
-
var
|
|
11713
|
-
var button =
|
|
12075
|
+
var consequent_1 = ($$anchor) => {
|
|
12076
|
+
var button = root_2$1();
|
|
11714
12077
|
|
|
11715
12078
|
button.__click = toggleExpand;
|
|
11716
12079
|
|
|
11717
|
-
var
|
|
12080
|
+
var node_3 = child(button);
|
|
11718
12081
|
|
|
11719
|
-
html(
|
|
12082
|
+
html(node_3, () => get$1(localExpanded) ? getChevronUpIcon() : getChevronDownIcon());
|
|
11720
12083
|
reset(button);
|
|
11721
12084
|
template_effect(() => set_attribute(button, 'aria-label', get$1(localExpanded) ? "Collapse content" : "Expand content"));
|
|
11722
12085
|
append($$anchor, button);
|
|
11723
12086
|
};
|
|
11724
12087
|
|
|
11725
|
-
if_block(
|
|
11726
|
-
if (get$1(peekState) && !get$1(isSmallContent)) $$render(
|
|
12088
|
+
if_block(node_2, ($$render) => {
|
|
12089
|
+
if (get$1(peekState) && !get$1(isSmallContent)) $$render(consequent_1);
|
|
11727
12090
|
});
|
|
11728
12091
|
}
|
|
11729
12092
|
|
|
11730
12093
|
reset(div);
|
|
11731
12094
|
|
|
11732
|
-
template_effect(() =>
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
12095
|
+
template_effect(() => {
|
|
12096
|
+
classes = set_class(div, 1, 'cv-toggle-wrapper svelte-1x95rqi', null, classes, {
|
|
12097
|
+
expanded: get$1(showFullContent) && !get$1(showPeekContent),
|
|
12098
|
+
peeking: get$1(showPeekContent),
|
|
12099
|
+
'peek-mode': get$1(peekState),
|
|
12100
|
+
hidden: get$1(isHidden),
|
|
12101
|
+
'has-border': showPeekBorder() && get$1(peekState)
|
|
12102
|
+
});
|
|
11737
12103
|
|
|
12104
|
+
styles = set_style(div_2, '', styles, { 'max-height': get$1(currentMaxHeight) });
|
|
12105
|
+
});
|
|
12106
|
+
|
|
12107
|
+
event('transitionend', div_2, handleTransitionEnd);
|
|
11738
12108
|
append($$anchor, div);
|
|
11739
12109
|
|
|
11740
12110
|
return pop($$exports);
|
|
@@ -11746,7 +12116,15 @@ customElements.define('cv-toggle', create_custom_element(
|
|
|
11746
12116
|
Toggle,
|
|
11747
12117
|
{
|
|
11748
12118
|
toggleId: { attribute: 'toggle-id', reflect: true, type: 'String' },
|
|
11749
|
-
assetId: { attribute: 'asset-id', reflect: true, type: 'String' }
|
|
12119
|
+
assetId: { attribute: 'asset-id', reflect: true, type: 'String' },
|
|
12120
|
+
|
|
12121
|
+
showPeekBorder: {
|
|
12122
|
+
attribute: 'show-peek-border',
|
|
12123
|
+
reflect: true,
|
|
12124
|
+
type: 'Boolean'
|
|
12125
|
+
},
|
|
12126
|
+
|
|
12127
|
+
showLabel: { attribute: 'show-label', reflect: true, type: 'Boolean' }
|
|
11750
12128
|
},
|
|
11751
12129
|
['default'],
|
|
11752
12130
|
[],
|
|
@@ -11757,7 +12135,7 @@ var root$1 = from_html(`<div><!></div>`);
|
|
|
11757
12135
|
|
|
11758
12136
|
const $$css$3 = {
|
|
11759
12137
|
hash: 'svelte-17fgzpj',
|
|
11760
|
-
code: ':host {display:block;}:host(.cv-hidden) {display:none !important;}:host(.cv-visible) {display:block !important;}:host([active="true"]) {display:block;}.cv-tab-content.svelte-17fgzpj {display:none;\n animation: svelte-17fgzpj-fade-in 0.2s ease-in-out;padding:1rem
|
|
12138
|
+
code: ':host {display:block;}:host(.cv-hidden) {display:none !important;}:host(.cv-visible) {display:block !important;}:host([active="true"]) {display:block;}.cv-tab-content.svelte-17fgzpj {display:none;\n animation: svelte-17fgzpj-fade-in 0.2s ease-in-out;padding-top:1rem;padding-bottom:0.5rem;padding-left:0;padding-right:0;}.cv-tab-content.active.svelte-17fgzpj {display:block;}\n\n /* Hide cv-tab-header source element; content is extracted to nav link */.svelte-17fgzpj::slotted(cv-tab-header) {display:none !important;}\n\n /* Allow cv-tab-body to flow naturally */.svelte-17fgzpj::slotted(cv-tab-body) {display:block;}\n\n @keyframes svelte-17fgzpj-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }'
|
|
11761
12139
|
};
|
|
11762
12140
|
|
|
11763
12141
|
function Tab($$anchor, $$props) {
|
|
@@ -11806,7 +12184,8 @@ customElements.define('cv-tab', create_custom_element(
|
|
|
11806
12184
|
|
|
11807
12185
|
var root_2 = from_html(`<li class="nav-item svelte-1630cmg"><a role="tab" title="Double-click a tab to 'pin' it in all similar tab groups."><span class="cv-tab-header-container svelte-1630cmg"><span class="cv-tab-header-text svelte-1630cmg"><!></span> <span class="cv-tab-pin-icon svelte-1630cmg"><!></span></span></a></li>`);
|
|
11808
12186
|
var root_1 = from_html(`<ul class="cv-tabs-nav nav-tabs svelte-1630cmg" role="tablist"></ul>`);
|
|
11809
|
-
var
|
|
12187
|
+
var root_3 = from_html(`<link rel="stylesheet"/>`);
|
|
12188
|
+
var root = from_html(`<div class="cv-tabgroup-container"><!> <!> <div class="cv-tabgroup-content"><!></div> <div class="cv-tabgroup-bottom-border svelte-1630cmg"></div></div>`);
|
|
11810
12189
|
|
|
11811
12190
|
const $$css$2 = {
|
|
11812
12191
|
hash: 'svelte-1630cmg',
|
|
@@ -12060,10 +12439,19 @@ function TabGroup($$anchor, $$props) {
|
|
|
12060
12439
|
});
|
|
12061
12440
|
}
|
|
12062
12441
|
|
|
12063
|
-
var
|
|
12064
|
-
|
|
12442
|
+
var node_3 = sibling(node, 2);
|
|
12443
|
+
|
|
12444
|
+
each(node_3, 16, () => Array.from(document.querySelectorAll('link[rel="stylesheet"]')), index, ($$anchor, link) => {
|
|
12445
|
+
var link_1 = root_3();
|
|
12446
|
+
|
|
12447
|
+
template_effect(() => set_attribute(link_1, 'href', link.href));
|
|
12448
|
+
append($$anchor, link_1);
|
|
12449
|
+
});
|
|
12450
|
+
|
|
12451
|
+
var div_1 = sibling(node_3, 2);
|
|
12452
|
+
var node_4 = child(div_1);
|
|
12065
12453
|
|
|
12066
|
-
slot(
|
|
12454
|
+
slot(node_4, $$props, 'default', {});
|
|
12067
12455
|
reset(div_1);
|
|
12068
12456
|
bind_this(div_1, ($$value) => set(contentWrapper, $$value), () => get$1(contentWrapper));
|
|
12069
12457
|
next(2);
|
|
@@ -12169,5 +12557,5 @@ class CustomViews {
|
|
|
12169
12557
|
}
|
|
12170
12558
|
}
|
|
12171
12559
|
|
|
12172
|
-
export { AssetsManager, CustomViews, CustomViewsCore,
|
|
12560
|
+
export { AssetsManager, CustomViews, CustomViewsCore, CustomViewsSettings, PersistenceManager, URLStateManager };
|
|
12173
12561
|
//# sourceMappingURL=custom-views.esm.js.map
|