hasting-swatchcart-module 0.0.2 → 0.0.3

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 (340) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/index.js +7 -0
  3. package/dist/_virtual/index2.js +7 -0
  4. package/dist/_virtual/index3.js +4 -0
  5. package/dist/_virtual/use-sync-external-store-with-selector.development.js +4 -0
  6. package/dist/_virtual/use-sync-external-store-with-selector.production.js +4 -0
  7. package/dist/_virtual/utilities.js +4 -0
  8. package/dist/_virtual/with-selector.js +5 -0
  9. package/dist/_virtual/with-selector2.js +4 -0
  10. package/dist/assets/src/shared/ui/CustomSidebar/CustomSidebar.module.css +1 -0
  11. package/dist/assets/src/shared/ui/Markdown/MDWithAccordion.module.css +1 -0
  12. package/dist/assets/src/shared/ui/PopoverTooltip/PopoverTooltip.module.css +0 -0
  13. package/dist/components/SwatchesModule.js +22 -38896
  14. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
  15. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
  16. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
  17. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
  18. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
  19. package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  20. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  21. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +251 -0
  22. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
  23. package/dist/node_modules/@radix-ui/react-context/dist/index.js +68 -0
  24. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +256 -0
  25. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
  26. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
  27. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
  28. package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
  29. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +231 -0
  30. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
  31. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
  32. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
  33. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  34. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  35. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
  36. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  37. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  38. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  39. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +8 -0
  40. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
  41. package/dist/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js +877 -0
  42. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +35 -0
  43. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +497 -0
  44. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  45. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +62 -0
  46. package/dist/node_modules/@ungap/structured-clone/esm/index.js +11 -0
  47. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +106 -0
  48. package/dist/node_modules/@ungap/structured-clone/esm/types.js +13 -0
  49. package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  50. package/dist/node_modules/bail/index.js +7 -0
  51. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  52. package/dist/node_modules/comma-separated-tokens/index.js +20 -0
  53. package/dist/node_modules/decode-named-character-reference/index.dom.js +14 -0
  54. package/dist/node_modules/devlop/lib/default.js +8 -0
  55. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +7 -0
  56. package/dist/node_modules/extend/index.js +43 -0
  57. package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
  58. package/dist/node_modules/hast-util-from-parse5/lib/index.js +145 -0
  59. package/dist/node_modules/hast-util-parse-selector/lib/index.js +20 -0
  60. package/dist/node_modules/hast-util-raw/lib/index.js +217 -0
  61. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +302 -0
  62. package/dist/node_modules/hast-util-to-parse5/lib/index.js +118 -0
  63. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.js +12 -0
  64. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.js +61 -0
  65. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.js +33 -0
  66. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.js +368 -0
  67. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.js +6 -0
  68. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.js +566 -0
  69. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.js +7 -0
  70. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.js +6 -0
  71. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.js +22 -0
  72. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.js +27 -0
  73. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.js +23 -0
  74. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.js +11 -0
  75. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.js +17 -0
  76. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.js +14 -0
  77. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.js +19 -0
  78. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.js +11 -0
  79. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.js +11 -0
  80. package/dist/node_modules/hast-util-whitespace/lib/index.js +10 -0
  81. package/dist/node_modules/hastscript/lib/create-h.js +112 -0
  82. package/dist/node_modules/hastscript/lib/index.js +8 -0
  83. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +44 -0
  84. package/dist/node_modules/html-url-attributes/lib/index.js +26 -0
  85. package/dist/node_modules/html-void-elements/index.js +25 -0
  86. package/dist/node_modules/immer/dist/immer.js +467 -0
  87. package/dist/node_modules/inline-style-parser/index.js +93 -0
  88. package/dist/node_modules/is-plain-obj/index.js +9 -0
  89. package/dist/node_modules/lucide-react/dist/esm/Icon.js +40 -0
  90. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +27 -0
  91. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
  92. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +12 -0
  93. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +12 -0
  94. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +15 -0
  95. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +19 -0
  96. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +581 -0
  97. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +90 -0
  98. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +12 -0
  99. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +8 -0
  100. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +15 -0
  101. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +12 -0
  102. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +12 -0
  103. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +28 -0
  104. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +12 -0
  105. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +9 -0
  106. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +14 -0
  107. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +10 -0
  108. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +58 -0
  109. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +14 -0
  110. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +19 -0
  111. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +15 -0
  112. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +42 -0
  113. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +21 -0
  114. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +12 -0
  115. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +7 -0
  116. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +12 -0
  117. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +13 -0
  118. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +21 -0
  119. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +32 -0
  120. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +8 -0
  121. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +12 -0
  122. package/dist/node_modules/mdast-util-to-hast/lib/index.js +10 -0
  123. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +13 -0
  124. package/dist/node_modules/mdast-util-to-hast/lib/state.js +104 -0
  125. package/dist/node_modules/mdast-util-to-string/lib/index.js +29 -0
  126. package/dist/node_modules/micromark/lib/constructs.js +85 -0
  127. package/dist/node_modules/micromark/lib/create-tokenizer.js +223 -0
  128. package/dist/node_modules/micromark/lib/initialize/content.js +37 -0
  129. package/dist/node_modules/micromark/lib/initialize/document.js +126 -0
  130. package/dist/node_modules/micromark/lib/initialize/flow.js +33 -0
  131. package/dist/node_modules/micromark/lib/initialize/text.js +95 -0
  132. package/dist/node_modules/micromark/lib/parse.js +32 -0
  133. package/dist/node_modules/micromark/lib/postprocess.js +9 -0
  134. package/dist/node_modules/micromark/lib/preprocess.js +39 -0
  135. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +83 -0
  136. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +43 -0
  137. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +18 -0
  138. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +42 -0
  139. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +17 -0
  140. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +30 -0
  141. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +94 -0
  142. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +43 -0
  143. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +45 -0
  144. package/dist/node_modules/micromark-core-commonmark/lib/content.js +50 -0
  145. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +80 -0
  146. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +17 -0
  147. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +46 -0
  148. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +144 -0
  149. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +102 -0
  150. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +152 -0
  151. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +22 -0
  152. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +19 -0
  153. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +14 -0
  154. package/dist/node_modules/micromark-core-commonmark/lib/list.js +90 -0
  155. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +57 -0
  156. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +25 -0
  157. package/dist/node_modules/micromark-factory-destination/index.js +31 -0
  158. package/dist/node_modules/micromark-factory-label/index.js +28 -0
  159. package/dist/node_modules/micromark-factory-space/index.js +15 -0
  160. package/dist/node_modules/micromark-factory-title/index.js +26 -0
  161. package/dist/node_modules/micromark-factory-whitespace/index.js +12 -0
  162. package/dist/node_modules/micromark-util-character/index.js +39 -0
  163. package/dist/node_modules/micromark-util-chunked/index.js +16 -0
  164. package/dist/node_modules/micromark-util-classify-character/index.js +10 -0
  165. package/dist/node_modules/micromark-util-combine-extensions/index.js +36 -0
  166. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +16 -0
  167. package/dist/node_modules/micromark-util-decode-string/index.js +18 -0
  168. package/dist/node_modules/micromark-util-html-tag-name/index.js +68 -0
  169. package/dist/node_modules/micromark-util-normalize-identifier/index.js +6 -0
  170. package/dist/node_modules/micromark-util-resolve-all/index.js +12 -0
  171. package/dist/node_modules/micromark-util-sanitize-uri/index.js +23 -0
  172. package/dist/node_modules/micromark-util-subtokenize/index.js +55 -0
  173. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +175 -0
  174. package/dist/node_modules/parse5/dist/common/doctype.js +98 -0
  175. package/dist/node_modules/parse5/dist/common/error-codes.js +7 -0
  176. package/dist/node_modules/parse5/dist/common/foreign-content.js +210 -0
  177. package/dist/node_modules/parse5/dist/common/html.js +250 -0
  178. package/dist/node_modules/parse5/dist/common/token.js +14 -0
  179. package/dist/node_modules/parse5/dist/common/unicode.js +73 -0
  180. package/dist/node_modules/parse5/dist/parser/formatting-element-list.js +84 -0
  181. package/dist/node_modules/parse5/dist/parser/index.js +2271 -0
  182. package/dist/node_modules/parse5/dist/parser/open-element-stack.js +240 -0
  183. package/dist/node_modules/parse5/dist/serializer/index.js +2 -0
  184. package/dist/node_modules/parse5/dist/tokenizer/index.js +1940 -0
  185. package/dist/node_modules/parse5/dist/tokenizer/preprocessor.js +88 -0
  186. package/dist/node_modules/parse5/dist/tree-adapters/default.js +162 -0
  187. package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js +38 -0
  188. package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode.js +245 -0
  189. package/dist/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
  190. package/dist/node_modules/property-information/index.js +12 -0
  191. package/dist/node_modules/property-information/lib/aria.js +61 -0
  192. package/dist/node_modules/property-information/lib/find.js +33 -0
  193. package/dist/node_modules/property-information/lib/hast-to-react.js +22 -0
  194. package/dist/node_modules/property-information/lib/html.js +368 -0
  195. package/dist/node_modules/property-information/lib/normalize.js +6 -0
  196. package/dist/node_modules/property-information/lib/svg.js +566 -0
  197. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +7 -0
  198. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +6 -0
  199. package/dist/node_modules/property-information/lib/util/create.js +19 -0
  200. package/dist/node_modules/property-information/lib/util/defined-info.js +36 -0
  201. package/dist/node_modules/property-information/lib/util/info.js +28 -0
  202. package/dist/node_modules/property-information/lib/util/merge.js +10 -0
  203. package/dist/node_modules/property-information/lib/util/schema.js +21 -0
  204. package/dist/node_modules/property-information/lib/util/types.js +14 -0
  205. package/dist/node_modules/property-information/lib/xlink.js +19 -0
  206. package/dist/node_modules/property-information/lib/xml.js +11 -0
  207. package/dist/node_modules/property-information/lib/xmlns.js +11 -0
  208. package/dist/node_modules/react-markdown/lib/index.js +102 -0
  209. package/dist/node_modules/react-redux/dist/react-redux.js +135 -0
  210. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
  211. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
  212. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
  213. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
  214. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
  215. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  216. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  217. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
  218. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
  219. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
  220. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
  221. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
  222. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
  223. package/dist/node_modules/redux/dist/redux.js +258 -0
  224. package/dist/node_modules/redux-thunk/dist/redux-thunk.js +8 -0
  225. package/dist/node_modules/rehype-raw/lib/index.js +12 -0
  226. package/dist/node_modules/remark-parse/lib/index.js +19 -0
  227. package/dist/node_modules/remark-rehype/lib/index.js +18 -0
  228. package/dist/node_modules/reselect/dist/reselect.js +244 -0
  229. package/dist/node_modules/space-separated-tokens/index.js +11 -0
  230. package/dist/node_modules/style-to-js/cjs/index.js +20 -0
  231. package/dist/node_modules/style-to-js/cjs/utilities.js +19 -0
  232. package/dist/node_modules/style-to-object/cjs/index.js +28 -0
  233. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2731 -0
  234. package/dist/node_modules/trim-lines/index.js +28 -0
  235. package/dist/node_modules/trough/lib/index.js +60 -0
  236. package/dist/node_modules/tslib/tslib.es6.js +27 -0
  237. package/dist/node_modules/unified/lib/callable-instance.js +25 -0
  238. package/dist/node_modules/unified/lib/index.js +529 -0
  239. package/dist/node_modules/unist-util-is/lib/index.js +84 -0
  240. package/dist/node_modules/unist-util-position/lib/index.js +23 -0
  241. package/dist/node_modules/unist-util-stringify-position/lib/index.js +15 -0
  242. package/dist/node_modules/unist-util-visit/lib/index.js +16 -0
  243. package/dist/node_modules/unist-util-visit-parents/lib/color.js +6 -0
  244. package/dist/node_modules/unist-util-visit-parents/lib/index.js +56 -0
  245. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
  246. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
  247. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
  248. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  249. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
  250. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +66 -0
  251. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +65 -0
  252. package/dist/node_modules/use-sync-external-store/with-selector.js +10 -0
  253. package/dist/node_modules/vfile/lib/index.js +406 -0
  254. package/dist/node_modules/vfile/lib/minpath.browser.js +112 -0
  255. package/dist/node_modules/vfile/lib/minproc.browser.js +7 -0
  256. package/dist/node_modules/vfile/lib/minurl.browser.js +41 -0
  257. package/dist/node_modules/vfile/lib/minurl.shared.js +7 -0
  258. package/dist/node_modules/vfile-location/lib/index.js +42 -0
  259. package/dist/node_modules/vfile-message/lib/index.js +91 -0
  260. package/dist/node_modules/web-namespaces/index.js +11 -0
  261. package/dist/node_modules/zwitch/index.js +18 -0
  262. package/dist/src/app/assets/images/product_thumb.png.js +4 -0
  263. package/dist/src/app/assets/svg/ArrowIconSVG.js +25 -0
  264. package/dist/src/app/assets/svg/CheckMarkIconSVG.js +25 -0
  265. package/dist/src/app/assets/svg/CloseIconSVG.js +25 -0
  266. package/dist/src/app/assets/svg/MinusIconSVG.js +24 -0
  267. package/dist/src/app/assets/svg/PlusIconSVG.js +24 -0
  268. package/dist/src/app/assets/svg/SearchIconSVG.js +37 -0
  269. package/dist/src/app/assets/svg/TrashIconSVG.js +24 -0
  270. package/dist/src/app/store/rootReducer.js +12 -0
  271. package/dist/src/app/store/store.js +14 -0
  272. package/dist/src/features/Cart/lib/CartCervices.js +8 -0
  273. package/dist/src/features/Cart/model/cartSlice.js +58 -0
  274. package/dist/src/features/Cart/model/selectors.js +18 -0
  275. package/dist/src/features/Cart/ui/CartHeader/CartHeader.js +53 -0
  276. package/dist/src/features/Cart/ui/CartList/CartList.js +29 -0
  277. package/dist/src/features/Cart/ui/CartListItem/CartListItem.js +41 -0
  278. package/dist/src/features/Cart/ui/CartPrice/CartPrice.js +23 -0
  279. package/dist/src/features/Cart/ui/CartWrapper/CartWrapper.js +38 -0
  280. package/dist/src/features/Cart/ui/Counter/Counter.js +46 -0
  281. package/dist/src/features/DataAdapter/lib/DataAdapterServices.js +102 -0
  282. package/dist/src/features/DataAdapter/utils/types.js +8 -0
  283. package/dist/src/features/MultiProduct/lib/MultiProductCartServices.js +34 -0
  284. package/dist/src/features/MultiProduct/model/API/api.js +18 -0
  285. package/dist/src/features/MultiProduct/model/multiProductCartSlice.js +83 -0
  286. package/dist/src/features/MultiProduct/model/selectors.js +7 -0
  287. package/dist/src/features/MultiProduct/ui/CartSelectedProductList/CartSelectedProductList.js +21 -0
  288. package/dist/src/features/MultiProduct/ui/CustomModal/CustomModal.js +28 -0
  289. package/dist/src/features/MultiProduct/ui/FiltersSelectedProductItem/FiltersSelectedProductItem.js +27 -0
  290. package/dist/src/features/MultiProduct/ui/MultiProductCartHeader/MultiProductCartHeader.js +60 -0
  291. package/dist/src/features/MultiProduct/ui/MultiProductItemCart/MultiProductItemCart.js +71 -0
  292. package/dist/src/features/MultiProduct/ui/MultiProductWrapper/MultiProductWrapper.js +19 -0
  293. package/dist/src/features/MultiProduct/ui/ProductList/ProductList.js +138 -0
  294. package/dist/src/features/MultiProduct/ui/ProductListItem/ProductListItem.js +51 -0
  295. package/dist/src/features/MultiProduct/ui/SelectedProductItem/SelectedProductItem.js +55 -0
  296. package/dist/src/features/MultiProduct/ui/SwatchContentContainer/SwatchContentContainer.js +46 -0
  297. package/dist/src/features/MultiProduct/utils/constants.js +16 -0
  298. package/dist/src/features/MultiProduct/utils/randomList.js +41 -0
  299. package/dist/src/features/swatches/lib/AttributeHelper.js +21 -0
  300. package/dist/src/features/swatches/lib/SwatchesServices.js +54 -0
  301. package/dist/src/features/swatches/model/selectors.js +12 -0
  302. package/dist/src/features/swatches/model/swatchesSlice.js +108 -0
  303. package/dist/src/features/swatches/model/thunks.js +22 -0
  304. package/dist/src/features/swatches/model/types.js +6 -0
  305. package/dist/src/features/swatches/ui/Filters/ColorsFilter.js +45 -0
  306. package/dist/src/features/swatches/ui/Filters/LooksFilter.js +45 -0
  307. package/dist/src/features/swatches/ui/Filters/MaterialsFilter.js +47 -0
  308. package/dist/src/features/swatches/ui/Filters/index.js +12 -0
  309. package/dist/src/features/swatches/ui/HexGridZoom/HexGridZoom.js +50 -0
  310. package/dist/src/features/swatches/ui/ImageGridZoom/ImageGridZoom.js +45 -0
  311. package/dist/src/features/swatches/ui/MaterialList/index.js +39 -0
  312. package/dist/src/features/swatches/ui/MaterialListItem/MaterialListItem.js +51 -0
  313. package/dist/src/features/swatches/ui/ProductElement/index.js +65 -0
  314. package/dist/src/features/swatches/ui/SwatchWrapper/SwatchWrapper.js +62 -0
  315. package/dist/src/features/swatches/ui/Swatches.js +51 -0
  316. package/dist/src/features/swatches/ui/SwatchesList/SwatchesList.js +67 -0
  317. package/dist/src/features/swatches/utils/constants.js +8 -0
  318. package/dist/src/shared/constants/props.js +13337 -0
  319. package/dist/src/shared/constants/selectedMaterials.js +4 -0
  320. package/dist/src/shared/types/activeTab.js +7 -0
  321. package/dist/src/shared/ui/Checkbox/Checkbox.js +31 -0
  322. package/dist/src/shared/ui/CustomButton/CustomButton.js +16 -0
  323. package/dist/src/shared/ui/CustomSidebar/CustomSidebar.js +59 -0
  324. package/dist/src/shared/ui/CustomSidebar/CustomSidebar.module.scss.js +13 -0
  325. package/dist/src/shared/ui/Dialog/Dialog.js +81 -0
  326. package/dist/src/shared/ui/Label/Label.js +27 -0
  327. package/dist/src/shared/ui/Markdown/MDWithAccordion.js +36 -0
  328. package/dist/src/shared/ui/Markdown/MDWithAccordion.module.scss.js +9 -0
  329. package/dist/src/shared/ui/MaterialItem/MaterialItem.js +36 -0
  330. package/dist/src/shared/ui/MultiSelect/MultiSelect.js +150 -0
  331. package/dist/src/shared/ui/PopoverTooltip/InfoIcon.js +35 -0
  332. package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.js +37 -0
  333. package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.module.scss.js +4 -0
  334. package/dist/src/shared/ui/Slider/Slider.js +117 -0
  335. package/dist/src/shared/utils/cn.js +8 -0
  336. package/dist/src/shared/utils/uniqueList.js +4 -0
  337. package/package.json +12 -2
  338. package/dist/assets/SwatchesModule.css +0 -1
  339. /package/dist/{lib/components → components}/SwatchesModule.d.ts +0 -0
  340. /package/dist/{lib/main.d.ts → main.d.ts} +0 -0
