bitsnap-react 1.15.0 → 1.17.0

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.
Files changed (161) hide show
  1. package/AGENTS.md +8 -0
  2. package/README.md +132 -2
  3. package/dist/CartProvider-DGRZDTYC.mjs +2 -0
  4. package/dist/CartProvider-YVOHSMPE.js +2 -0
  5. package/dist/CartProvider-YVOHSMPE.js.map +1 -0
  6. package/dist/PanelModelFiles-NYCOFPLY.js +2 -0
  7. package/dist/PanelModelFiles-NYCOFPLY.js.map +1 -0
  8. package/dist/PanelModelFiles-RV7OHUUZ.mjs +2 -0
  9. package/dist/PanelModelFiles-RV7OHUUZ.mjs.map +1 -0
  10. package/dist/Viewer3D-2IDEH6W3.mjs +2 -0
  11. package/dist/Viewer3D-2IDEH6W3.mjs.map +1 -0
  12. package/dist/analytics.d.mts +2 -2
  13. package/dist/analytics.d.ts +2 -2
  14. package/dist/analytics.js +1 -1
  15. package/dist/analytics.js.map +1 -1
  16. package/dist/analytics.mjs +1 -1
  17. package/dist/catalog.d.mts +6 -2
  18. package/dist/catalog.d.ts +6 -2
  19. package/dist/catalog.js +1 -1
  20. package/dist/catalog.js.map +1 -1
  21. package/dist/catalog.mjs +1 -1
  22. package/dist/chunk-2NL5FCXC.mjs +4 -0
  23. package/dist/chunk-2NL5FCXC.mjs.map +1 -0
  24. package/dist/{chunk-PEVB3VL4.mjs → chunk-2UDAB2C5.mjs} +2 -2
  25. package/dist/{chunk-PEVB3VL4.mjs.map → chunk-2UDAB2C5.mjs.map} +1 -1
  26. package/dist/{chunk-7DG4UPWE.js → chunk-4BL7TLK3.js} +2 -2
  27. package/dist/chunk-4BL7TLK3.js.map +1 -0
  28. package/dist/chunk-4ETIDGYZ.mjs +2 -0
  29. package/dist/chunk-4ETIDGYZ.mjs.map +1 -0
  30. package/dist/chunk-555KFWGY.js +4 -0
  31. package/dist/chunk-555KFWGY.js.map +1 -0
  32. package/dist/chunk-5ED7FWNY.mjs +2 -0
  33. package/dist/chunk-5ED7FWNY.mjs.map +1 -0
  34. package/dist/chunk-5FZAROP6.js +2 -0
  35. package/dist/chunk-5FZAROP6.js.map +1 -0
  36. package/dist/chunk-5R6AGO3Z.mjs +2 -0
  37. package/dist/chunk-5R6AGO3Z.mjs.map +1 -0
  38. package/dist/chunk-6GCCNBEU.js +2 -0
  39. package/dist/chunk-6GCCNBEU.js.map +1 -0
  40. package/dist/chunk-6Q3VGPSF.js +2 -0
  41. package/dist/chunk-6Q3VGPSF.js.map +1 -0
  42. package/dist/chunk-6YIRRDCL.mjs +2 -0
  43. package/dist/chunk-6YIRRDCL.mjs.map +1 -0
  44. package/dist/chunk-7RXW6XFY.js +2 -0
  45. package/dist/chunk-7RXW6XFY.js.map +1 -0
  46. package/dist/chunk-A6VCP3A4.mjs +2 -0
  47. package/dist/chunk-A6VCP3A4.mjs.map +1 -0
  48. package/dist/chunk-BZXV77PT.mjs +2 -0
  49. package/dist/chunk-BZXV77PT.mjs.map +1 -0
  50. package/dist/{chunk-MG6VV5J2.js → chunk-C3BBJOVV.js} +2 -2
  51. package/dist/chunk-C3BBJOVV.js.map +1 -0
  52. package/dist/chunk-CUPG4B5W.mjs +2 -0
  53. package/dist/chunk-CUPG4B5W.mjs.map +1 -0
  54. package/dist/chunk-ESF5ZVVF.js +2 -0
  55. package/dist/chunk-ESF5ZVVF.js.map +1 -0
  56. package/dist/chunk-HKNWW37T.mjs +2 -0
  57. package/dist/chunk-HKNWW37T.mjs.map +1 -0
  58. package/dist/chunk-JSDGZ4NY.js.map +1 -1
  59. package/dist/chunk-KOYBZORL.js.map +1 -1
  60. package/dist/chunk-L7Q7OKM5.mjs +2 -0
  61. package/dist/chunk-L7Q7OKM5.mjs.map +1 -0
  62. package/dist/chunk-M2G74N43.mjs +2 -0
  63. package/dist/chunk-M2G74N43.mjs.map +1 -0
  64. package/dist/chunk-MIMQTH2G.js +2 -0
  65. package/dist/chunk-MIMQTH2G.js.map +1 -0
  66. package/dist/chunk-SYN5KU3O.js +2 -0
  67. package/dist/chunk-SYN5KU3O.js.map +1 -0
  68. package/dist/chunk-VNYHJT6V.mjs +2 -0
  69. package/dist/chunk-VNYHJT6V.mjs.map +1 -0
  70. package/dist/chunk-W3RGQYPD.js.map +1 -1
  71. package/dist/chunk-X3LVYIJR.mjs +2 -0
  72. package/dist/chunk-X3LVYIJR.mjs.map +1 -0
  73. package/dist/consent.js.map +1 -1
  74. package/dist/course.d.mts +3 -3
  75. package/dist/course.d.ts +3 -3
  76. package/dist/course.js +1 -1
  77. package/dist/course.js.map +1 -1
  78. package/dist/course.mjs +1 -1
  79. package/dist/course.mjs.map +1 -1
  80. package/dist/embed/analytics.js +1 -1
  81. package/dist/errors.js.map +1 -1
  82. package/dist/index.css +1 -1
  83. package/dist/index.css.map +1 -1
  84. package/dist/index.d.mts +41 -12
  85. package/dist/index.d.ts +41 -12
  86. package/dist/index.js +1 -1
  87. package/dist/index.js.map +1 -1
  88. package/dist/index.mjs +1 -1
  89. package/dist/index.mjs.map +1 -1
  90. package/dist/{instrument-BE8ktMUv.d.mts → instrument-eXaC8hc2.d.mts} +1 -1
  91. package/dist/{instrument-BE8ktMUv.d.ts → instrument-eXaC8hc2.d.ts} +1 -1
  92. package/dist/internal.js.map +1 -1
  93. package/dist/methods-3W34GRYL.js +2 -0
  94. package/dist/methods-3W34GRYL.js.map +1 -0
  95. package/dist/methods-LUJSKSQ4.mjs +2 -0
  96. package/dist/model-files-client-HHDXJDTS.mjs +2 -0
  97. package/dist/model-files-client-HHDXJDTS.mjs.map +1 -0
  98. package/dist/model-files-client-P4PORZJ6.js +2 -0
  99. package/dist/model-files-client-P4PORZJ6.js.map +1 -0
  100. package/dist/models.d.mts +2 -0
  101. package/dist/models.d.ts +2 -0
  102. package/dist/models.js +1 -1
  103. package/dist/models.js.map +1 -1
  104. package/dist/models.mjs +1 -1
  105. package/dist/models.mjs.map +1 -1
  106. package/dist/returns.d.mts +19 -10
  107. package/dist/returns.d.ts +19 -10
  108. package/dist/returns.js +1 -1
  109. package/dist/returns.js.map +1 -1
  110. package/dist/returns.mjs +1 -1
  111. package/dist/{texts-tQtAGJCT.d.mts → texts-LGhuQfA9.d.mts} +28 -3
  112. package/dist/{texts-CIEFbJTN.d.ts → texts-m6XQGZ6w.d.ts} +28 -3
  113. package/dist/types-ClFCVzk_.d.ts +121 -0
  114. package/dist/types-D6LsoycW.d.mts +121 -0
  115. package/dist/viewer3d.css +2 -0
  116. package/dist/viewer3d.css.map +1 -0
  117. package/dist/viewer3d.d.mts +318 -0
  118. package/dist/viewer3d.d.ts +318 -0
  119. package/dist/viewer3d.js +2 -0
  120. package/dist/viewer3d.js.map +1 -0
  121. package/dist/viewer3d.mjs +63 -0
  122. package/dist/viewer3d.mjs.map +1 -0
  123. package/package.json +43 -16
  124. package/dist/CartProvider-64QEJ7A7.js +0 -2
  125. package/dist/CartProvider-64QEJ7A7.js.map +0 -1
  126. package/dist/CartProvider-XKK7A3C2.mjs +0 -2
  127. package/dist/chunk-2TLWMYXW.mjs +0 -2
  128. package/dist/chunk-2TLWMYXW.mjs.map +0 -1
  129. package/dist/chunk-7DG4UPWE.js.map +0 -1
  130. package/dist/chunk-7TLJKYZD.mjs +0 -2
  131. package/dist/chunk-7TLJKYZD.mjs.map +0 -1
  132. package/dist/chunk-AZQOW73L.mjs +0 -4
  133. package/dist/chunk-AZQOW73L.mjs.map +0 -1
  134. package/dist/chunk-DY2S42Q6.js +0 -2
  135. package/dist/chunk-DY2S42Q6.js.map +0 -1
  136. package/dist/chunk-FGB5FJCI.js +0 -2
  137. package/dist/chunk-FGB5FJCI.js.map +0 -1
  138. package/dist/chunk-GLAJPUMA.js +0 -2
  139. package/dist/chunk-GLAJPUMA.js.map +0 -1
  140. package/dist/chunk-H4WAQQVO.js +0 -2
  141. package/dist/chunk-H4WAQQVO.js.map +0 -1
  142. package/dist/chunk-MG6VV5J2.js.map +0 -1
  143. package/dist/chunk-Q3DSK66F.mjs +0 -2
  144. package/dist/chunk-Q3DSK66F.mjs.map +0 -1
  145. package/dist/chunk-RWEP6IUC.mjs +0 -2
  146. package/dist/chunk-RWEP6IUC.mjs.map +0 -1
  147. package/dist/chunk-S4Z4O46O.mjs +0 -2
  148. package/dist/chunk-S4Z4O46O.mjs.map +0 -1
  149. package/dist/chunk-VY6CZVVA.js +0 -4
  150. package/dist/chunk-VY6CZVVA.js.map +0 -1
  151. package/dist/chunk-XZYCQ655.js +0 -2
  152. package/dist/chunk-XZYCQ655.js.map +0 -1
  153. package/dist/chunk-ZIWQ57GY.mjs +0 -2
  154. package/dist/chunk-ZIWQ57GY.mjs.map +0 -1
  155. package/dist/methods-NUMVR53L.js +0 -2
  156. package/dist/methods-NUMVR53L.js.map +0 -1
  157. package/dist/methods-YKZZ6OVT.mjs +0 -2
  158. package/dist/types-DP1vxo5E.d.mts +0 -53
  159. package/dist/types-u8VwmC3j.d.ts +0 -53
  160. /package/dist/{CartProvider-XKK7A3C2.mjs.map → CartProvider-DGRZDTYC.mjs.map} +0 -0
  161. /package/dist/{methods-YKZZ6OVT.mjs.map → methods-LUJSKSQ4.mjs.map} +0 -0
