@activecollab/components 2.0.409 → 2.0.411

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 (179) hide show
  1. package/dist/cjs/components/BreakPoints.js +12 -1
  2. package/dist/cjs/components/BreakPoints.js.map +1 -1
  3. package/dist/cjs/components/Columns/Columns.js +42 -0
  4. package/dist/cjs/components/Columns/Columns.js.map +1 -0
  5. package/dist/cjs/components/Columns/Styles.js +25 -0
  6. package/dist/cjs/components/Columns/Styles.js.map +1 -0
  7. package/dist/cjs/components/Columns/index.js +17 -0
  8. package/dist/cjs/components/Columns/index.js.map +1 -0
  9. package/dist/cjs/components/LayoutTokens.js +21 -0
  10. package/dist/cjs/components/LayoutTokens.js.map +1 -0
  11. package/dist/cjs/components/Media/Media.js +39 -0
  12. package/dist/cjs/components/Media/Media.js.map +1 -0
  13. package/dist/cjs/components/Media/Styles.js +18 -0
  14. package/dist/cjs/components/Media/Styles.js.map +1 -0
  15. package/dist/cjs/components/Media/index.js +17 -0
  16. package/dist/cjs/components/Media/index.js.map +1 -0
  17. package/dist/cjs/components/PortableText/PortableText.js +125 -0
  18. package/dist/cjs/components/PortableText/PortableText.js.map +1 -0
  19. package/dist/cjs/components/PortableText/Styles.js +33 -0
  20. package/dist/cjs/components/PortableText/Styles.js.map +1 -0
  21. package/dist/cjs/components/PortableText/index.js +39 -0
  22. package/dist/cjs/components/PortableText/index.js.map +1 -0
  23. package/dist/cjs/components/PortableText/renderers.js +136 -0
  24. package/dist/cjs/components/PortableText/renderers.js.map +1 -0
  25. package/dist/cjs/components/PortableText/types.js +122 -0
  26. package/dist/cjs/components/PortableText/types.js.map +1 -0
  27. package/dist/cjs/components/PortableText/types.test.js +194 -0
  28. package/dist/cjs/components/PortableText/types.test.js.map +1 -0
  29. package/dist/cjs/components/Row/Row.js +30 -0
  30. package/dist/cjs/components/Row/Row.js.map +1 -0
  31. package/dist/cjs/components/Row/Styles.js +25 -0
  32. package/dist/cjs/components/Row/Styles.js.map +1 -0
  33. package/dist/cjs/components/Row/index.js +17 -0
  34. package/dist/cjs/components/Row/index.js.map +1 -0
  35. package/dist/cjs/components/Stack/Stack.js +27 -0
  36. package/dist/cjs/components/Stack/Stack.js.map +1 -0
  37. package/dist/cjs/components/Stack/Styles.js +21 -0
  38. package/dist/cjs/components/Stack/Styles.js.map +1 -0
  39. package/dist/cjs/components/Stack/index.js +17 -0
  40. package/dist/cjs/components/Stack/index.js.map +1 -0
  41. package/dist/cjs/components/Tiles/Styles.js +25 -0
  42. package/dist/cjs/components/Tiles/Styles.js.map +1 -0
  43. package/dist/cjs/components/Tiles/Tiles.js +29 -0
  44. package/dist/cjs/components/Tiles/Tiles.js.map +1 -0
  45. package/dist/cjs/components/Tiles/index.js +17 -0
  46. package/dist/cjs/components/Tiles/index.js.map +1 -0
  47. package/dist/cjs/components/TitledText/Styles.js +15 -0
  48. package/dist/cjs/components/TitledText/Styles.js.map +1 -0
  49. package/dist/cjs/components/TitledText/TitledText.js +50 -0
  50. package/dist/cjs/components/TitledText/TitledText.js.map +1 -0
  51. package/dist/cjs/components/TitledText/index.js +17 -0
  52. package/dist/cjs/components/TitledText/index.js.map +1 -0
  53. package/dist/cjs/components/index.js +88 -0
  54. package/dist/cjs/components/index.js.map +1 -1
  55. package/dist/cjs/presentation/shared/MessageDialog.js +351 -0
  56. package/dist/cjs/presentation/shared/MessageDialog.js.map +1 -0
  57. package/dist/cjs/presentation/shared/index.js +22 -0
  58. package/dist/cjs/presentation/shared/index.js.map +1 -1
  59. package/dist/esm/components/BreakPoints.d.ts +2 -0
  60. package/dist/esm/components/BreakPoints.d.ts.map +1 -1
  61. package/dist/esm/components/BreakPoints.js +9 -0
  62. package/dist/esm/components/BreakPoints.js.map +1 -1
  63. package/dist/esm/components/Columns/Columns.d.ts +11 -0
  64. package/dist/esm/components/Columns/Columns.d.ts.map +1 -0
  65. package/dist/esm/components/Columns/Columns.js +34 -0
  66. package/dist/esm/components/Columns/Columns.js.map +1 -0
  67. package/dist/esm/components/Columns/Styles.d.ts +8 -0
  68. package/dist/esm/components/Columns/Styles.d.ts.map +1 -0
  69. package/dist/esm/components/Columns/Styles.js +18 -0
  70. package/dist/esm/components/Columns/Styles.js.map +1 -0
  71. package/dist/esm/components/Columns/index.d.ts +2 -0
  72. package/dist/esm/components/Columns/index.d.ts.map +1 -0
  73. package/dist/esm/components/Columns/index.js +2 -0
  74. package/dist/esm/components/Columns/index.js.map +1 -0
  75. package/dist/esm/components/LayoutTokens.d.ts +6 -0
  76. package/dist/esm/components/LayoutTokens.d.ts.map +1 -0
  77. package/dist/esm/components/LayoutTokens.js +15 -0
  78. package/dist/esm/components/LayoutTokens.js.map +1 -0
  79. package/dist/esm/components/Media/Media.d.ts +10 -0
  80. package/dist/esm/components/Media/Media.d.ts.map +1 -0
  81. package/dist/esm/components/Media/Media.js +31 -0
  82. package/dist/esm/components/Media/Media.js.map +1 -0
  83. package/dist/esm/components/Media/Styles.d.ts +4 -0
  84. package/dist/esm/components/Media/Styles.d.ts.map +1 -0
  85. package/dist/esm/components/Media/Styles.js +11 -0
  86. package/dist/esm/components/Media/Styles.js.map +1 -0
  87. package/dist/esm/components/Media/index.d.ts +2 -0
  88. package/dist/esm/components/Media/index.d.ts.map +1 -0
  89. package/dist/esm/components/Media/index.js +2 -0
  90. package/dist/esm/components/Media/index.js.map +1 -0
  91. package/dist/esm/components/PortableText/PortableText.d.ts +24 -0
  92. package/dist/esm/components/PortableText/PortableText.d.ts.map +1 -0
  93. package/dist/esm/components/PortableText/PortableText.js +111 -0
  94. package/dist/esm/components/PortableText/PortableText.js.map +1 -0
  95. package/dist/esm/components/PortableText/Styles.d.ts +9 -0
  96. package/dist/esm/components/PortableText/Styles.d.ts.map +1 -0
  97. package/dist/esm/components/PortableText/Styles.js +27 -0
  98. package/dist/esm/components/PortableText/Styles.js.map +1 -0
  99. package/dist/esm/components/PortableText/index.d.ts +4 -0
  100. package/dist/esm/components/PortableText/index.d.ts.map +1 -0
  101. package/dist/esm/components/PortableText/index.js +4 -0
  102. package/dist/esm/components/PortableText/index.js.map +1 -0
  103. package/dist/esm/components/PortableText/renderers.d.ts +9 -0
  104. package/dist/esm/components/PortableText/renderers.d.ts.map +1 -0
  105. package/dist/esm/components/PortableText/renderers.js +130 -0
  106. package/dist/esm/components/PortableText/renderers.js.map +1 -0
  107. package/dist/esm/components/PortableText/types.d.ts +141 -0
  108. package/dist/esm/components/PortableText/types.d.ts.map +1 -0
  109. package/dist/esm/components/PortableText/types.js +106 -0
  110. package/dist/esm/components/PortableText/types.js.map +1 -0
  111. package/dist/esm/components/PortableText/types.test.d.ts +2 -0
  112. package/dist/esm/components/PortableText/types.test.d.ts.map +1 -0
  113. package/dist/esm/components/PortableText/types.test.js +192 -0
  114. package/dist/esm/components/PortableText/types.test.js.map +1 -0
  115. package/dist/esm/components/Row/Row.d.ts +10 -0
  116. package/dist/esm/components/Row/Row.d.ts.map +1 -0
  117. package/dist/esm/components/Row/Row.js +22 -0
  118. package/dist/esm/components/Row/Row.js.map +1 -0
  119. package/dist/esm/components/Row/Styles.d.ts +8 -0
  120. package/dist/esm/components/Row/Styles.d.ts.map +1 -0
  121. package/dist/esm/components/Row/Styles.js +18 -0
  122. package/dist/esm/components/Row/Styles.js.map +1 -0
  123. package/dist/esm/components/Row/index.d.ts +2 -0
  124. package/dist/esm/components/Row/index.d.ts.map +1 -0
  125. package/dist/esm/components/Row/index.js +2 -0
  126. package/dist/esm/components/Row/index.js.map +1 -0
  127. package/dist/esm/components/Stack/Stack.d.ts +8 -0
  128. package/dist/esm/components/Stack/Stack.d.ts.map +1 -0
  129. package/dist/esm/components/Stack/Stack.js +19 -0
  130. package/dist/esm/components/Stack/Stack.js.map +1 -0
  131. package/dist/esm/components/Stack/Styles.d.ts +6 -0
  132. package/dist/esm/components/Stack/Styles.d.ts.map +1 -0
  133. package/dist/esm/components/Stack/Styles.js +14 -0
  134. package/dist/esm/components/Stack/Styles.js.map +1 -0
  135. package/dist/esm/components/Stack/index.d.ts +2 -0
  136. package/dist/esm/components/Stack/index.d.ts.map +1 -0
  137. package/dist/esm/components/Stack/index.js +2 -0
  138. package/dist/esm/components/Stack/index.js.map +1 -0
  139. package/dist/esm/components/Tiles/Styles.d.ts +8 -0
  140. package/dist/esm/components/Tiles/Styles.d.ts.map +1 -0
  141. package/dist/esm/components/Tiles/Styles.js +18 -0
  142. package/dist/esm/components/Tiles/Styles.js.map +1 -0
  143. package/dist/esm/components/Tiles/Tiles.d.ts +10 -0
  144. package/dist/esm/components/Tiles/Tiles.d.ts.map +1 -0
  145. package/dist/esm/components/Tiles/Tiles.js +21 -0
  146. package/dist/esm/components/Tiles/Tiles.js.map +1 -0
  147. package/dist/esm/components/Tiles/index.d.ts +2 -0
  148. package/dist/esm/components/Tiles/index.d.ts.map +1 -0
  149. package/dist/esm/components/Tiles/index.js +2 -0
  150. package/dist/esm/components/Tiles/index.js.map +1 -0
  151. package/dist/esm/components/TitledText/Styles.d.ts +2 -0
  152. package/dist/esm/components/TitledText/Styles.d.ts.map +1 -0
  153. package/dist/esm/components/TitledText/Styles.js +8 -0
  154. package/dist/esm/components/TitledText/Styles.js.map +1 -0
  155. package/dist/esm/components/TitledText/TitledText.d.ts +18 -0
  156. package/dist/esm/components/TitledText/TitledText.d.ts.map +1 -0
  157. package/dist/esm/components/TitledText/TitledText.js +43 -0
  158. package/dist/esm/components/TitledText/TitledText.js.map +1 -0
  159. package/dist/esm/components/TitledText/index.d.ts +2 -0
  160. package/dist/esm/components/TitledText/index.d.ts.map +1 -0
  161. package/dist/esm/components/TitledText/index.js +2 -0
  162. package/dist/esm/components/TitledText/index.js.map +1 -0
  163. package/dist/esm/components/index.d.ts +8 -0
  164. package/dist/esm/components/index.d.ts.map +1 -1
  165. package/dist/esm/components/index.js +8 -0
  166. package/dist/esm/components/index.js.map +1 -1
  167. package/dist/esm/presentation/shared/MessageDialog.d.ts +35 -0
  168. package/dist/esm/presentation/shared/MessageDialog.d.ts.map +1 -0
  169. package/dist/esm/presentation/shared/MessageDialog.js +331 -0
  170. package/dist/esm/presentation/shared/MessageDialog.js.map +1 -0
  171. package/dist/esm/presentation/shared/index.d.ts +2 -0
  172. package/dist/esm/presentation/shared/index.d.ts.map +1 -1
  173. package/dist/esm/presentation/shared/index.js +1 -0
  174. package/dist/esm/presentation/shared/index.js.map +1 -1
  175. package/dist/index.js +1375 -742
  176. package/dist/index.js.map +1 -1
  177. package/dist/index.min.js +1 -1
  178. package/dist/index.min.js.map +1 -1
  179. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Styles.js","names":["styled","css","screenBelow","FLEX_ALIGN","SPACE","StyledColumns","div","withConfig","displayName","componentId","_ref","$alignY","_ref2","$space","_ref3","$collapse"],"sources":["../../../../src/components/Columns/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { Breakpoint, screenBelow } from \"../BreakPoints\";\nimport { Align, FLEX_ALIGN, Space, SPACE } from \"../LayoutTokens\";\n\nexport const StyledColumns = styled.div<{\n $space: Space;\n $alignY: Align;\n $collapse?: Breakpoint;\n}>`\n display: flex;\n flex-direction: row;\n align-items: ${({ $alignY }) => FLEX_ALIGN[$alignY]};\n gap: ${({ $space }) => SPACE[$space]};\n\n > .c-columns-col {\n min-width: 0;\n }\n\n ${({ $collapse }) =>\n $collapse &&\n css`\n ${screenBelow[$collapse]} {\n flex-direction: column;\n align-items: stretch;\n\n /* The column flex weight is an inline style, so it needs the override. */\n > .c-columns-col {\n flex: 0 0 auto !important;\n width: 100%;\n }\n }\n `}\n`;\n\nStyledColumns.displayName = \"StyledColumns\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAAqBC,WAAW,QAAQ,gBAAgB;AACxD,SAAgBC,UAAU,EAASC,KAAK,QAAQ,iBAAiB;AAEjE,OAAO,MAAMC,aAAa,GAAGL,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qGAOtBC,IAAA;EAAA,IAAGC,OAAO,GAAAD,IAAA,CAAPC,OAAO;EAAA,OAAOR,UAAU,CAACQ,OAAO,CAAC;AAAA,GAC5CC,KAAA;EAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;EAAA,OAAOT,KAAK,CAACS,MAAM,CAAC;AAAA,GAMlCC,KAAA;EAAA,IAAGC,SAAS,GAAAD,KAAA,CAATC,SAAS;EAAA,OACZA,SAAS,IACTd,GAAG,6GACCC,WAAW,CAACa,SAAS,CAAC,CAUzB;AAAA,EACJ;AAEDV,aAAa,CAACG,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./Columns";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Columns/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./Columns";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Columns/index.ts"],"sourcesContent":["export * from \"./Columns\";\n"],"mappings":"AAAA,cAAc,WAAW","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ export type { Breakpoint } from "./BreakPoints";
