@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.cjs.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
|
*/
|
|
@@ -7162,6 +7162,26 @@ function get_binding_group_value(group, __value, checked) {
|
|
|
7162
7162
|
return Array.from(value);
|
|
7163
7163
|
}
|
|
7164
7164
|
|
|
7165
|
+
/**
|
|
7166
|
+
* Makes an `export`ed (non-prop) variable available on the `$$props` object
|
|
7167
|
+
* so that consumers can do `bind:x` on the component.
|
|
7168
|
+
* @template V
|
|
7169
|
+
* @param {Record<string, unknown>} props
|
|
7170
|
+
* @param {string} prop
|
|
7171
|
+
* @param {V} value
|
|
7172
|
+
* @returns {void}
|
|
7173
|
+
*/
|
|
7174
|
+
function bind_prop(props, prop, value) {
|
|
7175
|
+
var desc = get_descriptor(props, prop);
|
|
7176
|
+
|
|
7177
|
+
if (desc && desc.set) {
|
|
7178
|
+
props[prop] = value;
|
|
7179
|
+
teardown(() => {
|
|
7180
|
+
props[prop] = null;
|
|
7181
|
+
});
|
|
7182
|
+
}
|
|
7183
|
+
}
|
|
7184
|
+
|
|
7165
7185
|
/**
|
|
7166
7186
|
* @param {any} bound_value
|
|
7167
7187
|
* @param {Element} element_or_component
|
|
@@ -9387,31 +9407,58 @@ class CustomViewsCore {
|
|
|
9387
9407
|
}
|
|
9388
9408
|
}
|
|
9389
9409
|
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
var root$a = from_html(`<div role="button" tabindex="0" aria-label="Open Custom Views">⚙</div>`);
|
|
9410
|
+
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>`);
|
|
9393
9411
|
|
|
9394
9412
|
const $$css$e = {
|
|
9395
|
-
hash: 'svelte-
|
|
9396
|
-
code: '
|
|
9413
|
+
hash: 'svelte-1jgbyi0',
|
|
9414
|
+
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;}'
|
|
9397
9415
|
};
|
|
9398
9416
|
|
|
9399
|
-
function
|
|
9417
|
+
function IntroCallout($$anchor, $$props) {
|
|
9400
9418
|
append_styles$1($$anchor, $$css$e);
|
|
9401
9419
|
|
|
9402
|
-
let position = prop($$props, 'position',
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9420
|
+
let position = prop($$props, 'position', 3, 'middle-left'),
|
|
9421
|
+
message = prop($$props, 'message', 3, 'Customize your reading experience here.'),
|
|
9422
|
+
onclose = prop($$props, 'onclose', 3, () => {}),
|
|
9423
|
+
enablePulse = prop($$props, 'enablePulse', 3, true),
|
|
9424
|
+
backgroundColor = prop($$props, 'backgroundColor', 3, undefined),
|
|
9425
|
+
textColor = prop($$props, 'textColor', 3, undefined);
|
|
9407
9426
|
|
|
9408
|
-
|
|
9409
|
-
|
|
9427
|
+
var // Map widget position to callout position logic
|
|
9428
|
+
/*
|
|
9429
|
+
Positions need to be adjusted based on the widget icon location.
|
|
9430
|
+
"right" positions -> callout appears to the left of the icon
|
|
9431
|
+
"left" positions -> callout appears to the right of the icon
|
|
9432
|
+
"top" -> aligned top
|
|
9433
|
+
"bottom" -> aligned bottom
|
|
9434
|
+
*/
|
|
9435
|
+
div = root$a();
|
|
9436
|
+
|
|
9437
|
+
var div_1 = child(div);
|
|
9438
|
+
let styles;
|
|
9439
|
+
var button = child(div_1);
|
|
9440
|
+
|
|
9441
|
+
button.__click = function (...$$args) {
|
|
9442
|
+
onclose()?.apply(this, $$args);
|
|
9410
9443
|
};
|
|
9411
9444
|
|
|
9445
|
+
var p = sibling(button, 2);
|
|
9446
|
+
var text = child(p, true);
|
|
9447
|
+
|
|
9448
|
+
reset(p);
|
|
9449
|
+
reset(div_1);
|
|
9450
|
+
reset(div);
|
|
9451
|
+
|
|
9412
9452
|
template_effect(() => {
|
|
9413
|
-
set_class(div, 1, `
|
|
9414
|
-
|
|
9453
|
+
set_class(div, 1, `callout-wrapper pos-${position() ?? ''}`, 'svelte-1jgbyi0');
|
|
9454
|
+
set_class(div_1, 1, `callout ${enablePulse() ? 'cv-pulse' : ''}`, 'svelte-1jgbyi0');
|
|
9455
|
+
|
|
9456
|
+
styles = set_style(div_1, '', styles, {
|
|
9457
|
+
'--cv-callout-bg': backgroundColor(),
|
|
9458
|
+
'--cv-callout-text': textColor()
|
|
9459
|
+
});
|
|
9460
|
+
|
|
9461
|
+
set_text(text, message());
|
|
9415
9462
|
});
|
|
9416
9463
|
|
|
9417
9464
|
append($$anchor, div);
|
|
@@ -9419,6 +9466,207 @@ function WidgetIcon($$anchor, $$props) {
|
|
|
9419
9466
|
|
|
9420
9467
|
delegate(['click']);
|
|
9421
9468
|
|
|
9469
|
+
enable_legacy_mode_flag();
|
|
9470
|
+
|
|
9471
|
+
var root$9 = from_html(`<div role="button" tabindex="0" aria-label="Open Custom Views Settings"><span class="cv-gear svelte-11erbyi">⚙</span></div>`);
|
|
9472
|
+
|
|
9473
|
+
const $$css$d = {
|
|
9474
|
+
hash: 'svelte-11erbyi',
|
|
9475
|
+
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 }'
|
|
9476
|
+
};
|
|
9477
|
+
|
|
9478
|
+
function SettingsIcon($$anchor, $$props) {
|
|
9479
|
+
push($$props, false);
|
|
9480
|
+
append_styles$1($$anchor, $$css$d);
|
|
9481
|
+
|
|
9482
|
+
let position = prop($$props, 'position', 8, 'middle-left');
|
|
9483
|
+
let title = prop($$props, 'title', 8, 'Customize View');
|
|
9484
|
+
let pulse = prop($$props, 'pulse', 8, false);
|
|
9485
|
+
let onclick = prop($$props, 'onclick', 8, undefined);
|
|
9486
|
+
|
|
9487
|
+
// Custom Styles
|
|
9488
|
+
let iconColor = prop($$props, 'iconColor', 8, undefined);
|
|
9489
|
+
|
|
9490
|
+
let backgroundColor = prop($$props, 'backgroundColor', 8, undefined);
|
|
9491
|
+
let opacity = prop($$props, 'opacity', 8, undefined);
|
|
9492
|
+
let scale = prop($$props, 'scale', 8, undefined);
|
|
9493
|
+
|
|
9494
|
+
function resetPosition() {
|
|
9495
|
+
set(currentOffset, 0);
|
|
9496
|
+
startOffset = 0;
|
|
9497
|
+
localStorage.removeItem(STORAGE_KEY);
|
|
9498
|
+
}
|
|
9499
|
+
|
|
9500
|
+
let isDragging = mutable_source(false);
|
|
9501
|
+
let startY = 0;
|
|
9502
|
+
let startOffset = 0;
|
|
9503
|
+
let currentOffset = mutable_source(0);
|
|
9504
|
+
const STORAGE_KEY = 'cv-settings-icon-offset';
|
|
9505
|
+
|
|
9506
|
+
onMount(() => {
|
|
9507
|
+
// Load persisted offset
|
|
9508
|
+
const saved = localStorage.getItem(STORAGE_KEY);
|
|
9509
|
+
|
|
9510
|
+
if (saved) {
|
|
9511
|
+
set(currentOffset, parseFloat(saved));
|
|
9512
|
+
}
|
|
9513
|
+
|
|
9514
|
+
// Global event listeners to handle drag leaving the element
|
|
9515
|
+
window.addEventListener('mousemove', onGlobalMove);
|
|
9516
|
+
|
|
9517
|
+
window.addEventListener('mouseup', onGlobalEnd);
|
|
9518
|
+
window.addEventListener('touchmove', onGlobalMove, { passive: false });
|
|
9519
|
+
window.addEventListener('touchend', onGlobalEnd);
|
|
9520
|
+
|
|
9521
|
+
return () => {
|
|
9522
|
+
window.removeEventListener('mousemove', onGlobalMove);
|
|
9523
|
+
window.removeEventListener('mouseup', onGlobalEnd);
|
|
9524
|
+
window.removeEventListener('touchmove', onGlobalMove);
|
|
9525
|
+
window.removeEventListener('touchend', onGlobalEnd);
|
|
9526
|
+
};
|
|
9527
|
+
});
|
|
9528
|
+
|
|
9529
|
+
// Refined Click Logic:
|
|
9530
|
+
// We'll capture the specific startY of the interaction.
|
|
9531
|
+
// If at mouseup (which happens before click), the delta is > 5, we set a flag 'suppressClick'.
|
|
9532
|
+
// On click, if suppressClick is true, we reset it and return.
|
|
9533
|
+
let suppressClick = false;
|
|
9534
|
+
|
|
9535
|
+
function onMouseDown(e) {
|
|
9536
|
+
if (e.button !== 0) return;
|
|
9537
|
+
|
|
9538
|
+
handleRefinedStart(e.clientY);
|
|
9539
|
+
}
|
|
9540
|
+
|
|
9541
|
+
function onTouchStart(e) {
|
|
9542
|
+
if (e.touches.length !== 1) return;
|
|
9543
|
+
|
|
9544
|
+
handleRefinedStart(e.touches[0].clientY);
|
|
9545
|
+
}
|
|
9546
|
+
|
|
9547
|
+
function handleRefinedStart(clientY) {
|
|
9548
|
+
set(isDragging, true);
|
|
9549
|
+
startY = clientY;
|
|
9550
|
+
startOffset = get$1(currentOffset);
|
|
9551
|
+
suppressClick = false;
|
|
9552
|
+
}
|
|
9553
|
+
|
|
9554
|
+
function onGlobalMove(e) {
|
|
9555
|
+
if (!get$1(isDragging)) return;
|
|
9556
|
+
|
|
9557
|
+
let clientY;
|
|
9558
|
+
|
|
9559
|
+
// Safer type check and access
|
|
9560
|
+
if (window.TouchEvent && e instanceof TouchEvent && e.touches.length > 0) {
|
|
9561
|
+
clientY = e.touches[0].clientY;
|
|
9562
|
+
} else if (e instanceof MouseEvent) {
|
|
9563
|
+
clientY = e.clientY;
|
|
9564
|
+
} else {
|
|
9565
|
+
return;
|
|
9566
|
+
}
|
|
9567
|
+
|
|
9568
|
+
const deltaY = clientY - startY;
|
|
9569
|
+
|
|
9570
|
+
set(currentOffset, startOffset + deltaY);
|
|
9571
|
+
|
|
9572
|
+
if (Math.abs(deltaY) > 5) {
|
|
9573
|
+
suppressClick = true;
|
|
9574
|
+
}
|
|
9575
|
+
}
|
|
9576
|
+
|
|
9577
|
+
function onGlobalEnd() {
|
|
9578
|
+
if (!get$1(isDragging)) return;
|
|
9579
|
+
|
|
9580
|
+
set(isDragging, false);
|
|
9581
|
+
localStorage.setItem(STORAGE_KEY, get$1(currentOffset).toString());
|
|
9582
|
+
}
|
|
9583
|
+
|
|
9584
|
+
function onClick(e) {
|
|
9585
|
+
if (suppressClick) {
|
|
9586
|
+
e.stopImmediatePropagation();
|
|
9587
|
+
e.preventDefault();
|
|
9588
|
+
suppressClick = false;
|
|
9589
|
+
|
|
9590
|
+
return;
|
|
9591
|
+
}
|
|
9592
|
+
|
|
9593
|
+
if (onclick()) onclick()();
|
|
9594
|
+
}
|
|
9595
|
+
|
|
9596
|
+
// Key handler for accessibility
|
|
9597
|
+
function onKeyDown(e) {
|
|
9598
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
9599
|
+
e.preventDefault();
|
|
9600
|
+
|
|
9601
|
+
if (onclick()) onclick()();
|
|
9602
|
+
}
|
|
9603
|
+
}
|
|
9604
|
+
|
|
9605
|
+
// Helper for transforms
|
|
9606
|
+
function getTransform(pos, offset, s) {
|
|
9607
|
+
const isMiddle = pos && pos.includes('middle');
|
|
9608
|
+
let t = '';
|
|
9609
|
+
|
|
9610
|
+
if (isMiddle) {
|
|
9611
|
+
t = `translateY(calc(-50% + ${offset}px))`;
|
|
9612
|
+
} else {
|
|
9613
|
+
t = `translateY(${offset}px)`;
|
|
9614
|
+
}
|
|
9615
|
+
|
|
9616
|
+
if (s && s !== 1) {
|
|
9617
|
+
t += ` scale(${s})`;
|
|
9618
|
+
}
|
|
9619
|
+
|
|
9620
|
+
return t;
|
|
9621
|
+
}
|
|
9622
|
+
|
|
9623
|
+
var $$exports = { resetPosition };
|
|
9624
|
+
|
|
9625
|
+
init();
|
|
9626
|
+
|
|
9627
|
+
var div = root$9();
|
|
9628
|
+
|
|
9629
|
+
event('mousemove', $window, onGlobalMove);
|
|
9630
|
+
event('mouseup', $window, onGlobalEnd);
|
|
9631
|
+
event('touchmove', $window, onGlobalMove, void 0, false);
|
|
9632
|
+
event('touchend', $window, onGlobalEnd);
|
|
9633
|
+
|
|
9634
|
+
let styles;
|
|
9635
|
+
|
|
9636
|
+
template_effect(
|
|
9637
|
+
($0) => {
|
|
9638
|
+
set_class(div, 1, `cv-settings-icon cv-settings-${position() ?? ''} ${pulse() ? 'cv-pulse' : ''}`, 'svelte-11erbyi');
|
|
9639
|
+
set_attribute(div, 'title', title());
|
|
9640
|
+
styles = set_style(div, '', styles, $0);
|
|
9641
|
+
},
|
|
9642
|
+
[
|
|
9643
|
+
() => ({
|
|
9644
|
+
'--cv-icon-color': iconColor(),
|
|
9645
|
+
'--cv-icon-bg': backgroundColor(),
|
|
9646
|
+
'--cv-icon-opacity': opacity(),
|
|
9647
|
+
|
|
9648
|
+
transform: (
|
|
9649
|
+
deep_read_state(position()),
|
|
9650
|
+
get$1(currentOffset),
|
|
9651
|
+
deep_read_state(scale()),
|
|
9652
|
+
untrack(() => getTransform(position(), get$1(currentOffset), scale()))
|
|
9653
|
+
),
|
|
9654
|
+
|
|
9655
|
+
cursor: get$1(isDragging) ? 'grabbing' : 'grab'
|
|
9656
|
+
})
|
|
9657
|
+
]
|
|
9658
|
+
);
|
|
9659
|
+
|
|
9660
|
+
event('mousedown', div, onMouseDown);
|
|
9661
|
+
event('touchstart', div, onTouchStart, void 0, false);
|
|
9662
|
+
event('click', div, onClick);
|
|
9663
|
+
event('keydown', div, onKeyDown);
|
|
9664
|
+
append($$anchor, div);
|
|
9665
|
+
bind_prop($$props, 'resetPosition', resetPosition);
|
|
9666
|
+
|
|
9667
|
+
return pop($$exports);
|
|
9668
|
+
}
|
|
9669
|
+
|
|
9422
9670
|
/** @import { BlurParams, CrossfadeParams, DrawParams, FadeParams, FlyParams, ScaleParams, SlideParams, TransitionConfig } from './public' */
|
|
9423
9671
|
|
|
9424
9672
|
|
|
@@ -9556,7 +9804,7 @@ function scale(
|
|
|
9556
9804
|
}
|
|
9557
9805
|
|
|
9558
9806
|
/**
|
|
9559
|
-
* Icon utilities for CustomViews
|
|
9807
|
+
* Icon utilities for CustomViews settings
|
|
9560
9808
|
* Centralized SVG icons for better maintainability and reusability
|
|
9561
9809
|
*/
|
|
9562
9810
|
/**
|
|
@@ -9692,16 +9940,16 @@ function getChevronUpIcon() {
|
|
|
9692
9940
|
}
|
|
9693
9941
|
|
|
9694
9942
|
var root_1$8 = from_html(`<p class="description svelte-dp7a9f"> </p>`);
|
|
9695
|
-
var root$
|
|
9943
|
+
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>`);
|
|
9696
9944
|
|
|
9697
|
-
const $$css$
|
|
9945
|
+
const $$css$c = {
|
|
9698
9946
|
hash: 'svelte-dp7a9f',
|
|
9699
|
-
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-
|
|
9947
|
+
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);}'
|
|
9700
9948
|
};
|
|
9701
9949
|
|
|
9702
9950
|
function ToggleItem($$anchor, $$props) {
|
|
9703
9951
|
push($$props, false);
|
|
9704
|
-
append_styles$1($$anchor, $$css$
|
|
9952
|
+
append_styles$1($$anchor, $$css$c);
|
|
9705
9953
|
|
|
9706
9954
|
const binding_group = [];
|
|
9707
9955
|
let toggle = prop($$props, 'toggle', 8);
|
|
@@ -9710,7 +9958,7 @@ function ToggleItem($$anchor, $$props) {
|
|
|
9710
9958
|
|
|
9711
9959
|
init();
|
|
9712
9960
|
|
|
9713
|
-
var div = root$
|
|
9961
|
+
var div = root$8();
|
|
9714
9962
|
var div_1 = child(div);
|
|
9715
9963
|
var div_2 = child(div_1);
|
|
9716
9964
|
var p = child(div_2);
|
|
@@ -9808,17 +10056,17 @@ function ToggleItem($$anchor, $$props) {
|
|
|
9808
10056
|
delegate(['change']);
|
|
9809
10057
|
|
|
9810
10058
|
var root_1$7 = from_html(`<p class="description svelte-741mad"> </p>`);
|
|
9811
|
-
var root_2$
|
|
9812
|
-
var root$
|
|
10059
|
+
var root_2$4 = from_html(`<option> </option>`);
|
|
10060
|
+
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>`);
|
|
9813
10061
|
|
|
9814
|
-
const $$css$
|
|
10062
|
+
const $$css$b = {
|
|
9815
10063
|
hash: 'svelte-741mad',
|
|
9816
|
-
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-
|
|
10064
|
+
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;}'
|
|
9817
10065
|
};
|
|
9818
10066
|
|
|
9819
10067
|
function TabGroupItem($$anchor, $$props) {
|
|
9820
10068
|
push($$props, false);
|
|
9821
|
-
append_styles$1($$anchor, $$css$
|
|
10069
|
+
append_styles$1($$anchor, $$css$b);
|
|
9822
10070
|
|
|
9823
10071
|
let group = prop($$props, 'group', 8);
|
|
9824
10072
|
let activeTabId = prop($$props, 'activeTabId', 12, '');
|
|
@@ -9833,7 +10081,7 @@ function TabGroupItem($$anchor, $$props) {
|
|
|
9833
10081
|
|
|
9834
10082
|
init();
|
|
9835
10083
|
|
|
9836
|
-
var div = root$
|
|
10084
|
+
var div = root$7();
|
|
9837
10085
|
var div_1 = child(div);
|
|
9838
10086
|
var label = child(div_1);
|
|
9839
10087
|
var text = child(label, true);
|
|
@@ -9872,7 +10120,7 @@ function TabGroupItem($$anchor, $$props) {
|
|
|
9872
10120
|
select.__change = onChange;
|
|
9873
10121
|
|
|
9874
10122
|
each(select, 5, () => (deep_read_state(group()), untrack(() => group().tabs)), index, ($$anchor, tab) => {
|
|
9875
|
-
var option = root_2$
|
|
10123
|
+
var option = root_2$4();
|
|
9876
10124
|
var text_2 = child(option, true);
|
|
9877
10125
|
|
|
9878
10126
|
reset(option);
|
|
@@ -9924,23 +10172,23 @@ function TabGroupItem($$anchor, $$props) {
|
|
|
9924
10172
|
|
|
9925
10173
|
delegate(['change']);
|
|
9926
10174
|
|
|
9927
|
-
var
|
|
9928
|
-
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>`);
|
|
10175
|
+
var root_2$3 = from_html(`<p class="description svelte-1tduk3b"> </p>`);
|
|
10176
|
+
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>`);
|
|
9929
10177
|
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>`);
|
|
9930
|
-
var
|
|
10178
|
+
var root_1$6 = from_html(`<div class="tab-content active svelte-1tduk3b"><!> <!> <!></div>`);
|
|
9931
10179
|
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>`);
|
|
9932
10180
|
var root_12 = from_html(`<button class="reset-btn svelte-1tduk3b" title="Reset to Default"><span><!></span> <span>Reset</span></button>`);
|
|
9933
10181
|
var root_13 = from_html(`<div></div>`);
|
|
9934
|
-
var root$
|
|
10182
|
+
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>`);
|
|
9935
10183
|
|
|
9936
|
-
const $$css$
|
|
10184
|
+
const $$css$a = {
|
|
9937
10185
|
hash: 'svelte-1tduk3b',
|
|
9938
|
-
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-
|
|
10186
|
+
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);}'
|
|
9939
10187
|
};
|
|
9940
10188
|
|
|
9941
10189
|
function Modal($$anchor, $$props) {
|
|
9942
10190
|
push($$props, false);
|
|
9943
|
-
append_styles$1($$anchor, $$css$
|
|
10191
|
+
append_styles$1($$anchor, $$css$a);
|
|
9944
10192
|
|
|
9945
10193
|
let title = prop($$props, 'title', 8, 'Customize View');
|
|
9946
10194
|
let description = prop($$props, 'description', 8, '');
|
|
@@ -10023,7 +10271,7 @@ function Modal($$anchor, $$props) {
|
|
|
10023
10271
|
legacy_pre_effect_reset();
|
|
10024
10272
|
init();
|
|
10025
10273
|
|
|
10026
|
-
var div = root$
|
|
10274
|
+
var div = root$6();
|
|
10027
10275
|
|
|
10028
10276
|
div.__click = (e) => {
|
|
10029
10277
|
if (e.target === e.currentTarget) onclose()();
|
|
@@ -10057,24 +10305,7 @@ function Modal($$anchor, $$props) {
|
|
|
10057
10305
|
reset(header);
|
|
10058
10306
|
|
|
10059
10307
|
var main = sibling(header, 2);
|
|
10060
|
-
var
|
|
10061
|
-
|
|
10062
|
-
{
|
|
10063
|
-
var consequent = ($$anchor) => {
|
|
10064
|
-
var p = root_1$6();
|
|
10065
|
-
var text_1 = child(p, true);
|
|
10066
|
-
|
|
10067
|
-
reset(p);
|
|
10068
|
-
template_effect(() => set_text(text_1, description()));
|
|
10069
|
-
append($$anchor, p);
|
|
10070
|
-
};
|
|
10071
|
-
|
|
10072
|
-
if_block(node_2, ($$render) => {
|
|
10073
|
-
if (description()) $$render(consequent);
|
|
10074
|
-
});
|
|
10075
|
-
}
|
|
10076
|
-
|
|
10077
|
-
var div_5 = sibling(node_2, 2);
|
|
10308
|
+
var div_5 = child(main);
|
|
10078
10309
|
var button_1 = child(div_5);
|
|
10079
10310
|
|
|
10080
10311
|
button_1.__click = () => set(activeTab, 'customize');
|
|
@@ -10084,16 +10315,33 @@ function Modal($$anchor, $$props) {
|
|
|
10084
10315
|
button_2.__click = () => set(activeTab, 'share');
|
|
10085
10316
|
reset(div_5);
|
|
10086
10317
|
|
|
10087
|
-
var
|
|
10318
|
+
var node_2 = sibling(div_5, 2);
|
|
10088
10319
|
|
|
10089
10320
|
{
|
|
10090
10321
|
var consequent_3 = ($$anchor) => {
|
|
10091
|
-
var div_6 =
|
|
10092
|
-
var
|
|
10322
|
+
var div_6 = root_1$6();
|
|
10323
|
+
var node_3 = child(div_6);
|
|
10324
|
+
|
|
10325
|
+
{
|
|
10326
|
+
var consequent = ($$anchor) => {
|
|
10327
|
+
var p = root_2$3();
|
|
10328
|
+
var text_1 = child(p, true);
|
|
10329
|
+
|
|
10330
|
+
reset(p);
|
|
10331
|
+
template_effect(() => set_text(text_1, description()));
|
|
10332
|
+
append($$anchor, p);
|
|
10333
|
+
};
|
|
10334
|
+
|
|
10335
|
+
if_block(node_3, ($$render) => {
|
|
10336
|
+
if (description()) $$render(consequent);
|
|
10337
|
+
});
|
|
10338
|
+
}
|
|
10339
|
+
|
|
10340
|
+
var node_4 = sibling(node_3, 2);
|
|
10093
10341
|
|
|
10094
10342
|
{
|
|
10095
10343
|
var consequent_1 = ($$anchor) => {
|
|
10096
|
-
var div_7 = root_3();
|
|
10344
|
+
var div_7 = root_3$1();
|
|
10097
10345
|
var div_8 = sibling(child(div_7), 2);
|
|
10098
10346
|
|
|
10099
10347
|
each(div_8, 5, toggles, (toggle) => toggle.toggleId, ($$anchor, toggle) => {
|
|
@@ -10282,7 +10530,7 @@ function Modal($$anchor, $$props) {
|
|
|
10282
10530
|
append($$anchor, div_16);
|
|
10283
10531
|
};
|
|
10284
10532
|
|
|
10285
|
-
if_block(
|
|
10533
|
+
if_block(node_2, ($$render) => {
|
|
10286
10534
|
if (get$1(activeTab) === 'customize') $$render(consequent_3); else $$render(alternate_2, false);
|
|
10287
10535
|
});
|
|
10288
10536
|
}
|
|
@@ -10353,62 +10601,6 @@ function Modal($$anchor, $$props) {
|
|
|
10353
10601
|
|
|
10354
10602
|
delegate(['click', 'change']);
|
|
10355
10603
|
|
|
10356
|
-
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>`);
|
|
10357
|
-
|
|
10358
|
-
const $$css$a = {
|
|
10359
|
-
hash: 'svelte-ixixmj',
|
|
10360
|
-
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);}'
|
|
10361
|
-
};
|
|
10362
|
-
|
|
10363
|
-
function IntroCallout($$anchor, $$props) {
|
|
10364
|
-
push($$props, false);
|
|
10365
|
-
append_styles$1($$anchor, $$css$a);
|
|
10366
|
-
|
|
10367
|
-
let position = prop($$props, 'position', 8, 'middle-left');
|
|
10368
|
-
let message = prop($$props, 'message', 8, 'Customize your reading experience here.');
|
|
10369
|
-
let onclose = prop($$props, 'onclose', 8, () => {});
|
|
10370
|
-
|
|
10371
|
-
// Map widget position to callout position logic
|
|
10372
|
-
/*
|
|
10373
|
-
Positions need to be adjusted based on the widget icon location.
|
|
10374
|
-
"right" positions -> callout appears to the left of the icon
|
|
10375
|
-
"left" positions -> callout appears to the right of the icon
|
|
10376
|
-
"top" -> aligned top
|
|
10377
|
-
"bottom" -> aligned bottom
|
|
10378
|
-
*/
|
|
10379
|
-
function getTransitionParams() {
|
|
10380
|
-
if (position() && position().includes('right')) return { x: 20, duration: 300 };
|
|
10381
|
-
|
|
10382
|
-
return { x: -20, duration: 300 };
|
|
10383
|
-
}
|
|
10384
|
-
|
|
10385
|
-
init();
|
|
10386
|
-
|
|
10387
|
-
var div = root$6();
|
|
10388
|
-
var button = child(div);
|
|
10389
|
-
|
|
10390
|
-
button.__click = function (...$$args) {
|
|
10391
|
-
onclose()?.apply(this, $$args);
|
|
10392
|
-
};
|
|
10393
|
-
|
|
10394
|
-
var p = sibling(button, 2);
|
|
10395
|
-
var text = child(p, true);
|
|
10396
|
-
|
|
10397
|
-
reset(p);
|
|
10398
|
-
reset(div);
|
|
10399
|
-
|
|
10400
|
-
template_effect(() => {
|
|
10401
|
-
set_class(div, 1, `callout pos-${position() ?? ''}`, 'svelte-ixixmj');
|
|
10402
|
-
set_text(text, message());
|
|
10403
|
-
});
|
|
10404
|
-
|
|
10405
|
-
transition(3, div, () => fly, getTransitionParams);
|
|
10406
|
-
append($$anchor, div);
|
|
10407
|
-
pop();
|
|
10408
|
-
}
|
|
10409
|
-
|
|
10410
|
-
delegate(['click']);
|
|
10411
|
-
|
|
10412
10604
|
const SELECTED_CLASS = 'cv-share-selected';
|
|
10413
10605
|
const HIGHLIGHT_TARGET_CLASS = 'cv-highlight-target';
|
|
10414
10606
|
const CV_CUSTOM_ELEMENTS = 'cv-tabgroup, cv-toggle';
|
|
@@ -10722,7 +10914,7 @@ function ShareToolbar($$anchor, $$props) {
|
|
|
10722
10914
|
|
|
10723
10915
|
delegate(['click']);
|
|
10724
10916
|
|
|
10725
|
-
var root_2$
|
|
10917
|
+
var root_2$2 = from_html(`<button class="action-btn up svelte-2rmv56" title="Select Parent">↰</button>`);
|
|
10726
10918
|
var root_1$4 = from_html(`<div class="hover-helper svelte-2rmv56"><span class="tag svelte-2rmv56"> </span> <button> </button> <!></div>`);
|
|
10727
10919
|
|
|
10728
10920
|
const $$css$7 = {
|
|
@@ -10825,7 +11017,7 @@ function HoverHelper($$anchor, $$props) {
|
|
|
10825
11017
|
|
|
10826
11018
|
{
|
|
10827
11019
|
var consequent = ($$anchor) => {
|
|
10828
|
-
var button_1 = root_2$
|
|
11020
|
+
var button_1 = root_2$2();
|
|
10829
11021
|
|
|
10830
11022
|
button_1.__click = handleUp;
|
|
10831
11023
|
append($$anchor, button_1);
|
|
@@ -11114,7 +11306,7 @@ function scrollToElement(element) {
|
|
|
11114
11306
|
|
|
11115
11307
|
var root_1$2 = from_html(`<!> <!> <!> <!> <!> <!>`, 1);
|
|
11116
11308
|
|
|
11117
|
-
function
|
|
11309
|
+
function Settings($$anchor, $$props) {
|
|
11118
11310
|
push($$props, true);
|
|
11119
11311
|
|
|
11120
11312
|
const $shareStore = () => store_get(shareStore, '$shareStore', $$stores);
|
|
@@ -11129,6 +11321,7 @@ function MainWidget($$anchor, $$props) {
|
|
|
11129
11321
|
let showCallout = state(false);
|
|
11130
11322
|
let isResetting = state(false);
|
|
11131
11323
|
let showPulse = state(false);
|
|
11324
|
+
let settingsIcon = state(void 0);
|
|
11132
11325
|
|
|
11133
11326
|
// Nav Visibility
|
|
11134
11327
|
let navsVisible = state(true);
|
|
@@ -11154,7 +11347,7 @@ function MainWidget($$anchor, $$props) {
|
|
|
11154
11347
|
// Init
|
|
11155
11348
|
onMount(() => {
|
|
11156
11349
|
// Check for callout
|
|
11157
|
-
if ($$props.options.
|
|
11350
|
+
if ($$props.options.callout?.show && get$1(store).hasActiveComponents) {
|
|
11158
11351
|
checkIntro();
|
|
11159
11352
|
}
|
|
11160
11353
|
|
|
@@ -11204,6 +11397,7 @@ function MainWidget($$anchor, $$props) {
|
|
|
11204
11397
|
function handleReset() {
|
|
11205
11398
|
set(isResetting, true);
|
|
11206
11399
|
$$props.core.resetToDefault();
|
|
11400
|
+
get$1(settingsIcon)?.resetPosition();
|
|
11207
11401
|
|
|
11208
11402
|
// Sync local state
|
|
11209
11403
|
set(navsVisible, true);
|
|
@@ -11279,17 +11473,36 @@ function MainWidget($$anchor, $$props) {
|
|
|
11279
11473
|
|
|
11280
11474
|
{
|
|
11281
11475
|
var consequent = ($$anchor) => {
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11476
|
+
{
|
|
11477
|
+
let $0 = user_derived(() => $$props.options.callout?.message);
|
|
11478
|
+
let $1 = user_derived(() => $$props.options.callout?.enablePulse);
|
|
11479
|
+
let $2 = user_derived(() => $$props.options.callout?.backgroundColor);
|
|
11480
|
+
let $3 = user_derived(() => $$props.options.callout?.textColor);
|
|
11481
|
+
|
|
11482
|
+
IntroCallout($$anchor, {
|
|
11483
|
+
get position() {
|
|
11484
|
+
return $$props.options.icon.position;
|
|
11485
|
+
},
|
|
11486
|
+
|
|
11487
|
+
get message() {
|
|
11488
|
+
return get$1($0);
|
|
11489
|
+
},
|
|
11490
|
+
|
|
11491
|
+
get enablePulse() {
|
|
11492
|
+
return get$1($1);
|
|
11493
|
+
},
|
|
11494
|
+
|
|
11495
|
+
get backgroundColor() {
|
|
11496
|
+
return get$1($2);
|
|
11497
|
+
},
|
|
11498
|
+
|
|
11499
|
+
get textColor() {
|
|
11500
|
+
return get$1($3);
|
|
11501
|
+
},
|
|
11502
|
+
|
|
11503
|
+
onclose: dismissCallout
|
|
11504
|
+
});
|
|
11505
|
+
}
|
|
11293
11506
|
};
|
|
11294
11507
|
|
|
11295
11508
|
if_block(node_1, ($$render) => {
|
|
@@ -11327,21 +11540,48 @@ function MainWidget($$anchor, $$props) {
|
|
|
11327
11540
|
|
|
11328
11541
|
var node_5 = sibling(node_4, 2);
|
|
11329
11542
|
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11543
|
+
{
|
|
11544
|
+
let $0 = user_derived(() => $$props.options.icon?.color);
|
|
11545
|
+
let $1 = user_derived(() => $$props.options.icon?.backgroundColor);
|
|
11546
|
+
let $2 = user_derived(() => $$props.options.icon?.opacity);
|
|
11547
|
+
let $3 = user_derived(() => $$props.options.icon?.scale);
|
|
11334
11548
|
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11549
|
+
bind_this(
|
|
11550
|
+
SettingsIcon(node_5, {
|
|
11551
|
+
get position() {
|
|
11552
|
+
return $$props.options.icon.position;
|
|
11553
|
+
},
|
|
11338
11554
|
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11555
|
+
get title() {
|
|
11556
|
+
return $$props.options.panel.title;
|
|
11557
|
+
},
|
|
11342
11558
|
|
|
11343
|
-
|
|
11344
|
-
|
|
11559
|
+
get pulse() {
|
|
11560
|
+
return get$1(showPulse);
|
|
11561
|
+
},
|
|
11562
|
+
|
|
11563
|
+
onclick: openModal,
|
|
11564
|
+
|
|
11565
|
+
get iconColor() {
|
|
11566
|
+
return get$1($0);
|
|
11567
|
+
},
|
|
11568
|
+
|
|
11569
|
+
get backgroundColor() {
|
|
11570
|
+
return get$1($1);
|
|
11571
|
+
},
|
|
11572
|
+
|
|
11573
|
+
get opacity() {
|
|
11574
|
+
return get$1($2);
|
|
11575
|
+
},
|
|
11576
|
+
|
|
11577
|
+
get scale() {
|
|
11578
|
+
return get$1($3);
|
|
11579
|
+
}
|
|
11580
|
+
}),
|
|
11581
|
+
($$value) => set(settingsIcon, $$value, true),
|
|
11582
|
+
() => get$1(settingsIcon)
|
|
11583
|
+
);
|
|
11584
|
+
}
|
|
11345
11585
|
|
|
11346
11586
|
var node_6 = sibling(node_5, 2);
|
|
11347
11587
|
|
|
@@ -11349,19 +11589,19 @@ function MainWidget($$anchor, $$props) {
|
|
|
11349
11589
|
var consequent_2 = ($$anchor) => {
|
|
11350
11590
|
Modal($$anchor, {
|
|
11351
11591
|
get title() {
|
|
11352
|
-
return $$props.options.title;
|
|
11592
|
+
return $$props.options.panel.title;
|
|
11353
11593
|
},
|
|
11354
11594
|
|
|
11355
11595
|
get description() {
|
|
11356
|
-
return $$props.options.description;
|
|
11596
|
+
return $$props.options.panel.description;
|
|
11357
11597
|
},
|
|
11358
11598
|
|
|
11359
11599
|
get showReset() {
|
|
11360
|
-
return $$props.options.showReset;
|
|
11600
|
+
return $$props.options.panel.showReset;
|
|
11361
11601
|
},
|
|
11362
11602
|
|
|
11363
11603
|
get showTabGroups() {
|
|
11364
|
-
return $$props.options.showTabGroups;
|
|
11604
|
+
return $$props.options.panel.showTabGroups;
|
|
11365
11605
|
},
|
|
11366
11606
|
|
|
11367
11607
|
get toggles() {
|
|
@@ -11420,33 +11660,46 @@ function MainWidget($$anchor, $$props) {
|
|
|
11420
11660
|
$$cleanup();
|
|
11421
11661
|
}
|
|
11422
11662
|
|
|
11423
|
-
class
|
|
11663
|
+
class CustomViewsSettings {
|
|
11424
11664
|
app = null;
|
|
11425
11665
|
options;
|
|
11426
11666
|
constructor(options) {
|
|
11427
11667
|
// Set defaults
|
|
11428
11668
|
this.options = {
|
|
11429
|
-
core: options.core,
|
|
11669
|
+
core: options.core, // 'core' is a required property and must be explicitly passed
|
|
11430
11670
|
container: options.container || document.body,
|
|
11431
|
-
position: options.position || 'middle-left',
|
|
11432
11671
|
theme: options.theme || 'light',
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11672
|
+
panel: {
|
|
11673
|
+
title: options.panel?.title || 'Customize View',
|
|
11674
|
+
description: options.panel?.description || '',
|
|
11675
|
+
showTabGroups: options.panel?.showTabGroups ?? true,
|
|
11676
|
+
showReset: options.panel?.showReset ?? true
|
|
11677
|
+
},
|
|
11678
|
+
callout: {
|
|
11679
|
+
show: options.callout?.show ?? false,
|
|
11680
|
+
message: options.callout?.message || 'Customize your reading experience here.',
|
|
11681
|
+
enablePulse: options.callout?.enablePulse ?? true,
|
|
11682
|
+
backgroundColor: options.callout?.backgroundColor,
|
|
11683
|
+
textColor: options.callout?.textColor
|
|
11684
|
+
},
|
|
11685
|
+
icon: {
|
|
11686
|
+
position: options.icon?.position || 'middle-left',
|
|
11687
|
+
color: options.icon?.color,
|
|
11688
|
+
backgroundColor: options.icon?.backgroundColor,
|
|
11689
|
+
opacity: options.icon?.opacity,
|
|
11690
|
+
scale: options.icon?.scale ?? 1
|
|
11691
|
+
}
|
|
11439
11692
|
};
|
|
11440
11693
|
}
|
|
11441
11694
|
/**
|
|
11442
|
-
* Render the widget
|
|
11695
|
+
* Render the settings widget
|
|
11443
11696
|
*/
|
|
11444
11697
|
renderModalIcon() {
|
|
11445
11698
|
if (this.app) {
|
|
11446
11699
|
return;
|
|
11447
11700
|
}
|
|
11448
11701
|
// Mount Svelte App using Svelte 5 API
|
|
11449
|
-
this.app = mount(
|
|
11702
|
+
this.app = mount(Settings, {
|
|
11450
11703
|
target: this.options.container,
|
|
11451
11704
|
props: {
|
|
11452
11705
|
core: this.options.core,
|
|
@@ -11455,7 +11708,7 @@ class CustomViewsWidget {
|
|
|
11455
11708
|
});
|
|
11456
11709
|
}
|
|
11457
11710
|
/**
|
|
11458
|
-
* Remove the widget from DOM
|
|
11711
|
+
* Remove the settings widget from DOM
|
|
11459
11712
|
*/
|
|
11460
11713
|
destroy() {
|
|
11461
11714
|
if (this.app) {
|
|
@@ -11607,12 +11860,13 @@ function renderAssetInto(el, assetId, assetsManager) {
|
|
|
11607
11860
|
}
|
|
11608
11861
|
}
|
|
11609
11862
|
|
|
11610
|
-
var root_1$1 = from_html(`<
|
|
11611
|
-
var
|
|
11863
|
+
var root_1$1 = from_html(`<div class="cv-toggle-label svelte-1x95rqi"> </div>`);
|
|
11864
|
+
var root_2$1 = from_html(`<button class="cv-expand-btn svelte-1x95rqi"><!></button>`);
|
|
11865
|
+
var root$2 = from_html(`<div><!> <div class="cv-toggle-content svelte-1x95rqi"><div class="cv-toggle-inner svelte-1x95rqi"><!></div></div> <!></div>`);
|
|
11612
11866
|
|
|
11613
11867
|
const $$css$4 = {
|
|
11614
11868
|
hash: 'svelte-1x95rqi',
|
|
11615
|
-
code: ':host {display:block;
|
|
11869
|
+
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;}'
|
|
11616
11870
|
};
|
|
11617
11871
|
|
|
11618
11872
|
function Toggle($$anchor, $$props) {
|
|
@@ -11621,18 +11875,32 @@ function Toggle($$anchor, $$props) {
|
|
|
11621
11875
|
|
|
11622
11876
|
// Props using Svelte 5 runes
|
|
11623
11877
|
let toggleId = prop($$props, 'toggleId', 7, ''),
|
|
11624
|
-
assetId = prop($$props, 'assetId', 7, '')
|
|
11878
|
+
assetId = prop($$props, 'assetId', 7, ''),
|
|
11879
|
+
showPeekBorder = prop($$props, 'showPeekBorder', 7, false),
|
|
11880
|
+
showLabel = prop($$props, 'showLabel', 7, false);
|
|
11625
11881
|
|
|
11626
11882
|
// Derive toggle IDs from toggle-id prop (can have multiple space-separated IDs)
|
|
11627
11883
|
let toggleIds = user_derived(() => (toggleId() || '').split(/\s+/).filter(Boolean));
|
|
11628
11884
|
|
|
11885
|
+
let toggleConfig = user_derived(() => store.config.toggles?.find((t) => t.toggleId === get$1(toggleIds)[0]));
|
|
11886
|
+
|
|
11629
11887
|
user_effect(() => {
|
|
11630
11888
|
get$1(toggleIds).forEach((id) => store.registerToggle(id));
|
|
11631
11889
|
});
|
|
11632
11890
|
|
|
11891
|
+
// Derive label text from config
|
|
11892
|
+
let labelText = user_derived(() => {
|
|
11893
|
+
if (!get$1(toggleConfig)) return '';
|
|
11894
|
+
|
|
11895
|
+
return get$1(toggleConfig).label || get$1(toggleIds)[0];
|
|
11896
|
+
});
|
|
11897
|
+
|
|
11633
11898
|
let localExpanded = state(false);
|
|
11899
|
+
let isUnconstrained = state(false /* New state to track if we can release max-height */);
|
|
11634
11900
|
let hasRendered = state(false);
|
|
11635
11901
|
let contentEl;
|
|
11902
|
+
let innerEl;
|
|
11903
|
+
let scrollHeight = state(0);
|
|
11636
11904
|
|
|
11637
11905
|
// Derive visibility from store state
|
|
11638
11906
|
let showState = user_derived(() => {
|
|
@@ -11651,21 +11919,77 @@ function Toggle($$anchor, $$props) {
|
|
|
11651
11919
|
const PEEK_HEIGHT = 70;
|
|
11652
11920
|
let isSmallContent = state(false);
|
|
11653
11921
|
|
|
11654
|
-
//
|
|
11922
|
+
// Setup ResizeObserver to track content height changes (e.g. images loading, window resize)
|
|
11655
11923
|
user_effect(() => {
|
|
11656
|
-
if (contentEl
|
|
11657
|
-
|
|
11658
|
-
|
|
11924
|
+
if (!contentEl) return;
|
|
11925
|
+
|
|
11926
|
+
const observer = new ResizeObserver(() => {
|
|
11927
|
+
// We measure the inner element's height
|
|
11928
|
+
// contentEl is the window, innerEl is the content
|
|
11929
|
+
if (innerEl) {
|
|
11930
|
+
set(scrollHeight, innerEl.offsetHeight, true);
|
|
11931
|
+
}
|
|
11932
|
+
|
|
11933
|
+
// Always track small content state to avoid race conditions/stale state
|
|
11934
|
+
if (get$1(scrollHeight) > 0) {
|
|
11935
|
+
if (get$1(scrollHeight) <= PEEK_HEIGHT) {
|
|
11936
|
+
set(isSmallContent, true);
|
|
11937
|
+
} else if (!get$1(isSmallContent)) {
|
|
11938
|
+
// Only set to false if it wasn't already true (latch behavior)
|
|
11939
|
+
// This ensures if it STARTS small, growing won't add the button.
|
|
11940
|
+
set(isSmallContent, false);
|
|
11941
|
+
}
|
|
11942
|
+
}
|
|
11943
|
+
});
|
|
11944
|
+
|
|
11945
|
+
if (innerEl) {
|
|
11946
|
+
observer.observe(innerEl);
|
|
11947
|
+
set(scrollHeight, innerEl.offsetHeight, true);
|
|
11659
11948
|
}
|
|
11949
|
+
|
|
11950
|
+
return () => {
|
|
11951
|
+
observer.disconnect();
|
|
11952
|
+
};
|
|
11660
11953
|
});
|
|
11661
11954
|
|
|
11662
|
-
let showFullContent = user_derived(() => get$1(showState) || get$1(peekState) && get$1(localExpanded));
|
|
11955
|
+
let showFullContent = user_derived(() => get$1(showState) || get$1(peekState) && get$1(localExpanded) || get$1(peekState) && get$1(isSmallContent));
|
|
11956
|
+
|
|
11957
|
+
// Reset unconstrained state when toggling
|
|
11958
|
+
user_effect(() => {
|
|
11959
|
+
if (get$1(showFullContent)) {
|
|
11960
|
+
// Expanding: start constrained (to animate), will unlock on transitionend
|
|
11961
|
+
set(isUnconstrained, false);
|
|
11962
|
+
} else {
|
|
11963
|
+
// Collapsing: must recapture height immediately (snap) or stay constrained
|
|
11964
|
+
set(isUnconstrained, false);
|
|
11965
|
+
}
|
|
11966
|
+
});
|
|
11663
11967
|
|
|
11664
11968
|
// Only show peek styling (mask) if it's peeking, not expanded locally, AND content is actually taller than peek height
|
|
11665
11969
|
let showPeekContent = user_derived(() => !get$1(showState) && get$1(peekState) && !get$1(localExpanded) && !get$1(isSmallContent));
|
|
11666
11970
|
|
|
11667
11971
|
let isHidden = user_derived(() => !get$1(showState) && !get$1(peekState));
|
|
11668
11972
|
|
|
11973
|
+
// Calculate dynamic max-height for animation
|
|
11974
|
+
let currentMaxHeight = user_derived(() => {
|
|
11975
|
+
if (get$1(isHidden)) return '0px';
|
|
11976
|
+
if (get$1(isUnconstrained) && get$1(showFullContent)) return 'none'; /* Release constraint when stable */
|
|
11977
|
+
if (get$1(showPeekContent)) return `${PEEK_HEIGHT}px`;
|
|
11978
|
+
if (get$1(showFullContent)) return get$1(scrollHeight) > 0 ? `${get$1(scrollHeight)}px` : '9999px';
|
|
11979
|
+
|
|
11980
|
+
return '0px';
|
|
11981
|
+
});
|
|
11982
|
+
|
|
11983
|
+
function handleTransitionEnd(e) {
|
|
11984
|
+
// Only care about max-height transitions on the content element
|
|
11985
|
+
if (e.propertyName !== 'max-height' || e.target !== contentEl) return;
|
|
11986
|
+
|
|
11987
|
+
// If we finished expanding, release the height constraint
|
|
11988
|
+
if (get$1(showFullContent)) {
|
|
11989
|
+
set(isUnconstrained, true);
|
|
11990
|
+
}
|
|
11991
|
+
}
|
|
11992
|
+
|
|
11669
11993
|
function toggleExpand(e) {
|
|
11670
11994
|
e.stopPropagation();
|
|
11671
11995
|
set(localExpanded, !get$1(localExpanded));
|
|
@@ -11696,47 +12020,93 @@ function Toggle($$anchor, $$props) {
|
|
|
11696
12020
|
set assetId($$value = '') {
|
|
11697
12021
|
assetId($$value);
|
|
11698
12022
|
flushSync();
|
|
12023
|
+
},
|
|
12024
|
+
|
|
12025
|
+
get showPeekBorder() {
|
|
12026
|
+
return showPeekBorder();
|
|
12027
|
+
},
|
|
12028
|
+
|
|
12029
|
+
set showPeekBorder($$value = false) {
|
|
12030
|
+
showPeekBorder($$value);
|
|
12031
|
+
flushSync();
|
|
12032
|
+
},
|
|
12033
|
+
|
|
12034
|
+
get showLabel() {
|
|
12035
|
+
return showLabel();
|
|
12036
|
+
},
|
|
12037
|
+
|
|
12038
|
+
set showLabel($$value = false) {
|
|
12039
|
+
showLabel($$value);
|
|
12040
|
+
flushSync();
|
|
11699
12041
|
}
|
|
11700
12042
|
};
|
|
11701
12043
|
|
|
11702
12044
|
var div = root$2();
|
|
11703
12045
|
let classes;
|
|
11704
|
-
var
|
|
11705
|
-
var node = child(div_1);
|
|
12046
|
+
var node = child(div);
|
|
11706
12047
|
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
12048
|
+
{
|
|
12049
|
+
var consequent = ($$anchor) => {
|
|
12050
|
+
var div_1 = root_1$1();
|
|
12051
|
+
var text = child(div_1, true);
|
|
12052
|
+
|
|
12053
|
+
reset(div_1);
|
|
12054
|
+
template_effect(() => set_text(text, get$1(labelText)));
|
|
12055
|
+
append($$anchor, div_1);
|
|
12056
|
+
};
|
|
11710
12057
|
|
|
11711
|
-
|
|
12058
|
+
if_block(node, ($$render) => {
|
|
12059
|
+
if (showLabel() && get$1(labelText) && !get$1(isHidden)) $$render(consequent);
|
|
12060
|
+
});
|
|
12061
|
+
}
|
|
12062
|
+
|
|
12063
|
+
var div_2 = sibling(node, 2);
|
|
12064
|
+
let styles;
|
|
12065
|
+
var div_3 = child(div_2);
|
|
12066
|
+
var node_1 = child(div_3);
|
|
12067
|
+
|
|
12068
|
+
slot(node_1, $$props, 'default', {});
|
|
12069
|
+
reset(div_3);
|
|
12070
|
+
bind_this(div_3, ($$value) => innerEl = $$value, () => innerEl);
|
|
12071
|
+
reset(div_2);
|
|
12072
|
+
bind_this(div_2, ($$value) => contentEl = $$value, () => contentEl);
|
|
12073
|
+
|
|
12074
|
+
var node_2 = sibling(div_2, 2);
|
|
11712
12075
|
|
|
11713
12076
|
{
|
|
11714
|
-
var
|
|
11715
|
-
var button =
|
|
12077
|
+
var consequent_1 = ($$anchor) => {
|
|
12078
|
+
var button = root_2$1();
|
|
11716
12079
|
|
|
11717
12080
|
button.__click = toggleExpand;
|
|
11718
12081
|
|
|
11719
|
-
var
|
|
12082
|
+
var node_3 = child(button);
|
|
11720
12083
|
|
|
11721
|
-
html(
|
|
12084
|
+
html(node_3, () => get$1(localExpanded) ? getChevronUpIcon() : getChevronDownIcon());
|
|
11722
12085
|
reset(button);
|
|
11723
12086
|
template_effect(() => set_attribute(button, 'aria-label', get$1(localExpanded) ? "Collapse content" : "Expand content"));
|
|
11724
12087
|
append($$anchor, button);
|
|
11725
12088
|
};
|
|
11726
12089
|
|
|
11727
|
-
if_block(
|
|
11728
|
-
if (get$1(peekState) && !get$1(isSmallContent)) $$render(
|
|
12090
|
+
if_block(node_2, ($$render) => {
|
|
12091
|
+
if (get$1(peekState) && !get$1(isSmallContent)) $$render(consequent_1);
|
|
11729
12092
|
});
|
|
11730
12093
|
}
|
|
11731
12094
|
|
|
11732
12095
|
reset(div);
|
|
11733
12096
|
|
|
11734
|
-
template_effect(() =>
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
12097
|
+
template_effect(() => {
|
|
12098
|
+
classes = set_class(div, 1, 'cv-toggle-wrapper svelte-1x95rqi', null, classes, {
|
|
12099
|
+
expanded: get$1(showFullContent) && !get$1(showPeekContent),
|
|
12100
|
+
peeking: get$1(showPeekContent),
|
|
12101
|
+
'peek-mode': get$1(peekState),
|
|
12102
|
+
hidden: get$1(isHidden),
|
|
12103
|
+
'has-border': showPeekBorder() && get$1(peekState)
|
|
12104
|
+
});
|
|
11739
12105
|
|
|
12106
|
+
styles = set_style(div_2, '', styles, { 'max-height': get$1(currentMaxHeight) });
|
|
12107
|
+
});
|
|
12108
|
+
|
|
12109
|
+
event('transitionend', div_2, handleTransitionEnd);
|
|
11740
12110
|
append($$anchor, div);
|
|
11741
12111
|
|
|
11742
12112
|
return pop($$exports);
|
|
@@ -11748,7 +12118,15 @@ customElements.define('cv-toggle', create_custom_element(
|
|
|
11748
12118
|
Toggle,
|
|
11749
12119
|
{
|
|
11750
12120
|
toggleId: { attribute: 'toggle-id', reflect: true, type: 'String' },
|
|
11751
|
-
assetId: { attribute: 'asset-id', reflect: true, type: 'String' }
|
|
12121
|
+
assetId: { attribute: 'asset-id', reflect: true, type: 'String' },
|
|
12122
|
+
|
|
12123
|
+
showPeekBorder: {
|
|
12124
|
+
attribute: 'show-peek-border',
|
|
12125
|
+
reflect: true,
|
|
12126
|
+
type: 'Boolean'
|
|
12127
|
+
},
|
|
12128
|
+
|
|
12129
|
+
showLabel: { attribute: 'show-label', reflect: true, type: 'Boolean' }
|
|
11752
12130
|
},
|
|
11753
12131
|
['default'],
|
|
11754
12132
|
[],
|
|
@@ -11759,7 +12137,7 @@ var root$1 = from_html(`<div><!></div>`);
|
|
|
11759
12137
|
|
|
11760
12138
|
const $$css$3 = {
|
|
11761
12139
|
hash: 'svelte-17fgzpj',
|
|
11762
|
-
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
|
|
12140
|
+
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 }'
|
|
11763
12141
|
};
|
|
11764
12142
|
|
|
11765
12143
|
function Tab($$anchor, $$props) {
|
|
@@ -11808,7 +12186,8 @@ customElements.define('cv-tab', create_custom_element(
|
|
|
11808
12186
|
|
|
11809
12187
|
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>`);
|
|
11810
12188
|
var root_1 = from_html(`<ul class="cv-tabs-nav nav-tabs svelte-1630cmg" role="tablist"></ul>`);
|
|
11811
|
-
var
|
|
12189
|
+
var root_3 = from_html(`<link rel="stylesheet"/>`);
|
|
12190
|
+
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>`);
|
|
11812
12191
|
|
|
11813
12192
|
const $$css$2 = {
|
|
11814
12193
|
hash: 'svelte-1630cmg',
|
|
@@ -12062,10 +12441,19 @@ function TabGroup($$anchor, $$props) {
|
|
|
12062
12441
|
});
|
|
12063
12442
|
}
|
|
12064
12443
|
|
|
12065
|
-
var
|
|
12066
|
-
|
|
12444
|
+
var node_3 = sibling(node, 2);
|
|
12445
|
+
|
|
12446
|
+
each(node_3, 16, () => Array.from(document.querySelectorAll('link[rel="stylesheet"]')), index, ($$anchor, link) => {
|
|
12447
|
+
var link_1 = root_3();
|
|
12448
|
+
|
|
12449
|
+
template_effect(() => set_attribute(link_1, 'href', link.href));
|
|
12450
|
+
append($$anchor, link_1);
|
|
12451
|
+
});
|
|
12452
|
+
|
|
12453
|
+
var div_1 = sibling(node_3, 2);
|
|
12454
|
+
var node_4 = child(div_1);
|
|
12067
12455
|
|
|
12068
|
-
slot(
|
|
12456
|
+
slot(node_4, $$props, 'default', {});
|
|
12069
12457
|
reset(div_1);
|
|
12070
12458
|
bind_this(div_1, ($$value) => set(contentWrapper, $$value), () => get$1(contentWrapper));
|
|
12071
12459
|
next(2);
|
|
@@ -12174,7 +12562,7 @@ class CustomViews {
|
|
|
12174
12562
|
exports.AssetsManager = AssetsManager;
|
|
12175
12563
|
exports.CustomViews = CustomViews;
|
|
12176
12564
|
exports.CustomViewsCore = CustomViewsCore;
|
|
12177
|
-
exports.
|
|
12565
|
+
exports.CustomViewsSettings = CustomViewsSettings;
|
|
12178
12566
|
exports.PersistenceManager = PersistenceManager;
|
|
12179
12567
|
exports.URLStateManager = URLStateManager;
|
|
12180
12568
|
//# sourceMappingURL=custom-views.cjs.js.map
|