@@ -940,4 +940,4 @@ declare function useInstrument(projectKey: string | null | undefined, analytics?
940
940
  /** Score (0..100) → the contract's bucket. */
941
941
  declare function scoreBucket(percent: number): "0-24" | "25-49" | "50-74" | "75-99" | "100";
942
942
 
943
- export { type AnalyticsOption as A, type BrowserEventName as B, type ClientEvent as C, DEFAULT_ENDPOINT as D, type Env as E, InstrumentProvider as I, type PageType as P, type Source as S, type Tracker as T, type TrackerOptions as a, type TrackExtra as b, createTracker as c, type AppEventName as d, type Channel as e, type EventName as f, getTracker as g, type EventProps as h, initTracker as i, type StorefrontEventName as j, useInstrumentContext as k, type Instrument as l, noopInstrument as n, resetTracker as r, scoreBucket as s, useInstrument as u };
943
+ export { type AppEventName as A, type BrowserEventName as B, type ClientEvent as C, DEFAULT_ENDPOINT as D, type Env as E, InstrumentProvider as I, type PageType as P, type Source as S, type Tracker as T, type TrackerOptions as a, type TrackExtra as b, createTracker as c, type Channel as d, type EventName as e, type EventProps as f, getTracker as g, type StorefrontEventName as h, initTracker as i, useInstrumentContext as j, type AnalyticsOption as k, type Instrument as l, noopInstrument as n, resetTracker as r, scoreBucket as s, useInstrument as u };
@@ -940,4 +940,4 @@ declare function useInstrument(projectKey: string | null | undefined, analytics?
940
940
  /** Score (0..100) → the contract's bucket. */
941
941
  declare function scoreBucket(percent: number): "0-24" | "25-49" | "50-74" | "75-99" | "100";
942
942
 
943
- export { type AnalyticsOption as A, type BrowserEventName as B, type ClientEvent as C, DEFAULT_ENDPOINT as D, type Env as E, InstrumentProvider as I, type PageType as P, type Source as S, type Tracker as T, type TrackerOptions as a, type TrackExtra as b, createTracker as c, type AppEventName as d, type Channel as e, type EventName as f, getTracker as g, type EventProps as h, initTracker as i, type StorefrontEventName as j, useInstrumentContext as k, type Instrument as l, noopInstrument as n, resetTracker as r, scoreBucket as s, useInstrument as u };
943
+ export { type AppEventName as A, type BrowserEventName as B, type ClientEvent as C, DEFAULT_ENDPOINT as D, type Env as E, InstrumentProvider as I, type PageType as P, type Source as S, type Tracker as T, type TrackerOptions as a, type TrackExtra as b, createTracker as c, type Channel as d, type EventName as e, type EventProps as f, getTracker as g, type StorefrontEventName as h, initTracker as i, useInstrumentContext as j, type AnalyticsOption as k, type Instrument as l, noopInstrument as n, resetTracker as r, scoreBucket as s, useInstrument as u };
@@ -1 +1 @@
1
- {"version":3,"sources":["/private/tmp/bsr-src/dist/internal.js","../src/internal.ts"],"names":["require_internal","__commonJSMin"],"mappings":"AAAA,+HAAkC,ICAlCA,CAAAA,CAAAC,gCAAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,UAAA,CAAA,CAAA,CAAA","file":"/private/tmp/bsr-src/dist/internal.js","sourcesContent":[null,""]}
1
+ {"version":3,"sources":["/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/internal.js","../src/internal.ts"],"names":["require_internal","__commonJSMin"],"mappings":"AAAA,+HAAkC,ICAlCA,CAAAA,CAAAC,gCAAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,UAAA,CAAA,CAAA,CAAA","file":"/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/internal.js","sourcesContent":[null,""]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk555KFWGYjs = require('./chunk-555KFWGY.js');require('./chunk-5FZAROP6.js');require('./chunk-KOYBZORL.js');require('./chunk-4BL7TLK3.js');require('./chunk-SYN5KU3O.js');require('./chunk-ESF5ZVVF.js');require('./chunk-C3BBJOVV.js');require('./chunk-7RXW6XFY.js');require('./chunk-W3RGQYPD.js');require('./chunk-JSDGZ4NY.js');exports.Bitsnap = _chunk555KFWGYjs.y; exports.createCheckout = _chunk555KFWGYjs.B; exports.createPaymentURL = _chunk555KFWGYjs.A; exports.getPaymentMethodChoice = _chunk555KFWGYjs.z; exports.getReferenceIfPossible = _chunk555KFWGYjs.C; exports.injectReferenceToRequestIfNeeded = _chunk555KFWGYjs.D;
2
+ //# sourceMappingURL=methods-3W34GRYL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/methods-3W34GRYL.js"],"names":[],"mappings":"AAAA,+HAA0E,+BAA4B,+BAA4B,+BAA4B,+BAA4B,+BAA4B,+BAA4B,+BAA4B,+BAA4B,+BAA4B,0SAA6J","file":"/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/methods-3W34GRYL.js"}
@@ -0,0 +1,2 @@
1
+ import{A as c,B as d,C as e,D as f,y as a,z as b}from"./chunk-2NL5FCXC.mjs";import"./chunk-HKNWW37T.mjs";import"./chunk-KOVKUJAW.mjs";import"./chunk-A6VCP3A4.mjs";import"./chunk-CUPG4B5W.mjs";import"./chunk-L7Q7OKM5.mjs";import"./chunk-5R6AGO3Z.mjs";import"./chunk-X3LVYIJR.mjs";import"./chunk-2UDAB2C5.mjs";import"./chunk-VNYHJT6V.mjs";import"./chunk-MDCP5JNP.mjs";import"./chunk-U6FLIRIV.mjs";export{a as Bitsnap,d as createCheckout,c as createPaymentURL,b as getPaymentMethodChoice,e as getReferenceIfPossible,f as injectReferenceToRequestIfNeeded};
2
+ //# sourceMappingURL=methods-LUJSKSQ4.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as t}from"./chunk-6YIRRDCL.mjs";import"./chunk-U6FLIRIV.mjs";import{Code as o,ConnectError as d,createClient as n}from"@connectrpc/connect";async function m(s,l,i){try{let e=await n(t,s).listModelFiles({accessToken:l,projectId:i});return e.result.case==="success"?{status:"ready",models:e.result.value.models}:e.result.case==="failure"&&e.result.value===1?{status:"unauthorized"}:{status:"hidden"}}catch(e){let r=d.from(e).code;return r!==o.Unimplemented&&r!==o.NotFound&&console.warn("[bitsnap-react] 3D files could not be loaded",e),{status:"hidden"}}}export{m as listModelFiles};
2
+ //# sourceMappingURL=model-files-client-HHDXJDTS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/panel/components/model-files-client.ts"],"sourcesContent":["import { Code, ConnectError, createClient, type Transport } from \"@connectrpc/connect\";\n\nimport {\n ModelDeliveryFailure,\n ModelDeliveryService,\n} from \"../../gen/proto/public/v1/model_delivery_pb\";\nimport type { ModelFilesLoad } from \"./model-files-load\";\n\n/**\n * Lists the buyer's 3D files (`public.v1.ModelDeliveryService`). Loaded with\n * `import()` by `useModelFiles`, so the service descriptor stays out of the\n * main bundle. A transport error (an older server without the service\n * answers 404 / unimplemented) or any failure other than an expired session\n * hides the section.\n */\nexport async function listModelFiles(\n transport: Transport,\n accessToken: string,\n projectID: string,\n): Promise<ModelFilesLoad> {\n try {\n const response = await createClient(ModelDeliveryService, transport).listModelFiles({\n accessToken,\n projectId: projectID,\n });\n if (response.result.case === \"success\") {\n return { status: \"ready\", models: response.result.value.models };\n }\n if (\n response.result.case === \"failure\" &&\n response.result.value === ModelDeliveryFailure.UNAUTHORIZED\n ) {\n return { status: \"unauthorized\" };\n }\n return { status: \"hidden\" };\n } catch (error) {\n const code = ConnectError.from(error).code;\n if (code !== Code.Unimplemented && code !== Code.NotFound) {\n console.warn(\"[bitsnap-react] 3D files could not be loaded\", error);\n }\n return { status: \"hidden\" };\n }\n}\n"],"mappings":"sEAAA,OAAS,QAAAA,EAAM,gBAAAC,EAAc,gBAAAC,MAAoC,sBAejE,eAAsBC,EACpBC,EACAC,EACAC,EACyB,CACzB,GAAI,CACF,IAAMC,EAAW,MAAMC,EAAaC,EAAsBL,CAAS,EAAE,eAAe,CAClF,YAAAC,EACA,UAAWC,CACb,CAAC,EACD,OAAIC,EAAS,OAAO,OAAS,UACpB,CAAE,OAAQ,QAAS,OAAQA,EAAS,OAAO,MAAM,MAAO,EAG/DA,EAAS,OAAO,OAAS,WACzBA,EAAS,OAAO,QAAU,EAEnB,CAAE,OAAQ,cAAe,EAE3B,CAAE,OAAQ,QAAS,CAC5B,OAASG,EAAO,CACd,IAAMC,EAAOC,EAAa,KAAKF,CAAK,EAAE,KACtC,OAAIC,IAASE,EAAK,eAAiBF,IAASE,EAAK,UAC/C,QAAQ,KAAK,+CAAgDH,CAAK,EAE7D,CAAE,OAAQ,QAAS,CAC5B,CACF","names":["Code","ConnectError","createClient","listModelFiles","transport","accessToken","projectID","response","createClient","ModelDeliveryService","error","code","ConnectError","Code"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6Q3VGPSFjs = require('./chunk-6Q3VGPSF.js');require('./chunk-JSDGZ4NY.js');var _connect = require('@connectrpc/connect');async function m(s,l,i){try{let e=await _connect.createClient.call(void 0, _chunk6Q3VGPSFjs.b,s).listModelFiles({accessToken:l,projectId:i});return e.result.case==="success"?{status:"ready",models:e.result.value.models}:e.result.case==="failure"&&e.result.value===1?{status:"unauthorized"}:{status:"hidden"}}catch(e){let r=_connect.ConnectError.from(e).code;return r!==_connect.Code.Unimplemented&&r!==_connect.Code.NotFound&&console.warn("[bitsnap-react] 3D files could not be loaded",e),{status:"hidden"}}}exports.listModelFiles = m;
2
+ //# sourceMappingURL=model-files-client-P4PORZJ6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/model-files-client-P4PORZJ6.js","../src/panel/components/model-files-client.ts"],"names":["listModelFiles","transport","accessToken","projectID","response","createClient","ModelDeliveryService","error","code","ConnectError","Code"],"mappings":"AAAA,+HAAuC,+BAA4B,8CCAF,MAejE,SAAsBA,CAAAA,CACpBC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACyB,CACzB,GAAI,CACF,IAAMC,CAAAA,CAAW,MAAMC,mCAAAA,kBAAaC,CAAsBL,CAAS,CAAA,CAAE,cAAA,CAAe,CAClF,WAAA,CAAAC,CAAAA,CACA,SAAA,CAAWC,CACb,CAAC,CAAA,CACD,OAAIC,CAAAA,CAAS,MAAA,CAAO,IAAA,GAAS,SAAA,CACpB,CAAE,MAAA,CAAQ,OAAA,CAAS,MAAA,CAAQA,CAAAA,CAAS,MAAA,CAAO,KAAA,CAAM,MAAO,CAAA,CAG/DA,CAAAA,CAAS,MAAA,CAAO,IAAA,GAAS,SAAA,EACzBA,CAAAA,CAAS,MAAA,CAAO,KAAA,GAAU,CAAA,CAEnB,CAAE,MAAA,CAAQ,cAAe,CAAA,CAE3B,CAAE,MAAA,CAAQ,QAAS,CAC5B,CAAA,KAAA,CAASG,CAAAA,CAAO,CACd,IAAMC,CAAAA,CAAOC,qBAAAA,CAAa,IAAA,CAAKF,CAAK,CAAA,CAAE,IAAA,CACtC,OAAIC,CAAAA,GAASE,aAAAA,CAAK,aAAA,EAAiBF,CAAAA,GAASE,aAAAA,CAAK,QAAA,EAC/C,OAAA,CAAQ,IAAA,CAAK,8CAAA,CAAgDH,CAAK,CAAA,CAE7D,CAAE,MAAA,CAAQ,QAAS,CAC5B,CACF,CAAA,2BAAA","file":"/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/model-files-client-P4PORZJ6.js","sourcesContent":[null,"import { Code, ConnectError, createClient, type Transport } from \"@connectrpc/connect\";\n\nimport {\n ModelDeliveryFailure,\n ModelDeliveryService,\n} from \"../../gen/proto/public/v1/model_delivery_pb\";\nimport type { ModelFilesLoad } from \"./model-files-load\";\n\n/**\n * Lists the buyer's 3D files (`public.v1.ModelDeliveryService`). Loaded with\n * `import()` by `useModelFiles`, so the service descriptor stays out of the\n * main bundle. A transport error (an older server without the service\n * answers 404 / unimplemented) or any failure other than an expired session\n * hides the section.\n */\nexport async function listModelFiles(\n transport: Transport,\n accessToken: string,\n projectID: string,\n): Promise<ModelFilesLoad> {\n try {\n const response = await createClient(ModelDeliveryService, transport).listModelFiles({\n accessToken,\n projectId: projectID,\n });\n if (response.result.case === \"success\") {\n return { status: \"ready\", models: response.result.value.models };\n }\n if (\n response.result.case === \"failure\" &&\n response.result.value === ModelDeliveryFailure.UNAUTHORIZED\n ) {\n return { status: \"unauthorized\" };\n }\n return { status: \"hidden\" };\n } catch (error) {\n const code = ConnectError.from(error).code;\n if (code !== Code.Unimplemented && code !== Code.NotFound) {\n console.warn(\"[bitsnap-react] 3D files could not be loaded\", error);\n }\n return { status: \"hidden\" };\n }\n}\n"]}
package/dist/models.d.mts CHANGED
@@ -616,6 +616,7 @@ declare namespace BitsnapModels {
616
616
  isRecurring: z.ZodBoolean;
617
617
  available: z.ZodBoolean;
618
618
  addToCart: z.ZodBoolean;
619
+ has3d: z.ZodOptional<z.ZodBoolean>;
619
620
  }, z.core.$strip>;
620
621
  type PublicListProduct = z.infer<typeof PublicListProductSchema>;
621
622
  const ProductListResponseSchema: z.ZodObject<{
@@ -637,6 +638,7 @@ declare namespace BitsnapModels {
637
638
  isRecurring: z.ZodBoolean;
638
639
  available: z.ZodBoolean;
639
640
  addToCart: z.ZodBoolean;
641
+ has3d: z.ZodOptional<z.ZodBoolean>;
640
642
  }, z.core.$strip>>;
641
643
  totalCount: z.ZodNumber;
642
644
  }, z.core.$strip>;
package/dist/models.d.ts CHANGED
@@ -616,6 +616,7 @@ declare namespace BitsnapModels {
616
616
  isRecurring: z.ZodBoolean;
617
617
  available: z.ZodBoolean;
618
618
  addToCart: z.ZodBoolean;
619
+ has3d: z.ZodOptional<z.ZodBoolean>;
619
620
  }, z.core.$strip>;
620
621
  type PublicListProduct = z.infer<typeof PublicListProductSchema>;
621
622
  const ProductListResponseSchema: z.ZodObject<{
@@ -637,6 +638,7 @@ declare namespace BitsnapModels {
637
638
  isRecurring: z.ZodBoolean;
638
639
  available: z.ZodBoolean;
639
640
  addToCart: z.ZodBoolean;
641
+ has3d: z.ZodOptional<z.ZodBoolean>;
640
642
  }, z.core.$strip>>;
641
643
  totalCount: z.ZodNumber;
642
644
  }, z.core.$strip>;
package/dist/models.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }require('./chunk-JSDGZ4NY.js');var _zod = require('zod'); var e = _interopRequireWildcard(_zod);var s;(t=>(t.BaselinkerFieldsSchema=e.object({storageID:e.string().optional()}),t.MetadataSchema=e.record(e.string(),e.any()),t.ProductPricingSchema=e.object({regularPrice:e.number(),effectivePrice:e.number(),currency:e.string(),discount:e.object({id:e.string(),type:e.enum(["FIXED","PERCENTAGE"]),value:e.number(),status:e.enum(["ACTIVE","SCHEDULED","EXPIRED","DISABLED"]),startsAt:e.number().optional(),endsAt:e.number().optional()}).optional(),referencePrice:e.object({amount:e.number().optional(),windowDays:e.literal(30),asOf:e.number(),basis:e.literal("observed-history"),historyAvailable:e.boolean()}),priceVersion:e.string(),nextPriceChangeAt:e.number().optional()}),t.VariantSchema=e.object({id:e.string(),name:e.string(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),images:e.array(e.string()),availableQuantity:e.number().optional(),isDeliverable:e.boolean().optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.AdditionalSchema=e.object({sku:e.string().optional(),baselinkerFields:t.BaselinkerFieldsSchema.optional(),isPresale:e.boolean().optional()}),t.ItemSchema=e.object({id:e.string(),ownerID:e.string().optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),createdAt:e.number().optional(),updatedAt:e.number().optional(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),image_url:e.string(),images:e.array(e.string()),isDeliverable:e.boolean().optional(),availableQuantity:e.number().optional(),additional:t.AdditionalSchema.optional(),variants:e.array(t.VariantSchema).optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.DataSchema=e.object({success:e.boolean(),result:e.array(t.ItemSchema),totalCount:e.number()}),t.ProductsResultResultSchema=e.object({data:t.DataSchema}),t.ProductsResultElementSchema=e.array(e.object({result:t.ProductsResultResultSchema})),t.ProductResultSchema=e.array(e.object({result:e.object({data:e.object({success:e.boolean(),message:e.string().optional(),result:t.ItemSchema.optional()})})})),t.PublicListProductImageSchema=e.object({url:e.string(),thumbnailUrl:e.union([e.string(),e.null()])}),t.PublicListProductSchema=e.object({id:e.string(),cartItemId:e.string().optional(),uniqueSlug:e.string(),name:e.string(),shortDescription:e.union([e.string(),e.null()]),image:e.union([t.PublicListProductImageSchema,e.null()]),price:e.number(),currency:e.string(),compareAtPrice:e.union([e.number(),e.null()]),priceFrom:e.boolean(),variantCount:e.number(),isRecurring:e.boolean(),available:e.boolean(),addToCart:e.boolean()}),t.ProductListResponseSchema=e.object({items:e.array(t.PublicListProductSchema),totalCount:e.number()})))(s = exports.BitsnapModels||={});exports.BitsnapModels = s;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }require('./chunk-JSDGZ4NY.js');var _zod = require('zod'); var e = _interopRequireWildcard(_zod);var s;(t=>(t.BaselinkerFieldsSchema=e.object({storageID:e.string().optional()}),t.MetadataSchema=e.record(e.string(),e.any()),t.ProductPricingSchema=e.object({regularPrice:e.number(),effectivePrice:e.number(),currency:e.string(),discount:e.object({id:e.string(),type:e.enum(["FIXED","PERCENTAGE"]),value:e.number(),status:e.enum(["ACTIVE","SCHEDULED","EXPIRED","DISABLED"]),startsAt:e.number().optional(),endsAt:e.number().optional()}).optional(),referencePrice:e.object({amount:e.number().optional(),windowDays:e.literal(30),asOf:e.number(),basis:e.literal("observed-history"),historyAvailable:e.boolean()}),priceVersion:e.string(),nextPriceChangeAt:e.number().optional()}),t.VariantSchema=e.object({id:e.string(),name:e.string(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),images:e.array(e.string()),availableQuantity:e.number().optional(),isDeliverable:e.boolean().optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.AdditionalSchema=e.object({sku:e.string().optional(),baselinkerFields:t.BaselinkerFieldsSchema.optional(),isPresale:e.boolean().optional()}),t.ItemSchema=e.object({id:e.string(),ownerID:e.string().optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),createdAt:e.number().optional(),updatedAt:e.number().optional(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),image_url:e.string(),images:e.array(e.string()),isDeliverable:e.boolean().optional(),availableQuantity:e.number().optional(),additional:t.AdditionalSchema.optional(),variants:e.array(t.VariantSchema).optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.DataSchema=e.object({success:e.boolean(),result:e.array(t.ItemSchema),totalCount:e.number()}),t.ProductsResultResultSchema=e.object({data:t.DataSchema}),t.ProductsResultElementSchema=e.array(e.object({result:t.ProductsResultResultSchema})),t.ProductResultSchema=e.array(e.object({result:e.object({data:e.object({success:e.boolean(),message:e.string().optional(),result:t.ItemSchema.optional()})})})),t.PublicListProductImageSchema=e.object({url:e.string(),thumbnailUrl:e.union([e.string(),e.null()])}),t.PublicListProductSchema=e.object({id:e.string(),cartItemId:e.string().optional(),uniqueSlug:e.string(),name:e.string(),shortDescription:e.union([e.string(),e.null()]),image:e.union([t.PublicListProductImageSchema,e.null()]),price:e.number(),currency:e.string(),compareAtPrice:e.union([e.number(),e.null()]),priceFrom:e.boolean(),variantCount:e.number(),isRecurring:e.boolean(),available:e.boolean(),addToCart:e.boolean(),has3d:e.boolean().optional()}),t.ProductListResponseSchema=e.object({items:e.array(t.PublicListProductSchema),totalCount:e.number()})))(s = exports.BitsnapModels||={});exports.BitsnapModels = s;
2
2
  //# sourceMappingURL=models.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/private/tmp/bsr-src/dist/models.js","../src/models.ts"],"names":["BitsnapModels"],"mappings":"AAAA,0XAA2B,iECAR,IAEFA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACFA,CAAAA,CAAA,sBAAA,CAA2B,CAAA,CAAA,MAAA,CAAO,CAC7C,SAAA,CAAa,CAAA,CAAA,MAAA,CAAO,CAAA,CAAE,QAAA,CAAS,CACjC,CAAC,CAAA,CAGYA,CAAAA,CAAA,cAAA,CAAmB,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAO,CAAA,CAAK,CAAA,CAAA,GAAA,CAAI,CAAC,CAAA,CAE7CA,CAAAA,CAAA,oBAAA,CAAyB,CAAA,CAAA,MAAA,CAAO,CAC3C,YAAA,CAAgB,CAAA,CAAA,MAAA,CAAO,CAAA,CACvB,cAAA,CAAkB,CAAA,CAAA,MAAA,CAAO,CAAA,CACzB,QAAA,CAAY,CAAA,CAAA,MAAA,CAAO,CAAA,CACnB,QAAA,CAAY,CAAA,CAAA,MAAA,CAAO,CACjB,EAAA,CAAM,CAAA,CAAA,MAAA,CAAO,CAAA,CACb,IA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AA,CAAO,CAAA,CAAK,CAAA,CAAA,IAAA,CAAK,CAAC,CAAC,CAAA,CAE9C,SAAA,CAAa,CAAA,CAAA,OAAA,CAAQ,CAAA,CACrB,YAAA,CAAgB,CAAA,CAAA,MAAA,CAAO,CAAA,CACvB,WAAA,CAAe,CAAA,CAAA,OAAA,CAAQ,CAAA,CACvB,SAAA,CAAa,CAAA,CAAA,OAAA,CAAQ,CAAA,CAErB,SAAA,CAAa,CAAA,CAAA,OAAA,CAAQ,CACvB,CAAC,CAAA,CAGYA,CAAAA,CAAA,yBAAA,CAA8B,CAAA,CAAA,MAAA,CAAO,CAChD,KAAA,CAAS,CAAA,CAAA,KAAA,CAAMA,CAAAA,CAAA,uBAAuB,CAAA,CACtC,UAAA,CAAc,CAAA,CAAA,MAAA,CAAO,CACvB,CAAC,CAAA,CAAA,CAAA,CApJcA,yBAAAA,GAAA,CAAA,CAAA,CAAA,CAAA,0BAAA","file":"/private/tmp/bsr-src/dist/models.js","sourcesContent":[null,"import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n\n export const PublicListProductImageSchema = z.object({\n url: z.string(),\n thumbnailUrl: z.union([z.string(), z.null()]),\n });\n export type PublicListProductImage = z.infer<\n typeof PublicListProductImageSchema\n >;\n\n /**\n * One card of the public product catalog\n * (`GET /api/integrations/{projectID}/public-commerce/product-list`).\n * `price` and `compareAtPrice` are in minor units (grosze, cents), like the\n * prices of the cart.\n */\n export const PublicListProductSchema = z.object({\n id: z.string(),\n /**\n * ID the cart should add: the variant ID for single-variant products.\n * Older backends omit it; use `cartItemId ?? id`.\n */\n cartItemId: z.string().optional(),\n uniqueSlug: z.string(),\n name: z.string(),\n shortDescription: z.union([z.string(), z.null()]),\n image: z.union([PublicListProductImageSchema, z.null()]),\n price: z.number(),\n currency: z.string(),\n compareAtPrice: z.union([z.number(), z.null()]),\n /** `true` when the variants have different prices: show \"from {price}\". */\n priceFrom: z.boolean(),\n variantCount: z.number(),\n isRecurring: z.boolean(),\n available: z.boolean(),\n /** `true` when the product can be added to the cart straight from the list. */\n addToCart: z.boolean(),\n });\n export type PublicListProduct = z.infer<typeof PublicListProductSchema>;\n\n export const ProductListResponseSchema = z.object({\n items: z.array(PublicListProductSchema),\n totalCount: z.number(),\n });\n export type ProductListResponse = z.infer<typeof ProductListResponseSchema>;\n}\n"]}
1
+ {"version":3,"sources":["/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/models.js","../src/models.ts"],"names":["BitsnapModels"],"mappings":"AAAA,0XAA2B,iECAR,IAEFA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACFA,CAAAA,CAAA,sBAAA,CAA2B,CAAA,CAAA,MAAA,CAAO,CAC7C,SAAA,CAAa,CAAA,CAAA,MAAA,CAAO,CAAA,CAAE,QAAA,CAAS,CACjC,CAAC,CAAA,CAGYA,CAAAA,CAAA,cAAA,CAAmB,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAO,CAAA,CAAK,CAAA,CAAA,GAAA,CAAI,CAAC,CAAA,CAE7CA,CAAAA,CAAA,oBAAA,CAAyB,CAAA,CAAA,MAAA,CAAO,CAC3C,YAAA,CAAgB,CAAA,CAAA,MAAA,CAAO,CAAA,CACvB,cAAA,CAAkB,CAAA,CAAA,MAAA,C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D,KAAA,CAAS,CAAA,CAAA,MAAA,CAAO,CAAA,CAChB,QAAA,CAAY,CAAA,CAAA,MAAA,CAAO,CAAA,CACnB,cAAA,CAAkB,CAAA,CAAA,KAAA,CAAM,CAAG,CAAA,CAAA,MAAA,CAAO,CAAA,CAAK,CAAA,CAAA,IAAA,CAAK,CAAC,CAAC,CAAA,CAE9C,SAAA,CAAa,CAAA,CAAA,OAAA,CAAQ,CAAA,CACrB,YAAA,CAAgB,CAAA,CAAA,MAAA,CAAO,CAAA,CACvB,WAAA,CAAe,CAAA,CAAA,OAAA,CAAQ,CAAA,CACvB,SAAA,CAAa,CAAA,CAAA,OAAA,CAAQ,CAAA,CAErB,SAAA,CAAa,CAAA,CAAA,OAAA,CAAQ,CAAA,CAKrB,KAAA,CAAS,CAAA,CAAA,OAAA,CAAQ,CAAA,CAAE,QAAA,CAAS,CAC9B,CAAC,CAAA,CAGYA,CAAAA,CAAA,yBAAA,CAA8B,CAAA,CAAA,MAAA,CAAO,CAChD,KAAA,CAAS,CAAA,CAAA,KAAA,CAAMA,CAAAA,CAAA,uBAAuB,CAAA,CACtC,UAAA,CAAc,CAAA,CAAA,MAAA,CAAO,CACvB,CAAC,CAAA,CAAA,CAAA,CAzJcA,yBAAAA,GAAA,CAAA,CAAA,CAAA,CAAA,0BAAA","file":"/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/models.js","sourcesContent":[null,"import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n\n export const PublicListProductImageSchema = z.object({\n url: z.string(),\n thumbnailUrl: z.union([z.string(), z.null()]),\n });\n export type PublicListProductImage = z.infer<\n typeof PublicListProductImageSchema\n >;\n\n /**\n * One card of the public product catalog\n * (`GET /api/integrations/{projectID}/public-commerce/product-list`).\n * `price` and `compareAtPrice` are in minor units (grosze, cents), like the\n * prices of the cart.\n */\n export const PublicListProductSchema = z.object({\n id: z.string(),\n /**\n * ID the cart should add: the variant ID for single-variant products.\n * Older backends omit it; use `cartItemId ?? id`.\n */\n cartItemId: z.string().optional(),\n uniqueSlug: z.string(),\n name: z.string(),\n shortDescription: z.union([z.string(), z.null()]),\n image: z.union([PublicListProductImageSchema, z.null()]),\n price: z.number(),\n currency: z.string(),\n compareAtPrice: z.union([z.number(), z.null()]),\n /** `true` when the variants have different prices: show \"from {price}\". */\n priceFrom: z.boolean(),\n variantCount: z.number(),\n isRecurring: z.boolean(),\n available: z.boolean(),\n /** `true` when the product can be added to the cart straight from the list. */\n addToCart: z.boolean(),\n /**\n * `true` when the product or one of its variants has a ready 3D model\n * (the card shows a \"3D\" badge). Older backends omit it.\n */\n has3d: z.boolean().optional(),\n });\n export type PublicListProduct = z.infer<typeof PublicListProductSchema>;\n\n export const ProductListResponseSchema = z.object({\n items: z.array(PublicListProductSchema),\n totalCount: z.number(),\n });\n export type ProductListResponse = z.infer<typeof ProductListResponseSchema>;\n}\n"]}
package/dist/models.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-U6FLIRIV.mjs";import*as e from"zod";var s;(t=>(t.BaselinkerFieldsSchema=e.object({storageID:e.string().optional()}),t.MetadataSchema=e.record(e.string(),e.any()),t.ProductPricingSchema=e.object({regularPrice:e.number(),effectivePrice:e.number(),currency:e.string(),discount:e.object({id:e.string(),type:e.enum(["FIXED","PERCENTAGE"]),value:e.number(),status:e.enum(["ACTIVE","SCHEDULED","EXPIRED","DISABLED"]),startsAt:e.number().optional(),endsAt:e.number().optional()}).optional(),referencePrice:e.object({amount:e.number().optional(),windowDays:e.literal(30),asOf:e.number(),basis:e.literal("observed-history"),historyAvailable:e.boolean()}),priceVersion:e.string(),nextPriceChangeAt:e.number().optional()}),t.VariantSchema=e.object({id:e.string(),name:e.string(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),images:e.array(e.string()),availableQuantity:e.number().optional(),isDeliverable:e.boolean().optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.AdditionalSchema=e.object({sku:e.string().optional(),baselinkerFields:t.BaselinkerFieldsSchema.optional(),isPresale:e.boolean().optional()}),t.ItemSchema=e.object({id:e.string(),ownerID:e.string().optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),createdAt:e.number().optional(),updatedAt:e.number().optional(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),image_url:e.string(),images:e.array(e.string()),isDeliverable:e.boolean().optional(),availableQuantity:e.number().optional(),additional:t.AdditionalSchema.optional(),variants:e.array(t.VariantSchema).optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.DataSchema=e.object({success:e.boolean(),result:e.array(t.ItemSchema),totalCount:e.number()}),t.ProductsResultResultSchema=e.object({data:t.DataSchema}),t.ProductsResultElementSchema=e.array(e.object({result:t.ProductsResultResultSchema})),t.ProductResultSchema=e.array(e.object({result:e.object({data:e.object({success:e.boolean(),message:e.string().optional(),result:t.ItemSchema.optional()})})})),t.PublicListProductImageSchema=e.object({url:e.string(),thumbnailUrl:e.union([e.string(),e.null()])}),t.PublicListProductSchema=e.object({id:e.string(),cartItemId:e.string().optional(),uniqueSlug:e.string(),name:e.string(),shortDescription:e.union([e.string(),e.null()]),image:e.union([t.PublicListProductImageSchema,e.null()]),price:e.number(),currency:e.string(),compareAtPrice:e.union([e.number(),e.null()]),priceFrom:e.boolean(),variantCount:e.number(),isRecurring:e.boolean(),available:e.boolean(),addToCart:e.boolean()}),t.ProductListResponseSchema=e.object({items:e.array(t.PublicListProductSchema),totalCount:e.number()})))(s||={});export{s as BitsnapModels};
1
+ import"./chunk-U6FLIRIV.mjs";import*as e from"zod";var s;(t=>(t.BaselinkerFieldsSchema=e.object({storageID:e.string().optional()}),t.MetadataSchema=e.record(e.string(),e.any()),t.ProductPricingSchema=e.object({regularPrice:e.number(),effectivePrice:e.number(),currency:e.string(),discount:e.object({id:e.string(),type:e.enum(["FIXED","PERCENTAGE"]),value:e.number(),status:e.enum(["ACTIVE","SCHEDULED","EXPIRED","DISABLED"]),startsAt:e.number().optional(),endsAt:e.number().optional()}).optional(),referencePrice:e.object({amount:e.number().optional(),windowDays:e.literal(30),asOf:e.number(),basis:e.literal("observed-history"),historyAvailable:e.boolean()}),priceVersion:e.string(),nextPriceChangeAt:e.number().optional()}),t.VariantSchema=e.object({id:e.string(),name:e.string(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),images:e.array(e.string()),availableQuantity:e.number().optional(),isDeliverable:e.boolean().optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.AdditionalSchema=e.object({sku:e.string().optional(),baselinkerFields:t.BaselinkerFieldsSchema.optional(),isPresale:e.boolean().optional()}),t.ItemSchema=e.object({id:e.string(),ownerID:e.string().optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),createdAt:e.number().optional(),updatedAt:e.number().optional(),price:e.number(),currency:e.string(),metadata:t.MetadataSchema.optional(),image_url:e.string(),images:e.array(e.string()),isDeliverable:e.boolean().optional(),availableQuantity:e.number().optional(),additional:t.AdditionalSchema.optional(),variants:e.array(t.VariantSchema).optional(),estimatedDeliveryAt:e.number().optional(),pricing:t.ProductPricingSchema.optional()}),t.DataSchema=e.object({success:e.boolean(),result:e.array(t.ItemSchema),totalCount:e.number()}),t.ProductsResultResultSchema=e.object({data:t.DataSchema}),t.ProductsResultElementSchema=e.array(e.object({result:t.ProductsResultResultSchema})),t.ProductResultSchema=e.array(e.object({result:e.object({data:e.object({success:e.boolean(),message:e.string().optional(),result:t.ItemSchema.optional()})})})),t.PublicListProductImageSchema=e.object({url:e.string(),thumbnailUrl:e.union([e.string(),e.null()])}),t.PublicListProductSchema=e.object({id:e.string(),cartItemId:e.string().optional(),uniqueSlug:e.string(),name:e.string(),shortDescription:e.union([e.string(),e.null()]),image:e.union([t.PublicListProductImageSchema,e.null()]),price:e.number(),currency:e.string(),compareAtPrice:e.union([e.number(),e.null()]),priceFrom:e.boolean(),variantCount:e.number(),isRecurring:e.boolean(),available:e.boolean(),addToCart:e.boolean(),has3d:e.boolean().optional()}),t.ProductListResponseSchema=e.object({items:e.array(t.PublicListProductSchema),totalCount:e.number()})))(s||={});export{s as BitsnapModels};
2
2
  //# sourceMappingURL=models.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/models.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n\n export const PublicListProductImageSchema = z.object({\n url: z.string(),\n thumbnailUrl: z.union([z.string(), z.null()]),\n });\n export type PublicListProductImage = z.infer<\n typeof PublicListProductImageSchema\n >;\n\n /**\n * One card of the public product catalog\n * (`GET /api/integrations/{projectID}/public-commerce/product-list`).\n * `price` and `compareAtPrice` are in minor units (grosze, cents), like the\n * prices of the cart.\n */\n export const PublicListProductSchema = z.object({\n id: z.string(),\n /**\n * ID the cart should add: the variant ID for single-variant products.\n * Older backends omit it; use `cartItemId ?? id`.\n */\n cartItemId: z.string().optional(),\n uniqueSlug: z.string(),\n name: z.string(),\n shortDescription: z.union([z.string(), z.null()]),\n image: z.union([PublicListProductImageSchema, z.null()]),\n price: z.number(),\n currency: z.string(),\n compareAtPrice: z.union([z.number(), z.null()]),\n /** `true` when the variants have different prices: show \"from {price}\". */\n priceFrom: z.boolean(),\n variantCount: z.number(),\n isRecurring: z.boolean(),\n available: z.boolean(),\n /** `true` when the product can be added to the cart straight from the list. */\n addToCart: z.boolean(),\n });\n export type PublicListProduct = z.infer<typeof PublicListProductSchema>;\n\n export const ProductListResponseSchema = z.object({\n items: z.array(PublicListProductSchema),\n totalCount: z.number(),\n });\n export type ProductListResponse = z.infer<typeof ProductListResponseSchema>;\n}\n"],"mappings":"6BAAA,UAAYA,MAAO,MAEZ,IAAUC,OACFA,EAAA,uBAA2B,SAAO,CAC7C,UAAa,SAAO,EAAE,SAAS,CACjC,CAAC,EAGYA,EAAA,eAAmB,SAAS,SAAO,EAAK,MAAI,CAAC,EAE7CA,EAAA,qBAAyB,SAAO,CAC3C,aAAgB,SAAO,EACvB,eAAkB,SAAO,EACzB,SAAY,SAAO,EACnB,SAAY,SAAO,CACjB,GAAM,SAAO,EACb,KAAQ,OAAK,CAAC,QAAS,YAAY,CAAC,EACpC,MAAS,SAAO,EAChB,OAAU,OAAK,CAAC,SAAU,YAAa,UAAW,UAAU,CAAC,EAC7D,SAAY,SAAO,EAAE,SAAS,EAC9B,OAAU,SAAO,EAAE,SAAS,CAC9B,CAAC,EAAE,SAAS,EACZ,eAAkB,SAAO,CACvB,OAAU,SAAO,EAAE,SAAS,EAC5B,WAAc,UAAQ,EAAE,EACxB,KAAQ,SAAO,EACf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,EAAA,2BAA+B,SAAO,CACjD,KAAMA,EAAA,UACR,CAAC,EAGYA,EAAA,4BAAgC,QACzC,SAAO,CACP,OAAQA,EAAA,0BACV,CAAC,CACH,EAKaA,EAAA,oBAAwB,QACjC,SAAO,CACP,OAAU,SAAO,CACf,KAAQ,SAAO,CACb,QAAW,UAAQ,EACnB,QAAW,SAAO,EAAE,SAAS,EAC7B,OAAQA,EAAA,WAAW,SAAS,CAC9B,CAAC,CACH,CAAC,CACH,CAAC,CACH,EAEaA,EAAA,6BAAiC,SAAO,CACnD,IAAO,SAAO,EACd,aAAgB,QAAM,CAAG,SAAO,EAAK,OAAK,CAAC,CAAC,CAC9C,CAAC,EAWYA,EAAA,wBAA4B,SAAO,CAC9C,GAAM,SAAO,EAKb,WAAc,SAAO,EAAE,SAAS,EAChC,WAAc,SAAO,EACrB,KAAQ,SAAO,EACf,iBAAoB,QAAM,CAAG,SAAO,EAAK,OAAK,CAAC,CAAC,EAChD,MAAS,QAAM,CAACA,EAAA,6BAAgC,OAAK,CAAC,CAAC,EACvD,MAAS,SAAO,EAChB,SAAY,SAAO,EACnB,eAAkB,QAAM,CAAG,SAAO,EAAK,OAAK,CAAC,CAAC,EAE9C,UAAa,UAAQ,EACrB,aAAgB,SAAO,EACvB,YAAe,UAAQ,EACvB,UAAa,UAAQ,EAErB,UAAa,UAAQ,CACvB,CAAC,EAGYA,EAAA,0BAA8B,SAAO,CAChD,MAAS,QAAMA,EAAA,uBAAuB,EACtC,WAAc,SAAO,CACvB,CAAC,IApJcA,IAAA","names":["z","BitsnapModels"]}
1
+ {"version":3,"sources":["../src/models.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport namespace BitsnapModels {\n export const BaselinkerFieldsSchema = z.object({\n storageID: z.string().optional(),\n });\n export type BaselinkerFields = z.infer<typeof BaselinkerFieldsSchema>;\n\n export const MetadataSchema = z.record(z.string(), z.any());\n\n export const ProductPricingSchema = z.object({\n regularPrice: z.number(),\n effectivePrice: z.number(),\n currency: z.string(),\n discount: z.object({\n id: z.string(),\n type: z.enum([\"FIXED\", \"PERCENTAGE\"]),\n value: z.number(),\n status: z.enum([\"ACTIVE\", \"SCHEDULED\", \"EXPIRED\", \"DISABLED\"]),\n startsAt: z.number().optional(),\n endsAt: z.number().optional(),\n }).optional(),\n referencePrice: z.object({\n amount: z.number().optional(),\n windowDays: z.literal(30),\n asOf: z.number(),\n basis: z.literal(\"observed-history\"),\n historyAvailable: z.boolean(),\n }),\n priceVersion: z.string(),\n nextPriceChangeAt: z.number().optional(),\n });\n export type ProductPricing = z.infer<typeof ProductPricingSchema>;\n\n export const VariantSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n images: z.array(z.string()),\n availableQuantity: z.number().optional(),\n isDeliverable: z.boolean().optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Variant = z.infer<typeof VariantSchema>;\n\n export const AdditionalSchema = z.object({\n sku: z.string().optional(),\n baselinkerFields: BaselinkerFieldsSchema.optional(),\n isPresale: z.boolean().optional(),\n });\n export type Additional = z.infer<typeof AdditionalSchema>;\n\n export const ItemSchema = z.object({\n id: z.string(),\n ownerID: z.string().optional(),\n name: z.string(),\n description: z.union([z.string(), z.null()]).optional(),\n createdAt: z.number().optional(),\n updatedAt: z.number().optional(),\n price: z.number(),\n currency: z.string(),\n metadata: MetadataSchema.optional(),\n image_url: z.string(),\n images: z.array(z.string()),\n isDeliverable: z.boolean().optional(),\n availableQuantity: z.number().optional(),\n additional: AdditionalSchema.optional(),\n variants: z.array(VariantSchema).optional(),\n estimatedDeliveryAt: z.number().optional(),\n pricing: ProductPricingSchema.optional(),\n });\n export type Item = z.infer<typeof ItemSchema>;\n\n export const DataSchema = z.object({\n success: z.boolean(),\n result: z.array(ItemSchema),\n totalCount: z.number(),\n });\n export type Data = z.infer<typeof DataSchema>;\n\n export const ProductsResultResultSchema = z.object({\n data: DataSchema,\n });\n export type ProductsResultResult = z.infer<typeof ProductsResultResultSchema>;\n\n export const ProductsResultElementSchema = z.array(\n z.object({\n result: ProductsResultResultSchema,\n }),\n );\n export type ProductsResultElement = z.infer<\n typeof ProductsResultElementSchema\n >;\n\n export const ProductResultSchema = z.array(\n z.object({\n result: z.object({\n data: z.object({\n success: z.boolean(),\n message: z.string().optional(),\n result: ItemSchema.optional(),\n }),\n }),\n }),\n );\n\n export const PublicListProductImageSchema = z.object({\n url: z.string(),\n thumbnailUrl: z.union([z.string(), z.null()]),\n });\n export type PublicListProductImage = z.infer<\n typeof PublicListProductImageSchema\n >;\n\n /**\n * One card of the public product catalog\n * (`GET /api/integrations/{projectID}/public-commerce/product-list`).\n * `price` and `compareAtPrice` are in minor units (grosze, cents), like the\n * prices of the cart.\n */\n export const PublicListProductSchema = z.object({\n id: z.string(),\n /**\n * ID the cart should add: the variant ID for single-variant products.\n * Older backends omit it; use `cartItemId ?? id`.\n */\n cartItemId: z.string().optional(),\n uniqueSlug: z.string(),\n name: z.string(),\n shortDescription: z.union([z.string(), z.null()]),\n image: z.union([PublicListProductImageSchema, z.null()]),\n price: z.number(),\n currency: z.string(),\n compareAtPrice: z.union([z.number(), z.null()]),\n /** `true` when the variants have different prices: show \"from {price}\". */\n priceFrom: z.boolean(),\n variantCount: z.number(),\n isRecurring: z.boolean(),\n available: z.boolean(),\n /** `true` when the product can be added to the cart straight from the list. */\n addToCart: z.boolean(),\n /**\n * `true` when the product or one of its variants has a ready 3D model\n * (the card shows a \"3D\" badge). Older backends omit it.\n */\n has3d: z.boolean().optional(),\n });\n export type PublicListProduct = z.infer<typeof PublicListProductSchema>;\n\n export const ProductListResponseSchema = z.object({\n items: z.array(PublicListProductSchema),\n totalCount: z.number(),\n });\n export type ProductListResponse = z.infer<typeof ProductListResponseSchema>;\n}\n"],"mappings":"6BAAA,UAAYA,MAAO,MAEZ,IAAUC,OACFA,EAAA,uBAA2B,SAAO,CAC7C,UAAa,SAAO,EAAE,SAAS,CAC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AAa,UAAQ,EACrB,aAAgB,SAAO,EACvB,YAAe,UAAQ,EACvB,UAAa,UAAQ,EAErB,UAAa,UAAQ,EAKrB,MAAS,UAAQ,EAAE,SAAS,CAC9B,CAAC,EAGYA,EAAA,0BAA8B,SAAO,CAChD,MAAS,QAAMA,EAAA,uBAAuB,EACtC,WAAc,SAAO,CACvB,CAAC,IAzJcA,IAAA","names":["z","BitsnapModels"]}
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { a as ReturnsTexts, R as ReturnsAppearance, L as LoginLogoOptions, h as ReturnsTextKey, i as ResolvedReturnsAppearance, f as ReturnsSlotName, e as ReturnsSlotAppearance } from './texts-LGhuQfA9.mjs';
3
+ export { b as RETURNS_SLOT_NAMES, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, g as ReturnsTheme } from './texts-LGhuQfA9.mjs';
2
4
  import { ReactNode } from 'react';
3
- import { A as AnalyticsOption } from './instrument-BE8ktMUv.mjs';
4
- import { a as ReturnsTexts, R as ReturnsAppearance, h as ReturnsTextKey, i as ResolvedReturnsAppearance, f as ReturnsSlotName, e as ReturnsSlotAppearance } from './texts-tQtAGJCT.mjs';
5
- export { b as RETURNS_SLOT_NAMES, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, g as ReturnsTheme } from './texts-tQtAGJCT.mjs';
5
+ import { k as AnalyticsOption } from './instrument-eXaC8hc2.mjs';
6
6
  import { Timestamp } from '@bufbuild/protobuf/wkt';
7
7
  import { Message } from '@bufbuild/protobuf';
8
8
  import './appearance-core-Dt2grZdl.mjs';
@@ -123,7 +123,12 @@ declare function ReturnsProvider({ projectID, host, environment, appearance, tex
123
123
  declare const BitsnapReturnsProvider: typeof ReturnsProvider;
124
124
  type BitsnapReturnsProviderProps = ReturnsProviderProps;
125
125
 
126
- type BitsnapReturnsProps = Omit<ReturnsProviderProps, "children">;
126
+ /**
127
+ * Props of {@link BitsnapReturns}. `showLogo`, `logoUrl` and `logoDarkUrl` set
128
+ * the shop logo above the e-mail and code steps: by default the logo from the
129
+ * shop settings, or Bitsnap's when the shop has none.
130
+ */
131
+ type BitsnapReturnsProps = Omit<ReturnsProviderProps, "children"> & LoginLogoOptions;
127
132
  /**
128
133
  * Customer return flow: email, code, orders, line selection, confirmation and
129
134
  * result, plus the list of earlier returns. It is `ReturnsProvider` with the
@@ -134,24 +139,28 @@ type BitsnapReturnsProps = Omit<ReturnsProviderProps, "children">;
134
139
  * <BitsnapReturns projectID="…" appearance={brand} texts={{ emailStepTitle: "Return a product" }} />
135
140
  * ```
136
141
  */
137
- declare function BitsnapReturns(props: BitsnapReturnsProps): react_jsx_runtime.JSX.Element;
142
+ declare function BitsnapReturns({ showLogo, logoUrl, logoDarkUrl, ...props }: BitsnapReturnsProps): react_jsx_runtime.JSX.Element;
138
143
 
139
- type ReturnsEmailStepProps = {
144
+ type ReturnsEmailStepProps = LoginLogoOptions & {
140
145
  /** Called after the verification code was sent, with the trimmed email. */
141
146
  onSubmitted?: (email: string) => void;
142
147
  className?: string;
143
148
  };
144
149
  /** First step: asks for the email the order was placed with. */
145
- declare function ReturnsEmailStep({ onSubmitted, className, }: ReturnsEmailStepProps): react_jsx_runtime.JSX.Element;
146
- type ReturnsCodeStepProps = {
150
+ declare function ReturnsEmailStep({ onSubmitted, className, ...logo }: ReturnsEmailStepProps): react_jsx_runtime.JSX.Element;
151
+ type ReturnsCodeStepProps = LoginLogoOptions & {
147
152
  /** Called once the code was accepted and the session exists. */
148
153
  onVerified?: () => void;
149
154
  /** Shows a back button, for example to change the email. */
150
155
  onBack?: () => void;
151
156
  className?: string;
152
157
  };
153
- /** Second step: asks for the code that was emailed to the customer. */
154
- declare function ReturnsCodeStep({ onVerified, onBack, className, }: ReturnsCodeStepProps): react_jsx_runtime.JSX.Element;
158
+ /**
159
+ * Second step: asks for the code that was emailed to the customer. The code
160
+ * is a six digit one-time-code field that submits itself on the last digit;
161
+ * the button stays for those who prefer it.
162
+ */
163
+ declare function ReturnsCodeStep({ onVerified, onBack, className, ...logo }: ReturnsCodeStepProps): react_jsx_runtime.JSX.Element;
155
164
 
156
165
  /**
157
166
  * @generated from message public.v1.StartReturnSessionResponse
package/dist/returns.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { a as ReturnsTexts, R as ReturnsAppearance, L as LoginLogoOptions, h as ReturnsTextKey, i as ResolvedReturnsAppearance, f as ReturnsSlotName, e as ReturnsSlotAppearance } from './texts-m6XQGZ6w.js';
3
+ export { b as RETURNS_SLOT_NAMES, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, g as ReturnsTheme } from './texts-m6XQGZ6w.js';
2
4
  import { ReactNode } from 'react';
3
- import { A as AnalyticsOption } from './instrument-BE8ktMUv.js';
4
- import { a as ReturnsTexts, R as ReturnsAppearance, h as ReturnsTextKey, i as ResolvedReturnsAppearance, f as ReturnsSlotName, e as ReturnsSlotAppearance } from './texts-CIEFbJTN.js';
5
- export { b as RETURNS_SLOT_NAMES, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, g as ReturnsTheme } from './texts-CIEFbJTN.js';
5
+ import { k as AnalyticsOption } from './instrument-eXaC8hc2.js';
6
6
  import { Timestamp } from '@bufbuild/protobuf/wkt';
7
7
  import { Message } from '@bufbuild/protobuf';
8
8
  import './appearance-core-Dt2grZdl.js';
@@ -123,7 +123,12 @@ declare function ReturnsProvider({ projectID, host, environment, appearance, tex
123
123
  declare const BitsnapReturnsProvider: typeof ReturnsProvider;
124
124
  type BitsnapReturnsProviderProps = ReturnsProviderProps;
125
125
 
126
- type BitsnapReturnsProps = Omit<ReturnsProviderProps, "children">;
126
+ /**
127
+ * Props of {@link BitsnapReturns}. `showLogo`, `logoUrl` and `logoDarkUrl` set
128
+ * the shop logo above the e-mail and code steps: by default the logo from the
129
+ * shop settings, or Bitsnap's when the shop has none.
130
+ */
131
+ type BitsnapReturnsProps = Omit<ReturnsProviderProps, "children"> & LoginLogoOptions;
127
132
  /**
128
133
  * Customer return flow: email, code, orders, line selection, confirmation and
129
134
  * result, plus the list of earlier returns. It is `ReturnsProvider` with the
@@ -134,24 +139,28 @@ type BitsnapReturnsProps = Omit<ReturnsProviderProps, "children">;
134
139
  * <BitsnapReturns projectID="…" appearance={brand} texts={{ emailStepTitle: "Return a product" }} />
135
140
  * ```
136
141
  */
137
- declare function BitsnapReturns(props: BitsnapReturnsProps): react_jsx_runtime.JSX.Element;
142
+ declare function BitsnapReturns({ showLogo, logoUrl, logoDarkUrl, ...props }: BitsnapReturnsProps): react_jsx_runtime.JSX.Element;
138
143
 
139
- type ReturnsEmailStepProps = {
144
+ type ReturnsEmailStepProps = LoginLogoOptions & {
140
145
  /** Called after the verification code was sent, with the trimmed email. */
141
146
  onSubmitted?: (email: string) => void;
142
147
  className?: string;
143
148
  };
144
149
  /** First step: asks for the email the order was placed with. */
145
- declare function ReturnsEmailStep({ onSubmitted, className, }: ReturnsEmailStepProps): react_jsx_runtime.JSX.Element;
146
- type ReturnsCodeStepProps = {
150
+ declare function ReturnsEmailStep({ onSubmitted, className, ...logo }: ReturnsEmailStepProps): react_jsx_runtime.JSX.Element;
151
+ type ReturnsCodeStepProps = LoginLogoOptions & {
147
152
  /** Called once the code was accepted and the session exists. */
148
153
  onVerified?: () => void;
149
154
  /** Shows a back button, for example to change the email. */
150
155
  onBack?: () => void;
151
156
  className?: string;
152
157
  };
153
- /** Second step: asks for the code that was emailed to the customer. */
154
- declare function ReturnsCodeStep({ onVerified, onBack, className, }: ReturnsCodeStepProps): react_jsx_runtime.JSX.Element;
158
+ /**
159
+ * Second step: asks for the code that was emailed to the customer. The code
160
+ * is a six digit one-time-code field that submits itself on the last digit;
161
+ * the button stays for those who prefer it.
162
+ */
163
+ declare function ReturnsCodeStep({ onVerified, onBack, className, ...logo }: ReturnsCodeStepProps): react_jsx_runtime.JSX.Element;
155
164
 
156
165
  /**
157
166
  * @generated from message public.v1.StartReturnSessionResponse
package/dist/returns.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXZYCQ655js = require('./chunk-XZYCQ655.js');var _chunkH4WAQQVOjs = require('./chunk-H4WAQQVO.js');require('./chunk-KOYBZORL.js');var _chunkFGB5FJCIjs = require('./chunk-FGB5FJCI.js');require('./chunk-DY2S42Q6.js');require('./chunk-MG6VV5J2.js');require('./chunk-W3RGQYPD.js');require('./chunk-JSDGZ4NY.js');exports.BitsnapReturns = _chunkXZYCQ655js.a; exports.BitsnapReturnsProvider = _chunkH4WAQQVOjs.l; exports.Environment = _chunkFGB5FJCIjs.h; exports.RETURNS_SLOT_NAMES = _chunkH4WAQQVOjs.c; exports.ReturnsAppearanceProvider = _chunkH4WAQQVOjs.d; exports.ReturnsCodeStep = _chunkH4WAQQVOjs.u; exports.ReturnsConfirmation = _chunkH4WAQQVOjs.x; exports.ReturnsEmailStep = _chunkH4WAQQVOjs.t; exports.ReturnsMyReturnDetail = _chunkH4WAQQVOjs.A; exports.ReturnsMyReturnsList = _chunkH4WAQQVOjs.z; exports.ReturnsOrderDetail = _chunkH4WAQQVOjs.w; exports.ReturnsOrderList = _chunkH4WAQQVOjs.v; exports.ReturnsProvider = _chunkH4WAQQVOjs.k; exports.ReturnsResult = _chunkH4WAQQVOjs.y; exports.useCreateReturn = _chunkH4WAQQVOjs.p; exports.useMyReturn = _chunkH4WAQQVOjs.r; exports.useMyReturns = _chunkH4WAQQVOjs.q; exports.useReturnOrders = _chunkH4WAQQVOjs.n; exports.useReturnSession = _chunkH4WAQQVOjs.m; exports.useReturnableOrder = _chunkH4WAQQVOjs.o; exports.useReturnsAppearance = _chunkH4WAQQVOjs.e; exports.useReturnsSlot = _chunkH4WAQQVOjs.f; exports.useReturnsText = _chunkH4WAQQVOjs.i;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMIMQTH2Gjs = require('./chunk-MIMQTH2G.js');var _chunk5FZAROP6js = require('./chunk-5FZAROP6.js');require('./chunk-KOYBZORL.js');var _chunkSYN5KU3Ojs = require('./chunk-SYN5KU3O.js');require('./chunk-ESF5ZVVF.js');require('./chunk-C3BBJOVV.js');require('./chunk-7RXW6XFY.js');require('./chunk-W3RGQYPD.js');require('./chunk-JSDGZ4NY.js');exports.BitsnapReturns = _chunkMIMQTH2Gjs.a; exports.BitsnapReturnsProvider = _chunk5FZAROP6js.v; exports.Environment = _chunkSYN5KU3Ojs.i; exports.RETURNS_SLOT_NAMES = _chunk5FZAROP6js.l; exports.ReturnsAppearanceProvider = _chunk5FZAROP6js.m; exports.ReturnsCodeStep = _chunk5FZAROP6js.E; exports.ReturnsConfirmation = _chunk5FZAROP6js.H; exports.ReturnsEmailStep = _chunk5FZAROP6js.D; exports.ReturnsMyReturnDetail = _chunk5FZAROP6js.K; exports.ReturnsMyReturnsList = _chunk5FZAROP6js.J; exports.ReturnsOrderDetail = _chunk5FZAROP6js.G; exports.ReturnsOrderList = _chunk5FZAROP6js.F; exports.ReturnsProvider = _chunk5FZAROP6js.u; exports.ReturnsResult = _chunk5FZAROP6js.I; exports.useCreateReturn = _chunk5FZAROP6js.z; exports.useMyReturn = _chunk5FZAROP6js.B; exports.useMyReturns = _chunk5FZAROP6js.A; exports.useReturnOrders = _chunk5FZAROP6js.x; exports.useReturnSession = _chunk5FZAROP6js.w; exports.useReturnableOrder = _chunk5FZAROP6js.y; exports.useReturnsAppearance = _chunk5FZAROP6js.n; exports.useReturnsSlot = _chunk5FZAROP6js.o; exports.useReturnsText = _chunk5FZAROP6js.r;
2
2
  //# sourceMappingURL=returns.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/private/tmp/bsr-src/dist/returns.js"],"names":[],"mappings":"AAAA,+HAAuC,sDAAoL,+BAA4B,sDAAwC,+BAA4B,+BAA4B,+BAA4B,+BAA4B,kkCAA4gB","file":"/private/tmp/bsr-src/dist/returns.js"}
1
+ {"version":3,"sources":["/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/returns.js"],"names":[],"mappings":"AAAA,+HAAuC,sDAA+K,+BAA4B,sDAAwC,+BAA4B,+BAA4B,+BAA4B,+BAA4B,+BAA4B,kkCAA4gB","file":"/home/emems/web/bitsnap/bitsnap/bitsnap-react/dist/returns.js"}
package/dist/returns.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{a as L}from"./chunk-7TLJKYZD.mjs";import{A as C,c as t,d as r,e as s,f as n,i as p,k as u,l as R,m as o,n as y,o as a,p as i,q as m,r as l,t as x,u as d,v as P,w as f,x as S,y as c,z as T}from"./chunk-Q3DSK66F.mjs";import"./chunk-KOVKUJAW.mjs";import{h as e}from"./chunk-2TLWMYXW.mjs";import"./chunk-S4Z4O46O.mjs";import"./chunk-PEVB3VL4.mjs";import"./chunk-MDCP5JNP.mjs";import"./chunk-U6FLIRIV.mjs";export{L as BitsnapReturns,R as BitsnapReturnsProvider,e as Environment,t as RETURNS_SLOT_NAMES,r as ReturnsAppearanceProvider,d as ReturnsCodeStep,S as ReturnsConfirmation,x as ReturnsEmailStep,C as ReturnsMyReturnDetail,T as ReturnsMyReturnsList,f as ReturnsOrderDetail,P as ReturnsOrderList,u as ReturnsProvider,c as ReturnsResult,i as useCreateReturn,l as useMyReturn,m as useMyReturns,y as useReturnOrders,o as useReturnSession,a as useReturnableOrder,s as useReturnsAppearance,n as useReturnsSlot,p as useReturnsText};
1
+ import{a as L}from"./chunk-BZXV77PT.mjs";import{A as m,B as l,D as x,E as d,F as P,G as f,H as S,I as c,J as T,K as C,l as t,m as r,n as s,o as n,r as p,u,v as R,w as o,x as y,y as a,z as i}from"./chunk-HKNWW37T.mjs";import"./chunk-KOVKUJAW.mjs";import{i as e}from"./chunk-L7Q7OKM5.mjs";import"./chunk-5R6AGO3Z.mjs";import"./chunk-X3LVYIJR.mjs";import"./chunk-2UDAB2C5.mjs";import"./chunk-VNYHJT6V.mjs";import"./chunk-MDCP5JNP.mjs";import"./chunk-U6FLIRIV.mjs";export{L as BitsnapReturns,R as BitsnapReturnsProvider,e as Environment,t as RETURNS_SLOT_NAMES,r as ReturnsAppearanceProvider,d as ReturnsCodeStep,S as ReturnsConfirmation,x as ReturnsEmailStep,C as ReturnsMyReturnDetail,T as ReturnsMyReturnsList,f as ReturnsOrderDetail,P as ReturnsOrderList,u as ReturnsProvider,c as ReturnsResult,i as useCreateReturn,l as useMyReturn,m as useMyReturns,y as useReturnOrders,o as useReturnSession,a as useReturnableOrder,s as useReturnsAppearance,n as useReturnsSlot,p as useReturnsText};
2
2
  //# sourceMappingURL=returns.mjs.map
@@ -1,6 +1,16 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { S as SlotAppearance, A as AppearanceElements } from './appearance-core-Dt2grZdl.mjs';
3
3
 
4
+ /** Options every login surface passes through to {@link LoginBrandLogo}. */
5
+ type LoginLogoOptions = {
6
+ /** Shows the shop logo above the login. Default `true`; `false` hides it. */
7
+ showLogo?: boolean;
8
+ /** Logo for light backgrounds, instead of the one of the shop settings. */
9
+ logoUrl?: string;
10
+ /** Logo for dark backgrounds, instead of the one of the shop settings. */
11
+ logoDarkUrl?: string;
12
+ };
13
+
4
14
  /**
5
15
  * Returns appearance API.
6
16
  *
@@ -83,7 +93,14 @@ type ResolvedReturnsAppearance = {
83
93
  * whatever the locale. Strings with `{name}` placeholders keep them in
84
94
  * overrides; unknown placeholders are left untouched.
85
95
  */
86
- type ReturnsTexts = {
96
+ type ReturnsTexts = Omit<ResolvedReturnsTexts, OptionalReturnsTextKey> & Partial<Pick<ResolvedReturnsTexts, OptionalReturnsTextKey>>;
97
+ /**
98
+ * Keys added after 1.6: optional in {@link ReturnsTexts} so that code which
99
+ * builds a complete texts object keeps compiling. The defaults fill them in.
100
+ */
101
+ type OptionalReturnsTextKey = "resendSent" | "codeSpamHint" | "codeValidity" | "codeIncomplete" | "errorNetwork";
102
+ /** The texts after the defaults are applied: every key is present. */
103
+ type ResolvedReturnsTexts = {
87
104
  /** Label of the back buttons. */
88
105
  back: string;
89
106
  /** Step indicator, placeholders `{current}` and `{total}`. */
@@ -105,6 +122,13 @@ type ReturnsTexts = {
105
122
  resend: string;
106
123
  /** Placeholder `{seconds}`. */
107
124
  resendIn: string;
125
+ /** Confirmation after a new code was sent. */
126
+ resendSent: string;
127
+ /** Hint under the code field. */
128
+ codeSpamHint: string;
129
+ codeValidity: string;
130
+ /** Shown when the form is submitted with fewer than 6 digits. */
131
+ codeIncomplete: string;
108
132
  logout: string;
109
133
  ordersTitle: string;
110
134
  ordersDescription: string;
@@ -178,6 +202,7 @@ type ReturnsTexts = {
178
202
  refundStatusFailed: string;
179
203
  refundStatusFallback: string;
180
204
  errorGeneric: string;
205
+ errorNetwork: string;
181
206
  errorInvalidEmail: string;
182
207
  errorInvalidCode: string;
183
208
  errorSessionExpired: string;
@@ -191,6 +216,6 @@ type ReturnsTexts = {
191
216
  errorDeliveryFailed: string;
192
217
  errorRetry: string;
193
218
  };
194
- type ReturnsTextKey = keyof ReturnsTexts;
219
+ type ReturnsTextKey = keyof ResolvedReturnsTexts;
195
220
 
196
- export { type ReturnsAppearance as R, type ReturnsTexts as a, RETURNS_SLOT_NAMES as b, type ReturnsAppearanceElements as c, type ReturnsAppearanceTokens as d, type ReturnsSlotAppearance as e, type ReturnsSlotName as f, type ReturnsTheme as g, type ReturnsTextKey as h, type ResolvedReturnsAppearance as i };
221
+ export { type LoginLogoOptions as L, type ReturnsAppearance as R, type ReturnsTexts as a, RETURNS_SLOT_NAMES as b, type ReturnsAppearanceElements as c, type ReturnsAppearanceTokens as d, type ReturnsSlotAppearance as e, type ReturnsSlotName as f, type ReturnsTheme as g, type ReturnsTextKey as h, type ResolvedReturnsAppearance as i };
@@ -1,6 +1,16 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { S as SlotAppearance, A as AppearanceElements } from './appearance-core-Dt2grZdl.js';
3
3
 
4
+ /** Options every login surface passes through to {@link LoginBrandLogo}. */
5
+ type LoginLogoOptions = {
6
+ /** Shows the shop logo above the login. Default `true`; `false` hides it. */
7
+ showLogo?: boolean;
8
+ /** Logo for light backgrounds, instead of the one of the shop settings. */
9
+ logoUrl?: string;
10
+ /** Logo for dark backgrounds, instead of the one of the shop settings. */
11
+ logoDarkUrl?: string;
12
+ };
13
+
4
14
  /**
5
15
  * Returns appearance API.
6
16
  *
@@ -83,7 +93,14 @@ type ResolvedReturnsAppearance = {
83
93
  * whatever the locale. Strings with `{name}` placeholders keep them in
84
94
  * overrides; unknown placeholders are left untouched.
85
95
  */
86
- type ReturnsTexts = {
96
+ type ReturnsTexts = Omit<ResolvedReturnsTexts, OptionalReturnsTextKey> & Partial<Pick<ResolvedReturnsTexts, OptionalReturnsTextKey>>;
97
+ /**
98
+ * Keys added after 1.6: optional in {@link ReturnsTexts} so that code which
99
+ * builds a complete texts object keeps compiling. The defaults fill them in.
100
+ */
101
+ type OptionalReturnsTextKey = "resendSent" | "codeSpamHint" | "codeValidity" | "codeIncomplete" | "errorNetwork";
102
+ /** The texts after the defaults are applied: every key is present. */
103
+ type ResolvedReturnsTexts = {
87
104
  /** Label of the back buttons. */
88
105
  back: string;
89
106
  /** Step indicator, placeholders `{current}` and `{total}`. */
@@ -105,6 +122,13 @@ type ReturnsTexts = {
105
122
  resend: string;
106
123
  /** Placeholder `{seconds}`. */
107
124
  resendIn: string;
125
+ /** Confirmation after a new code was sent. */
126
+ resendSent: string;
127
+ /** Hint under the code field. */
128
+ codeSpamHint: string;
129
+ codeValidity: string;
130
+ /** Shown when the form is submitted with fewer than 6 digits. */
131
+ codeIncomplete: string;
108
132
  logout: string;
109
133
  ordersTitle: string;
110
134
  ordersDescription: string;
@@ -178,6 +202,7 @@ type ReturnsTexts = {
178
202
  refundStatusFailed: string;
179
203
  refundStatusFallback: string;
180
204
  errorGeneric: string;
205
+ errorNetwork: string;
181
206
  errorInvalidEmail: string;
182
207
  errorInvalidCode: string;
183
208
  errorSessionExpired: string;
@@ -191,6 +216,6 @@ type ReturnsTexts = {
191
216
  errorDeliveryFailed: string;
192
217
  errorRetry: string;
193
218
  };
194
- type ReturnsTextKey = keyof ReturnsTexts;
219
+ type ReturnsTextKey = keyof ResolvedReturnsTexts;
195
220
 
196
- export { type ReturnsAppearance as R, type ReturnsTexts as a, RETURNS_SLOT_NAMES as b, type ReturnsAppearanceElements as c, type ReturnsAppearanceTokens as d, type ReturnsSlotAppearance as e, type ReturnsSlotName as f, type ReturnsTheme as g, type ReturnsTextKey as h, type ResolvedReturnsAppearance as i };
221
+ export { type LoginLogoOptions as L, type ReturnsAppearance as R, type ReturnsTexts as a, RETURNS_SLOT_NAMES as b, type ReturnsAppearanceElements as c, type ReturnsAppearanceTokens as d, type ReturnsSlotAppearance as e, type ReturnsSlotName as f, type ReturnsTheme as g, type ReturnsTextKey as h, type ResolvedReturnsAppearance as i };