@depict-ai/react-ui 0.0.57 → 0.0.60

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/index.d.ts CHANGED
@@ -37,7 +37,6 @@ export interface DepictProductCardProps<T extends Display> {
37
37
  * Depict product card to use for rendering products.
38
38
  */
39
39
  export type DepictProductCard<T extends Display> = (props: DepictProductCardProps<T>) => ReactNode;
40
- export function DepictSearchField(): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
41
40
  type NavigateFunction = (href: string) => void;
42
41
  type DepictSearchConfig = {
43
42
  /**
@@ -392,7 +391,14 @@ interface UseSearchModalReturn {
392
391
  * @returns {JSX.Element}
393
392
  */
394
393
  export function useDepictSearchModal(params: UseSearchModalParams): UseSearchModalReturn;
395
- export const version = "0.0.57";
394
+ interface SearchFieldProps {
395
+ alignerRef?: React.RefObject<HTMLElement>;
396
+ }
397
+ interface SearchFieldReturn {
398
+ DepictSearchField: React.FC;
399
+ }
400
+ export const useDepictSearchField: (props: SearchFieldProps) => SearchFieldReturn;
401
+ export const version = "0.0.60";
396
402
  /**
397
403
  * Helper function to navigate to a new page depending on the navigation library used.
398
404
  */
package/dist/main.js CHANGED
@@ -17,10 +17,10 @@ $parcel$export(module.exports, "DepictAligner", () => $d96434e62e08087d$export$3
17
17
  $parcel$export(module.exports, "DepictProvider", () => $24b00503eef73528$export$9fac37a9c21c2f3b);
18
18
  $parcel$export(module.exports, "DepictCategoryPage", () => $5aa5fcb9f8a2bebc$export$d87c61cecb2edf0d);
19
19
  $parcel$export(module.exports, "DepictSearchPage", () => $7ad7a3d0011b7b1b$export$210723f5a54a7028);
20
- $parcel$export(module.exports, "DepictSearchField", () => $03c714523ff406fc$export$4c0fa313cf50c4ad);
21
20
  $parcel$export(module.exports, "ImagePlaceholder", () => $df522c8a81ed5a01$export$3f37af283f8fb843);
22
21
  $parcel$export(module.exports, "TextPlaceholder", () => $7c8b440edc188ad5$export$89c6019e4baa40b1);
23
22
  $parcel$export(module.exports, "useDepictSearchModal", () => $3647cad61d03b89c$export$cc1e9aaf280afdcb);
23
+ $parcel$export(module.exports, "useDepictSearchField", () => $913da7f4d0bc77f2$export$45080d603eda647c);
24
24
  $parcel$export(module.exports, "CategoryTitle", () => $b03e4eee8610ebbe$re_export$CategoryTitle);
25
25
  $parcel$export(module.exports, "EmbeddedNumProducts", () => $b03e4eee8610ebbe$re_export$EmbeddedNumProducts);
26
26
  $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
@@ -44,6 +44,8 @@ const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
44
44
 
45
45
 
46
46
 
47
+
48
+
47
49
  let $b4d0d98857ed9934$var$run_on_href_change;
48
50
  function $b4d0d98857ed9934$export$74f3924c5027fe1d(cb) {
49
51
  $b4d0d98857ed9934$var$run_on_href_change = cb;
@@ -115,13 +117,15 @@ async function $b4d0d98857ed9934$export$79c79419c1ef0081({ display: display , in
115
117
  }
116
118
 
117
119
 
118
-
119
-
120
- function $03c714523ff406fc$export$4c0fa313cf50c4ad() {
121
- return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)((0, $b4d0d98857ed9934$export$e5139bbbb9a05035)(()=>(0, $4GYXz$depictaiui.SearchField)({
122
- depict_search: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search
123
- })), {});
124
- }
120
+ const $03c714523ff406fc$export$bde46b5bb6287cea = (props)=>{
121
+ const ReactSearchField = ()=>{
122
+ return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)((0, $b4d0d98857ed9934$export$e5139bbbb9a05035)(()=>(0, $4GYXz$depictaiui.SearchField)({
123
+ depict_search: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search,
124
+ aligner_ref: props?.alignerRef?.current
125
+ })), {});
126
+ };
127
+ return ReactSearchField;
128
+ };
125
129
 
126
130
 
127
131
 
@@ -245,9 +249,6 @@ function $24b00503eef73528$export$9fac37a9c21c2f3b(props) {
245
249
  }
246
250
 
247
251
 
248
- // PoC maybe-component
249
- // Idea is to always give a nice "modal input in header" look with no more config than adding this component to the page header to where it can absolute-size
250
- // and cover the entire height of the header. Then we know where to put the modal input top and bottom, and the left and right we just center.
251
252
 
252
253
  const $d96434e62e08087d$export$3f4580d6398c5027 = /*#__PURE__*/ (0, $4GYXz$react.forwardRef)((_, ref)=>{
253
254
  return /*#__PURE__*/ (0, $4GYXz$react.createElement)("div", {
@@ -425,7 +426,7 @@ const $7c8b440edc188ad5$export$89c6019e4baa40b1 = ({ width: width , height: heig
425
426
 
426
427
 
427
428
  const $ef7db890e488d4f4$export$d69d8daa20eae175 = (createOpenModalParams)=>{
428
- const { globalState: globalState , location: location , alignerRef: alignerRef , document: document } = createOpenModalParams;
429
+ const { globalState: globalState , location: location , alignerRef: alignerRef } = createOpenModalParams;
429
430
  const openModal = ()=>{
430
431
  const headerAligner = alignerRef?.current;
431
432
  if (!globalState.search) throw new Error("No active search in the app!");
@@ -475,7 +476,6 @@ const $ef7db890e488d4f4$export$d69d8daa20eae175 = (createOpenModalParams)=>{
475
476
  function $3647cad61d03b89c$export$cc1e9aaf280afdcb(params) {
476
477
  const open = (0, $ef7db890e488d4f4$export$d69d8daa20eae175)({
477
478
  globalState: $0b7cd4fb39fc3502$export$8e769ad4338a911e,
478
- document: document,
479
479
  ...params
480
480
  });
481
481
  return {
@@ -485,9 +485,20 @@ function $3647cad61d03b89c$export$cc1e9aaf280afdcb(params) {
485
485
 
486
486
 
487
487
 
488
+ const $913da7f4d0bc77f2$export$45080d603eda647c = (props)=>{
489
+ const SearchField = (0, $03c714523ff406fc$export$bde46b5bb6287cea)({
490
+ alignerRef: props.alignerRef
491
+ });
492
+ return {
493
+ DepictSearchField: SearchField
494
+ };
495
+ };
496
+
497
+
498
+
488
499
 
489
500
 
490
- const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.57";
501
+ const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.60";
491
502
 
492
503
 
493
504
 
package/dist/module.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {dlog as $TZSbU$dlog, href_change_ipns as $TZSbU$href_change_ipns, catchify as $TZSbU$catchify, observer as $TZSbU$observer, history_replacer as $TZSbU$history_replacer, queueMacroTask as $TZSbU$queueMacroTask, ContainedPlaceholderImage as $TZSbU$ContainedPlaceholderImage, Placeholder as $TZSbU$Placeholder} from "@depict-ai/utilishared";
2
2
  import {add_to_version_info as $TZSbU$add_to_version_info, CategoryTitle as $43099132aad1ceb6$re_export$CategoryTitle, embedded_num_products as $43099132aad1ceb6$re_export$EmbeddedNumProducts, SearchField as $TZSbU$SearchField, DepictSearch as $TZSbU$DepictSearch, DepictCategory as $TZSbU$DepictCategory, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage, CategoryPage as $TZSbU$CategoryPage, BreadCrumbs as $TZSbU$BreadCrumbs, QuickLinks as $TZSbU$QuickLinks, styles_to_valid_css_string as $TZSbU$styles_to_valid_css_string, align_field as $TZSbU$align_field} from "@depict-ai/ui";
3
- import {untrack as $TZSbU$untrack, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, onCleanup as $TZSbU$onCleanup, createSignal as $TZSbU$createSignal, createRoot as $TZSbU$createRoot, createComputed as $TZSbU$createComputed} from "solid-js";
3
+ import {createSignal as $TZSbU$createSignal, untrack as $TZSbU$untrack, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, onCleanup as $TZSbU$onCleanup, createRoot as $TZSbU$createRoot, createComputed as $TZSbU$createComputed} from "solid-js";
4
4
  import {render as $TZSbU$render} from "solid-js/web";
5
5
  import {useState as $TZSbU$useState, useRef as $TZSbU$useRef, useEffect as $TZSbU$useEffect, createElement as $TZSbU$createElement, Fragment as $TZSbU$Fragment, forwardRef as $TZSbU$forwardRef} from "react";
6
6
  import {jsx as $TZSbU$jsx} from "react/jsx-runtime";
@@ -26,6 +26,8 @@ const $42858f023ef23dab$export$8e769ad4338a911e = {
26
26
 
27
27
 
28
28
 
29
+
30
+
29
31
  let $c83ba9ab79386687$var$run_on_href_change;
30
32
  function $c83ba9ab79386687$export$74f3924c5027fe1d(cb) {
31
33
  $c83ba9ab79386687$var$run_on_href_change = cb;
@@ -97,13 +99,15 @@ async function $c83ba9ab79386687$export$79c79419c1ef0081({ display: display , in
97
99
  }
98
100
 
99
101
 
100
-
101
-
102
- function $02e2452814b6e7d6$export$4c0fa313cf50c4ad() {
103
- return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)((0, $c83ba9ab79386687$export$e5139bbbb9a05035)(()=>(0, $TZSbU$SearchField)({
104
- depict_search: (0, $42858f023ef23dab$export$8e769ad4338a911e).search
105
- })), {});
106
- }
102
+ const $02e2452814b6e7d6$export$bde46b5bb6287cea = (props)=>{
103
+ const ReactSearchField = ()=>{
104
+ return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)((0, $c83ba9ab79386687$export$e5139bbbb9a05035)(()=>(0, $TZSbU$SearchField)({
105
+ depict_search: (0, $42858f023ef23dab$export$8e769ad4338a911e).search,
106
+ aligner_ref: props?.alignerRef?.current
107
+ })), {});
108
+ };
109
+ return ReactSearchField;
110
+ };
107
111
 
108
112
 
109
113
 
@@ -227,9 +231,6 @@ function $5376eb2a386cd90d$export$9fac37a9c21c2f3b(props) {
227
231
  }
228
232
 
229
233
 
230
- // PoC maybe-component
231
- // Idea is to always give a nice "modal input in header" look with no more config than adding this component to the page header to where it can absolute-size
232
- // and cover the entire height of the header. Then we know where to put the modal input top and bottom, and the left and right we just center.
233
234
 
234
235
  const $4db0e2f013fc5124$export$3f4580d6398c5027 = /*#__PURE__*/ (0, $TZSbU$forwardRef)((_, ref)=>{
235
236
  return /*#__PURE__*/ (0, $TZSbU$createElement)("div", {
@@ -407,7 +408,7 @@ const $cbd250061abf11cb$export$89c6019e4baa40b1 = ({ width: width , height: heig
407
408
 
408
409
 
409
410
  const $5e26376d86621891$export$d69d8daa20eae175 = (createOpenModalParams)=>{
410
- const { globalState: globalState , location: location , alignerRef: alignerRef , document: document } = createOpenModalParams;
411
+ const { globalState: globalState , location: location , alignerRef: alignerRef } = createOpenModalParams;
411
412
  const openModal = ()=>{
412
413
  const headerAligner = alignerRef?.current;
413
414
  if (!globalState.search) throw new Error("No active search in the app!");
@@ -457,7 +458,6 @@ const $5e26376d86621891$export$d69d8daa20eae175 = (createOpenModalParams)=>{
457
458
  function $cfa72c75e6cf6901$export$cc1e9aaf280afdcb(params) {
458
459
  const open = (0, $5e26376d86621891$export$d69d8daa20eae175)({
459
460
  globalState: $42858f023ef23dab$export$8e769ad4338a911e,
460
- document: document,
461
461
  ...params
462
462
  });
463
463
  return {
@@ -467,9 +467,20 @@ function $cfa72c75e6cf6901$export$cc1e9aaf280afdcb(params) {
467
467
 
468
468
 
469
469
 
470
+ const $2b886cf548a4775c$export$45080d603eda647c = (props)=>{
471
+ const SearchField = (0, $02e2452814b6e7d6$export$bde46b5bb6287cea)({
472
+ alignerRef: props.alignerRef
473
+ });
474
+ return {
475
+ DepictSearchField: SearchField
476
+ };
477
+ };
478
+
479
+
480
+
470
481
 
471
482
 
472
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.57";
483
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.60";
473
484
 
474
485
 
475
486
 
@@ -511,4 +522,4 @@ const $43099132aad1ceb6$var$package_name = "@depict-ai/react-ui";
511
522
  });
512
523
 
513
524
 
514
- export {$b68a14248b7ef667$export$466cdc317043f6cb as QuickLinks, $f866f7ed9f751af4$export$5646050d516e06bc as BreadCrumbs, $4db0e2f013fc5124$export$3f4580d6398c5027 as DepictAligner, $5376eb2a386cd90d$export$9fac37a9c21c2f3b as DepictProvider, $48d7f568740a317d$export$d87c61cecb2edf0d as DepictCategoryPage, $4a678f0c87b12e78$export$210723f5a54a7028 as DepictSearchPage, $02e2452814b6e7d6$export$4c0fa313cf50c4ad as DepictSearchField, $f446a84f85ba06f6$export$3f37af283f8fb843 as ImagePlaceholder, $cbd250061abf11cb$export$89c6019e4baa40b1 as TextPlaceholder, $cfa72c75e6cf6901$export$cc1e9aaf280afdcb as useDepictSearchModal, $43099132aad1ceb6$re_export$CategoryTitle as CategoryTitle, $43099132aad1ceb6$re_export$EmbeddedNumProducts as EmbeddedNumProducts, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version, $97603d19204ec48d$export$b8a61e5c71402559 as Navigation};
525
+ export {$b68a14248b7ef667$export$466cdc317043f6cb as QuickLinks, $f866f7ed9f751af4$export$5646050d516e06bc as BreadCrumbs, $4db0e2f013fc5124$export$3f4580d6398c5027 as DepictAligner, $5376eb2a386cd90d$export$9fac37a9c21c2f3b as DepictProvider, $48d7f568740a317d$export$d87c61cecb2edf0d as DepictCategoryPage, $4a678f0c87b12e78$export$210723f5a54a7028 as DepictSearchPage, $f446a84f85ba06f6$export$3f37af283f8fb843 as ImagePlaceholder, $cbd250061abf11cb$export$89c6019e4baa40b1 as TextPlaceholder, $cfa72c75e6cf6901$export$cc1e9aaf280afdcb as useDepictSearchModal, $2b886cf548a4775c$export$45080d603eda647c as useDepictSearchField, $43099132aad1ceb6$re_export$CategoryTitle as CategoryTitle, $43099132aad1ceb6$re_export$EmbeddedNumProducts as EmbeddedNumProducts, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version, $97603d19204ec48d$export$b8a61e5c71402559 as Navigation};
@@ -2,7 +2,7 @@ type OpenModal = () => void;
2
2
  interface UseSearchModalReturn {
3
3
  open: OpenModal;
4
4
  }
5
- export const version = "0.0.57";
5
+ export const version = "0.0.60";
6
6
  export function DepictProvider(props: any): any;
7
7
  export function DepictSearchField(): any;
8
8
  export function DepictSearchPage(): any;
@@ -17,5 +17,8 @@ export function DepictAligner(): import("react").DetailedReactHTMLElement<{
17
17
  }, HTMLElement>;
18
18
  export function ImagePlaceHolder(): any;
19
19
  export function TextPlaceholder(): any;
20
+ export function useDepictSearchField(): {
21
+ SearchField: any;
22
+ };
20
23
  export function openModal(): void;
21
24
  export function useDepictSearchModal(): UseSearchModalReturn;
@@ -14,12 +14,13 @@ $parcel$export(module.exports, "QuickLinks", () => $41e7e5d85b5e0d49$export$466c
14
14
  $parcel$export(module.exports, "DepictAligner", () => $41e7e5d85b5e0d49$export$3f4580d6398c5027);
15
15
  $parcel$export(module.exports, "ImagePlaceHolder", () => $41e7e5d85b5e0d49$export$ecf150517ad2aa0);
16
16
  $parcel$export(module.exports, "TextPlaceholder", () => $41e7e5d85b5e0d49$export$89c6019e4baa40b1);
17
+ $parcel$export(module.exports, "useDepictSearchField", () => $41e7e5d85b5e0d49$export$45080d603eda647c);
17
18
  $parcel$export(module.exports, "openModal", () => $41e7e5d85b5e0d49$export$a7f6cffb6b8ba11c);
18
19
  $parcel$export(module.exports, "useDepictSearchModal", () => $41e7e5d85b5e0d49$export$cc1e9aaf280afdcb);
19
20
  $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
20
21
 
21
22
 
22
- const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.57";
23
+ const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.60";
23
24
 
24
25
 
25
26
  function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
@@ -68,6 +69,13 @@ function $41e7e5d85b5e0d49$export$89c6019e4baa40b1() {
68
69
  children: []
69
70
  });
70
71
  }
72
+ function $41e7e5d85b5e0d49$export$45080d603eda647c() {
73
+ return {
74
+ SearchField: (0, $5efvh$reactjsxruntime.jsx)("div", {
75
+ children: []
76
+ })
77
+ };
78
+ }
71
79
  function $41e7e5d85b5e0d49$export$a7f6cffb6b8ba11c() {}
72
80
  function $41e7e5d85b5e0d49$export$cc1e9aaf280afdcb() {
73
81
  return {
@@ -3,7 +3,7 @@ import {jsx as $1RlIW$jsx} from "react/jsx-runtime";
3
3
 
4
4
 
5
5
 
6
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.57";
6
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.60";
7
7
 
8
8
 
9
9
  function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
@@ -52,6 +52,13 @@ function $2b1fdeb83610500f$export$89c6019e4baa40b1() {
52
52
  children: []
53
53
  });
54
54
  }
55
+ function $2b1fdeb83610500f$export$45080d603eda647c() {
56
+ return {
57
+ SearchField: (0, $1RlIW$jsx)("div", {
58
+ children: []
59
+ })
60
+ };
61
+ }
55
62
  function $2b1fdeb83610500f$export$a7f6cffb6b8ba11c() {}
56
63
  function $2b1fdeb83610500f$export$cc1e9aaf280afdcb() {
57
64
  return {
@@ -60,4 +67,4 @@ function $2b1fdeb83610500f$export$cc1e9aaf280afdcb() {
60
67
  }
61
68
 
62
69
 
63
- export {$2b1fdeb83610500f$export$9fac37a9c21c2f3b as DepictProvider, $2b1fdeb83610500f$export$4c0fa313cf50c4ad as DepictSearchField, $2b1fdeb83610500f$export$210723f5a54a7028 as DepictSearchPage, $2b1fdeb83610500f$export$d87c61cecb2edf0d as DepictCategoryPage, $2b1fdeb83610500f$export$5646050d516e06bc as BreadCrumbs, $2b1fdeb83610500f$export$466cdc317043f6cb as QuickLinks, $2b1fdeb83610500f$export$3f4580d6398c5027 as DepictAligner, $2b1fdeb83610500f$export$ecf150517ad2aa0 as ImagePlaceHolder, $2b1fdeb83610500f$export$89c6019e4baa40b1 as TextPlaceholder, $2b1fdeb83610500f$export$a7f6cffb6b8ba11c as openModal, $2b1fdeb83610500f$export$cc1e9aaf280afdcb as useDepictSearchModal, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version};
70
+ export {$2b1fdeb83610500f$export$9fac37a9c21c2f3b as DepictProvider, $2b1fdeb83610500f$export$4c0fa313cf50c4ad as DepictSearchField, $2b1fdeb83610500f$export$210723f5a54a7028 as DepictSearchPage, $2b1fdeb83610500f$export$d87c61cecb2edf0d as DepictCategoryPage, $2b1fdeb83610500f$export$5646050d516e06bc as BreadCrumbs, $2b1fdeb83610500f$export$466cdc317043f6cb as QuickLinks, $2b1fdeb83610500f$export$3f4580d6398c5027 as DepictAligner, $2b1fdeb83610500f$export$ecf150517ad2aa0 as ImagePlaceHolder, $2b1fdeb83610500f$export$89c6019e4baa40b1 as TextPlaceholder, $2b1fdeb83610500f$export$45080d603eda647c as useDepictSearchField, $2b1fdeb83610500f$export$a7f6cffb6b8ba11c as openModal, $2b1fdeb83610500f$export$cc1e9aaf280afdcb as useDepictSearchModal, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/react-ui",
3
- "version": "0.0.57",
3
+ "version": "0.0.60",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -90,8 +90,8 @@
90
90
  "/locales"
91
91
  ],
92
92
  "dependencies": {
93
- "@depict-ai/ui": "^0.0.34",
94
- "@depict-ai/utilishared": "^0.0.32",
93
+ "@depict-ai/ui": "^0.0.37",
94
+ "@depict-ai/utilishared": "^0.0.35",
95
95
  "solid-js": "^1.6.2"
96
96
  },
97
97
  "peerDependencies": {
@@ -104,7 +104,7 @@
104
104
  "@babel/preset-typescript": "latest",
105
105
  "@babel/runtime": "latest",
106
106
  "@babel/runtime-corejs3": "latest",
107
- "@depict-ai/plp-styling": "^0.0.3",
107
+ "@depict-ai/plp-styling": "^0.0.5",
108
108
  "@jest/globals": "^29.3.1",
109
109
  "@parcel/babel-preset-env": "latest",
110
110
  "@parcel/resolver-default": "^2.8.0",