@depict-ai/ui 2.0.0 → 2.0.2
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/ES10/index.cjs +218 -81
- package/ES10/index.d.ts +2 -1
- package/ES10/index.js +218 -81
- package/latest/index.cjs +212 -78
- package/latest/index.d.ts +2 -1
- package/latest/index.js +212 -78
- package/package.json +2 -2
- package/server/ES10/index.cjs +173 -29
- package/server/ES10/index.d.ts +2 -1
- package/server/ES10/index.js +173 -29
- package/server/latest/index.cjs +167 -26
- package/server/latest/index.d.ts +2 -1
- package/server/latest/index.js +167 -26
package/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createMemo as $9HbP8$createMemo, createResource as $9HbP8$createResourc
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.2";
|
|
9
9
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
10
10
|
const cols_at_size = [];
|
|
11
11
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -650,9 +650,18 @@ const $9ea5383493360761$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<button class
|
|
|
650
650
|
function $9ea5383493360761$export$9756467d34d91cdb(props) {
|
|
651
651
|
return $16b52438165aafe2$export$23fca46f3143581f(() => {
|
|
652
652
|
const rows_object_ = $9HbP8$createMemo(() => {
|
|
653
|
-
const
|
|
654
|
-
|
|
653
|
+
const {
|
|
654
|
+
view_more_button: view_more_button,
|
|
655
|
+
max_rows: max_rows
|
|
656
|
+
} = props;
|
|
657
|
+
if (!view_more_button) {
|
|
658
|
+
if (max_rows) return {
|
|
659
|
+
max_rows: max_rows
|
|
660
|
+
};
|
|
661
|
+
return "all";
|
|
662
|
+
}
|
|
655
663
|
return {
|
|
664
|
+
max_rows: max_rows,
|
|
656
665
|
start_rows: view_more_button.start_rows,
|
|
657
666
|
rows_per_click: view_more_button.rows_per_click ?? 2,
|
|
658
667
|
button: (() => {
|
|
@@ -1353,9 +1362,9 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
1353
1362
|
return outmost_element;
|
|
1354
1363
|
}
|
|
1355
1364
|
$9HbP8$delegateEvents(["click"]);
|
|
1356
|
-
const $
|
|
1357
|
-
$
|
|
1358
|
-
const $
|
|
1365
|
+
const $49b79728e7d9e2a1$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<span class="count"></span>`, 2),
|
|
1366
|
+
$49b79728e7d9e2a1$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<label class="input-row"><div class="left"><input type="checkbox"><span class="custom-indicator"></span><span class="text line-clamp"></span></div><!#><!/></label>`, 11);
|
|
1367
|
+
const $49b79728e7d9e2a1$export$48513f6b9f8ce62d = props => {
|
|
1359
1368
|
// It seems like there's no diffing without memos here (since we often just have computations in the getters above that update to the same result often because their dependencies change with unrelated changes often), so put memos here to avoid unneeded DOM changes
|
|
1360
1369
|
const count = $9HbP8$createMemo(() => props.count_);
|
|
1361
1370
|
const label = $9HbP8$createMemo(() => props.label_);
|
|
@@ -1364,7 +1373,7 @@ const $87c712b5b33f24f7$export$48513f6b9f8ce62d = props => {
|
|
|
1364
1373
|
const is_count_zero = $9HbP8$createMemo(() => props.is_count_zero_ || count() === 0);
|
|
1365
1374
|
const id = $9HbP8$make_random_classname();
|
|
1366
1375
|
return (/* We can't use actual margin because ExpandingContainer gets messed up */(() => {
|
|
1367
|
-
const _el$ = $9HbP8$getNextElement($
|
|
1376
|
+
const _el$ = $9HbP8$getNextElement($49b79728e7d9e2a1$var$_tmpl$2),
|
|
1368
1377
|
_el$2 = _el$.firstChild,
|
|
1369
1378
|
_el$3 = _el$2.firstChild,
|
|
1370
1379
|
_el$4 = _el$3.nextSibling,
|
|
@@ -1391,7 +1400,7 @@ const $87c712b5b33f24f7$export$48513f6b9f8ce62d = props => {
|
|
|
1391
1400
|
return count() != undefined;
|
|
1392
1401
|
},
|
|
1393
1402
|
get children() {
|
|
1394
|
-
const _el$6 = $9HbP8$getNextElement($
|
|
1403
|
+
const _el$6 = $9HbP8$getNextElement($49b79728e7d9e2a1$var$_tmpl$);
|
|
1395
1404
|
$9HbP8$insert(_el$6, count);
|
|
1396
1405
|
return _el$6;
|
|
1397
1406
|
}
|
|
@@ -1479,7 +1488,7 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
1479
1488
|
});
|
|
1480
1489
|
const render_checkbox = checkbox => {
|
|
1481
1490
|
// Checkbox always calls the getters in props, so we don't wrap these values into memos
|
|
1482
|
-
return $9HbP8$createComponent((0, $
|
|
1491
|
+
return $9HbP8$createComponent((0, $49b79728e7d9e2a1$export$48513f6b9f8ce62d), {
|
|
1483
1492
|
get value_() {
|
|
1484
1493
|
return checkbox().value_;
|
|
1485
1494
|
},
|
|
@@ -2181,7 +2190,7 @@ function $1c8cac76cb67e9af$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
2181
2190
|
[_el$8, _co$3] = $9HbP8$getNextMarker(_el$7.nextSibling),
|
|
2182
2191
|
_el$9 = _el$8.nextSibling,
|
|
2183
2192
|
[_el$10, _co$4] = $9HbP8$getNextMarker(_el$9.nextSibling);
|
|
2184
|
-
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $
|
|
2193
|
+
$9HbP8$insert(_el$6, $9HbP8$createComponent((0, $49b79728e7d9e2a1$export$48513f6b9f8ce62d), {
|
|
2185
2194
|
get value_() {
|
|
2186
2195
|
return JSON.stringify(value()?.value_);
|
|
2187
2196
|
},
|
|
@@ -2435,9 +2444,26 @@ function $1c8cac76cb67e9af$var$expand_until_choice(data_structure) {
|
|
|
2435
2444
|
}
|
|
2436
2445
|
});
|
|
2437
2446
|
}
|
|
2438
|
-
|
|
2447
|
+
|
|
2448
|
+
/** @jsxImportSource solid-js */
|
|
2449
|
+
|
|
2450
|
+
function $0fdb37d8ddabef25$export$9f191182275e9ef(what_to_watch) {
|
|
2451
|
+
const [size, setSize] = $9HbP8$createSignal();
|
|
2452
|
+
const resizeObserver = new ResizeObserver($9HbP8$catchify(records => {
|
|
2453
|
+
for (let j = 0; j < records.length; j++) {
|
|
2454
|
+
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
2455
|
+
setSize(width);
|
|
2456
|
+
}
|
|
2457
|
+
}));
|
|
2458
|
+
resizeObserver.observe(what_to_watch);
|
|
2459
|
+
$9HbP8$onCleanup(() => resizeObserver.disconnect());
|
|
2460
|
+
return size;
|
|
2461
|
+
}
|
|
2462
|
+
const $93716a9ad0dea854$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0"></div>`, 2),
|
|
2439
2463
|
$93716a9ad0dea854$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<span class="count-wrapper"><span class="count"></span></span>`, 4),
|
|
2440
|
-
$93716a9ad0dea854$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<button
|
|
2464
|
+
$93716a9ad0dea854$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<button><!#><!/><!#><!/></button>`, 6);
|
|
2465
|
+
const $93716a9ad0dea854$var$gap_px = 5;
|
|
2466
|
+
const $93716a9ad0dea854$var$max_columns = 3;
|
|
2441
2467
|
const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
2442
2468
|
filter_: filter_,
|
|
2443
2469
|
selected_filters_: [get_selected_filters, set_selected_filters]
|
|
@@ -2460,74 +2486,182 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
2460
2486
|
count_: meta.counts?.[index]
|
|
2461
2487
|
}));
|
|
2462
2488
|
});
|
|
2463
|
-
|
|
2489
|
+
const [sizes_set, set_sizes_set] = $9HbP8$createSignal(new Set(), {
|
|
2490
|
+
equals: false
|
|
2491
|
+
});
|
|
2492
|
+
const [cols_at_size, set_cols_at_size] = $9HbP8$createSignal([[1, "0px", ""]]);
|
|
2493
|
+
const [container, set_container] = $9HbP8$createSignal();
|
|
2494
|
+
const container_width_accessor = $9HbP8$createMemo(() => {
|
|
2495
|
+
const element = container();
|
|
2496
|
+
if (!element) return;
|
|
2497
|
+
return $0fdb37d8ddabef25$export$9f191182275e9ef(element);
|
|
2498
|
+
});
|
|
2499
|
+
const [shadow_children, set_shadow_children] = $9HbP8$createSignal(new Set(), {
|
|
2500
|
+
equals: false
|
|
2501
|
+
});
|
|
2502
|
+
const shadow_grid = (() => {
|
|
2464
2503
|
const _el$ = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$);
|
|
2465
|
-
$9HbP8$insert(_el$,
|
|
2466
|
-
get each() {
|
|
2467
|
-
return buttons();
|
|
2468
|
-
},
|
|
2469
|
-
children: value => {
|
|
2470
|
-
const is_selected = $9HbP8$createMemo(() => existing_filter()?.data?.includes(value().value_));
|
|
2471
|
-
return (() => {
|
|
2472
|
-
const _el$2 = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$3),
|
|
2473
|
-
_el$5 = _el$2.firstChild,
|
|
2474
|
-
[_el$6, _co$] = $9HbP8$getNextMarker(_el$5.nextSibling),
|
|
2475
|
-
_el$7 = _el$6.nextSibling,
|
|
2476
|
-
[_el$8, _co$2] = $9HbP8$getNextMarker(_el$7.nextSibling);
|
|
2477
|
-
$9HbP8$addEventListener(_el$2, "click", $9HbP8$catchify(() => {
|
|
2478
|
-
const set_filter = existing_filter();
|
|
2479
|
-
const {
|
|
2480
|
-
field: field,
|
|
2481
|
-
op: op
|
|
2482
|
-
} = filter_();
|
|
2483
|
-
const base_object = set_filter ? set_filter : {
|
|
2484
|
-
op: op,
|
|
2485
|
-
field: field
|
|
2486
|
-
};
|
|
2487
|
-
const old_data = base_object.data;
|
|
2488
|
-
const new_data = [...(Array.isArray(old_data) ? [...old_data] : old_data ? [old_data] : [])];
|
|
2489
|
-
const new_filter_object = {
|
|
2490
|
-
...base_object,
|
|
2491
|
-
data: new_data
|
|
2492
|
-
};
|
|
2493
|
-
if (!is_selected()) new_filter_object.data.push(value().value_);else new_filter_object.data = new_filter_object.data.filter(v => v !== value().value_);
|
|
2494
|
-
const selected_filters = [...get_selected_filters().filter(f => f !== set_filter), ...(new_filter_object.data.length ? [new_filter_object] : [])];
|
|
2495
|
-
set_selected_filters(selected_filters);
|
|
2496
|
-
}), true);
|
|
2497
|
-
$9HbP8$insert(_el$2, () => value().value_, _el$6, _co$);
|
|
2498
|
-
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
2499
|
-
get when() {
|
|
2500
|
-
return value().count_ != undefined;
|
|
2501
|
-
},
|
|
2502
|
-
get children() {
|
|
2503
|
-
const _el$3 = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$2),
|
|
2504
|
-
_el$4 = _el$3.firstChild;
|
|
2505
|
-
$9HbP8$insert(_el$4, () => value().count_);
|
|
2506
|
-
return _el$3;
|
|
2507
|
-
}
|
|
2508
|
-
}), _el$8, _co$2);
|
|
2509
|
-
$9HbP8$effect(_p$ => {
|
|
2510
|
-
const _v$ = value().count_ === 0 && !is_selected(),
|
|
2511
|
-
_v$2 = !is_selected(),
|
|
2512
|
-
_v$3 = !!is_selected();
|
|
2513
|
-
_v$ !== _p$._v$ && (_el$2.disabled = _p$._v$ = _v$);
|
|
2514
|
-
_v$2 !== _p$._v$2 && _el$2.classList.toggle("minor", _p$._v$2 = _v$2);
|
|
2515
|
-
_v$3 !== _p$._v$3 && _el$2.classList.toggle("major", _p$._v$3 = _v$3);
|
|
2516
|
-
return _p$;
|
|
2517
|
-
}, {
|
|
2518
|
-
_v$: undefined,
|
|
2519
|
-
_v$2: undefined,
|
|
2520
|
-
_v$3: undefined
|
|
2521
|
-
});
|
|
2522
|
-
$9HbP8$runHydrationEvents();
|
|
2523
|
-
return _el$2;
|
|
2524
|
-
})();
|
|
2525
|
-
}
|
|
2526
|
-
}));
|
|
2504
|
+
$9HbP8$insert(_el$, () => [...shadow_children()]);
|
|
2527
2505
|
return _el$;
|
|
2528
|
-
})();
|
|
2506
|
+
})(); // for getting the smallest possible sizes of all the items
|
|
2507
|
+
$9HbP8$createEffect(() => {
|
|
2508
|
+
const container_width = container_width_accessor()?.();
|
|
2509
|
+
if (container_width == undefined) return;
|
|
2510
|
+
$93716a9ad0dea854$var$adjust_sizes(container_width, sizes_set(), set_cols_at_size);
|
|
2511
|
+
});
|
|
2512
|
+
return [shadow_grid, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), {
|
|
2513
|
+
get cols_at_size() {
|
|
2514
|
+
return cols_at_size();
|
|
2515
|
+
},
|
|
2516
|
+
grid_spacing: $93716a9ad0dea854$var$gap_px + "px",
|
|
2517
|
+
rows: "all",
|
|
2518
|
+
layout: "grid",
|
|
2519
|
+
element_attributes: {
|
|
2520
|
+
class: "checkbox-grid",
|
|
2521
|
+
ref: el => set_container(el)
|
|
2522
|
+
},
|
|
2523
|
+
get children() {
|
|
2524
|
+
return $9HbP8$createComponent((0, $9HbP8$Index), {
|
|
2525
|
+
get each() {
|
|
2526
|
+
return buttons();
|
|
2527
|
+
},
|
|
2528
|
+
children: value => {
|
|
2529
|
+
const is_selected = $9HbP8$createMemo(() => existing_filter()?.data?.includes(value().value_));
|
|
2530
|
+
const MakeButton = attributes => (() => {
|
|
2531
|
+
const _el$2 = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$3),
|
|
2532
|
+
_el$5 = _el$2.firstChild,
|
|
2533
|
+
[_el$6, _co$] = $9HbP8$getNextMarker(_el$5.nextSibling),
|
|
2534
|
+
_el$7 = _el$6.nextSibling,
|
|
2535
|
+
[_el$8, _co$2] = $9HbP8$getNextMarker(_el$7.nextSibling);
|
|
2536
|
+
$9HbP8$spread(_el$2, $9HbP8$mergeProps(attributes, {
|
|
2537
|
+
get disabled() {
|
|
2538
|
+
return $9HbP8$memo(() => value().count_ === 0)() && !is_selected();
|
|
2539
|
+
},
|
|
2540
|
+
get classList() {
|
|
2541
|
+
return {
|
|
2542
|
+
minor: !is_selected(),
|
|
2543
|
+
major: is_selected(),
|
|
2544
|
+
"major-minor-transition": true
|
|
2545
|
+
};
|
|
2546
|
+
},
|
|
2547
|
+
get onClick() {
|
|
2548
|
+
return $9HbP8$catchify(() => {
|
|
2549
|
+
const set_filter = existing_filter();
|
|
2550
|
+
const {
|
|
2551
|
+
field: field,
|
|
2552
|
+
op: op
|
|
2553
|
+
} = filter_();
|
|
2554
|
+
const base_object = set_filter ? set_filter : {
|
|
2555
|
+
op: op,
|
|
2556
|
+
field: field
|
|
2557
|
+
};
|
|
2558
|
+
const old_data = base_object.data;
|
|
2559
|
+
const new_data = [...(Array.isArray(old_data) ? [...old_data] : old_data ? [old_data] : [])];
|
|
2560
|
+
const new_filter_object = {
|
|
2561
|
+
...base_object,
|
|
2562
|
+
data: new_data
|
|
2563
|
+
};
|
|
2564
|
+
if (!is_selected()) new_filter_object.data.push(value().value_);else new_filter_object.data = new_filter_object.data.filter(v => v !== value().value_);
|
|
2565
|
+
const selected_filters = [...get_selected_filters().filter(f => f !== set_filter), ...(new_filter_object.data.length ? [new_filter_object] : [])];
|
|
2566
|
+
set_selected_filters(selected_filters);
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
}), false, true);
|
|
2570
|
+
$9HbP8$insert(_el$2, () => value().value_, _el$6, _co$);
|
|
2571
|
+
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
2572
|
+
get when() {
|
|
2573
|
+
return value().count_ != undefined;
|
|
2574
|
+
},
|
|
2575
|
+
get children() {
|
|
2576
|
+
const _el$3 = $9HbP8$getNextElement($93716a9ad0dea854$var$_tmpl$2),
|
|
2577
|
+
_el$4 = _el$3.firstChild;
|
|
2578
|
+
$9HbP8$insert(_el$4, () => value().count_);
|
|
2579
|
+
return _el$3;
|
|
2580
|
+
}
|
|
2581
|
+
}), _el$8, _co$2);
|
|
2582
|
+
$9HbP8$runHydrationEvents();
|
|
2583
|
+
return _el$2;
|
|
2584
|
+
})();
|
|
2585
|
+
const invisible_size_button = $9HbP8$createComponent(MakeButton, {});
|
|
2586
|
+
const smallest_possible_size = $0fdb37d8ddabef25$export$9f191182275e9ef(invisible_size_button); // create ResizeObserver for the invisible size button where the div hugs its content
|
|
2587
|
+
const sizes_value = $9HbP8$untrack(sizes_set);
|
|
2588
|
+
const shadow_children_value = $9HbP8$untrack(shadow_children);
|
|
2589
|
+
sizes_value.add(smallest_possible_size);
|
|
2590
|
+
set_sizes_set(sizes_value);
|
|
2591
|
+
shadow_children_value.add(invisible_size_button);
|
|
2592
|
+
set_shadow_children(shadow_children_value);
|
|
2593
|
+
$9HbP8$onCleanup(() => {
|
|
2594
|
+
const sizes_value = $9HbP8$untrack(sizes_set);
|
|
2595
|
+
const shadow_children_value = $9HbP8$untrack(shadow_children);
|
|
2596
|
+
sizes_value.delete(smallest_possible_size);
|
|
2597
|
+
set_sizes_set(sizes_value);
|
|
2598
|
+
shadow_children_value.delete(invisible_size_button);
|
|
2599
|
+
set_shadow_children(shadow_children_value);
|
|
2600
|
+
});
|
|
2601
|
+
// The actual button that will be visible
|
|
2602
|
+
return $9HbP8$createComponent(MakeButton, {});
|
|
2603
|
+
}
|
|
2604
|
+
});
|
|
2605
|
+
}
|
|
2606
|
+
})];
|
|
2529
2607
|
};
|
|
2530
|
-
|
|
2608
|
+
/**
|
|
2609
|
+
* Calculate and apply cols_at_size overrides to fit as many items as possible in a row, evenly spaced
|
|
2610
|
+
*/
|
|
2611
|
+
function $93716a9ad0dea854$var$adjust_sizes(container_width, sizes, set_cols_at_size) {
|
|
2612
|
+
let current_row_index = 0;
|
|
2613
|
+
let current_row_items = [];
|
|
2614
|
+
const column_to_row_result = {};
|
|
2615
|
+
const check_would_fit_evenly = (min_size_of_item, at_number_of_columnns) => {
|
|
2616
|
+
const would_have_even_size = container_width / at_number_of_columnns - (at_number_of_columnns * 2 - 2) * ($93716a9ad0dea854$var$gap_px / 2) / at_number_of_columnns; // What size would our element have (without gaps), given that now every column had the same width (equation from Layout.tsx)
|
|
2617
|
+
return would_have_even_size >= min_size_of_item; // would this item still fit if we added another column? (probably what the caller has done with at_number_of_columns), given that every item has the same size
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2620
|
+
for (const size_item of sizes) {
|
|
2621
|
+
const size = size_item();
|
|
2622
|
+
if (size == undefined) return; // Only do stuff if we know all the sizes
|
|
2623
|
+
const current_row_length = current_row_items.length;
|
|
2624
|
+
const can_add_another_column_initial_val = current_row_length < $93716a9ad0dea854$var$max_columns; // allow max 4 items per row
|
|
2625
|
+
let can_add_another_column = can_add_another_column_initial_val;
|
|
2626
|
+
if (can_add_another_column)
|
|
2627
|
+
// can we actually? Since adding another column changes the size of all elements in the row we need to check all of them
|
|
2628
|
+
for (let i = -1; i < current_row_length; i++) {
|
|
2629
|
+
// -1 is for the new item we're adding and every item is guaranteed to exist
|
|
2630
|
+
const size_to_check = current_row_items[i] ?? size;
|
|
2631
|
+
const would_have_columns = current_row_length + 1; // if we added another column
|
|
2632
|
+
const would_fit_evenly = check_would_fit_evenly(size_to_check, would_have_columns); // see comments in check_would_fit_evenly
|
|
2633
|
+
if (!would_fit_evenly) {
|
|
2634
|
+
can_add_another_column = false;
|
|
2635
|
+
break;
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
if (can_add_another_column) current_row_items.push(size);else {
|
|
2639
|
+
column_to_row_result[++current_row_index] = current_row_length || 1; // overrides is indexed by 1 it seems, therefore ++curent_row_index
|
|
2640
|
+
current_row_items = [size]; // save current item for next row
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
const items_left_to_add = current_row_items.length;
|
|
2645
|
+
if (items_left_to_add) {
|
|
2646
|
+
let num_columns = 1; // We want to have as close to max_columns as possible in the last row
|
|
2647
|
+
let fits = true;
|
|
2648
|
+
do
|
|
2649
|
+
// Check if more columns would fit
|
|
2650
|
+
for (let i = 0; i < items_left_to_add; i++) {
|
|
2651
|
+
const item = current_row_items[i];
|
|
2652
|
+
const would_fit_evenly = check_would_fit_evenly(item, num_columns + 1);
|
|
2653
|
+
if (!would_fit_evenly) {
|
|
2654
|
+
fits = false;
|
|
2655
|
+
break;
|
|
2656
|
+
}
|
|
2657
|
+
} while (fits && ++num_columns < $93716a9ad0dea854$var$max_columns);
|
|
2658
|
+
column_to_row_result[++current_row_index] = num_columns; // Add last row that's left after loop finished
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2661
|
+
set_cols_at_size([[1, "0px", "", null, {
|
|
2662
|
+
overrides: column_to_row_result
|
|
2663
|
+
}]]);
|
|
2664
|
+
}
|
|
2531
2665
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
2532
2666
|
const signal = $9HbP8$createSignal(false);
|
|
2533
2667
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -2572,7 +2706,7 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
2572
2706
|
const hex_color = $9HbP8$createMemo(() => checkbox().value_.split(";")?.[1] || "");
|
|
2573
2707
|
const rgb_color = $9HbP8$createMemo(() => $9HbP8$hex_to_rgb(hex_color()));
|
|
2574
2708
|
const black_contrast_better = $9HbP8$createMemo(() => rgb_color() ? $e731d52d97444b7c$var$does_black_contrast_better(rgb_color()) : false);
|
|
2575
|
-
const input_row = $9HbP8$createComponent((0, $
|
|
2709
|
+
const input_row = $9HbP8$createComponent((0, $49b79728e7d9e2a1$export$48513f6b9f8ce62d), {
|
|
2576
2710
|
get value_() {
|
|
2577
2711
|
return checkbox().value_;
|
|
2578
2712
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^1.2.
|
|
239
|
+
"@depict-ai/plp-styling": "^1.2.2",
|
|
240
240
|
"@depict-ai/types": "^1.0.39",
|
|
241
241
|
"@depict-ai/utilishared": "^1.0.41",
|
|
242
242
|
"solid-js": "^1.7.3"
|
package/server/ES10/index.cjs
CHANGED
|
@@ -66,7 +66,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
66
66
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
67
67
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
68
68
|
/*! Depict.ai search and product listing SDK */
|
|
69
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
69
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.2";
|
|
70
70
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
71
71
|
const cols_at_size = [];
|
|
72
72
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -692,9 +692,18 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
|
692
692
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
693
693
|
const rows_object_ = $3hooq$solidjs.createMemo(() => {
|
|
694
694
|
var _view_more_button$row;
|
|
695
|
-
const
|
|
696
|
-
|
|
695
|
+
const {
|
|
696
|
+
view_more_button: view_more_button,
|
|
697
|
+
max_rows: max_rows
|
|
698
|
+
} = props;
|
|
699
|
+
if (!view_more_button) {
|
|
700
|
+
if (max_rows) return {
|
|
701
|
+
max_rows: max_rows
|
|
702
|
+
};
|
|
703
|
+
return "all";
|
|
704
|
+
}
|
|
697
705
|
return {
|
|
706
|
+
max_rows: max_rows,
|
|
698
707
|
start_rows: view_more_button.start_rows,
|
|
699
708
|
rows_per_click: (_view_more_button$row = view_more_button.rows_per_click) !== null && _view_more_button$row !== void 0 ? _view_more_button$row : 2,
|
|
700
709
|
button: $3hooq$solidjsweb.ssr($41227f10ad680afd$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(view_more_button.text))
|
|
@@ -1119,9 +1128,9 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
1119
1128
|
}));
|
|
1120
1129
|
return outmost_element;
|
|
1121
1130
|
}
|
|
1122
|
-
const $
|
|
1123
|
-
$
|
|
1124
|
-
const $
|
|
1131
|
+
const $902a0ca2b52f3898$var$_tmpl$ = ["<span", ' class="count">', "</span>"],
|
|
1132
|
+
$902a0ca2b52f3898$var$_tmpl$2 = ["<label", ' class="', '"', '><div class="left"><input type="checkbox"', "", "", '><span class="custom-indicator"></span><span class="text line-clamp">', "</span></div><!--#-->", "<!--/--></label>"];
|
|
1133
|
+
const $902a0ca2b52f3898$export$48513f6b9f8ce62d = props => {
|
|
1125
1134
|
// It seems like there's no diffing without memos here (since we often just have computations in the getters above that update to the same result often because their dependencies change with unrelated changes often), so put memos here to avoid unneeded DOM changes
|
|
1126
1135
|
const count = $3hooq$solidjs.createMemo(() => props.count_);
|
|
1127
1136
|
const label = $3hooq$solidjs.createMemo(() => props.label_);
|
|
@@ -1129,12 +1138,12 @@ const $6b92e147c6e24046$export$48513f6b9f8ce62d = props => {
|
|
|
1129
1138
|
const value = $3hooq$solidjs.createMemo(() => props.value_);
|
|
1130
1139
|
const is_count_zero = $3hooq$solidjs.createMemo(() => props.is_count_zero_ || count() === 0);
|
|
1131
1140
|
const id = $3hooq$depictaiutilishared.make_random_classname();
|
|
1132
|
-
return (/* We can't use actual margin because ExpandingContainer gets messed up */$3hooq$solidjsweb.ssr($
|
|
1141
|
+
return (/* We can't use actual margin because ExpandingContainer gets messed up */$3hooq$solidjsweb.ssr($902a0ca2b52f3898$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), "input-row ".concat(is_count_zero() ? "count-0" : ""), $3hooq$solidjsweb.ssrAttribute("for", $3hooq$solidjsweb.escape(id, true), false), $3hooq$solidjsweb.ssrAttribute("name", $3hooq$solidjsweb.escape(value(), true), false) + $3hooq$solidjsweb.ssrAttribute("id", $3hooq$solidjsweb.escape(id, true), false), $3hooq$solidjsweb.ssrAttribute("checked", checked(), true), $3hooq$solidjsweb.ssrAttribute("disabled", !checked() && is_count_zero(), true), $3hooq$solidjsweb.escape(label()) || $3hooq$solidjsweb.escape(value()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1133
1142
|
get when() {
|
|
1134
1143
|
return count() != undefined;
|
|
1135
1144
|
},
|
|
1136
1145
|
get children() {
|
|
1137
|
-
return $3hooq$solidjsweb.ssr($
|
|
1146
|
+
return $3hooq$solidjsweb.ssr($902a0ca2b52f3898$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(count()));
|
|
1138
1147
|
}
|
|
1139
1148
|
})))
|
|
1140
1149
|
);
|
|
@@ -1193,7 +1202,7 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
|
|
|
1193
1202
|
});
|
|
1194
1203
|
const render_checkbox = checkbox => {
|
|
1195
1204
|
// Checkbox always calls the getters in props, so we don't wrap these values into memos
|
|
1196
|
-
return $3hooq$solidjsweb.createComponent((0, $
|
|
1205
|
+
return $3hooq$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
|
|
1197
1206
|
get value_() {
|
|
1198
1207
|
return checkbox().value_;
|
|
1199
1208
|
},
|
|
@@ -1701,7 +1710,7 @@ function $9c1d49181fb3002a$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
1701
1710
|
var _value;
|
|
1702
1711
|
return !!Object.keys(((_value = value()) === null || _value === void 0 ? void 0 : _value.children_) || {}).length;
|
|
1703
1712
|
});
|
|
1704
|
-
return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), "checkbox-details ".concat(has_expandable() ? "expandable" : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $
|
|
1713
|
+
return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), "checkbox-details ".concat(has_expandable() ? "expandable" : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
|
|
1705
1714
|
get value_() {
|
|
1706
1715
|
var _value2;
|
|
1707
1716
|
return JSON.stringify((_value2 = value()) === null || _value2 === void 0 ? void 0 : _value2.value_);
|
|
@@ -1972,9 +1981,26 @@ function $9c1d49181fb3002a$var$expand_until_choice(data_structure) {
|
|
|
1972
1981
|
}
|
|
1973
1982
|
});
|
|
1974
1983
|
}
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1984
|
+
|
|
1985
|
+
/** @jsxImportSource solid-js */
|
|
1986
|
+
|
|
1987
|
+
function $13671aa5e984acd9$export$9f191182275e9ef(what_to_watch) {
|
|
1988
|
+
const [size, setSize] = $3hooq$solidjs.createSignal();
|
|
1989
|
+
const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => {
|
|
1990
|
+
for (let j = 0; j < records.length; j++) {
|
|
1991
|
+
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
1992
|
+
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
1993
|
+
setSize(width);
|
|
1994
|
+
}
|
|
1995
|
+
}));
|
|
1996
|
+
resizeObserver.observe(what_to_watch);
|
|
1997
|
+
$3hooq$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
1998
|
+
return size;
|
|
1999
|
+
}
|
|
2000
|
+
const $cd0e5524f9476f9b$var$_tmpl$ = ["<div", ' class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0">', "</div>"],
|
|
2001
|
+
$cd0e5524f9476f9b$var$_tmpl$2 = ["<span", ' class="count-wrapper"><span class="count">', "</span></span>"];
|
|
2002
|
+
const $cd0e5524f9476f9b$var$gap_px = 5;
|
|
2003
|
+
const $cd0e5524f9476f9b$var$max_columns = 3;
|
|
1978
2004
|
const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
|
|
1979
2005
|
let {
|
|
1980
2006
|
filter_: filter_,
|
|
@@ -2004,26 +2030,144 @@ const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
|
|
|
2004
2030
|
};
|
|
2005
2031
|
});
|
|
2006
2032
|
});
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2033
|
+
const [sizes_set, set_sizes_set] = $3hooq$solidjs.createSignal(new Set(), {
|
|
2034
|
+
equals: false
|
|
2035
|
+
});
|
|
2036
|
+
const [cols_at_size, set_cols_at_size] = $3hooq$solidjs.createSignal([[1, "0px", ""]]);
|
|
2037
|
+
const [container, set_container] = $3hooq$solidjs.createSignal();
|
|
2038
|
+
const container_width_accessor = $3hooq$solidjs.createMemo(() => {
|
|
2039
|
+
const element = container();
|
|
2040
|
+
if (!element) return;
|
|
2041
|
+
return $13671aa5e984acd9$export$9f191182275e9ef(element);
|
|
2042
|
+
});
|
|
2043
|
+
const [shadow_children, set_shadow_children] = $3hooq$solidjs.createSignal(new Set(), {
|
|
2044
|
+
equals: false
|
|
2045
|
+
});
|
|
2046
|
+
const shadow_grid = $3hooq$solidjsweb.ssr($cd0e5524f9476f9b$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape([...shadow_children()])); // for getting the smallest possible sizes of all the items
|
|
2047
|
+
$3hooq$solidjs.createEffect(() => {
|
|
2048
|
+
var _container_width_acce;
|
|
2049
|
+
const container_width = (_container_width_acce = container_width_accessor()) === null || _container_width_acce === void 0 ? void 0 : _container_width_acce();
|
|
2050
|
+
if (container_width == undefined) return;
|
|
2051
|
+
$cd0e5524f9476f9b$var$adjust_sizes(container_width, sizes_set(), set_cols_at_size);
|
|
2052
|
+
});
|
|
2053
|
+
return [shadow_grid, $3hooq$solidjsweb.createComponent((0, $6c2c739b113a8ddf$export$d21e32dfedac04be), {
|
|
2054
|
+
get cols_at_size() {
|
|
2055
|
+
return cols_at_size();
|
|
2010
2056
|
},
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2057
|
+
grid_spacing: $cd0e5524f9476f9b$var$gap_px + "px",
|
|
2058
|
+
rows: "all",
|
|
2059
|
+
layout: "grid",
|
|
2060
|
+
element_attributes: {
|
|
2061
|
+
class: "checkbox-grid",
|
|
2062
|
+
ref: el => set_container(el)
|
|
2063
|
+
},
|
|
2064
|
+
get children() {
|
|
2065
|
+
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Index), {
|
|
2066
|
+
get each() {
|
|
2067
|
+
return buttons();
|
|
2019
2068
|
},
|
|
2020
|
-
|
|
2021
|
-
|
|
2069
|
+
children: value => {
|
|
2070
|
+
const is_selected = $3hooq$solidjs.createMemo(() => {
|
|
2071
|
+
var _existing_filter, _existing_filter$data;
|
|
2072
|
+
return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(value().value_);
|
|
2073
|
+
});
|
|
2074
|
+
const MakeButton = attributes => $3hooq$solidjsweb.ssrElement("button", () => ({
|
|
2075
|
+
...attributes,
|
|
2076
|
+
"disabled": value().count_ === 0 && !is_selected(),
|
|
2077
|
+
"classList": {
|
|
2078
|
+
minor: !is_selected(),
|
|
2079
|
+
major: is_selected(),
|
|
2080
|
+
"major-minor-transition": true
|
|
2081
|
+
}
|
|
2082
|
+
}), () => ["<!--#-->", $3hooq$solidjsweb.escape(value().value_), "<!--/-->", "<!--#-->", $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
2083
|
+
get when() {
|
|
2084
|
+
return value().count_ != undefined;
|
|
2085
|
+
},
|
|
2086
|
+
get children() {
|
|
2087
|
+
return $3hooq$solidjsweb.ssr($cd0e5524f9476f9b$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(value().count_));
|
|
2088
|
+
}
|
|
2089
|
+
})), "<!--/-->"], true);
|
|
2090
|
+
const invisible_size_button = $3hooq$solidjsweb.createComponent(MakeButton, {});
|
|
2091
|
+
const smallest_possible_size = $13671aa5e984acd9$export$9f191182275e9ef(invisible_size_button); // create ResizeObserver for the invisible size button where the div hugs its content
|
|
2092
|
+
const sizes_value = $3hooq$solidjs.untrack(sizes_set);
|
|
2093
|
+
const shadow_children_value = $3hooq$solidjs.untrack(shadow_children);
|
|
2094
|
+
sizes_value.add(smallest_possible_size);
|
|
2095
|
+
set_sizes_set(sizes_value);
|
|
2096
|
+
shadow_children_value.add(invisible_size_button);
|
|
2097
|
+
set_shadow_children(shadow_children_value);
|
|
2098
|
+
$3hooq$solidjs.onCleanup(() => {
|
|
2099
|
+
const sizes_value = $3hooq$solidjs.untrack(sizes_set);
|
|
2100
|
+
const shadow_children_value = $3hooq$solidjs.untrack(shadow_children);
|
|
2101
|
+
sizes_value.delete(smallest_possible_size);
|
|
2102
|
+
set_sizes_set(sizes_value);
|
|
2103
|
+
shadow_children_value.delete(invisible_size_button);
|
|
2104
|
+
set_shadow_children(shadow_children_value);
|
|
2105
|
+
});
|
|
2106
|
+
// The actual button that will be visible
|
|
2107
|
+
return $3hooq$solidjsweb.createComponent(MakeButton, {});
|
|
2022
2108
|
}
|
|
2023
|
-
})
|
|
2109
|
+
});
|
|
2024
2110
|
}
|
|
2025
|
-
})
|
|
2111
|
+
})];
|
|
2026
2112
|
};
|
|
2113
|
+
/**
|
|
2114
|
+
* Calculate and apply cols_at_size overrides to fit as many items as possible in a row, evenly spaced
|
|
2115
|
+
*/
|
|
2116
|
+
function $cd0e5524f9476f9b$var$adjust_sizes(container_width, sizes, set_cols_at_size) {
|
|
2117
|
+
let current_row_index = 0;
|
|
2118
|
+
let current_row_items = [];
|
|
2119
|
+
const column_to_row_result = {};
|
|
2120
|
+
const check_would_fit_evenly = (min_size_of_item, at_number_of_columnns) => {
|
|
2121
|
+
const would_have_even_size = container_width / at_number_of_columnns - (at_number_of_columnns * 2 - 2) * ($cd0e5524f9476f9b$var$gap_px / 2) / at_number_of_columnns; // What size would our element have (without gaps), given that now every column had the same width (equation from Layout.tsx)
|
|
2122
|
+
return would_have_even_size >= min_size_of_item; // would this item still fit if we added another column? (probably what the caller has done with at_number_of_columns), given that every item has the same size
|
|
2123
|
+
};
|
|
2124
|
+
|
|
2125
|
+
for (const size_item of sizes) {
|
|
2126
|
+
const size = size_item();
|
|
2127
|
+
if (size == undefined) return; // Only do stuff if we know all the sizes
|
|
2128
|
+
const current_row_length = current_row_items.length;
|
|
2129
|
+
const can_add_another_column_initial_val = current_row_length < $cd0e5524f9476f9b$var$max_columns; // allow max 4 items per row
|
|
2130
|
+
let can_add_another_column = can_add_another_column_initial_val;
|
|
2131
|
+
if (can_add_another_column)
|
|
2132
|
+
// can we actually? Since adding another column changes the size of all elements in the row we need to check all of them
|
|
2133
|
+
for (let i = -1; i < current_row_length; i++) {
|
|
2134
|
+
var _ref3;
|
|
2135
|
+
// -1 is for the new item we're adding and every item is guaranteed to exist
|
|
2136
|
+
const size_to_check = (_ref3 = current_row_items[i]) !== null && _ref3 !== void 0 ? _ref3 : size;
|
|
2137
|
+
const would_have_columns = current_row_length + 1; // if we added another column
|
|
2138
|
+
const would_fit_evenly = check_would_fit_evenly(size_to_check, would_have_columns); // see comments in check_would_fit_evenly
|
|
2139
|
+
if (!would_fit_evenly) {
|
|
2140
|
+
can_add_another_column = false;
|
|
2141
|
+
break;
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
if (can_add_another_column) current_row_items.push(size);else {
|
|
2145
|
+
column_to_row_result[++current_row_index] = current_row_length || 1; // overrides is indexed by 1 it seems, therefore ++curent_row_index
|
|
2146
|
+
current_row_items = [size]; // save current item for next row
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
const items_left_to_add = current_row_items.length;
|
|
2151
|
+
if (items_left_to_add) {
|
|
2152
|
+
let num_columns = 1; // We want to have as close to max_columns as possible in the last row
|
|
2153
|
+
let fits = true;
|
|
2154
|
+
do
|
|
2155
|
+
// Check if more columns would fit
|
|
2156
|
+
for (let i = 0; i < items_left_to_add; i++) {
|
|
2157
|
+
const item = current_row_items[i];
|
|
2158
|
+
const would_fit_evenly = check_would_fit_evenly(item, num_columns + 1);
|
|
2159
|
+
if (!would_fit_evenly) {
|
|
2160
|
+
fits = false;
|
|
2161
|
+
break;
|
|
2162
|
+
}
|
|
2163
|
+
} while (fits && ++num_columns < $cd0e5524f9476f9b$var$max_columns);
|
|
2164
|
+
column_to_row_result[++current_row_index] = num_columns; // Add last row that's left after loop finished
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
set_cols_at_size([[1, "0px", "", null, {
|
|
2168
|
+
overrides: column_to_row_result
|
|
2169
|
+
}]]);
|
|
2170
|
+
}
|
|
2027
2171
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
2028
2172
|
const signal = $3hooq$solidjs.createSignal(false);
|
|
2029
2173
|
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -2082,7 +2226,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
2082
2226
|
});
|
|
2083
2227
|
const rgb_color = $3hooq$solidjs.createMemo(() => $3hooq$depictaiutilishared.hex_to_rgb(hex_color()));
|
|
2084
2228
|
const black_contrast_better = $3hooq$solidjs.createMemo(() => rgb_color() ? $476a3dc36afc1938$var$does_black_contrast_better(rgb_color()) : false);
|
|
2085
|
-
const input_row = $3hooq$solidjsweb.createComponent((0, $
|
|
2229
|
+
const input_row = $3hooq$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
|
|
2086
2230
|
get value_() {
|
|
2087
2231
|
return checkbox().value_;
|
|
2088
2232
|
},
|