@@ -0,0 +1,28 @@
1
+ function r(c) {
2
+ const i = String(c), o = /\r?\n|\r/g;
3
+ let e = o.exec(i), t = 0;
4
+ const n = [];
5
+ for (; e; )
6
+ n.push(
7
+ s(i.slice(t, e.index), t > 0, !0),
8
+ e[0]
9
+ ), t = e.index + e[0].length, e = o.exec(i);
10
+ return n.push(s(i.slice(t), t > 0, !1)), n.join("");
11
+ }
12
+ function s(c, i, o) {
13
+ let e = 0, t = c.length;
14
+ if (i) {
15
+ let n = c.codePointAt(e);
16
+ for (; n === 9 || n === 32; )
17
+ e++, n = c.codePointAt(e);
18
+ }
19
+ if (o) {
20
+ let n = c.codePointAt(t - 1);
21
+ for (; n === 9 || n === 32; )
22
+ t--, n = c.codePointAt(t - 1);
23
+ }
24
+ return t > e ? c.slice(e, t) : "";
25
+ }
26
+ export {
27
+ r as trimLines
28
+ };
@@ -0,0 +1,60 @@
1
+ function x() {
2
+ const i = [], u = { run: c, use: p };
3
+ return u;
4
+ function c(...n) {
5
+ let h = -1;
6
+ const t = n.pop();
7
+ if (typeof t != "function")
8
+ throw new TypeError("Expected function as last argument, not " + t);
9
+ f(null, ...n);
10
+ function f(e, ...o) {
11
+ const r = i[++h];
12
+ let l = -1;
13
+ if (e) {
14
+ t(e);
15
+ return;
16
+ }
17
+ for (; ++l < n.length; )
18
+ (o[l] === null || o[l] === void 0) && (o[l] = n[l]);
19
+ n = o, r ? s(r, f)(...o) : t(null, ...o);
20
+ }
21
+ }
22
+ function p(n) {
23
+ if (typeof n != "function")
24
+ throw new TypeError(
25
+ "Expected `middelware` to be a function, not " + n
26
+ );
27
+ return i.push(n), u;
28
+ }
29
+ }
30
+ function s(i, u) {
31
+ let c;
32
+ return p;
33
+ function p(...t) {
34
+ const f = i.length > t.length;
35
+ let e;
36
+ f && t.push(n);
37
+ try {
38
+ e = i.apply(this, t);
39
+ } catch (o) {
40
+ const r = (
41
+ /** @type {Error} */
42
+ o
43
+ );
44
+ if (f && c)
45
+ throw r;
46
+ return n(r);
47
+ }
48
+ f || (e && e.then && typeof e.then == "function" ? e.then(h, n) : e instanceof Error ? n(e) : h(e));
49
+ }
50
+ function n(t, ...f) {
51
+ c || (c = !0, u(t, ...f));
52
+ }
53
+ function h(t) {
54
+ n(null, t);
55
+ }
56
+ }
57
+ export {
58
+ x as trough,
59
+ s as wrap
60
+ };
@@ -0,0 +1,27 @@
1
+ var p = function() {
2
+ return p = Object.assign || function(e) {
3
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
4
+ n = arguments[r];
5
+ for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
6
+ }
7
+ return e;
8
+ }, p.apply(this, arguments);
9
+ };
10
+ function c(t, e) {
11
+ var n = {};
12
+ for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
13
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
14
+ for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
15
+ e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
16
+ return n;
17
+ }
18
+ function l(t, e, n) {
19
+ if (n || arguments.length === 2) for (var r = 0, o = e.length, a; r < o; r++)
20
+ (a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
21
+ return t.concat(a || Array.prototype.slice.call(e));
22
+ }
23
+ export {
24
+ p as __assign,
25
+ c as __rest,
26
+ l as __spreadArray
27
+ };
@@ -0,0 +1,25 @@
1
+ const r = (
2
+ /**
3
+ * @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}
4
+ */
5
+ /** @type {unknown} */
6
+ /**
7
+ * @this {Function}
8
+ * @param {string | symbol} property
9
+ * @returns {(...parameters: Array<unknown>) => unknown}
10
+ */
11
+ (function(n) {
12
+ const o = (
13
+ /** @type {Record<string | symbol, Function>} */
14
+ // Prototypes do exist.
15
+ // type-coverage:ignore-next-line
16
+ this.constructor.prototype
17
+ ), s = o[n], t = function() {
18
+ return s.apply(t, arguments);
19
+ };
20
+ return Object.setPrototypeOf(t, o), t;
21
+ })
22
+ );
23
+ export {
24
+ r as CallableInstance
25
+ };
@@ -0,0 +1,529 @@
1
+ import { bail as P } from "../../bail/index.js";
2
+ import y from "../../../_virtual/index2.js";
3
+ import z from "../../is-plain-obj/index.js";
4
+ import { CallableInstance as C } from "./callable-instance.js";
5
+ import { trough as A } from "../../trough/lib/index.js";
6
+ import { VFile as S } from "../../vfile/lib/index.js";
7
+ const F = {}.hasOwnProperty;
8
+ class x extends C {
9
+ /**
10
+ * Create a processor.
11
+ */
12
+ constructor() {
13
+ super("copy"), this.Compiler = void 0, this.Parser = void 0, this.attachers = [], this.compiler = void 0, this.freezeIndex = -1, this.frozen = void 0, this.namespace = {}, this.parser = void 0, this.transformers = A();
14
+ }
15
+ /**
16
+ * Copy a processor.
17
+ *
18
+ * @deprecated
19
+ * This is a private internal method and should not be used.
20
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
21
+ * New *unfrozen* processor ({@linkcode Processor}) that is
22
+ * configured to work the same as its ancestor.
23
+ * When the descendant processor is configured in the future it does not
24
+ * affect the ancestral processor.
25
+ */
26
+ copy() {
27
+ const e = (
28
+ /** @type {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>} */
29
+ new x()
30
+ );
31
+ let n = -1;
32
+ for (; ++n < this.attachers.length; ) {
33
+ const t = this.attachers[n];
34
+ e.use(...t);
35
+ }
36
+ return e.data(y(!0, {}, this.namespace)), e;
37
+ }
38
+ /**
39
+ * Configure the processor with info available to all plugins.
40
+ * Information is stored in an object.
41
+ *
42
+ * Typically, options can be given to a specific plugin, but sometimes it
43
+ * makes sense to have information shared with several plugins.
44
+ * For example, a list of HTML elements that are self-closing, which is
45
+ * needed during all phases.
46
+ *
47
+ * > **Note**: setting information cannot occur on *frozen* processors.
48
+ * > Call the processor first to create a new unfrozen processor.
49
+ *
50
+ * > **Note**: to register custom data in TypeScript, augment the
51
+ * > {@linkcode Data} interface.
52
+ *
53
+ * @example
54
+ * This example show how to get and set info:
55
+ *
56
+ * ```js
57
+ * import {unified} from 'unified'
58
+ *
59
+ * const processor = unified().data('alpha', 'bravo')
60
+ *
61
+ * processor.data('alpha') // => 'bravo'
62
+ *
63
+ * processor.data() // => {alpha: 'bravo'}
64
+ *
65
+ * processor.data({charlie: 'delta'})
66
+ *
67
+ * processor.data() // => {charlie: 'delta'}
68
+ * ```
69
+ *
70
+ * @template {keyof Data} Key
71
+ *
72
+ * @overload
73
+ * @returns {Data}
74
+ *
75
+ * @overload
76
+ * @param {Data} dataset
77
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
78
+ *
79
+ * @overload
80
+ * @param {Key} key
81
+ * @returns {Data[Key]}
82
+ *
83
+ * @overload
84
+ * @param {Key} key
85
+ * @param {Data[Key]} value
86
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
87
+ *
88
+ * @param {Data | Key} [key]
89
+ * Key to get or set, or entire dataset to set, or nothing to get the
90
+ * entire dataset (optional).
91
+ * @param {Data[Key]} [value]
92
+ * Value to set (optional).
93
+ * @returns {unknown}
94
+ * The current processor when setting, the value at `key` when getting, or
95
+ * the entire dataset when getting without key.
96
+ */
97
+ data(e, n) {
98
+ return typeof e == "string" ? arguments.length === 2 ? (b("data", this.frozen), this.namespace[e] = n, this) : F.call(this.namespace, e) && this.namespace[e] || void 0 : e ? (b("data", this.frozen), this.namespace = e, this) : this.namespace;
99
+ }
100
+ /**
101
+ * Freeze a processor.
102
+ *
103
+ * Frozen processors are meant to be extended and not to be configured
104
+ * directly.
105
+ *
106
+ * When a processor is frozen it cannot be unfrozen.
107
+ * New processors working the same way can be created by calling the
108
+ * processor.
109
+ *
110
+ * It’s possible to freeze processors explicitly by calling `.freeze()`.
111
+ * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,
112
+ * `.stringify()`, `.process()`, or `.processSync()` are called.
113
+ *
114
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
115
+ * The current processor.
116
+ */
117
+ freeze() {
118
+ if (this.frozen)
119
+ return this;
120
+ const e = (
121
+ /** @type {Processor} */
122
+ /** @type {unknown} */
123
+ this
124
+ );
125
+ for (; ++this.freezeIndex < this.attachers.length; ) {
126
+ const [n, ...t] = this.attachers[this.freezeIndex];
127
+ if (t[0] === !1)
128
+ continue;
129
+ t[0] === !0 && (t[0] = void 0);
130
+ const i = n.call(e, ...t);
131
+ typeof i == "function" && this.transformers.use(i);
132
+ }
133
+ return this.frozen = !0, this.freezeIndex = Number.POSITIVE_INFINITY, this;
134
+ }
135
+ /**
136
+ * Parse text to a syntax tree.
137
+ *
138
+ * > **Note**: `parse` freezes the processor if not already *frozen*.
139
+ *
140
+ * > **Note**: `parse` performs the parse phase, not the run phase or other
141
+ * > phases.
142
+ *
143
+ * @param {Compatible | undefined} [file]
144
+ * file to parse (optional); typically `string` or `VFile`; any value
145
+ * accepted as `x` in `new VFile(x)`.
146
+ * @returns {ParseTree extends undefined ? Node : ParseTree}
147
+ * Syntax tree representing `file`.
148
+ */
149
+ parse(e) {
150
+ this.freeze();
151
+ const n = m(e), t = this.parser || this.Parser;
152
+ return w("parse", t), t(String(n), n);
153
+ }
154
+ /**
155
+ * Process the given file as configured on the processor.
156
+ *
157
+ * > **Note**: `process` freezes the processor if not already *frozen*.
158
+ *
159
+ * > **Note**: `process` performs the parse, run, and stringify phases.
160
+ *
161
+ * @overload
162
+ * @param {Compatible | undefined} file
163
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
164
+ * @returns {undefined}
165
+ *
166
+ * @overload
167
+ * @param {Compatible | undefined} [file]
168
+ * @returns {Promise<VFileWithOutput<CompileResult>>}
169
+ *
170
+ * @param {Compatible | undefined} [file]
171
+ * File (optional); typically `string` or `VFile`]; any value accepted as
172
+ * `x` in `new VFile(x)`.
173
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
174
+ * Callback (optional).
175
+ * @returns {Promise<VFile> | undefined}
176
+ * Nothing if `done` is given.
177
+ * Otherwise a promise, rejected with a fatal error or resolved with the
178
+ * processed file.
179
+ *
180
+ * The parsed, transformed, and compiled value is available at
181
+ * `file.value` (see note).
182
+ *
183
+ * > **Note**: unified typically compiles by serializing: most
184
+ * > compilers return `string` (or `Uint8Array`).
185
+ * > Some compilers, such as the one configured with
186
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
187
+ * > React tree).
188
+ * > If you’re using a compiler that doesn’t serialize, expect different
189
+ * > result values.
190
+ * >
191
+ * > To register custom results in TypeScript, add them to
192
+ * > {@linkcode CompileResultMap}.
193
+ *
194
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
195
+ */
196
+ process(e, n) {
197
+ const t = this;
198
+ return this.freeze(), w("process", this.parser || this.Parser), g("process", this.compiler || this.Compiler), n ? i(void 0, n) : new Promise(i);
199
+ function i(a, h) {
200
+ const p = m(e), l = (
201
+ /** @type {HeadTree extends undefined ? Node : HeadTree} */
202
+ /** @type {unknown} */
203
+ t.parse(p)
204
+ );
205
+ t.run(l, p, function(o, c, f) {
206
+ if (o || !c || !f)
207
+ return s(o);
208
+ const u = (
209
+ /** @type {CompileTree extends undefined ? Node : CompileTree} */
210
+ /** @type {unknown} */
211
+ c
212
+ ), d = t.stringify(u, f);
213
+ D(d) ? f.value = d : f.result = d, s(
214
+ o,
215
+ /** @type {VFileWithOutput<CompileResult>} */
216
+ f
217
+ );
218
+ });
219
+ function s(o, c) {
220
+ o || !c ? h(o) : a ? a(c) : n(void 0, c);
221
+ }
222
+ }
223
+ }
224
+ /**
225
+ * Process the given file as configured on the processor.
226
+ *
227
+ * An error is thrown if asynchronous transforms are configured.
228
+ *
229
+ * > **Note**: `processSync` freezes the processor if not already *frozen*.
230
+ *
231
+ * > **Note**: `processSync` performs the parse, run, and stringify phases.
232
+ *
233
+ * @param {Compatible | undefined} [file]
234
+ * File (optional); typically `string` or `VFile`; any value accepted as
235
+ * `x` in `new VFile(x)`.
236
+ * @returns {VFileWithOutput<CompileResult>}
237
+ * The processed file.
238
+ *
239
+ * The parsed, transformed, and compiled value is available at
240
+ * `file.value` (see note).
241
+ *
242
+ * > **Note**: unified typically compiles by serializing: most
243
+ * > compilers return `string` (or `Uint8Array`).
244
+ * > Some compilers, such as the one configured with
245
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
246
+ * > React tree).
247
+ * > If you’re using a compiler that doesn’t serialize, expect different
248
+ * > result values.
249
+ * >
250
+ * > To register custom results in TypeScript, add them to
251
+ * > {@linkcode CompileResultMap}.
252
+ *
253
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
254
+ */
255
+ processSync(e) {
256
+ let n = !1, t;
257
+ return this.freeze(), w("processSync", this.parser || this.Parser), g("processSync", this.compiler || this.Compiler), this.process(e, i), T("processSync", "process", n), t;
258
+ function i(a, h) {
259
+ n = !0, P(a), t = h;
260
+ }
261
+ }
262
+ /**
263
+ * Run *transformers* on a syntax tree.
264
+ *
265
+ * > **Note**: `run` freezes the processor if not already *frozen*.
266
+ *
267
+ * > **Note**: `run` performs the run phase, not other phases.
268
+ *
269
+ * @overload
270
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
271
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
272
+ * @returns {undefined}
273
+ *
274
+ * @overload
275
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
276
+ * @param {Compatible | undefined} file
277
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
278
+ * @returns {undefined}
279
+ *
280
+ * @overload
281
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
282
+ * @param {Compatible | undefined} [file]
283
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree>}
284
+ *
285
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
286
+ * Tree to transform and inspect.
287
+ * @param {(
288
+ * RunCallback<TailTree extends undefined ? Node : TailTree> |
289
+ * Compatible
290
+ * )} [file]
291
+ * File associated with `node` (optional); any value accepted as `x` in
292
+ * `new VFile(x)`.
293
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
294
+ * Callback (optional).
295
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
296
+ * Nothing if `done` is given.
297
+ * Otherwise, a promise rejected with a fatal error or resolved with the
298
+ * transformed tree.
299
+ */
300
+ run(e, n, t) {
301
+ I(e), this.freeze();
302
+ const i = this.transformers;
303
+ return !t && typeof n == "function" && (t = n, n = void 0), t ? a(void 0, t) : new Promise(a);
304
+ function a(h, p) {
305
+ const l = m(n);
306
+ i.run(e, l, s);
307
+ function s(o, c, f) {
308
+ const u = (
309
+ /** @type {TailTree extends undefined ? Node : TailTree} */
310
+ c || e
311
+ );
312
+ o ? p(o) : h ? h(u) : t(void 0, u, f);
313
+ }
314
+ }
315
+ }
316
+ /**
317
+ * Run *transformers* on a syntax tree.
318
+ *
319
+ * An error is thrown if asynchronous transforms are configured.
320
+ *
321
+ * > **Note**: `runSync` freezes the processor if not already *frozen*.
322
+ *
323
+ * > **Note**: `runSync` performs the run phase, not other phases.
324
+ *
325
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
326
+ * Tree to transform and inspect.
327
+ * @param {Compatible | undefined} [file]
328
+ * File associated with `node` (optional); any value accepted as `x` in
329
+ * `new VFile(x)`.
330
+ * @returns {TailTree extends undefined ? Node : TailTree}
331
+ * Transformed tree.
332
+ */
333
+ runSync(e, n) {
334
+ let t = !1, i;
335
+ return this.run(e, n, a), T("runSync", "run", t), i;
336
+ function a(h, p) {
337
+ P(h), i = p, t = !0;
338
+ }
339
+ }
340
+ /**
341
+ * Compile a syntax tree.
342
+ *
343
+ * > **Note**: `stringify` freezes the processor if not already *frozen*.
344
+ *
345
+ * > **Note**: `stringify` performs the stringify phase, not the run phase
346
+ * > or other phases.
347
+ *
348
+ * @param {CompileTree extends undefined ? Node : CompileTree} tree
349
+ * Tree to compile.
350
+ * @param {Compatible | undefined} [file]
351
+ * File associated with `node` (optional); any value accepted as `x` in
352
+ * `new VFile(x)`.
353
+ * @returns {CompileResult extends undefined ? Value : CompileResult}
354
+ * Textual representation of the tree (see note).
355
+ *
356
+ * > **Note**: unified typically compiles by serializing: most compilers
357
+ * > return `string` (or `Uint8Array`).
358
+ * > Some compilers, such as the one configured with
359
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
360
+ * > React tree).
361
+ * > If you’re using a compiler that doesn’t serialize, expect different
362
+ * > result values.
363
+ * >
364
+ * > To register custom results in TypeScript, add them to
365
+ * > {@linkcode CompileResultMap}.
366
+ *
367
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
368
+ */
369
+ stringify(e, n) {
370
+ this.freeze();
371
+ const t = m(n), i = this.compiler || this.Compiler;
372
+ return g("stringify", i), I(e), i(e, t);
373
+ }
374
+ /**
375
+ * Configure the processor to use a plugin, a list of usable values, or a
376
+ * preset.
377
+ *
378
+ * If the processor is already using a plugin, the previous plugin
379
+ * configuration is changed based on the options that are passed in.
380
+ * In other words, the plugin is not added a second time.
381
+ *
382
+ * > **Note**: `use` cannot be called on *frozen* processors.
383
+ * > Call the processor first to create a new unfrozen processor.
384
+ *
385
+ * @example
386
+ * There are many ways to pass plugins to `.use()`.
387
+ * This example gives an overview:
388
+ *
389
+ * ```js
390
+ * import {unified} from 'unified'
391
+ *
392
+ * unified()
393
+ * // Plugin with options:
394
+ * .use(pluginA, {x: true, y: true})
395
+ * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
396
+ * .use(pluginA, {y: false, z: true})
397
+ * // Plugins:
398
+ * .use([pluginB, pluginC])
399
+ * // Two plugins, the second with options:
400
+ * .use([pluginD, [pluginE, {}]])
401
+ * // Preset with plugins and settings:
402
+ * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
403
+ * // Settings only:
404
+ * .use({settings: {position: false}})
405
+ * ```
406
+ *
407
+ * @template {Array<unknown>} [Parameters=[]]
408
+ * @template {Node | string | undefined} [Input=undefined]
409
+ * @template [Output=Input]
410
+ *
411
+ * @overload
412
+ * @param {Preset | null | undefined} [preset]
413
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
414
+ *
415
+ * @overload
416
+ * @param {PluggableList} list
417
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
418
+ *
419
+ * @overload
420
+ * @param {Plugin<Parameters, Input, Output>} plugin
421
+ * @param {...(Parameters | [boolean])} parameters
422
+ * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
423
+ *
424
+ * @param {PluggableList | Plugin | Preset | null | undefined} value
425
+ * Usable value.
426
+ * @param {...unknown} parameters
427
+ * Parameters, when a plugin is given as a usable value.
428
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
429
+ * Current processor.
430
+ */
431
+ use(e, ...n) {
432
+ const t = this.attachers, i = this.namespace;
433
+ if (b("use", this.frozen), e != null) if (typeof e == "function")
434
+ l(e, n);
435
+ else if (typeof e == "object")
436
+ Array.isArray(e) ? p(e) : h(e);
437
+ else
438
+ throw new TypeError("Expected usable value, not `" + e + "`");
439
+ return this;
440
+ function a(s) {
441
+ if (typeof s == "function")
442
+ l(s, []);
443
+ else if (typeof s == "object")
444
+ if (Array.isArray(s)) {
445
+ const [o, ...c] = (
446
+ /** @type {PluginTuple<Array<unknown>>} */
447
+ s
448
+ );
449
+ l(o, c);
450
+ } else
451
+ h(s);
452
+ else
453
+ throw new TypeError("Expected usable value, not `" + s + "`");
454
+ }
455
+ function h(s) {
456
+ if (!("plugins" in s) && !("settings" in s))
457
+ throw new Error(
458
+ "Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither"
459
+ );
460
+ p(s.plugins), s.settings && (i.settings = y(!0, i.settings, s.settings));
461
+ }
462
+ function p(s) {
463
+ let o = -1;
464
+ if (s != null) if (Array.isArray(s))
465
+ for (; ++o < s.length; ) {
466
+ const c = s[o];
467
+ a(c);
468
+ }
469
+ else
470
+ throw new TypeError("Expected a list of plugins, not `" + s + "`");
471
+ }
472
+ function l(s, o) {
473
+ let c = -1, f = -1;
474
+ for (; ++c < t.length; )
475
+ if (t[c][0] === s) {
476
+ f = c;
477
+ break;
478
+ }
479
+ if (f === -1)
480
+ t.push([s, ...o]);
481
+ else if (o.length > 0) {
482
+ let [u, ...d] = o;
483
+ const E = t[f][1];
484
+ z(E) && z(u) && (u = y(!0, E, u)), t[f] = [s, u, ...d];
485
+ }
486
+ }
487
+ }
488
+ }
489
+ const R = new x().freeze();
490
+ function w(r, e) {
491
+ if (typeof e != "function")
492
+ throw new TypeError("Cannot `" + r + "` without `parser`");
493
+ }
494
+ function g(r, e) {
495
+ if (typeof e != "function")
496
+ throw new TypeError("Cannot `" + r + "` without `compiler`");
497
+ }
498
+ function b(r, e) {
499
+ if (e)
500
+ throw new Error(
501
+ "Cannot call `" + r + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
502
+ );
503
+ }
504
+ function I(r) {
505
+ if (!z(r) || typeof r.type != "string")
506
+ throw new TypeError("Expected node, got `" + r + "`");
507
+ }
508
+ function T(r, e, n) {
509
+ if (!n)
510
+ throw new Error(
511
+ "`" + r + "` finished async. Use `" + e + "` instead"
512
+ );
513
+ }
514
+ function m(r) {
515
+ return j(r) ? r : new S(r);
516
+ }
517
+ function j(r) {
518
+ return !!(r && typeof r == "object" && "message" in r && "messages" in r);
519
+ }
520
+ function D(r) {
521
+ return typeof r == "string" || L(r);
522
+ }
523
+ function L(r) {
524
+ return !!(r && typeof r == "object" && "byteLength" in r && "byteOffset" in r);
525
+ }
526
+ export {
527
+ x as Processor,
528
+ R as unified
529
+ };