@pagopa/io-app-design-system 6.0.7 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/lib/commonjs/components/badge/Badge.js +2 -2
  2. package/lib/commonjs/components/badge/Badge.js.map +1 -1
  3. package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
  4. package/lib/commonjs/components/index.js +30 -19
  5. package/lib/commonjs/components/index.js.map +1 -1
  6. package/lib/commonjs/components/markdown/CodeBlock.js +36 -0
  7. package/lib/commonjs/components/markdown/CodeBlock.js.map +1 -0
  8. package/lib/commonjs/components/markdown/IOMarkdown.js +71 -0
  9. package/lib/commonjs/components/markdown/IOMarkdown.js.map +1 -0
  10. package/lib/commonjs/components/markdown/IOMarkdownLite.js +22 -0
  11. package/lib/commonjs/components/markdown/IOMarkdownLite.js.map +1 -0
  12. package/lib/commonjs/components/markdown/ImageRenderer.js +53 -0
  13. package/lib/commonjs/components/markdown/ImageRenderer.js.map +1 -0
  14. package/lib/commonjs/components/markdown/index.js +20 -0
  15. package/lib/commonjs/components/markdown/index.js.map +1 -0
  16. package/lib/commonjs/components/markdown/parser.js +253 -0
  17. package/lib/commonjs/components/markdown/parser.js.map +1 -0
  18. package/lib/commonjs/components/markdown/rules.js +324 -0
  19. package/lib/commonjs/components/markdown/rules.js.map +1 -0
  20. package/lib/commonjs/components/markdown/types.js +6 -0
  21. package/lib/commonjs/components/markdown/types.js.map +1 -0
  22. package/lib/commonjs/components/markdown/utils.js +113 -0
  23. package/lib/commonjs/components/markdown/utils.js.map +1 -0
  24. package/lib/commonjs/components/modules/__test__/__snapshots__/ModuleNavigationAlt.test.tsx.snap +2 -2
  25. package/lib/commonjs/components/tag/Tag.js +2 -1
  26. package/lib/commonjs/components/tag/Tag.js.map +1 -1
  27. package/lib/commonjs/components/typography/BodySmall.js +6 -3
  28. package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
  29. package/lib/commonjs/utils/pipe.js +29 -0
  30. package/lib/commonjs/utils/pipe.js.map +1 -0
  31. package/lib/module/components/badge/Badge.js +2 -2
  32. package/lib/module/components/badge/Badge.js.map +1 -1
  33. package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
  34. package/lib/module/components/index.js +3 -2
  35. package/lib/module/components/index.js.map +1 -1
  36. package/lib/module/components/markdown/CodeBlock.js +31 -0
  37. package/lib/module/components/markdown/CodeBlock.js.map +1 -0
  38. package/lib/module/components/markdown/IOMarkdown.js +66 -0
  39. package/lib/module/components/markdown/IOMarkdown.js.map +1 -0
  40. package/lib/module/components/markdown/IOMarkdownLite.js +17 -0
  41. package/lib/module/components/markdown/IOMarkdownLite.js.map +1 -0
  42. package/lib/module/components/markdown/ImageRenderer.js +48 -0
  43. package/lib/module/components/markdown/ImageRenderer.js.map +1 -0
  44. package/lib/module/components/markdown/index.js +5 -0
  45. package/lib/module/components/markdown/index.js.map +1 -0
  46. package/lib/module/components/markdown/parser.js +246 -0
  47. package/lib/module/components/markdown/parser.js.map +1 -0
  48. package/lib/module/components/markdown/rules.js +319 -0
  49. package/lib/module/components/markdown/rules.js.map +1 -0
  50. package/lib/module/components/markdown/types.js +4 -0
  51. package/lib/module/components/markdown/types.js.map +1 -0
  52. package/lib/module/components/markdown/utils.js +103 -0
  53. package/lib/module/components/markdown/utils.js.map +1 -0
  54. package/lib/module/components/modules/__test__/__snapshots__/ModuleNavigationAlt.test.tsx.snap +2 -2
  55. package/lib/module/components/tag/Tag.js +2 -1
  56. package/lib/module/components/tag/Tag.js.map +1 -1
  57. package/lib/module/components/typography/BodySmall.js +5 -2
  58. package/lib/module/components/typography/BodySmall.js.map +1 -1
  59. package/lib/module/utils/pipe.js +25 -0
  60. package/lib/module/utils/pipe.js.map +1 -0
  61. package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
  62. package/lib/typescript/components/index.d.ts +3 -2
  63. package/lib/typescript/components/index.d.ts.map +1 -1
  64. package/lib/typescript/components/markdown/CodeBlock.d.ts +10 -0
  65. package/lib/typescript/components/markdown/CodeBlock.d.ts.map +1 -0
  66. package/lib/typescript/components/markdown/IOMarkdown.d.ts +34 -0
  67. package/lib/typescript/components/markdown/IOMarkdown.d.ts.map +1 -0
  68. package/lib/typescript/components/markdown/IOMarkdownLite.d.ts +22 -0
  69. package/lib/typescript/components/markdown/IOMarkdownLite.d.ts.map +1 -0
  70. package/lib/typescript/components/markdown/ImageRenderer.d.ts +12 -0
  71. package/lib/typescript/components/markdown/ImageRenderer.d.ts.map +1 -0
  72. package/lib/typescript/components/markdown/index.d.ts +6 -0
  73. package/lib/typescript/components/markdown/index.d.ts.map +1 -0
  74. package/lib/typescript/components/markdown/parser.d.ts +17 -0
  75. package/lib/typescript/components/markdown/parser.d.ts.map +1 -0
  76. package/lib/typescript/components/markdown/rules.d.ts +6 -0
  77. package/lib/typescript/components/markdown/rules.d.ts.map +1 -0
  78. package/lib/typescript/components/markdown/types.d.ts +41 -0
  79. package/lib/typescript/components/markdown/types.d.ts.map +1 -0
  80. package/lib/typescript/components/markdown/utils.d.ts +27 -0
  81. package/lib/typescript/components/markdown/utils.d.ts.map +1 -0
  82. package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
  83. package/lib/typescript/components/typography/BodySmall.d.ts +2 -0
  84. package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -1
  85. package/lib/typescript/utils/pipe.d.ts +25 -0
  86. package/lib/typescript/utils/pipe.d.ts.map +1 -0
  87. package/package.json +3 -1
  88. package/src/components/badge/Badge.tsx +2 -2
  89. package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
  90. package/src/components/index.tsx +3 -2
  91. package/src/components/markdown/CodeBlock.tsx +32 -0
  92. package/src/components/markdown/IOMarkdown.tsx +110 -0
  93. package/src/components/markdown/IOMarkdownLite.tsx +27 -0
  94. package/src/components/markdown/ImageRenderer.tsx +52 -0
  95. package/src/components/markdown/index.ts +7 -0
  96. package/src/components/markdown/parser.ts +334 -0
  97. package/src/components/markdown/rules.tsx +366 -0
  98. package/src/components/markdown/types.ts +81 -0
  99. package/src/components/markdown/utils.ts +127 -0
  100. package/src/components/modules/__test__/__snapshots__/ModuleNavigationAlt.test.tsx.snap +2 -2
  101. package/src/components/tag/Tag.tsx +2 -1
  102. package/src/components/typography/BodySmall.tsx +5 -2
  103. package/src/utils/pipe.ts +55 -0
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.parseLite = exports.parse = exports.LITE_DISABLED_TYPES = void 0;
7
+ var _markdownIt = _interopRequireDefault(require("markdown-it"));
8
+ var _pipe = require("../../utils/pipe");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ /* Two markdown-it instances: lite (no HTML) and full (HTML enabled) */
11
+ const mdLite = (0, _markdownIt.default)({
12
+ html: false,
13
+ typographer: false,
14
+ linkify: false
15
+ });
16
+ const mdFull = (0, _markdownIt.default)({
17
+ html: true,
18
+ typographer: false,
19
+ linkify: false
20
+ });
21
+
22
+ /**
23
+ * Creates a zero-dependency key generator for the markdown AST.
24
+ *
25
+ * These keys are only used as local React render keys, so they do not need
26
+ * cryptographic randomness or an external package: a per-parse incrementing
27
+ * counter is sufficient for our needs.
28
+ */
29
+ const createKeyFactory = () => {
30
+ // eslint-disable-next-line functional/no-let
31
+ let keyCounter = 0;
32
+ return prefix => `md_${prefix}_${keyCounter++}`;
33
+ };
34
+
35
+ /**
36
+ * Complete set of all supported node types.
37
+ */
38
+ const ALL_TYPES = new Set([/* lite types */
39
+ "heading1", "heading2", "heading3", "heading4", "heading5", "heading6", "paragraph", "text", "strong", "em", "link", "softbreak", "hardbreak", /* full types */
40
+ "bullet_list", "ordered_list", "list_item", "blockquote", "image", "code_inline", "fence", "hr", "html_block", "html_inline"]);
41
+
42
+ /**
43
+ * The types disabled when using IOMarkdownLite.
44
+ */
45
+ const LITE_DISABLED_TYPES = exports.LITE_DISABLED_TYPES = ["heading1", "heading2", "heading3", "heading4", "heading5", "heading6", "bullet_list", "ordered_list", "list_item", "blockquote", "image", "code_inline", "fence", "hr", "html_block", "html_inline"];
46
+
47
+ /**
48
+ * Maps a markdown-it token type to a MarkdownNodeType.
49
+ * Normalizes `*_open` / `*_close` suffixes and heading tags.
50
+ * Returns undefined for unsupported or disabled types.
51
+ */
52
+ const getNodeType = (token, enabledTypes) => {
53
+ const cleanedType = token.type.replace(/_open|_close/g, "");
54
+ const type = cleanedType === "heading" ? `${cleanedType}${token.tag.slice(1)}` : cleanedType;
55
+ return enabledTypes.has(type) ? type : undefined;
56
+ };
57
+
58
+ /**
59
+ * Flattens nested inline tokens into the parent token stream.
60
+ * markdown-it wraps inline content in `inline` tokens with children.
61
+ */
62
+ const flattenInline = tokens => tokens.reduce((acc, token) => {
63
+ if (token.type === "inline" && token.children && token.children.length > 0) {
64
+ return [...acc, ...flattenInline(token.children)];
65
+ }
66
+ return [...acc, token];
67
+ }, []);
68
+
69
+ /**
70
+ * Converts a flat array of tokens into a hierarchical AST,
71
+ * skipping disabled/unsupported token types entirely.
72
+ */
73
+ const tokensToAST = (tokens, enabledTypes, getKey) => {
74
+ if (!tokens || tokens.length === 0) {
75
+ return [];
76
+ }
77
+ const parseFrom = index => {
78
+ if (index >= tokens.length) {
79
+ return [[], index];
80
+ }
81
+ const token = tokens[index];
82
+ const nodeType = getNodeType(token, enabledTypes);
83
+
84
+ // Closing token — stop and return to caller
85
+ if (token.nesting === -1) {
86
+ return [[], index + 1];
87
+ }
88
+
89
+ // Unsupported / disabled type — skip it
90
+ if (nodeType === undefined) {
91
+ if (token.nesting === 1) {
92
+ // Opening token: skip ahead to matching close
93
+ const findMatchingClose = (pos, depth) => pos >= tokens.length || depth === 0 ? pos : findMatchingClose(pos + 1, depth + tokens[pos].nesting);
94
+ return parseFrom(findMatchingClose(index + 1, 1));
95
+ }
96
+ // Self-closing / inline token: skip single token
97
+ return parseFrom(index + 1);
98
+ }
99
+
100
+ // Skip empty text nodes
101
+ if (nodeType === "text" && token.content === "") {
102
+ return parseFrom(index + 1);
103
+ }
104
+ const attributes = token.attrs?.reduce((prev, [name, value]) => ({
105
+ ...prev,
106
+ [name]: value
107
+ }), {});
108
+ const node = {
109
+ type: nodeType,
110
+ key: getKey(nodeType),
111
+ content: token.content || undefined,
112
+ attributes: attributes || undefined,
113
+ children: [],
114
+ // Preserve ordered flag for lists
115
+ ...(nodeType === "ordered_list" ? {
116
+ ordered: true
117
+ } : {}),
118
+ ...(nodeType === "bullet_list" ? {
119
+ ordered: false
120
+ } : {}),
121
+ // Preserve image src and alt via attributes
122
+ ...(nodeType === "image" ? {
123
+ attributes: {
124
+ ...attributes,
125
+ src: token.attrGet?.("src") ?? attributes?.src ?? "",
126
+ alt: token.content ?? ""
127
+ }
128
+ } : {})
129
+ };
130
+ if (token.nesting === 1) {
131
+ // Opening token — parse children
132
+ const [childNodes, nextIndex] = parseFrom(index + 1);
133
+ const nodeWithChildren = {
134
+ ...node,
135
+ children: childNodes
136
+ };
137
+ const [restNodes, finalIndex] = parseFrom(nextIndex);
138
+ return [[nodeWithChildren, ...restNodes], finalIndex];
139
+ }
140
+
141
+ // Self-closing / inline token (nesting === 0)
142
+ const [restNodes, finalIndex] = parseFrom(index + 1);
143
+ return [[node, ...restNodes], finalIndex];
144
+ };
145
+ const [nodes] = parseFrom(0);
146
+ return nodes;
147
+ };
148
+
149
+ /**
150
+ * Lifts image nodes out of paragraph containers so they become
151
+ * top-level siblings. markdown-it always wraps images inside
152
+ * paragraphs; this post-processing step ensures the existing
153
+ * `imageRule` is actually invoked during rendering.
154
+ *
155
+ * - Paragraph with **only** image children → replaced by the images.
156
+ * - Paragraph with a **mix** of text and images → split into
157
+ * alternating paragraph (text run) and standalone image nodes.
158
+ * - Paragraphs without images → unchanged.
159
+ */
160
+ const liftImages = (nodes, getKey) => nodes.flatMap(node => {
161
+ if (node.type !== "paragraph") {
162
+ return [node];
163
+ }
164
+ const hasImage = node.children.some(c => c.type === "image");
165
+ if (!hasImage) {
166
+ return [node];
167
+ }
168
+
169
+ // Every child is an image → lift them all out
170
+ const allImages = node.children.every(c => c.type === "image");
171
+ if (allImages) {
172
+ // Return images as top-level nodes (they keep their own keys)
173
+ return [...node.children];
174
+ }
175
+
176
+ // Mixed content: split children into text runs and standalone images.
177
+ // A single reduce accumulates finished nodes and the current text run;
178
+ // a trailing text run is flushed after the fold.
179
+
180
+ const wrapTextRun = run => ({
181
+ ...node,
182
+ key: getKey("paragraph"),
183
+ children: run
184
+ });
185
+ const {
186
+ result,
187
+ textRun
188
+ } = node.children.reduce((acc, child) => child.type === "image" ? {
189
+ result: [...acc.result, ...(acc.textRun.length > 0 ? [wrapTextRun(acc.textRun)] : []), child],
190
+ textRun: []
191
+ } : {
192
+ ...acc,
193
+ textRun: [...acc.textRun, child]
194
+ }, {
195
+ result: [],
196
+ textRun: []
197
+ });
198
+ return textRun.length > 0 ? [...result, wrapTextRun(textRun)] : [...result];
199
+ });
200
+ const annotateListDepth = (nodes, parentListDepth = 0) => nodes.map(node => {
201
+ const listDepth = parentListDepth;
202
+ const childListDepth = node.type === "bullet_list" || node.type === "ordered_list" ? parentListDepth + 1 : parentListDepth;
203
+ return {
204
+ ...node,
205
+ listDepth,
206
+ children: annotateListDepth(node.children, childListDepth)
207
+ };
208
+ });
209
+
210
+ /**
211
+ * Computes the enabled types set from the full set minus disabled types.
212
+ */
213
+ const getEnabledTypes = disabledTypes => {
214
+ if (!disabledTypes || disabledTypes.length === 0) {
215
+ return ALL_TYPES;
216
+ }
217
+ const disabled = new Set(disabledTypes);
218
+ return new Set([...ALL_TYPES].filter(t => !disabled.has(t)));
219
+ };
220
+
221
+ /**
222
+ * Parses a markdown source string into an AST.
223
+ * @param source The markdown string.
224
+ * @param disabledTypes Node types to exclude from parsing.
225
+ * @returns Array of MarkdownNode.
226
+ */
227
+ const parse = (source, disabledTypes) => {
228
+ const enabledTypes = getEnabledTypes(disabledTypes);
229
+ const needsHtml = enabledTypes.has("html_block") || enabledTypes.has("html_inline");
230
+ const md = needsHtml ? mdFull : mdLite;
231
+ const getKey = createKeyFactory();
232
+ return (0, _pipe.pipe)(
233
+ // 1. Tokenize the markdown source using markdown-it
234
+ md.parse(source, {}),
235
+ // 2. Unwrap nested inline tokens into a flat token stream
236
+ flattenInline,
237
+ // 3. Convert the flat token stream into a hierarchical AST
238
+ tokens => tokensToAST(tokens, enabledTypes, getKey),
239
+ // 4. Hoist image nodes out of paragraph wrappers so imageRule is invoked
240
+ nodes => liftImages(nodes, getKey),
241
+ // 5. Drop empty paragraphs left behind by disabled/lifted node types
242
+ nodes => nodes.filter(n => n.type !== "paragraph" || n.children.length > 0),
243
+ // 6. Annotate nodes with their list nesting depth for rendering
244
+ annotateListDepth);
245
+ };
246
+
247
+ /**
248
+ * Parses markdown with the lite subset of rules only.
249
+ */
250
+ exports.parse = parse;
251
+ const parseLite = source => parse(source, LITE_DISABLED_TYPES);
252
+ exports.parseLite = parseLite;
253
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_markdownIt","_interopRequireDefault","require","_pipe","e","__esModule","default","mdLite","MarkdownIt","html","typographer","linkify","mdFull","createKeyFactory","keyCounter","prefix","ALL_TYPES","Set","LITE_DISABLED_TYPES","exports","getNodeType","token","enabledTypes","cleanedType","type","replace","tag","slice","has","undefined","flattenInline","tokens","reduce","acc","children","length","tokensToAST","getKey","parseFrom","index","nodeType","nesting","findMatchingClose","pos","depth","content","attributes","attrs","prev","name","value","node","key","ordered","src","attrGet","alt","childNodes","nextIndex","nodeWithChildren","restNodes","finalIndex","nodes","liftImages","flatMap","hasImage","some","c","allImages","every","wrapTextRun","run","result","textRun","child","annotateListDepth","parentListDepth","map","listDepth","childListDepth","getEnabledTypes","disabledTypes","disabled","filter","t","parse","source","needsHtml","md","pipe","n","parseLite"],"sourceRoot":"../../../../src","sources":["components/markdown/parser.ts"],"mappings":";;;;;;AAAA,IAAAA,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AAC;EACnE,MAAM4D,EAAE,GAAGD,SAAS,GAAG3E,MAAM,GAAGL,MAAM;EACtC,MAAM8B,MAAM,GAAGxB,gBAAgB,CAAC,CAAC;EAEjC,OAAO,IAAA4E,UAAI;EACT;EACAD,EAAE,CAACH,KAAK,CAACC,MAAM,EAAE,CAAC,CAAC,CAAC;EACpB;EACAxD,aAAa;EACb;EACAC,MAAM,IAAIK,WAAW,CAACL,MAAM,EAAET,YAAY,EAAEe,MAAM,CAAC;EACnD;EACAyB,KAAK,IAAIC,UAAU,CAACD,KAAK,EAAEzB,MAAM,CAAC;EAClC;EACAyB,KAAK,IAAIA,KAAK,CAACqB,MAAM,CAACO,CAAC,IAAIA,CAAC,CAAClE,IAAI,KAAK,WAAW,IAAIkE,CAAC,CAACxD,QAAQ,CAACC,MAAM,GAAG,CAAC,CAAC;EAC3E;EACAwC,iBACF,CAAC;AACH,CAAC;;AAED;AACA;AACA;AAFAxD,OAAA,CAAAkE,KAAA,GAAAA,KAAA;AAGO,MAAMM,SAAS,GAAIL,MAAc,IACtCD,KAAK,CAACC,MAAM,EAAEpE,mBAAmB,CAAC;AAACC,OAAA,CAAAwE,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -0,0 +1,324 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DEFAULT_RULES = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _banner = require("../banner");
10
+ var _layout = require("../layout");
11
+ var _Body = require("../typography/Body");
12
+ var _BodyMonospace = require("../typography/BodyMonospace");
13
+ var _H = require("../typography/H1");
14
+ var _H2 = require("../typography/H2");
15
+ var _H3 = require("../typography/H3");
16
+ var _H4 = require("../typography/H4");
17
+ var _H5 = require("../typography/H5");
18
+ var _H6 = require("../typography/H6");
19
+ var _IOText = require("../typography/IOText");
20
+ var _CodeBlock = require("./CodeBlock");
21
+ var _ImageRenderer = require("./ImageRenderer");
22
+ var _utils = require("./utils");
23
+ var _jsxRuntime = require("react/jsx-runtime");
24
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
25
+ /* ─── Inline flattening (shared between heading and paragraph rendering) ─── */
26
+
27
+ /**
28
+ * Recursively walks inline AST nodes and produces flat styled segments
29
+ * with accumulated bold/italic/link state.
30
+ */
31
+ const flattenInlineNodes = (nodes, inherited) => nodes.reduce((acc, node) => {
32
+ switch (node.type) {
33
+ case "text":
34
+ case "code_inline":
35
+ return [...acc, {
36
+ key: node.key,
37
+ text: node.content ?? "",
38
+ style: inherited
39
+ }];
40
+ case "softbreak":
41
+ case "hardbreak":
42
+ return [...acc, {
43
+ key: node.key,
44
+ text: "\n",
45
+ style: inherited
46
+ }];
47
+ case "strong":
48
+ return [...acc, ...flattenInlineNodes(node.children, {
49
+ ...inherited,
50
+ bold: true
51
+ })];
52
+ case "em":
53
+ return [...acc, ...flattenInlineNodes(node.children, {
54
+ ...inherited,
55
+ italic: true
56
+ })];
57
+ case "link":
58
+ {
59
+ const href = node.attributes?.href;
60
+ return [...acc, ...flattenInlineNodes(node.children, {
61
+ ...inherited,
62
+ link: href
63
+ })];
64
+ }
65
+ default:
66
+ return acc;
67
+ }
68
+ }, []);
69
+
70
+ /**
71
+ * Renders a single styled segment as either a raw string
72
+ * or an IOText element with the appropriate props.
73
+ */
74
+ const renderSegment = (segment, context, isCode) => {
75
+ if (isCode) {
76
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyMonospace.BodyMonospace, {
77
+ children: segment.text
78
+ }, segment.key);
79
+ }
80
+ const {
81
+ bold,
82
+ italic,
83
+ link
84
+ } = segment.style;
85
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IOText.IOText, {
86
+ ...(bold ? {
87
+ weight: "Semibold"
88
+ } : {}),
89
+ ...(italic ? {
90
+ fontStyle: "italic"
91
+ } : {}),
92
+ ...(link ? {
93
+ color: context.linkColor,
94
+ onPress: () => context.onLinkPress?.(link),
95
+ accessibilityRole: "link",
96
+ textStyle: {
97
+ textDecorationLine: "underline"
98
+ }
99
+ } : {}),
100
+ size: context.fontSize,
101
+ lineHeight: context.lineHeight,
102
+ children: segment.text
103
+ }, segment.key);
104
+ };
105
+
106
+ /* ─── Heading component map ─── */
107
+
108
+ const headingComponentMap = {
109
+ heading1: _H.H1,
110
+ heading2: _H2.H2,
111
+ heading3: _H3.H3,
112
+ heading4: _H4.H4,
113
+ heading5: _H5.H5,
114
+ heading6: _H6.H6
115
+ };
116
+
117
+ /* ─── Block rendering helpers ─── */
118
+
119
+ /**
120
+ * Renders a paragraph block by flattening inline children
121
+ * into styled segments.
122
+ */
123
+ const renderParagraph = (node, context) => {
124
+ const segments = flattenInlineNodes(node.children, {
125
+ bold: false,
126
+ italic: false
127
+ });
128
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Body.Body, {
129
+ style: {
130
+ textAlign: context.textAlign
131
+ },
132
+ children: segments.map(seg => {
133
+ const matchingNode = node.children.find(c => c.key === seg.key);
134
+ const isCode = matchingNode?.type === "code_inline";
135
+ return renderSegment(seg, context, isCode);
136
+ })
137
+ }, node.key);
138
+ };
139
+
140
+ /**
141
+ * Creates a render rule for a heading level using the corresponding
142
+ * DS heading component (H1-H6). This ensures headings inherit
143
+ * dynamicTypeRamp, uppercase/letterSpacing (H5), legacy typeface (H6),
144
+ * and theme colors automatically.
145
+ */
146
+ const makeHeadingRule = Heading => (node, _renderChildren, context) => {
147
+ const segments = flattenInlineNodes(node.children, {
148
+ bold: false,
149
+ italic: false
150
+ });
151
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
152
+ accessibilityRole: "header",
153
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Heading, {
154
+ style: {
155
+ textAlign: context.textAlign
156
+ },
157
+ children: segments.map(seg => seg.text)
158
+ })
159
+ }, node.key);
160
+ };
161
+
162
+ /* ─── Default render rules ─── */
163
+
164
+ const paragraphRule = (node, _renderChildren, context) => renderParagraph(node, context);
165
+ const textRule = node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
166
+ children: node.content ?? ""
167
+ }, node.key);
168
+ const strongRule = (node, renderChildren) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_IOText.IOText, {
169
+ weight: "Semibold",
170
+ children: renderChildren(node.children)
171
+ }, node.key);
172
+ const emRule = (node, renderChildren) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_IOText.IOText, {
173
+ fontStyle: "italic",
174
+ children: renderChildren(node.children)
175
+ }, node.key);
176
+ const linkRule = (node, renderChildren, context) => {
177
+ const href = node.attributes?.href;
178
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IOText.IOText, {
179
+ color: context.linkColor,
180
+ onPress: href ? () => context.onLinkPress?.(href) : undefined,
181
+ accessibilityRole: "link",
182
+ textStyle: {
183
+ textDecorationLine: "underline"
184
+ },
185
+ children: renderChildren(node.children)
186
+ }, node.key);
187
+ };
188
+ const softbreakRule = node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
189
+ children: "\n"
190
+ }, node.key);
191
+ const hardbreakRule = node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
192
+ children: "\n"
193
+ }, node.key);
194
+ const bulletListRule = (node, renderChildren) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
195
+ accessible: true,
196
+ accessibilityRole: "list",
197
+ style: {
198
+ paddingLeft: 12
199
+ },
200
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.VSpacer, {
201
+ size: 8
202
+ }), node.children.map(child => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
203
+ style: {
204
+ flexDirection: "row"
205
+ },
206
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Body.Body, {
207
+ children: (0, _utils.getUnorderedListBullet)(node.listDepth ?? 0)
208
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.HSpacer, {
209
+ size: 8
210
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
211
+ style: {
212
+ flex: 1,
213
+ flexShrink: 1
214
+ },
215
+ children: renderChildren(child.children)
216
+ })]
217
+ }, child.key)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.VSpacer, {
218
+ size: 8
219
+ })]
220
+ }, node.key);
221
+ const orderedListRule = (node, renderChildren) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
222
+ accessible: true,
223
+ accessibilityRole: "list",
224
+ style: {
225
+ paddingLeft: 12
226
+ },
227
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.VSpacer, {
228
+ size: 8
229
+ }), node.children.map((child, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
230
+ style: {
231
+ flexDirection: "row"
232
+ },
233
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Body.Body, {
234
+ children: (0, _utils.getOrderedListMarker)(i + 1, node.listDepth ?? 0)
235
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.HSpacer, {
236
+ size: 8
237
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
238
+ style: {
239
+ flex: 1,
240
+ flexShrink: 1
241
+ },
242
+ children: renderChildren(child.children)
243
+ })]
244
+ }, child.key)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.VSpacer, {
245
+ size: 8
246
+ })]
247
+ }, node.key);
248
+ const listItemRule = (node, renderChildren) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
249
+ style: {
250
+ flex: 1,
251
+ flexShrink: 1
252
+ },
253
+ children: renderChildren(node.children)
254
+ }, node.key);
255
+ const blockquoteRule = node => {
256
+ const allText = (0, _utils.collectRawText)(node);
257
+ const pictogramName = (0, _utils.extractPictogramName)(allText);
258
+
259
+ // Find the first heading child for the banner title
260
+ const headingNode = node.children.find(c => c.type.startsWith("heading"));
261
+ const title = headingNode ? (0, _utils.collectRawText)(headingNode).trim() : undefined;
262
+
263
+ // Collect content from paragraph children, stripping the pictogram pattern
264
+ const content = node.children.filter(c => c.type === "paragraph").map(c => (0, _utils.stripPictogramPrefix)((0, _utils.collectRawText)(c)).trim()).filter(Boolean).join("\n");
265
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_banner.Banner, {
266
+ pictogramName: pictogramName,
267
+ color: "neutral",
268
+ title: title,
269
+ content: content || undefined
270
+ }, node.key);
271
+ };
272
+ const imageRule = node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
273
+ style: {
274
+ marginVertical: 16
275
+ },
276
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageRenderer.ImageRenderer, {
277
+ node: node
278
+ })
279
+ }, node.key);
280
+ const codeInlineRule = node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyMonospace.BodyMonospace, {
281
+ children: node.content ?? ""
282
+ }, node.key);
283
+ const fenceRule = node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_CodeBlock.CodeBlock, {
284
+ content: (node.content ?? "").trimEnd()
285
+ }, node.key);
286
+ const hrRule = node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.Divider, {}, node.key);
287
+ const htmlRule = node => {
288
+ if (node.content && (0, _utils.isBrTag)(node.content)) {
289
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
290
+ children: "\n"
291
+ }, node.key);
292
+ }
293
+ return null;
294
+ };
295
+
296
+ /**
297
+ * The complete set of default render rules for all supported node types.
298
+ */
299
+ const DEFAULT_RULES = exports.DEFAULT_RULES = {
300
+ heading1: makeHeadingRule(headingComponentMap.heading1),
301
+ heading2: makeHeadingRule(headingComponentMap.heading2),
302
+ heading3: makeHeadingRule(headingComponentMap.heading3),
303
+ heading4: makeHeadingRule(headingComponentMap.heading4),
304
+ heading5: makeHeadingRule(headingComponentMap.heading5),
305
+ heading6: makeHeadingRule(headingComponentMap.heading6),
306
+ paragraph: paragraphRule,
307
+ text: textRule,
308
+ strong: strongRule,
309
+ em: emRule,
310
+ link: linkRule,
311
+ softbreak: softbreakRule,
312
+ hardbreak: hardbreakRule,
313
+ bullet_list: bulletListRule,
314
+ ordered_list: orderedListRule,
315
+ list_item: listItemRule,
316
+ blockquote: blockquoteRule,
317
+ image: imageRule,
318
+ code_inline: codeInlineRule,
319
+ fence: fenceRule,
320
+ hr: hrRule,
321
+ html_block: htmlRule,
322
+ html_inline: htmlRule
323
+ };
324
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_banner","_layout","_Body","_BodyMonospace","_H","_H2","_H3","_H4","_H5","_H6","_IOText","_CodeBlock","_ImageRenderer","_utils","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","flattenInlineNodes","nodes","inherited","reduce","acc","node","type","key","text","content","style","children","bold","italic","href","attributes","link","renderSegment","segment","context","isCode","jsx","BodyMonospace","IOText","weight","fontStyle","color","linkColor","onPress","onLinkPress","accessibilityRole","textStyle","textDecorationLine","size","fontSize","lineHeight","headingComponentMap","heading1","H1","heading2","H2","heading3","H3","heading4","H4","heading5","H5","heading6","H6","renderParagraph","segments","Body","textAlign","map","seg","matchingNode","find","c","makeHeadingRule","Heading","_renderChildren","View","paragraphRule","textRule","Fragment","strongRule","renderChildren","emRule","linkRule","undefined","softbreakRule","hardbreakRule","bulletListRule","jsxs","accessible","paddingLeft","VSpacer","child","flexDirection","getUnorderedListBullet","listDepth","HSpacer","flex","flexShrink","orderedListRule","getOrderedListMarker","listItemRule","blockquoteRule","allText","collectRawText","pictogramName","extractPictogramName","headingNode","startsWith","title","trim","filter","stripPictogramPrefix","Boolean","join","Banner","imageRule","marginVertical","ImageRenderer","codeInlineRule","fenceRule","CodeBlock","trimEnd","hrRule","Divider","htmlRule","isBrTag","DEFAULT_RULES","exports","paragraph","strong","em","softbreak","hardbreak","bullet_list","ordered_list","list_item","blockquote","image","code_inline","fence","hr","html_block","html_inline"],"sourceRoot":"../../../../src","sources":["components/markdown/rules.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,EAAA,GAAAN,OAAA;AACA,IAAAO,GAAA,GAAAP,OAAA;AACA,IAAAQ,GAAA,GAAAR,OAAA;AACA,IAAAS,GAAA,GAAAT,OAAA;AACA,IAAAU,GAAA,GAAAV,OAAA;AACA,IAAAW,GAAA,GAAAX,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AACA,IAAAc,cAAA,GAAAd,OAAA;AAOA,IAAAe,MAAA,GAAAf,OAAA;AAOiB,IAAAgB,WAAA,GAAAhB,OAAA;AAAA,SAAAD,wBAAAkB,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAApB,uBAAA,YAAAA,CAAAkB,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM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Q,EAAEiB,eAAe,CAACtB,mBAAmB,CAACK,QAAQ,CAAC;EACvDE,QAAQ,EAAEe,eAAe,CAACtB,mBAAmB,CAACO,QAAQ,CAAC;EACvDE,QAAQ,EAAEa,eAAe,CAACtB,mBAAmB,CAACS,QAAQ,CAAC;EACvDE,QAAQ,EAAEW,eAAe,CAACtB,mBAAmB,CAACW,QAAQ,CAAC;EACvDmE,SAAS,EAAEpD,aAAa;EACxBtD,IAAI,EAAEuD,QAAQ;EACdoD,MAAM,EAAElD,UAAU;EAClBmD,EAAE,EAAEjD,MAAM;EACVnD,IAAI,EAAEoD,QAAQ;EACdiD,SAAS,EAAE/C,aAAa;EACxBgD,SAAS,EAAE/C,aAAa;EACxBgD,WAAW,EAAE/C,cAAc;EAC3BgD,YAAY,EAAEpC,eAAe;EAC7BqC,SAAS,EAAEnC,YAAY;EACvBoC,UAAU,EAAEnC,cAAc;EAC1BoC,KAAK,EAAEtB,SAAS;EAChBuB,WAAW,EAAEpB,cAAc;EAC3BqB,KAAK,EAAEpB,SAAS;EAChBqB,EAAE,EAAElB,MAAM;EACVmB,UAAU,EAAEjB,QAAQ;EACpBkB,WAAW,EAAElB;AACf,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/markdown/types.ts"],"mappings":"","ignoreList":[]}