2
+ export type Space = "none" | "xs" | "sm" | "md" | "lg" | "xl";
3
+ export declare const SPACE: Record<Space, string>;
4
+ export type Align = "start" | "center" | "end" | "stretch";
5
+ export declare const FLEX_ALIGN: Record<Align, string>;
6
+ //# sourceMappingURL=LayoutTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutTokens.d.ts","sourceRoot":"","sources":["../../../src/components/LayoutTokens.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9D,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOvC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAE3D,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAK5C,CAAC"}
@@ -0,0 +1,15 @@
1
+ export const SPACE = {
2
+ none: "0",
3
+ xs: "0.25rem",
4
+ sm: "0.5rem",
5
+ md: "1rem",
6
+ lg: "1.5rem",
7
+ xl: "2.5rem"
8
+ };
9
+ export const FLEX_ALIGN = {
10
+ start: "flex-start",
11
+ center: "center",
12
+ end: "flex-end",
13
+ stretch: "stretch"
14
+ };
15
+ //# sourceMappingURL=LayoutTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutTokens.js","names":["SPACE","none","xs","sm","md","lg","xl","FLEX_ALIGN","start","center","end","stretch"],"sources":["../../../src/components/LayoutTokens.ts"],"sourcesContent":["import { theme } from \"twin.macro\";\n\nexport type { Breakpoint } from \"./BreakPoints\";\n\nexport type Space = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nexport const SPACE: Record<Space, string> = {\n none: \"0\",\n xs: theme(\"spacing.1\"),\n sm: theme(\"spacing.2\"),\n md: theme(\"spacing.4\"),\n lg: theme(\"spacing.6\"),\n xl: theme(\"spacing.10\"),\n};\n\nexport type Align = \"start\" | \"center\" | \"end\" | \"stretch\";\n\nexport const FLEX_ALIGN: Record<Align, string> = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n stretch: \"stretch\",\n};\n"],"mappings":"AAMA,OAAO,MAAMA,KAA4B,GAAG;EAC1CC,IAAI,EAAE,GAAG;EACTC,EAAE,EAAE,SAAkB;EACtBC,EAAE,EAAE,QAAkB;EACtBC,EAAE,EAAE,MAAkB;EACtBC,EAAE,EAAE,QAAkB;EACtBC,EAAE,EAAE;AACN,CAAC;AAID,OAAO,MAAMC,UAAiC,GAAG;EAC/CC,KAAK,EAAE,YAAY;EACnBC,MAAM,EAAE,QAAQ;EAChBC,GAAG,EAAE,UAAU;EACfC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { PortableTextMediaBlock } from "../PortableText/types";
3
+ export interface IMediaProps extends Omit<PortableTextMediaBlock, "type">, React.ComponentPropsWithoutRef<"div"> {
4
+ }
5
+ /**
6
+ * An image block: a screenshot renders framed (border, no shadow), a flat
7
+ * illustration renders without a frame. The caption sits below the frame.
8
+ */
9
+ export declare const Media: React.ForwardRefExoticComponent<IMediaProps & React.RefAttributes<HTMLDivElement>>;
10
+ //# sourceMappingURL=Media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Media.d.ts","sourceRoot":"","sources":["../../../../src/components/Media/Media.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAG/D,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC,EAC1C,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAE5C;;;GAGG;AACH,eAAO,MAAM,KAAK,oFASjB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["src", "alt", "variant", "caption"];
4
+ import React, { forwardRef } from "react";
5
+ import { StyledMedia } from "./Styles";
6
+ import { Caption1 } from "../Typography";
7
+ /**
8
+ * An image block: a screenshot renders framed (border, no shadow), a flat
9
+ * illustration renders without a frame. The caption sits below the frame.
10
+ */
11
+ export const Media = /*#__PURE__*/forwardRef((_ref, ref) => {
12
+ let src = _ref.src,
13
+ alt = _ref.alt,
14
+ _ref$variant = _ref.variant,
15
+ variant = _ref$variant === void 0 ? "illustration" : _ref$variant,
16
+ caption = _ref.caption,
17
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
18
+ return /*#__PURE__*/React.createElement(StyledMedia, _extends({
19
+ ref: ref,
20
+ $bordered: variant === "screenshot"
21
+ }, rest), /*#__PURE__*/React.createElement("div", {
22
+ className: "c-media-frame"
23
+ }, /*#__PURE__*/React.createElement("img", {
24
+ src: src,
25
+ alt: alt != null ? alt : ""
26
+ })), caption ? /*#__PURE__*/React.createElement(Caption1, {
27
+ color: "secondary"
28
+ }, caption) : null);
29
+ });
30
+ Media.displayName = "Media";
31
+ //# sourceMappingURL=Media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Media.js","names":["React","forwardRef","StyledMedia","Caption1","Media","_ref","ref","src","alt","_ref$variant","variant","caption","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","$bordered","className","color","displayName"],"sources":["../../../../src/components/Media/Media.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { StyledMedia } from \"./Styles\";\nimport { PortableTextMediaBlock } from \"../PortableText/types\";\nimport { Caption1 } from \"../Typography\";\n\nexport interface IMediaProps\n extends Omit<PortableTextMediaBlock, \"type\">,\n React.ComponentPropsWithoutRef<\"div\"> {}\n\n/**\n * An image block: a screenshot renders framed (border, no shadow), a flat\n * illustration renders without a frame. The caption sits below the frame.\n */\nexport const Media = forwardRef<HTMLDivElement, IMediaProps>(\n ({ src, alt, variant = \"illustration\", caption, ...rest }, ref) => (\n <StyledMedia ref={ref} $bordered={variant === \"screenshot\"} {...rest}>\n <div className=\"c-media-frame\">\n <img src={src} alt={alt ?? \"\"} />\n </div>\n {caption ? <Caption1 color=\"secondary\">{caption}</Caption1> : null}\n </StyledMedia>\n )\n);\n\nMedia.displayName = \"Media\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAEzC,SAASC,WAAW,QAAQ,UAAU;AAEtC,SAASC,QAAQ,QAAQ,eAAe;AAMxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,gBAAGH,UAAU,CAC7B,CAAAI,IAAA,EAA2DC,GAAG;EAAA,IAA3DC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IAAEC,GAAG,GAAAH,IAAA,CAAHG,GAAG;IAAAC,YAAA,GAAAJ,IAAA,CAAEK,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,cAAc,GAAAA,YAAA;IAAEE,OAAO,GAAAN,IAAA,CAAPM,OAAO;IAAKC,IAAI,GAAAC,6BAAA,CAAAR,IAAA,EAAAS,SAAA;EAAA,oBACrDd,KAAA,CAAAe,aAAA,CAACb,WAAW,EAAAc,QAAA;IAACV,GAAG,EAAEA,GAAI;IAACW,SAAS,EAAEP,OAAO,KAAK;EAAa,GAAKE,IAAI,gBAClEZ,KAAA,CAAAe,aAAA;IAAKG,SAAS,EAAC;EAAe,gBAC5BlB,KAAA,CAAAe,aAAA;IAAKR,GAAG,EAAEA,GAAI;IAACC,GAAG,EAAEA,GAAG,WAAHA,GAAG,GAAI;EAAG,CAAE,CAC7B,CAAC,EACLG,OAAO,gBAAGX,KAAA,CAAAe,aAAA,CAACZ,QAAQ;IAACgB,KAAK,EAAC;EAAW,GAAER,OAAkB,CAAC,GAAG,IACnD,CAAC;AAAA,CAElB,CAAC;AAEDP,KAAK,CAACgB,WAAW,GAAG,OAAO","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export declare const StyledMedia: import("styled-components").StyledComponent<"div", any, {
2
+ $bordered: boolean;
3
+ }, never>;
4
+ //# sourceMappingURL=Styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Media/Styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW;eAA2B,OAAO;SAqBzD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import styled, { css } from "styled-components";
2
+ import { SPACE } from "../LayoutTokens";
3
+ export const StyledMedia = styled.div.withConfig({
4
+ displayName: "Styles__StyledMedia",
5
+ componentId: "sc-zjz7mh-0"
6
+ })(["display:flex;flex-direction:column;gap:", ";width:100%;.c-media-frame{", "}.c-media-frame img{display:block;width:100%;height:auto;}"], SPACE.sm, _ref => {
7
+ let $bordered = _ref.$bordered;
8
+ return $bordered && css(["overflow:hidden;border:1px solid var(--border-primary);border-radius:", ";"], "0.5rem");
9
+ });
10
+ StyledMedia.displayName = "StyledMedia";
11
+ //# sourceMappingURL=Styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Styles.js","names":["styled","css","SPACE","StyledMedia","div","withConfig","displayName","componentId","sm","_ref","$bordered"],"sources":["../../../../src/components/Media/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { theme } from \"twin.macro\";\n\nimport { SPACE } from \"../LayoutTokens\";\n\nexport const StyledMedia = styled.div<{ $bordered: boolean }>`\n display: flex;\n flex-direction: column;\n gap: ${SPACE.sm};\n width: 100%;\n\n .c-media-frame {\n ${({ $bordered }) =>\n $bordered &&\n css`\n overflow: hidden;\n border: 1px solid var(--border-primary);\n border-radius: ${theme(\"borderRadius.lg\")};\n `}\n }\n\n .c-media-frame img {\n display: block;\n width: 100%;\n height: auto;\n }\n`;\n\nStyledMedia.displayName = \"StyledMedia\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAG/C,SAASC,KAAK,QAAQ,iBAAiB;AAEvC,OAAO,MAAMC,WAAW,GAAGH,MAAM,CAACI,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,6IAG5BL,KAAK,CAACM,EAAE,EAIXC,IAAA;EAAA,IAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;EAAA,OACZA,SAAS,IACTT,GAAG,iFAGgB,QAAwB,CAC1C;AAAA,EAQN;AAEDE,WAAW,CAACG,WAAW,GAAG,aAAa","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./Media";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Media/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./Media";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Media/index.ts"],"sourcesContent":["export * from \"./Media\";\n"],"mappings":"AAAA,cAAc,SAAS","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { PortableTextComponents, PortableTextContent } from "./types";
3
+ import { Space } from "../LayoutTokens";
4
+ export interface IPortableTextProps extends Omit<React.ComponentPropsWithoutRef<"div">, "content"> {
5
+ /** The message body: the node list an API returns under `content`. */
6
+ content: PortableTextContent;
7
+ /**
8
+ * Application-injected renderers: catalog marks and objects, optional
9
+ * default-block overrides, and the unknown-type hook. See README.md.
10
+ */
11
+ components?: PortableTextComponents;
12
+ /** Vertical rhythm between top-level nodes. */
13
+ space?: Space;
14
+ }
15
+ /**
16
+ * The Portable Text engine: walks a {@link PortableTextContent} envelope and
17
+ * renders it with the default renderers for the universal set, plus whatever
18
+ * the application injects through `components`. The engine itself is hollow —
19
+ * it knows no product element; an unknown block or object renders nothing and
20
+ * is reported once per type through `onUnknownType` (console.warn when the
21
+ * hook is absent).
22
+ */
23
+ export declare const PortableText: React.ForwardRefExoticComponent<IPortableTextProps & React.RefAttributes<HTMLDivElement>>;
24
+ //# sourceMappingURL=PortableText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortableText.d.ts","sourceRoot":"","sources":["../../../../src/components/PortableText/PortableText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,OAAO,EAML,sBAAsB,EACtB,mBAAmB,EAOpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGxC,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC9D,sEAAsE;IACtE,OAAO,EAAE,mBAAmB,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAsHD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,2FAsBxB,CAAC"}
@@ -0,0 +1,111 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["content", "components", "space"];
4
+ import React, { Fragment, forwardRef, useMemo } from "react";
5
+ import { portableTextDefaultBlockRenderers, portableTextDefaultMarkRenderers } from "./renderers";
6
+ import { isPortableTextBlock, isPortableTextContent, isPortableTextObjectNode, isPortableTextSpan } from "./types";
7
+ import { Stack } from "../Stack";
8
+ const defaultUnknownTypeHandler = (kind, type) => {
9
+ console.warn("PortableText: no renderer for " + kind + " type \"" + type + "\".");
10
+ };
11
+
12
+ /**
13
+ * A span's marks wrap its text inside out. An unknown mark is reported and
14
+ * skipped — the text stays, because dropping a word would break the sentence.
15
+ */
16
+ const renderSpan = (span, ctx) => {
17
+ var _span$marks;
18
+ return ((_span$marks = span.marks) != null ? _span$marks : []).reduce((children, mark) => {
19
+ var _ctx$components$marks, _ctx$components;
20
+ const type = typeof mark === "string" ? mark : mark.type;
21
+ const Renderer = (_ctx$components$marks = (_ctx$components = ctx.components) == null || (_ctx$components = _ctx$components.marks) == null ? void 0 : _ctx$components[type]) != null ? _ctx$components$marks : portableTextDefaultMarkRenderers[type];
22
+ if (!Renderer) {
23
+ ctx.report("mark", type);
24
+ return children;
25
+ }
26
+ return /*#__PURE__*/React.createElement(Renderer, {
27
+ mark: typeof mark === "string" ? undefined : mark
28
+ }, children);
29
+ }, span.text);
30
+ };
31
+
32
+ /**
33
+ * Traversal is structural, so the walker keeps no list of block types of its
34
+ * own: a `children` array holds spans or nested blocks, a nested `content`
35
+ * holds a node list, and anything else has no children to render.
36
+ */
37
+ const renderBlockChildren = (block, ctx) => {
38
+ const _ref = block,
39
+ children = _ref.children,
40
+ content = _ref.content;
41
+ if (Array.isArray(children)) {
42
+ return children.map((child, index) => /*#__PURE__*/React.createElement(Fragment, {
43
+ key: index
44
+ }, isPortableTextSpan(child) ? renderSpan(child, ctx) : isPortableTextBlock(child) ? renderBlock(child, ctx) : null));
45
+ }
46
+ return isPortableTextContent(content) ? renderNodes(content, ctx) : undefined;
47
+ };
48
+ const renderBlock = (block, ctx) => {
49
+ var _ctx$components$block, _ctx$components2;
50
+ const type = block.type;
51
+ const Renderer = (_ctx$components$block = (_ctx$components2 = ctx.components) == null || (_ctx$components2 = _ctx$components2.blocks) == null ? void 0 : _ctx$components2[type]) != null ? _ctx$components$block : portableTextDefaultBlockRenderers[type];
52
+ if (!Renderer) {
53
+ ctx.report("block", block.type);
54
+ return null;
55
+ }
56
+ return /*#__PURE__*/React.createElement(Renderer, {
57
+ block: block
58
+ }, renderBlockChildren(block, ctx));
59
+ };
60
+ const renderObject = (node, ctx) => {
61
+ var _ctx$components3;
62
+ const Renderer = (_ctx$components3 = ctx.components) == null || (_ctx$components3 = _ctx$components3.objects) == null ? void 0 : _ctx$components3[node._type];
63
+ if (!Renderer) {
64
+ ctx.report("object", node._type);
65
+ return null;
66
+ }
67
+ return /*#__PURE__*/React.createElement(Renderer, {
68
+ node: node
69
+ }, isPortableTextContent(node.content) ? renderNodes(node.content, ctx) : undefined);
70
+ };
71
+ const renderNodes = (nodes, ctx) => nodes.map((node, index) => /*#__PURE__*/React.createElement(Fragment, {
72
+ key: index
73
+ }, isPortableTextObjectNode(node) ? renderObject(node, ctx) : renderBlock(node, ctx)));
74
+
75
+ /**
76
+ * The Portable Text engine: walks a {@link PortableTextContent} envelope and
77
+ * renders it with the default renderers for the universal set, plus whatever
78
+ * the application injects through `components`. The engine itself is hollow —
79
+ * it knows no product element; an unknown block or object renders nothing and
80
+ * is reported once per type through `onUnknownType` (console.warn when the
81
+ * hook is absent).
82
+ */
83
+ export const PortableText = /*#__PURE__*/forwardRef((_ref2, ref) => {
84
+ let content = _ref2.content,
85
+ components = _ref2.components,
86
+ _ref2$space = _ref2.space,
87
+ space = _ref2$space === void 0 ? "md" : _ref2$space,
88
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
89
+ // Memoized so unknown types are reported once per type for a given
90
+ // content/components pair, not again on every parent re-render.
91
+ const nodes = useMemo(() => {
92
+ const reported = new Set();
93
+ const report = (kind, type) => {
94
+ var _components$onUnknown;
95
+ const key = kind + ":" + type;
96
+ if (reported.has(key)) return;
97
+ reported.add(key);
98
+ ((_components$onUnknown = components == null ? void 0 : components.onUnknownType) != null ? _components$onUnknown : defaultUnknownTypeHandler)(kind, type);
99
+ };
100
+ return renderNodes(content, {
101
+ components,
102
+ report
103
+ });
104
+ }, [content, components]);
105
+ return /*#__PURE__*/React.createElement(Stack, _extends({
106
+ ref: ref,
107
+ space: space
108
+ }, rest), nodes);
109
+ });
110
+ PortableText.displayName = "PortableText";
111
+ //# sourceMappingURL=PortableText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortableText.js","names":["React","Fragment","forwardRef","useMemo","portableTextDefaultBlockRenderers","portableTextDefaultMarkRenderers","isPortableTextBlock","isPortableTextContent","isPortableTextObjectNode","isPortableTextSpan","Stack","defaultUnknownTypeHandler","kind","type","console","warn","renderSpan","span","ctx","_span$marks","marks","reduce","children","mark","_ctx$components$marks","_ctx$components","Renderer","components","report","createElement","undefined","text","renderBlockChildren","block","_ref","content","Array","isArray","map","child","index","key","renderBlock","renderNodes","_ctx$components$block","_ctx$components2","blocks","renderObject","node","_ctx$components3","objects","_type","nodes","PortableText","_ref2","ref","_ref2$space","space","rest","_objectWithoutPropertiesLoose","_excluded","reported","Set","_components$onUnknown","has","add","onUnknownType","_extends","displayName"],"sources":["../../../../src/components/PortableText/PortableText.tsx"],"sourcesContent":["import React, { Fragment, ReactNode, forwardRef, useMemo } from \"react\";\n\nimport {\n portableTextDefaultBlockRenderers,\n portableTextDefaultMarkRenderers,\n} from \"./renderers\";\nimport {\n isPortableTextBlock,\n isPortableTextContent,\n isPortableTextObjectNode,\n isPortableTextSpan,\n PortableTextBlock,\n PortableTextComponents,\n PortableTextContent,\n PortableTextDefaultBlockType,\n PortableTextDefaultMark,\n PortableTextListItemBlock,\n PortableTextObjectNode,\n PortableTextSpan,\n PortableTextUnknownTypeHandler,\n} from \"./types\";\nimport { Space } from \"../LayoutTokens\";\nimport { Stack } from \"../Stack\";\n\nexport interface IPortableTextProps\n extends Omit<React.ComponentPropsWithoutRef<\"div\">, \"content\"> {\n /** The message body: the node list an API returns under `content`. */\n content: PortableTextContent;\n /**\n * Application-injected renderers: catalog marks and objects, optional\n * default-block overrides, and the unknown-type hook. See README.md.\n */\n components?: PortableTextComponents;\n /** Vertical rhythm between top-level nodes. */\n space?: Space;\n}\n\ninterface IWalkContext {\n components?: PortableTextComponents;\n report: PortableTextUnknownTypeHandler;\n}\n\nconst defaultUnknownTypeHandler: PortableTextUnknownTypeHandler = (\n kind,\n type\n) => {\n console.warn(`PortableText: no renderer for ${kind} type \"${type}\".`);\n};\n\n/**\n * A span's marks wrap its text inside out. An unknown mark is reported and\n * skipped — the text stays, because dropping a word would break the sentence.\n */\nconst renderSpan = (span: PortableTextSpan, ctx: IWalkContext): ReactNode =>\n (span.marks ?? []).reduce<ReactNode>((children, mark) => {\n const type = typeof mark === \"string\" ? mark : mark.type;\n const Renderer =\n ctx.components?.marks?.[type] ??\n portableTextDefaultMarkRenderers[type as PortableTextDefaultMark];\n\n if (!Renderer) {\n ctx.report(\"mark\", type);\n return children;\n }\n\n return (\n <Renderer mark={typeof mark === \"string\" ? undefined : mark}>\n {children}\n </Renderer>\n );\n }, span.text);\n\n/**\n * Traversal is structural, so the walker keeps no list of block types of its\n * own: a `children` array holds spans or nested blocks, a nested `content`\n * holds a node list, and anything else has no children to render.\n */\nconst renderBlockChildren = (\n block: PortableTextBlock | PortableTextListItemBlock,\n ctx: IWalkContext\n): ReactNode => {\n const { children, content } = block as {\n children?: unknown;\n content?: unknown;\n };\n\n if (Array.isArray(children)) {\n return children.map((child, index) => (\n <Fragment key={index}>\n {isPortableTextSpan(child)\n ? renderSpan(child, ctx)\n : isPortableTextBlock(child)\n ? renderBlock(child, ctx)\n : null}\n </Fragment>\n ));\n }\n\n return isPortableTextContent(content) ? renderNodes(content, ctx) : undefined;\n};\n\nconst renderBlock = (\n block: PortableTextBlock | PortableTextListItemBlock,\n ctx: IWalkContext\n): ReactNode => {\n const type = block.type as PortableTextDefaultBlockType;\n const Renderer =\n ctx.components?.blocks?.[type] ?? portableTextDefaultBlockRenderers[type];\n\n if (!Renderer) {\n ctx.report(\"block\", block.type);\n return null;\n }\n\n return (\n <Renderer block={block as PortableTextBlock}>\n {renderBlockChildren(block, ctx)}\n </Renderer>\n );\n};\n\nconst renderObject = (\n node: PortableTextObjectNode,\n ctx: IWalkContext\n): ReactNode => {\n const Renderer = ctx.components?.objects?.[node._type];\n\n if (!Renderer) {\n ctx.report(\"object\", node._type);\n return null;\n }\n\n return (\n <Renderer node={node}>\n {isPortableTextContent(node.content)\n ? renderNodes(node.content, ctx)\n : undefined}\n </Renderer>\n );\n};\n\nconst renderNodes = (\n nodes: PortableTextContent,\n ctx: IWalkContext\n): ReactNode =>\n nodes.map((node, index) => (\n <Fragment key={index}>\n {isPortableTextObjectNode(node)\n ? renderObject(node, ctx)\n : renderBlock(node, ctx)}\n </Fragment>\n ));\n\n/**\n * The Portable Text engine: walks a {@link PortableTextContent} envelope and\n * renders it with the default renderers for the universal set, plus whatever\n * the application injects through `components`. The engine itself is hollow —\n * it knows no product element; an unknown block or object renders nothing and\n * is reported once per type through `onUnknownType` (console.warn when the\n * hook is absent).\n */\nexport const PortableText = forwardRef<HTMLDivElement, IPortableTextProps>(\n ({ content, components, space = \"md\", ...rest }, ref) => {\n // Memoized so unknown types are reported once per type for a given\n // content/components pair, not again on every parent re-render.\n const nodes = useMemo(() => {\n const reported = new Set<string>();\n const report: PortableTextUnknownTypeHandler = (kind, type) => {\n const key = `${kind}:${type}`;\n if (reported.has(key)) return;\n reported.add(key);\n (components?.onUnknownType ?? defaultUnknownTypeHandler)(kind, type);\n };\n\n return renderNodes(content, { components, report });\n }, [content, components]);\n\n return (\n <Stack ref={ref} space={space} {...rest}>\n {nodes}\n </Stack>\n );\n }\n);\n\nPortableText.displayName = \"PortableText\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAaC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAEvE,SACEC,iCAAiC,EACjCC,gCAAgC,QAC3B,aAAa;AACpB,SACEC,mBAAmB,EACnBC,qBAAqB,EACrBC,wBAAwB,EACxBC,kBAAkB,QAUb,SAAS;AAEhB,SAASC,KAAK,QAAQ,UAAU;AAoBhC,MAAMC,yBAAyD,GAAGA,CAChEC,IAAI,EACJC,IAAI,KACD;EACHC,OAAO,CAACC,IAAI,oCAAkCH,IAAI,gBAAUC,IAAI,QAAI,CAAC;AACvE,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMG,UAAU,GAAGA,CAACC,IAAsB,EAAEC,GAAiB;EAAA,IAAAC,WAAA;EAAA,OAC3D,EAAAA,WAAA,GAACF,IAAI,CAACG,KAAK,YAAAD,WAAA,GAAI,EAAE,EAAEE,MAAM,CAAY,CAACC,QAAQ,EAAEC,IAAI,KAAK;IAAA,IAAAC,qBAAA,EAAAC,eAAA;IACvD,MAAMZ,IAAI,GAAG,OAAOU,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAGA,IAAI,CAACV,IAAI;IACxD,MAAMa,QAAQ,IAAAF,qBAAA,IAAAC,eAAA,G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,aAAA,CAACnB,KAAK,EAAAyD,QAAA;IAACZ,GAAG,EAAEA,GAAI;IAACE,KAAK,EAAEA;EAAM,GAAKC,IAAI,GACpCN,KACI,CAAC;AAEZ,CACF,CAAC;AAEDC,YAAY,CAACe,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ /** The default `code` mark: a quiet inline chip that keeps the line intact. */
2
+ export declare const StyledCode: import("styled-components").StyledComponent<"code", any, {}, never>;
3
+ /** The default `link` mark: an inline text link inside flowing content. */
4
+ export declare const StyledLink: import("styled-components").StyledComponent<"a", any, {}, never>;
5
+ /** The default `list` block; rendered as ul or ol through the `as` prop. */
6
+ export declare const StyledList: import("styled-components").StyledComponent<"ul", any, {
7
+ $ordered: boolean;
8
+ }, never>;
9
+ //# sourceMappingURL=Styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/PortableText/Styles.ts"],"names":[],"mappings":"AAKA,+EAA+E;AAC/E,eAAO,MAAM,UAAU,qEAMtB,CAAC;AAIF,2EAA2E;AAC3E,eAAO,MAAM,UAAU,kEAQtB,CAAC;AAIF,4EAA4E;AAC5E,eAAO,MAAM,UAAU;cAAyB,OAAO;SAQtD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import styled from "styled-components";
2
+ import { SPACE } from "../LayoutTokens";
3
+
4
+ /** The default `code` mark: a quiet inline chip that keeps the line intact. */
5
+ export const StyledCode = styled.code.withConfig({
6
+ displayName: "Styles__StyledCode",
7
+ componentId: "sc-1fss4z4-0"
8
+ })(["padding:0 ", ";border-radius:", ";background-color:var(--color-theme-300);font-family:\"SFMono-Regular\",Menlo,Consolas,\"Liberation Mono\",monospace;font-size:0.85em;"], "0.25rem", "0.25rem");
9
+ StyledCode.displayName = "StyledCode";
10
+
11
+ /** The default `link` mark: an inline text link inside flowing content. */
12
+ export const StyledLink = styled.a.withConfig({
13
+ displayName: "Styles__StyledLink",
14
+ componentId: "sc-1fss4z4-1"
15
+ })(["color:var(--color-primary);text-decoration:underline var(--color-primary);text-underline-offset:3px;&:hover{text-decoration:none;}"]);
16
+ StyledLink.displayName = "StyledLink";
17
+
18
+ /** The default `list` block; rendered as ul or ol through the `as` prop. */
19
+ export const StyledList = styled.ul.withConfig({
20
+ displayName: "Styles__StyledList",
21
+ componentId: "sc-1fss4z4-2"
22
+ })(["margin:0;padding-left:", ";list-style:", " outside;li + li{margin-top:", ";}"], "1.25rem", _ref => {
23
+ let $ordered = _ref.$ordered;
24
+ return $ordered ? "decimal" : "disc";
25
+ }, SPACE.xs);
26
+ StyledList.displayName = "StyledList";
27
+ //# sourceMappingURL=Styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Styles.js","names":["styled","SPACE","StyledCode","code","withConfig","displayName","componentId","StyledLink","a","StyledList","ul","_ref","$ordered","xs"],"sources":["../../../../src/components/PortableText/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport { theme } from \"twin.macro\";\n\nimport { SPACE } from \"../LayoutTokens\";\n\n/** The default `code` mark: a quiet inline chip that keeps the line intact. */\nexport const StyledCode = styled.code`\n padding: 0 ${theme(\"spacing.1\")};\n border-radius: ${theme(\"borderRadius.DEFAULT\")};\n background-color: var(--color-theme-300);\n font-family: \"SFMono-Regular\", Menlo, Consolas, \"Liberation Mono\", monospace;\n font-size: 0.85em;\n`;\n\nStyledCode.displayName = \"StyledCode\";\n\n/** The default `link` mark: an inline text link inside flowing content. */\nexport const StyledLink = styled.a`\n color: var(--color-primary);\n text-decoration: underline var(--color-primary);\n text-underline-offset: 3px;\n\n &:hover {\n text-decoration: none;\n }\n`;\n\nStyledLink.displayName = \"StyledLink\";\n\n/** The default `list` block; rendered as ul or ol through the `as` prop. */\nexport const StyledList = styled.ul<{ $ordered: boolean }>`\n margin: 0;\n padding-left: ${theme(\"spacing.5\")};\n list-style: ${({ $ordered }) => ($ordered ? \"decimal\" : \"disc\")} outside;\n\n li + li {\n margin-top: ${SPACE.xs};\n }\n`;\n\nStyledList.displayName = \"StyledList\";\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAGtC,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA,OAAO,MAAMC,UAAU,GAAGF,MAAM,CAACG,IAAI,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gLACtB,SAAkB,EACd,SAA6B,CAI/C;AAEDJ,UAAU,CAACG,WAAW,GAAG,YAAY;;AAErC;AACA,OAAO,MAAME,UAAU,GAAGP,MAAM,CAACQ,CAAC,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0IAQjC;AAEDC,UAAU,CAACF,WAAW,GAAG,YAAY;;AAErC;AACA,OAAO,MAAMI,UAAU,GAAGT,MAAM,CAACU,EAAE,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qFAEjB,SAAkB,EACpBK,IAAA;EAAA,IAAGC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAAA,OAAQA,QAAQ,GAAG,SAAS,GAAG,MAAM;AAAA,CAAC,EAG/CX,KAAK,CAACY,EAAE,CAEzB;AAEDJ,UAAU,CAACJ,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export * from "./PortableText";
2
+ export * from "./renderers";
3
+ export * from "./types";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/PortableText/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./PortableText";
2
+ export * from "./renderers";
3
+ export * from "./types";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/PortableText/index.ts"],"sourcesContent":["export * from \"./PortableText\";\nexport * from \"./renderers\";\nexport * from \"./types\";\n"],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,SAAS","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ import { PortableTextBlockRenderer, PortableTextDefaultBlockType, PortableTextDefaultMark, PortableTextMarkRenderer } from "./types";
2
+ /**
3
+ * The default renderers for the universal set — everything a client renders
4
+ * without injection, and nothing more: no product element ever lands here.
5
+ * Injected {@link PortableTextComponents} maps take precedence entry by entry.
6
+ */
7
+ export declare const portableTextDefaultMarkRenderers: Record<PortableTextDefaultMark, PortableTextMarkRenderer>;
8
+ export declare const portableTextDefaultBlockRenderers: Record<PortableTextDefaultBlockType, PortableTextBlockRenderer>;
9
+ //# sourceMappingURL=renderers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../../src/components/PortableText/renderers.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,EAKvB,wBAAwB,EAGzB,MAAM,SAAS,CAAC;AAUjB;;;;GAIG;AAEH,eAAO,MAAM,gCAAgC,EAAE,MAAM,CACnD,uBAAuB,EACvB,wBAAwB,CAoBzB,CAAC;AA8CF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,4BAA4B,EAC5B,yBAAyB,CA6B1B,CAAC"}
@@ -0,0 +1,130 @@
1
+ import React from "react";
2
+ import { StyledCode, StyledLink, StyledList } from "./Styles";
3
+ import { Media } from "../Media";
4
+ import { TitledText, titledTextHeadings } from "../TitledText";
5
+ import { Body1 } from "../Typography";
6
+ import { Typography } from "../Typography/Typography";
7
+
8
+ /**
9
+ * The default renderers for the universal set — everything a client renders
10
+ * without injection, and nothing more: no product element ever lands here.
11
+ * Injected {@link PortableTextComponents} maps take precedence entry by entry.
12
+ */
13
+
14
+ export const portableTextDefaultMarkRenderers = {
15
+ strong: _ref => {
16
+ let children = _ref.children;
17
+ return /*#__PURE__*/React.createElement("strong", null, children);
18
+ },
19
+ em: _ref2 => {
20
+ let children = _ref2.children;
21
+ return /*#__PURE__*/React.createElement("em", null, children);
22
+ },
23
+ code: _ref3 => {
24
+ let children = _ref3.children;
25
+ return /*#__PURE__*/React.createElement(StyledCode, null, children);
26
+ },
27
+ link: _ref4 => {
28
+ let mark = _ref4.mark,
29
+ children = _ref4.children;
30
+ const href = mark == null ? void 0 : mark.href;
31
+
32
+ // A link mark without an href (authored as a plain string) has nowhere
33
+ // to go — keep the text, skip the anchor.
34
+ if (!href) {
35
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
36
+ }
37
+ return /*#__PURE__*/React.createElement(StyledLink, {
38
+ href: href,
39
+ target: "_blank",
40
+ rel: "noopener noreferrer"
41
+ }, children);
42
+ }
43
+ };
44
+
45
+ /** The semantic wire levels resolve to typography only here, in the renderer. */
46
+ const HEADING_LEVEL_VARIANTS = {
47
+ 1: "title1",
48
+ 2: "title2",
49
+ 3: "header2"
50
+ };
51
+
52
+ /** The level `heading` and `titled-text` fall back to. */
53
+ const DEFAULT_HEADING_LEVEL = 3;
54
+
55
+ /**
56
+ * Resolve a semantic wire level to its typography variant. An absent level is
57
+ * the documented default; any other unrecognised level is a serializer bug on
58
+ * a fixed 1–3 scale, so it falls back to the default and is logged, per the
59
+ * contract's degradation rule.
60
+ */
61
+ const headingVariantForLevel = level => {
62
+ if (level === undefined) {
63
+ return HEADING_LEVEL_VARIANTS[DEFAULT_HEADING_LEVEL];
64
+ }
65
+ const variant = HEADING_LEVEL_VARIANTS[level];
66
+ if (!variant) {
67
+ console.warn("PortableText: unknown heading level " + level + ", falling back to " + DEFAULT_HEADING_LEVEL + ".");
68
+ return HEADING_LEVEL_VARIANTS[DEFAULT_HEADING_LEVEL];
69
+ }
70
+ return variant;
71
+ };
72
+
73
+ /** Heading levels map to the same typography TitledText uses. */
74
+ const HeadingBlock = _ref5 => {
75
+ let block = _ref5.block,
76
+ children = _ref5.children;
77
+ const _ref6 = block,
78
+ level = _ref6.level;
79
+ const Heading = titledTextHeadings[headingVariantForLevel(level)];
80
+ return /*#__PURE__*/React.createElement(Heading, null, children);
81
+ };
82
+ export const portableTextDefaultBlockRenderers = {
83
+ paragraph: _ref7 => {
84
+ let children = _ref7.children;
85
+ return /*#__PURE__*/React.createElement(Body1, null, children);
86
+ },
87
+ heading: HeadingBlock,
88
+ list: _ref8 => {
89
+ let block = _ref8.block,
90
+ children = _ref8.children;
91
+ const ordered = block.style === "number";
92
+ return /*#__PURE__*/React.createElement(StyledList, {
93
+ as: ordered ? "ol" : "ul",
94
+ $ordered: ordered
95
+ }, children);
96
+ },
97
+ "list-item": _ref9 => {
98
+ let children = _ref9.children;
99
+ return /*#__PURE__*/React.createElement(Typography, {
100
+ variant: "Body 1",
101
+ as: "li"
102
+ }, children);
103
+ },
104
+ media: _ref0 => {
105
+ let block = _ref0.block;
106
+ const _ref1 = block,
107
+ src = _ref1.src,
108
+ alt = _ref1.alt,
109
+ variant = _ref1.variant,
110
+ caption = _ref1.caption;
111
+ return /*#__PURE__*/React.createElement(Media, {
112
+ src: src,
113
+ alt: alt,
114
+ variant: variant,
115
+ caption: caption
116
+ });
117
+ },
118
+ "titled-text": _ref10 => {
119
+ let block = _ref10.block,
120
+ children = _ref10.children;
121
+ const _ref11 = block,
122
+ title = _ref11.title,
123
+ level = _ref11.level;
124
+ return /*#__PURE__*/React.createElement(TitledText, {
125
+ title: title,
126
+ variant: headingVariantForLevel(level)
127
+ }, children);
128
+ }
129
+ };
130
+ //# sourceMappingURL=renderers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderers.js","names":["React","StyledCode","StyledLink","StyledList","Media","TitledText","titledTextHeadings","Body1","Typography","portableTextDefaultMarkRenderers","strong","_ref","children","createElement","em","_ref2","code","_ref3","link","_ref4","mark","href","Fragment","target","rel","HEADING_LEVEL_VARIANTS","DEFAULT_HEADING_LEVEL","headingVariantForLevel","level","undefined","variant","console","warn","HeadingBlock","_ref5","block","_ref6","Heading","portableTextDefaultBlockRenderers","paragraph","_ref7","heading","list","_ref8","ordered","style","as","$ordered","_ref9","media","_ref0","_ref1","src","alt","caption","_ref10","_ref11","title"],"sources":["../../../../src/components/PortableText/renderers.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { StyledCode, StyledLink, StyledList } from \"./Styles\";\nimport {\n PortableTextBlockRenderer,\n PortableTextDefaultBlockType,\n PortableTextDefaultMark,\n PortableTextHeadingBlock,\n PortableTextHeadingLevel,\n PortableTextLinkMark,\n PortableTextListBlock,\n PortableTextMarkRenderer,\n PortableTextMediaBlock,\n PortableTextTitledTextBlock,\n} from \"./types\";\nimport { Media } from \"../Media\";\nimport {\n TitledText,\n TitledTextVariant,\n titledTextHeadings,\n} from \"../TitledText\";\nimport { Body1 } from \"../Typography\";\nimport { Typography } from \"../Typography/Typography\";\n\n/**\n * The default renderers for the universal set — everything a client renders\n * without injection, and nothing more: no product element ever lands here.\n * Injected {@link PortableTextComponents} maps take precedence entry by entry.\n */\n\nexport const portableTextDefaultMarkRenderers: Record<\n PortableTextDefaultMark,\n PortableTextMarkRenderer\n> = {\n strong: ({ children }) => <strong>{children}</strong>,\n em: ({ children }) => <em>{children}</em>,\n code: ({ children }) => <StyledCode>{children}</StyledCode>,\n link: ({ mark, children }) => {\n const href = (mark as PortableTextLinkMark | undefined)?.href;\n\n // A link mark without an href (authored as a plain string) has nowhere\n // to go — keep the text, skip the anchor.\n if (!href) {\n return <>{children}</>;\n }\n\n return (\n <StyledLink href={href} target=\"_blank\" rel=\"noopener noreferrer\">\n {children}\n </StyledLink>\n );\n },\n};\n\n/** The semantic wire levels resolve to typography only here, in the renderer. */\nconst HEADING_LEVEL_VARIANTS: Record<\n PortableTextHeadingLevel,\n TitledTextVariant\n> = {\n 1: \"title1\",\n 2: \"title2\",\n 3: \"header2\",\n};\n\n/** The level `heading` and `titled-text` fall back to. */\nconst DEFAULT_HEADING_LEVEL: PortableTextHeadingLevel = 3;\n\n/**\n * Resolve a semantic wire level to its typography variant. An absent level is\n * the documented default; any other unrecognised level is a serializer bug on\n * a fixed 1–3 scale, so it falls back to the default and is logged, per the\n * contract's degradation rule.\n */\nconst headingVariantForLevel = (\n level: PortableTextHeadingLevel | undefined\n): TitledTextVariant => {\n if (level === undefined) {\n return HEADING_LEVEL_VARIANTS[DEFAULT_HEADING_LEVEL];\n }\n\n const variant = HEADING_LEVEL_VARIANTS[level];\n if (!variant) {\n console.warn(\n `PortableText: unknown heading level ${level}, falling back to ${DEFAULT_HEADING_LEVEL}.`\n );\n return HEADING_LEVEL_VARIANTS[DEFAULT_HEADING_LEVEL];\n }\n\n return variant;\n};\n\n/** Heading levels map to the same typography TitledText uses. */\nconst HeadingBlock: PortableTextBlockRenderer = ({ block, children }) => {\n const { level } = block as PortableTextHeadingBlock;\n const Heading = titledTextHeadings[headingVariantForLevel(level)];\n return <Heading>{children}</Heading>;\n};\n\nexport const portableTextDefaultBlockRenderers: Record<\n PortableTextDefaultBlockType,\n PortableTextBlockRenderer\n> = {\n paragraph: ({ children }) => <Body1>{children}</Body1>,\n heading: HeadingBlock,\n list: ({ block, children }) => {\n const ordered = (block as PortableTextListBlock).style === \"number\";\n return (\n <StyledList as={ordered ? \"ol\" : \"ul\"} $ordered={ordered}>\n {children}\n </StyledList>\n );\n },\n \"list-item\": ({ children }) => (\n <Typography variant=\"Body 1\" as=\"li\">\n {children}\n </Typography>\n ),\n media: ({ block }) => {\n const { src, alt, variant, caption } = block as PortableTextMediaBlock;\n return <Media src={src} alt={alt} variant={variant} caption={caption} />;\n },\n \"titled-text\": ({ block, children }) => {\n const { title, level } = block as PortableTextTitledTextBlock;\n return (\n <TitledText title={title} variant={headingVariantForLevel(level)}>\n {children}\n </TitledText>\n );\n },\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,EAAEC,UAAU,EAAEC,UAAU,QAAQ,UAAU;AAa7D,SAASC,KAAK,QAAQ,UAAU;AAChC,SACEC,UA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