@activecollab/components 2.0.414 → 2.0.416

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 (45) hide show
  1. package/dist/cjs/components/Media/Media.js.map +1 -1
  2. package/dist/cjs/components/PortableText/Styles.js +20 -2
  3. package/dist/cjs/components/PortableText/Styles.js.map +1 -1
  4. package/dist/cjs/components/PortableText/renderers.js +20 -4
  5. package/dist/cjs/components/PortableText/renderers.js.map +1 -1
  6. package/dist/cjs/components/PortableText/types.js +39 -3
  7. package/dist/cjs/components/PortableText/types.js.map +1 -1
  8. package/dist/cjs/components/PortableText/types.test.js +137 -0
  9. package/dist/cjs/components/PortableText/types.test.js.map +1 -1
  10. package/dist/cjs/presentation/shared/FeatureAvailability.js +217 -0
  11. package/dist/cjs/presentation/shared/FeatureAvailability.js.map +1 -0
  12. package/dist/cjs/presentation/shared/MessageDialog.js.map +1 -1
  13. package/dist/cjs/presentation/shared/index.js +16 -1
  14. package/dist/cjs/presentation/shared/index.js.map +1 -1
  15. package/dist/esm/components/Media/Media.d.ts +3 -2
  16. package/dist/esm/components/Media/Media.d.ts.map +1 -1
  17. package/dist/esm/components/Media/Media.js.map +1 -1
  18. package/dist/esm/components/PortableText/Styles.d.ts +19 -1
  19. package/dist/esm/components/PortableText/Styles.d.ts.map +1 -1
  20. package/dist/esm/components/PortableText/Styles.js +20 -2
  21. package/dist/esm/components/PortableText/Styles.js.map +1 -1
  22. package/dist/esm/components/PortableText/renderers.d.ts.map +1 -1
  23. package/dist/esm/components/PortableText/renderers.js +20 -4
  24. package/dist/esm/components/PortableText/renderers.js.map +1 -1
  25. package/dist/esm/components/PortableText/types.d.ts +16 -2
  26. package/dist/esm/components/PortableText/types.d.ts.map +1 -1
  27. package/dist/esm/components/PortableText/types.js +32 -2
  28. package/dist/esm/components/PortableText/types.js.map +1 -1
  29. package/dist/esm/components/PortableText/types.test.js +138 -1
  30. package/dist/esm/components/PortableText/types.test.js.map +1 -1
  31. package/dist/esm/presentation/shared/FeatureAvailability.d.ts +52 -0
  32. package/dist/esm/presentation/shared/FeatureAvailability.d.ts.map +1 -0
  33. package/dist/esm/presentation/shared/FeatureAvailability.js +203 -0
  34. package/dist/esm/presentation/shared/FeatureAvailability.js.map +1 -0
  35. package/dist/esm/presentation/shared/MessageDialog.d.ts.map +1 -1
  36. package/dist/esm/presentation/shared/MessageDialog.js.map +1 -1
  37. package/dist/esm/presentation/shared/index.d.ts +2 -0
  38. package/dist/esm/presentation/shared/index.d.ts.map +1 -1
  39. package/dist/esm/presentation/shared/index.js +1 -0
  40. package/dist/esm/presentation/shared/index.js.map +1 -1
  41. package/dist/index.js +210 -140
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.min.js +1 -1
  44. package/dist/index.min.js.map +1 -1
  45. package/package.json +1 -1
@@ -0,0 +1,217 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FeatureAvailability = exports.DEFAULT_FEATURE_AVAILABILITY = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ /**
11
+ * FeatureAvailability — a compact, data-driven block that states where a
12
+ * feature is available: on which hosting, on which plans and to which roles.
13
+ *
14
+ * It is the reusable version of the availability panel used in the Help Docs
15
+ * example articles, extracted so several stories (and, later, the real
16
+ * PortableText renderer) can share one implementation and one visual language:
17
+ *
18
+ * • green check → available
19
+ * • analog clock → decided but not shipped yet ("to be determined")
20
+ * • strikethrough → not included
21
+ *
22
+ * The component is theme-agnostic (all colors come from `--color-*` tokens) and
23
+ * self-contained (it carries its own typography, so it renders correctly
24
+ * outside the article body as well).
25
+ */
26
+
27
+ /* ------------------------------------------------------------------ */
28
+ /* Marks */
29
+ /* ------------------------------------------------------------------ */
30
+
31
+ var CheckMark = function CheckMark() {
32
+ return /*#__PURE__*/_react.default.createElement("svg", {
33
+ className: "ap-ic ap-yes",
34
+ viewBox: "0 0 16 16",
35
+ width: "15",
36
+ height: "15",
37
+ "aria-hidden": true
38
+ }, /*#__PURE__*/_react.default.createElement("path", {
39
+ d: "M13 4.6 L6.5 11.4 L3 8",
40
+ fill: "none",
41
+ stroke: "currentColor",
42
+ strokeWidth: "2",
43
+ strokeLinecap: "round",
44
+ strokeLinejoin: "round"
45
+ }));
46
+ };
47
+ var ClockMark = function ClockMark() {
48
+ return /*#__PURE__*/_react.default.createElement("svg", {
49
+ className: "ap-ic ap-clock",
50
+ viewBox: "0 0 16 16",
51
+ width: "14",
52
+ height: "14",
53
+ "aria-hidden": true
54
+ }, /*#__PURE__*/_react.default.createElement("circle", {
55
+ cx: "8",
56
+ cy: "8",
57
+ r: "6.2",
58
+ fill: "none",
59
+ stroke: "currentColor",
60
+ strokeWidth: "1.4"
61
+ }), /*#__PURE__*/_react.default.createElement("path", {
62
+ d: "M8 8 L8 4.4 M8 8 L10.5 9.3",
63
+ fill: "none",
64
+ stroke: "currentColor",
65
+ strokeWidth: "1.4",
66
+ strokeLinecap: "round"
67
+ }));
68
+ };
69
+ var StatusIcon = function StatusIcon(_ref) {
70
+ var status = _ref.status;
71
+ if (status === "available") {
72
+ return /*#__PURE__*/_react.default.createElement(CheckMark, null);
73
+ }
74
+ if (status === "pending") {
75
+ return /*#__PURE__*/_react.default.createElement(ClockMark, null);
76
+ }
77
+ return null;
78
+ };
79
+
80
+ /** A nested mark inside parentheses, e.g. "PM ✓". */
81
+ var ChildMark = function ChildMark(_ref2) {
82
+ var mark = _ref2.mark;
83
+ return mark.status === "excluded" ? /*#__PURE__*/_react.default.createElement("span", {
84
+ className: "ap-excluded"
85
+ }, mark.label) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, mark.label, " ", /*#__PURE__*/_react.default.createElement(StatusIcon, {
86
+ status: mark.status
87
+ }));
88
+ };
89
+ var Mark = function Mark(_ref3) {
90
+ var _mark$children;
91
+ var mark = _ref3.mark,
92
+ iconPosition = _ref3.iconPosition;
93
+ var hasChildren = Boolean(mark.children && mark.children.length > 0);
94
+ var excluded = mark.status === "excluded";
95
+ var icon = hasChildren ? null : /*#__PURE__*/_react.default.createElement(StatusIcon, {
96
+ status: mark.status
97
+ });
98
+ return /*#__PURE__*/_react.default.createElement("span", {
99
+ className: excluded ? "ap-item ap-excluded" : "ap-item"
100
+ }, iconPosition === "before" && icon, mark.label, mark.note && /*#__PURE__*/_react.default.createElement("span", {
101
+ className: "ap-sub"
102
+ }, mark.note), mark.pending && /*#__PURE__*/_react.default.createElement("span", {
103
+ className: "ap-tbd"
104
+ }, mark.pending), hasChildren && /*#__PURE__*/_react.default.createElement("span", {
105
+ className: "ap-sub"
106
+ }, "(", (_mark$children = mark.children) === null || _mark$children === void 0 ? void 0 : _mark$children.map(function (child, index) {
107
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
108
+ key: child.label
109
+ }, index > 0 && " / ", /*#__PURE__*/_react.default.createElement(ChildMark, {
110
+ mark: child
111
+ }));
112
+ }), ")"), iconPosition === "after" && icon);
113
+ };
114
+
115
+ /* ------------------------------------------------------------------ */
116
+ /* Panel */
117
+ /* ------------------------------------------------------------------ */
118
+
119
+ var StyledPanel = _styledComponents.default.div.withConfig({
120
+ displayName: "FeatureAvailability__StyledPanel",
121
+ componentId: "sc-42kyhy-0"
122
+ })(["font-family:-apple-system,BlinkMacSystemFont,\"Roboto\",\"Helvetica Neue\",Arial,sans-serif;font-size:13px;line-height:20px;color:var(--color-theme-900);padding:12px 16px;border:1px solid var(--color-theme-300);border-radius:10px;background:var(--color-theme-100);.ap-row{display:flex;gap:10px;padding:6px 0;align-items:baseline;flex-wrap:wrap;}.ap-row:first-of-type{padding-top:0;}.ap-row:last-of-type{padding-bottom:0;}.ap-row + .ap-row{border-top:1px dashed var(--color-theme-300);}.ap-label{flex:0 0 84px;color:var(--color-theme-700);font-weight:600;font-size:13px;}.ap-vals{flex:1 1 240px;display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;}.ap-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;}.ap-sub{color:var(--color-theme-600);}.ap-tbd{color:var(--color-theme-600);font-style:italic;}.ap-sep{color:var(--color-theme-400);}.ap-excluded{text-decoration:line-through;color:var(--color-theme-500);}.ap-ic{flex:none;vertical-align:-2px;}.ap-yes{color:var(--color-green-olive-drab);}.ap-clock{color:var(--color-theme-600);}"]);
123
+ var FeatureAvailability = exports.FeatureAvailability = function FeatureAvailability(_ref4) {
124
+ var rows = _ref4.rows,
125
+ className = _ref4.className;
126
+ return /*#__PURE__*/_react.default.createElement(StyledPanel, {
127
+ className: className,
128
+ "aria-label": "Feature availability"
129
+ }, rows.map(function (row) {
130
+ var _row$iconPosition;
131
+ var iconPosition = (_row$iconPosition = row.iconPosition) !== null && _row$iconPosition !== void 0 ? _row$iconPosition : "after";
132
+ return /*#__PURE__*/_react.default.createElement("div", {
133
+ className: "ap-row",
134
+ key: row.label
135
+ }, /*#__PURE__*/_react.default.createElement("span", {
136
+ className: "ap-label"
137
+ }, row.label), /*#__PURE__*/_react.default.createElement("span", {
138
+ className: "ap-vals"
139
+ }, row.items.map(function (item, index) {
140
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
141
+ key: item.label
142
+ }, index > 0 && row.separated && /*#__PURE__*/_react.default.createElement("span", {
143
+ className: "ap-sep"
144
+ }, "\xB7"), /*#__PURE__*/_react.default.createElement(Mark, {
145
+ mark: item,
146
+ iconPosition: iconPosition
147
+ }));
148
+ })));
149
+ }));
150
+ };
151
+
152
+ /* ------------------------------------------------------------------ */
153
+ /* Illustrative defaults */
154
+ /* ------------------------------------------------------------------ */
155
+
156
+ /**
157
+ * A realistic GA feature: shipped on Cloud, self-hosted still to be scheduled,
158
+ * on every plan, for internal roles but not for clients. Exercises all three
159
+ * marks (check / clock / strikethrough) out of the box.
160
+ */
161
+ var DEFAULT_FEATURE_AVAILABILITY = exports.DEFAULT_FEATURE_AVAILABILITY = {
162
+ rows: [{
163
+ label: "Availability",
164
+ iconPosition: "before",
165
+ separated: true,
166
+ items: [{
167
+ label: "Cloud",
168
+ status: "available",
169
+ note: "(stable, since Jun 17 2026)"
170
+ }, {
171
+ label: "Self-Hosted",
172
+ status: "pending",
173
+ pending: "to be determined"
174
+ }]
175
+ }, {
176
+ label: "Plans",
177
+ items: [{
178
+ label: "S–Mega",
179
+ status: "available"
180
+ }, {
181
+ label: "Plus",
182
+ status: "available"
183
+ }, {
184
+ label: "Pro",
185
+ status: "available"
186
+ }, {
187
+ label: "Pro+Get-Paid",
188
+ status: "available"
189
+ }]
190
+ }, {
191
+ label: "Roles",
192
+ items: [{
193
+ label: "Owner",
194
+ status: "available"
195
+ }, {
196
+ label: "Member",
197
+ status: "available"
198
+ }, {
199
+ label: "Member+",
200
+ status: "available",
201
+ children: [{
202
+ label: "PM",
203
+ status: "available"
204
+ }, {
205
+ label: "FM",
206
+ status: "available"
207
+ }]
208
+ }, {
209
+ label: "Client",
210
+ status: "excluded"
211
+ }, {
212
+ label: "Client+",
213
+ status: "excluded"
214
+ }]
215
+ }]
216
+ };
217
+ //# sourceMappingURL=FeatureAvailability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureAvailability.js","names":["_react","_interopRequireDefault","require","_styledComponents","e","__esModule","default","CheckMark","createElement","className","viewBox","width","height","d","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","ClockMark","cx","cy","r","StatusIcon","_ref","status","ChildMark","_ref2","mark","label","Fragment","Mark","_ref3","_mark$children","iconPosition","hasChildren","Boolean","children","length","excluded","icon","note","pending","map","child","index","key","StyledPanel","styled","div","withConfig","displayName","componentId","FeatureAvailability","exports","_ref4","rows","row","_row$iconPosition","items","item","separated","DEFAULT_FEATURE_AVAILABILITY"],"sources":["../../../../src/presentation/shared/FeatureAvailability.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\n/**\n * FeatureAvailability — a compact, data-driven block that states where a\n * feature is available: on which hosting, on which plans and to which roles.\n *\n * It is the reusable version of the availability panel used in the Help Docs\n * example articles, extracted so several stories (and, later, the real\n * PortableText renderer) can share one implementation and one visual language:\n *\n * • green check → available\n * • analog clock → decided but not shipped yet (\"to be determined\")\n * • strikethrough → not included\n *\n * The component is theme-agnostic (all colors come from `--color-*` tokens) and\n * self-contained (it carries its own typography, so it renders correctly\n * outside the article body as well).\n */\n\nexport type AvailabilityStatus = \"available\" | \"pending\" | \"excluded\";\n\nexport interface AvailabilityMark {\n label: string;\n status: AvailabilityStatus;\n /** Muted parenthetical, e.g. \"(stable, since Jun 17 2026)\". Include the parens. */\n note?: string;\n /** Italic muted trailing text for the pending state, e.g. \"to be determined\". */\n pending?: string;\n /**\n * Nested marks rendered in parentheses, e.g. Member+ (PM ✓ / FM ✓). When a\n * mark has children it does not render its own status icon — the children\n * carry the marks.\n */\n children?: AvailabilityMark[];\n}\n\nexport interface AvailabilityRow {\n label: string;\n items: AvailabilityMark[];\n /** Icon before the label (Availability row) or after it (Plans / Roles). Default \"after\". */\n iconPosition?: \"before\" | \"after\";\n /** Separate items with a middot (used on the Availability row). Default false. */\n separated?: boolean;\n}\n\nexport interface FeatureAvailabilityProps {\n rows: AvailabilityRow[];\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Marks */\n/* ------------------------------------------------------------------ */\n\nconst CheckMark = (): ReactElement => (\n <svg\n className=\"ap-ic ap-yes\"\n viewBox=\"0 0 16 16\"\n width=\"15\"\n height=\"15\"\n aria-hidden\n >\n <path\n d=\"M13 4.6 L6.5 11.4 L3 8\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nconst ClockMark = (): ReactElement => (\n <svg\n className=\"ap-ic ap-clock\"\n viewBox=\"0 0 16 16\"\n width=\"14\"\n height=\"14\"\n aria-hidden\n >\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"6.2\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.4\"\n />\n <path\n d=\"M8 8 L8 4.4 M8 8 L10.5 9.3\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.4\"\n strokeLinecap=\"round\"\n />\n </svg>\n);\n\nconst StatusIcon = ({\n status,\n}: {\n status: AvailabilityStatus;\n}): ReactElement | null => {\n if (status === \"available\") {\n return <CheckMark />;\n }\n if (status === \"pending\") {\n return <ClockMark />;\n }\n return null;\n};\n\n/** A nested mark inside parentheses, e.g. \"PM ✓\". */\nconst ChildMark = ({ mark }: { mark: AvailabilityMark }): ReactElement =>\n mark.status === \"excluded\" ? (\n <span className=\"ap-excluded\">{mark.label}</span>\n ) : (\n <>\n {mark.label} <StatusIcon status={mark.status} />\n </>\n );\n\nconst Mark = ({\n mark,\n iconPosition,\n}: {\n mark: AvailabilityMark;\n iconPosition: \"before\" | \"after\";\n}): ReactElement => {\n const hasChildren = Boolean(mark.children && mark.children.length > 0);\n const excluded = mark.status === \"excluded\";\n const icon = hasChildren ? null : <StatusIcon status={mark.status} />;\n\n return (\n <span className={excluded ? \"ap-item ap-excluded\" : \"ap-item\"}>\n {iconPosition === \"before\" && icon}\n {mark.label}\n {mark.note && <span className=\"ap-sub\">{mark.note}</span>}\n {mark.pending && <span className=\"ap-tbd\">{mark.pending}</span>}\n {hasChildren && (\n <span className=\"ap-sub\">\n (\n {mark.children?.map((child, index) => (\n <React.Fragment key={child.label}>\n {index > 0 && \" / \"}\n <ChildMark mark={child} />\n </React.Fragment>\n ))}\n )\n </span>\n )}\n {iconPosition === \"after\" && icon}\n </span>\n );\n};\n\n/* ------------------------------------------------------------------ */\n/* Panel */\n/* ------------------------------------------------------------------ */\n\nconst StyledPanel = styled.div`\n font-family: -apple-system, BlinkMacSystemFont, \"Roboto\", \"Helvetica Neue\",\n Arial, sans-serif;\n font-size: 13px;\n line-height: 20px;\n color: var(--color-theme-900);\n padding: 12px 16px;\n border: 1px solid var(--color-theme-300);\n border-radius: 10px;\n background: var(--color-theme-100);\n\n .ap-row {\n display: flex;\n gap: 10px;\n padding: 6px 0;\n align-items: baseline;\n flex-wrap: wrap;\n }\n\n .ap-row:first-of-type {\n padding-top: 0;\n }\n\n .ap-row:last-of-type {\n padding-bottom: 0;\n }\n\n .ap-row + .ap-row {\n border-top: 1px dashed var(--color-theme-300);\n }\n\n .ap-label {\n flex: 0 0 84px;\n color: var(--color-theme-700);\n font-weight: 600;\n font-size: 13px;\n }\n\n .ap-vals {\n flex: 1 1 240px;\n display: flex;\n flex-wrap: wrap;\n gap: 4px 14px;\n align-items: center;\n }\n\n .ap-item {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n white-space: nowrap;\n }\n\n .ap-sub {\n color: var(--color-theme-600);\n }\n\n .ap-tbd {\n color: var(--color-theme-600);\n font-style: italic;\n }\n\n .ap-sep {\n color: var(--color-theme-400);\n }\n\n .ap-excluded {\n text-decoration: line-through;\n color: var(--color-theme-500);\n }\n\n .ap-ic {\n flex: none;\n vertical-align: -2px;\n }\n\n .ap-yes {\n color: var(--color-green-olive-drab);\n }\n\n .ap-clock {\n color: var(--color-theme-600);\n }\n`;\n\nexport const FeatureAvailability = ({\n rows,\n className,\n}: FeatureAvailabilityProps): ReactElement => (\n <StyledPanel className={className} aria-label=\"Feature availability\">\n {rows.map((row) => {\n const iconPosition = row.iconPosition ?? \"after\";\n\n return (\n <div className=\"ap-row\" key={row.label}>\n <span className=\"ap-label\">{row.label}</span>\n <span className=\"ap-vals\">\n {row.items.map((item, index) => (\n <React.Fragment key={item.label}>\n {index > 0 && row.separated && (\n <span className=\"ap-sep\">·</span>\n )}\n <Mark mark={item} iconPosition={iconPosition} />\n </React.Fragment>\n ))}\n </span>\n </div>\n );\n })}\n </StyledPanel>\n);\n\n/* ------------------------------------------------------------------ */\n/* Illustrative defaults */\n/* ------------------------------------------------------------------ */\n\n/**\n * A realistic GA feature: shipped on Cloud, self-hosted still to be scheduled,\n * on every plan, for internal roles but not for clients. Exercises all three\n * marks (check / clock / strikethrough) out of the box.\n */\nexport const DEFAULT_FEATURE_AVAILABILITY: FeatureAvailabilityProps = {\n rows: [\n {\n label: \"Availability\",\n iconPosition: \"before\",\n separated: true,\n items: [\n {\n label: \"Cloud\",\n status: \"available\",\n note: \"(stable, since Jun 17 2026)\",\n },\n {\n label: \"Self-Hosted\",\n status: \"pending\",\n pending: \"to be determined\",\n },\n ],\n },\n {\n label: \"Plans\",\n items: [\n { label: \"S–Mega\", status: \"available\" },\n { label: \"Plus\", status: \"available\" },\n { label: \"Pro\", status: \"available\" },\n { label: \"Pro+Get-Paid\", status: \"available\" },\n ],\n },\n {\n label: \"Roles\",\n items: [\n { label: \"Owner\", status: \"available\" },\n { label: \"Member\", status: \"available\" },\n {\n label: \"Member+\",\n status: \"available\",\n children: [\n { label: \"PM\", status: \"available\" },\n { label: \"FM\", status: \"available\" },\n ],\n },\n { label: \"Client\", status: \"excluded\" },\n { label: \"Client+\", status: \"excluded\" },\n ],\n },\n ],\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiCA;AACA;AACA;;AAEA,IAAMG,SAAS,GAAG,SAAZA,SAASA,CAAA;EAAA,oBACbP,MAAA,CAAAM,OAAA,CAAAE,aAAA;IACEC,SAAS,EAAC,cAAc;IACxBC,OAAO,EAAC,WAAW;IACnBC,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACX;EAAW,gBAEXZ,MAAA,CAAAM,OAAA,CAAAE,aAAA;IACEK,CAAC,EAAC,wBAAw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EAAE,QAAQ;MAAEJ,MAAM,EAAE;IAAY,CAAC,EACxC;MAAEI,KAAK,EAAE,MAAM;MAAEJ,MAAM,EAAE;IAAY,CAAC,EACtC;MAAEI,KAAK,EAAE,KAAK;MAAEJ,MAAM,EAAE;IAAY,CAAC,EACrC;MAAEI,KAAK,EAAE,cAAc;MAAEJ,MAAM,EAAE;IAAY,CAAC;EAElD,CAAC,EACD;IACEI,KAAK,EAAE,OAAO;IACd8B,KAAK,EAAE,CACL;MAAE9B,KAAK,EAAE,OAAO;MAAEJ,MAAM,EAAE;IAAY,CAAC,EACvC;MAAEI,KAAK,EAAE,QAAQ;MAAEJ,MAAM,EAAE;IAAY,CAAC,EACxC;MACEI,KAAK,EAAE,SAAS;MAChBJ,MAAM,EAAE,WAAW;MACnBY,QAAQ,EAAE,CACR;QAAER,KAAK,EAAE,IAAI;QAAEJ,MAAM,EAAE;MAAY,CAAC,EACpC;QAAEI,KAAK,EAAE,IAAI;QAAEJ,MAAM,EAAE;MAAY,CAAC;IAExC,CAAC,EACD;MAAEI,KAAK,EAAE,QAAQ;MAAEJ,MAAM,EAAE;IAAW,CAAC,EACvC;MAAEI,KAAK,EAAE,SAAS;MAAEJ,MAAM,EAAE;IAAW,CAAC;EAE5C,CAAC;AAEL,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_BreakPoints","_Button","_Columns","_IconButton","_Icons","_InfoBox","_Media","_Modal","_Styles","_Row","_Stack","_Tiles","_TitledText","_Tooltip","_Typography","_Typography2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","DIALOG_WIDTH","sm","md","lg","StyledFeedback","styled","div","withConfig","displayName","componentId","screenBelow","DialogFeedback","_ref","onVote","_useState","useState","_useState2","voted","setVoted","vote","useCallback","createElement","Body2","color","Fragment","className","Tooltip","title","IconButton","type","variant","onClick","ThumbUpOutlineIcon","StyledDialog","_ref2","$size","MessageDialog","exports","_ref3","open","onClose","_ref3$size","size","children","Modal","CancelCrossIcon","DocLinkContext","React","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref4","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref5","StyledDocLink","InlineLink","DocLinkMark","_ref6","mark","openArticle","useContext","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref7","_ref8","node","InfoBox","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref9","_ref0","label","Button","tabIndex","RowObject","_ref1","_ref10","Row","space","TilesObject","_ref11","_ref12","Tiles","columns","collapseBelow","SplitObject","_ref13","_ref14","media","widths","textColumn","Stack","src","screenshot","mediaColumn","Media","alt","caption","Columns","reverse","alignY","ParagraphBlock","_ref15","lineHeight","ListItemBlock","_ref16","Typography","as","TitledTextBlock","_ref17","block","_ref18","level","TitledText","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport { Modal } from \"../../components/Modal\";\nimport {\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextMarkRenderer,\n PortableTextMediaVariant,\n PortableTextObjectRenderer,\n PortableTextTitledTextBlock,\n} from \"../../components/PortableText\";\nimport { StyledLink as InlineLink } from \"../../components/PortableText/Styles\";\nimport { Row } from \"../../components/Row\";\nimport { Stack } from \"../../components/Stack\";\nimport { Tiles } from \"../../components/Tiles\";\nimport { TitledText } from \"../../components/TitledText\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * The in-app message dialog, as a Presentation mock.\n *\n * Two pieces, mirroring how the product is split:\n *\n * - {@link MessageDialog} — the hollow dialog shell (width, closing,\n * feedback), built only from design-system parts. In the product this shell\n * lives in the application as `InAppMessageDialog`.\n * - {@link messageComponents} — a demo message element catalog injected into\n * the design-system Portable Text engine, exactly like the typed cards\n * injected into the hollow StackedCard shell. In the product the catalog is\n * application code; the presentation ships this demo copy so the stories\n * need no app imports.\n */\n\n/* ---- the dialog shell ---------------------------------------------- */\n\nexport type MessageDialogSize = \"sm\" | \"md\" | \"lg\";\n\nconst DIALOG_WIDTH: Record<MessageDialogSize, string> = {\n sm: \"520px\",\n md: \"720px\",\n lg: \"880px\",\n};\n\n/* Feedback — the thumbs up / down slot. Down-vote reuses the up icon,\n rotated (the DS set only ships ThumbUpOutlineIcon). */\nconst StyledFeedback = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\nconst DialogFeedback = ({\n onVote,\n}: {\n onVote?: (vote: \"up\" | \"down\") => void;\n}): ReactElement => {\n const [voted, setVoted] = useState<\"up\" | \"down\" | null>(null);\n const vote = useCallback(\n (value: \"up\" | \"down\") => {\n setVoted(value);\n onVote?.(value);\n },\n [onVote]\n );\n\n return (\n <StyledFeedback>\n {voted ? (\n <Body2 color=\"secondary\">Thanks for your feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n Was this helpful?\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledFeedback>\n );\n};\n\n/* The shell is behaviour only: it sizes itself, closes on click-outside /\n Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler\n is supplied. Content is whatever the caller renders as children — usually\n the Portable Text engine with the demo catalog injected. */\nconst StyledDialog = styled.div<{ $size: MessageDialogSize }>`\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: calc(100% - 32px);\n max-width: ${({ $size }) => DIALOG_WIDTH[$size]};\n max-height: calc(100vh - 96px);\n margin: 56px auto 40px;\n overflow-y: auto;\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n border-radius: 12px;\n box-shadow: var(--shadow-primary);\n\n ${screenBelow.sm} {\n margin: 16px auto;\n }\n\n /* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\n .dlg-close {\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n }\n\n .dlg-content {\n padding: 40px;\n }\n\n ${screenBelow.sm} {\n .dlg-content {\n padding: 32px 20px 24px;\n }\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Supplying a handler shows the centred helpful / not-helpful vote. */\n onVote?: (vote: \"up\" | \"down\") => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n onVote,\n children,\n}: MessageDialogProps): ReactElement => (\n <Modal open={open} onClose={onClose}>\n <StyledDialog $size={size}>\n <div className=\"dlg-close\">\n <Tooltip title=\"Close\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label=\"Close\"\n onClick={onClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </Tooltip>\n </div>\n <div className=\"dlg-content\">{children}</div>\n {onVote ? <DialogFeedback onVote={onVote} /> : null}\n </StyledDialog>\n </Modal>\n);\n\n/* ---- doc-link wiring ------------------------------------------------ */\n\n/** How a doc-link mark opens its article (by a slug-like reference). The\n surface that renders the message supplies the handler — in the product it\n closes the dialog and opens the article Sheet. */\nexport type OpenArticleHandler = (article?: string) => void;\n\nexport const DocLinkContext = React.createContext<OpenArticleHandler>(\n () => undefined\n);\n\n/* ---- the demo message element catalog ------------------------------- */\n\n/* Inline marks ------------------------------------------------------- */\n\n/* interface-name — the name of an interface element, e.g. the Security page. */\nconst StyledInterfaceName = styled.span`\n padding: 0 4px;\n border-radius: 4px;\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n font-weight: 600;\n white-space: nowrap;\n`;\nconst InterfaceNameMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledInterfaceName>{children}</StyledInterfaceName>\n);\n\n/* keyboard-key — a keyboard key cap. */\nconst StyledKeyboardKey = styled.kbd`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border: 1px solid var(--border-primary);\n border-bottom-width: 2px;\n border-radius: 5px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n vertical-align: baseline;\n`;\nconst KeyboardKeyMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledKeyboardKey>{children}</StyledKeyboardKey>\n);\n\n/* doc-link — an inline link that opens a full help article. The mark carries\n an article reference; the open behaviour comes from DocLinkContext, so the\n authored content stays declarative. */\n/* Built on the engine's inline anchor so a doc-link sits in the sentence\n exactly like a default link mark — same size, weight and line box as the\n surrounding copy — just recoloured. */\nconst StyledDocLink = styled(InlineLink)`\n color: var(--color-secondary);\n text-decoration-color: var(--color-secondary);\n`;\nconst DocLinkMark: PortableTextMarkRenderer = ({ mark, children }) => {\n const openArticle = useContext(DocLinkContext);\n return (\n <StyledDocLink\n href=\"#\"\n onClick={(event: React.MouseEvent) => {\n event.preventDefault();\n openArticle(mark?.article as string | undefined);\n }}\n >\n {children}\n </StyledDocLink>\n );\n};\n\n/* Component objects --------------------------------------------------- */\n\n/* callout — rendered with the DS InfoBox; the catalog keeps its own tone\n vocabulary and maps it to InfoBox types. */\ntype CalloutTone = \"info\" | \"note\" | \"success\";\nconst CALLOUT_TYPE: Record<CalloutTone, InfoBoxType> = {\n info: \"default\",\n note: \"note\",\n success: \"success\",\n};\nconst CalloutObject: PortableTextObjectRenderer = ({ node, children }) => (\n <InfoBox\n type={CALLOUT_TYPE[(node.tone as CalloutTone | undefined) ?? \"info\"]}\n title={node.title as string | undefined}\n showIcon\n >\n {children}\n </InfoBox>\n);\n\n/* button-reference — a real DS Button shown for reference as its own block,\n so a message can point at a button instead of screenshotting it. It is\n intentionally non-interactive. */\nconst StyledButtonReference = styled.div`\n display: flex;\n\n .c-button {\n pointer-events: none;\n }\n`;\ntype ButtonReferenceVariant =\n | \"primary\"\n | \"secondary\"\n | \"text colored\"\n | \"text gray\";\nconst ButtonReferenceObject: PortableTextObjectRenderer = ({ node }) => {\n if (typeof node.label !== \"string\") {\n return null;\n }\n\n return (\n <StyledButtonReference aria-hidden=\"true\">\n <Button\n variant={\n (node.variant as ButtonReferenceVariant | undefined) ?? \"primary\"\n }\n size=\"small\"\n type=\"button\"\n tabIndex={-1}\n >\n {node.label}\n </Button>\n </StyledButtonReference>\n );\n};\n\n/* row — a horizontal run of blocks (e.g. two button references). */\nconst RowObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Row space={(node.space as Space | undefined) ?? \"sm\"}>{children}</Row>\n);\n\n/* tiles — an equal-size mosaic of blocks. */\nconst TilesObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Tiles\n columns={(node.columns as number | undefined) ?? 3}\n space=\"md\"\n collapseBelow=\"sm\"\n >\n {children}\n </Tiles>\n);\n\n/* split — text beside media, with the one layout rule the messages follow:\n screenshots sit on the right, flat illustrations on the left. `widths` is\n authored as [text, media] and reordered with the columns. */\ninterface SplitMedia {\n src: string;\n alt?: string;\n variant?: PortableTextMediaVariant;\n caption?: string;\n}\nconst SplitObject: PortableTextObjectRenderer = ({ node, children }) => {\n const media = node.media as SplitMedia | undefined;\n const widths = (node.widths as number[] | undefined) ?? [1, 1];\n const textColumn = <Stack space=\"lg\">{children}</Stack>;\n\n // A split without media degrades to its text column instead of crashing.\n if (!media?.src) {\n return textColumn;\n }\n\n const screenshot = media.variant === \"screenshot\";\n\n const mediaColumn = (\n <Media\n src={media.src}\n alt={media.alt}\n variant={media.variant}\n caption={media.caption}\n />\n );\n\n return (\n <Columns\n widths={screenshot ? widths : [...widths].reverse()}\n space=\"xl\"\n alignY=\"center\"\n collapseBelow=\"md\"\n >\n {screenshot ? textColumn : mediaColumn}\n {screenshot ? mediaColumn : textColumn}\n </Columns>\n );\n};\n\n/* Default-block overrides --------------------------------------------- */\n\n/* The engine's defaults use Body 1 primary; the messages are designed on the\n quieter Body 2 secondary voice, so the catalog overrides the text blocks —\n demonstrating the `blocks` half of the injection contract. */\nconst ParagraphBlock: PortableTextBlockRenderer = ({ children }) => (\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Body2>\n);\n\nconst ListItemBlock: PortableTextBlockRenderer = ({ children }) => (\n <Typography variant=\"Body 2\" as=\"li\" color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Typography>\n);\n\n/* Titled sections speak in the quiet Header2 subhead voice rather than the\n engine's default Title2 for level 2, and keep a roomier rhythm between a\n titled section's content nodes. */\nconst TitledTextBlock: PortableTextBlockRenderer = ({ block, children }) => {\n const { title, level } = block as PortableTextTitledTextBlock;\n\n return (\n <TitledText title={title} variant={level === 1 ? \"title1\" : \"header2\"}>\n {children ? <Stack space=\"sm\">{children}</Stack> : undefined}\n </TitledText>\n );\n};\n\n/** The demo catalog the presentations inject into the Portable Text engine —\n the stand-in for the application's `messageComponents` map. */\nexport const messageComponents: PortableTextComponents = {\n marks: {\n \"interface-name\": InterfaceNameMark,\n \"keyboard-key\": KeyboardKeyMark,\n \"doc-link\": DocLinkMark,\n },\n objects: {\n callout: CalloutObject,\n \"button-reference\": ButtonReferenceObject,\n row: RowObject,\n tiles: TilesObject,\n split: SplitObject,\n },\n blocks: {\n paragraph: ParagraphBlock,\n \"list-item\": ListItemBlock,\n \"titled-text\": TitledTextBlock,\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AASA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,IAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AACA,IAAAiB,WAAA,GAAAjB,OAAA;AACA,IAAAkB,YAAA,GAAAlB,OAAA;AAAoE,SAAAE,uBAAAiB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,U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AAM;IAACG,OAAO,EAAE+F,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG;EAAU,GACnElF,QAAQ,gBAAG9G,MAAA,CAAAuB,OAAA,CAAAiE,aAAA,CAACzE,MAAA,CAAA4J,KAAK;IAACb,KAAK,EAAC;EAAI,GAAEhD,QAAgB,CAAC,GAAGM,SACzC,CAAC;AAEjB,CAAC;;AAED;AACA;AACO,IAAM8E,iBAAyC,GAAA1F,OAAA,CAAA0F,iBAAA,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAE5E,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEI;EACd,CAAC;EACDqE,OAAO,EAAE;IACPC,OAAO,EAAEzD,aAAa;IACtB,kBAAkB,EAAEQ,qBAAqB;IACzCkD,GAAG,EAAE5C,SAAS;IACd6C,KAAK,EAAExC,WAAW;IAClByC,KAAK,EAAEnC;EACT,CAAC;EACDoC,MAAM,EAAE;IACNC,SAAS,EAAErB,cAAc;IACzB,WAAW,EAAEG,aAAa;IAC1B,aAAa,EAAEI;EACjB;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MessageDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_BreakPoints","_Button","_Columns","_IconButton","_Icons","_InfoBox","_Media","_Modal","_Styles","_Row","_Stack","_Tiles","_TitledText","_Tooltip","_Typography","_Typography2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","DIALOG_WIDTH","sm","md","lg","StyledFeedback","styled","div","withConfig","displayName","componentId","screenBelow","DialogFeedback","_ref","onVote","_useState","useState","_useState2","voted","setVoted","vote","useCallback","createElement","Body2","color","Fragment","className","Tooltip","title","IconButton","type","variant","onClick","ThumbUpOutlineIcon","StyledDialog","_ref2","$size","MessageDialog","exports","_ref3","open","onClose","_ref3$size","size","children","Modal","CancelCrossIcon","DocLinkContext","React","createContext","undefined","StyledInterfaceName","span","InterfaceNameMark","_ref4","StyledKeyboardKey","kbd","KeyboardKeyMark","_ref5","StyledDocLink","InlineLink","DocLinkMark","_ref6","mark","openArticle","useContext","href","event","preventDefault","article","CALLOUT_TYPE","info","note","success","CalloutObject","_ref7","_ref8","node","InfoBox","tone","showIcon","StyledButtonReference","ButtonReferenceObject","_ref9","_ref0","label","Button","tabIndex","RowObject","_ref1","_ref10","Row","space","TilesObject","_ref11","_ref12","Tiles","columns","collapseBelow","SplitObject","_ref13","_ref14","media","widths","textColumn","Stack","src","screenshot","mediaColumn","Media","alt","caption","Columns","reverse","alignY","ParagraphBlock","_ref15","lineHeight","ListItemBlock","_ref16","Typography","as","TitledTextBlock","_ref17","block","_ref18","level","TitledText","messageComponents","marks","objects","callout","row","tiles","split","blocks","paragraph"],"sources":["../../../../src/presentation/shared/MessageDialog.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { screenBelow } from \"../../components/BreakPoints\";\nimport { Button } from \"../../components/Button\";\nimport { Columns } from \"../../components/Columns\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon, ThumbUpOutlineIcon } from \"../../components/Icons\";\nimport { InfoBox, InfoBoxType } from \"../../components/InfoBox\";\nimport { Space } from \"../../components/LayoutTokens\";\nimport { Media } from \"../../components/Media\";\nimport { Modal } from \"../../components/Modal\";\nimport {\n PortableTextBlockRenderer,\n PortableTextComponents,\n PortableTextMarkRenderer,\n PortableTextMediaImageVariant,\n PortableTextObjectRenderer,\n PortableTextTitledTextBlock,\n} from \"../../components/PortableText\";\nimport { StyledLink as InlineLink } from \"../../components/PortableText/Styles\";\nimport { Row } from \"../../components/Row\";\nimport { Stack } from \"../../components/Stack\";\nimport { Tiles } from \"../../components/Tiles\";\nimport { TitledText } from \"../../components/TitledText\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2 } from \"../../components/Typography\";\nimport { Typography } from \"../../components/Typography/Typography\";\n\n/**\n * The in-app message dialog, as a Presentation mock.\n *\n * Two pieces, mirroring how the product is split:\n *\n * - {@link MessageDialog} — the hollow dialog shell (width, closing,\n * feedback), built only from design-system parts. In the product this shell\n * lives in the application as `InAppMessageDialog`.\n * - {@link messageComponents} — a demo message element catalog injected into\n * the design-system Portable Text engine, exactly like the typed cards\n * injected into the hollow StackedCard shell. In the product the catalog is\n * application code; the presentation ships this demo copy so the stories\n * need no app imports.\n */\n\n/* ---- the dialog shell ---------------------------------------------- */\n\nexport type MessageDialogSize = \"sm\" | \"md\" | \"lg\";\n\nconst DIALOG_WIDTH: Record<MessageDialogSize, string> = {\n sm: \"520px\",\n md: \"720px\",\n lg: \"880px\",\n};\n\n/* Feedback — the thumbs up / down slot. Down-vote reuses the up icon,\n rotated (the DS set only ships ThumbUpOutlineIcon). */\nconst StyledFeedback = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 24px 28px;\n\n ${screenBelow.sm} {\n padding: 4px 24px 24px;\n }\n\n .fb-question {\n margin-right: 4px;\n }\n\n .fb-btn svg {\n width: 18px;\n height: 18px;\n }\n\n .fb-down svg {\n transform: rotate(180deg);\n }\n`;\n\nconst DialogFeedback = ({\n onVote,\n}: {\n onVote?: (vote: \"up\" | \"down\") => void;\n}): ReactElement => {\n const [voted, setVoted] = useState<\"up\" | \"down\" | null>(null);\n const vote = useCallback(\n (value: \"up\" | \"down\") => {\n setVoted(value);\n onVote?.(value);\n },\n [onVote]\n );\n\n return (\n <StyledFeedback>\n {voted ? (\n <Body2 color=\"secondary\">Thanks for your feedback!</Body2>\n ) : (\n <>\n <Body2 color=\"secondary\" className=\"fb-question\">\n Was this helpful?\n </Body2>\n <Tooltip title=\"Yes, helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn\"\n aria-label=\"Yes, helpful\"\n onClick={() => vote(\"up\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"No, not helpful\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n className=\"fb-btn fb-down\"\n aria-label=\"No, not helpful\"\n onClick={() => vote(\"down\")}\n >\n <ThumbUpOutlineIcon />\n </IconButton>\n </Tooltip>\n </>\n )}\n </StyledFeedback>\n );\n};\n\n/* The shell is behaviour only: it sizes itself, closes on click-outside /\n Esc (DS Modal) / the X, and shows the feedback slot when an onVote handler\n is supplied. Content is whatever the caller renders as children — usually\n the Portable Text engine with the demo catalog injected. */\nconst StyledDialog = styled.div<{ $size: MessageDialogSize }>`\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: calc(100% - 32px);\n max-width: ${({ $size }) => DIALOG_WIDTH[$size]};\n max-height: calc(100vh - 96px);\n margin: 56px auto 40px;\n overflow-y: auto;\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n border-radius: 12px;\n box-shadow: var(--shadow-primary);\n\n ${screenBelow.sm} {\n margin: 16px auto;\n }\n\n /* X floats in the corner and overlaps the content padding — it does not\n reserve a row of its own. */\n .dlg-close {\n position: absolute;\n top: 12px;\n right: 12px;\n z-index: 2;\n }\n\n .dlg-content {\n padding: 40px;\n }\n\n ${screenBelow.sm} {\n .dlg-content {\n padding: 32px 20px 24px;\n }\n }\n`;\n\nexport interface MessageDialogProps {\n open: boolean;\n onClose: () => void;\n size?: MessageDialogSize;\n /** Supplying a handler shows the centred helpful / not-helpful vote. */\n onVote?: (vote: \"up\" | \"down\") => void;\n children: ReactNode;\n}\n\nexport const MessageDialog = ({\n open,\n onClose,\n size = \"md\",\n onVote,\n children,\n}: MessageDialogProps): ReactElement => (\n <Modal open={open} onClose={onClose}>\n <StyledDialog $size={size}>\n <div className=\"dlg-close\">\n <Tooltip title=\"Close\">\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label=\"Close\"\n onClick={onClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </Tooltip>\n </div>\n <div className=\"dlg-content\">{children}</div>\n {onVote ? <DialogFeedback onVote={onVote} /> : null}\n </StyledDialog>\n </Modal>\n);\n\n/* ---- doc-link wiring ------------------------------------------------ */\n\n/** How a doc-link mark opens its article (by a slug-like reference). The\n surface that renders the message supplies the handler — in the product it\n closes the dialog and opens the article Sheet. */\nexport type OpenArticleHandler = (article?: string) => void;\n\nexport const DocLinkContext = React.createContext<OpenArticleHandler>(\n () => undefined\n);\n\n/* ---- the demo message element catalog ------------------------------- */\n\n/* Inline marks ------------------------------------------------------- */\n\n/* interface-name — the name of an interface element, e.g. the Security page. */\nconst StyledInterfaceName = styled.span`\n padding: 0 4px;\n border-radius: 4px;\n background-color: var(--color-theme-300);\n color: var(--color-theme-900);\n font-weight: 600;\n white-space: nowrap;\n`;\nconst InterfaceNameMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledInterfaceName>{children}</StyledInterfaceName>\n);\n\n/* keyboard-key — a keyboard key cap. */\nconst StyledKeyboardKey = styled.kbd`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border: 1px solid var(--border-primary);\n border-bottom-width: 2px;\n border-radius: 5px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n vertical-align: baseline;\n`;\nconst KeyboardKeyMark: PortableTextMarkRenderer = ({ children }) => (\n <StyledKeyboardKey>{children}</StyledKeyboardKey>\n);\n\n/* doc-link — an inline link that opens a full help article. The mark carries\n an article reference; the open behaviour comes from DocLinkContext, so the\n authored content stays declarative. */\n/* Built on the engine's inline anchor so a doc-link sits in the sentence\n exactly like a default link mark — same size, weight and line box as the\n surrounding copy — just recoloured. */\nconst StyledDocLink = styled(InlineLink)`\n color: var(--color-secondary);\n text-decoration-color: var(--color-secondary);\n`;\nconst DocLinkMark: PortableTextMarkRenderer = ({ mark, children }) => {\n const openArticle = useContext(DocLinkContext);\n return (\n <StyledDocLink\n href=\"#\"\n onClick={(event: React.MouseEvent) => {\n event.preventDefault();\n openArticle(mark?.article as string | undefined);\n }}\n >\n {children}\n </StyledDocLink>\n );\n};\n\n/* Component objects --------------------------------------------------- */\n\n/* callout — rendered with the DS InfoBox; the catalog keeps its own tone\n vocabulary and maps it to InfoBox types. */\ntype CalloutTone = \"info\" | \"note\" | \"success\";\nconst CALLOUT_TYPE: Record<CalloutTone, InfoBoxType> = {\n info: \"default\",\n note: \"note\",\n success: \"success\",\n};\nconst CalloutObject: PortableTextObjectRenderer = ({ node, children }) => (\n <InfoBox\n type={CALLOUT_TYPE[(node.tone as CalloutTone | undefined) ?? \"info\"]}\n title={node.title as string | undefined}\n showIcon\n >\n {children}\n </InfoBox>\n);\n\n/* button-reference — a real DS Button shown for reference as its own block,\n so a message can point at a button instead of screenshotting it. It is\n intentionally non-interactive. */\nconst StyledButtonReference = styled.div`\n display: flex;\n\n .c-button {\n pointer-events: none;\n }\n`;\ntype ButtonReferenceVariant =\n | \"primary\"\n | \"secondary\"\n | \"text colored\"\n | \"text gray\";\nconst ButtonReferenceObject: PortableTextObjectRenderer = ({ node }) => {\n if (typeof node.label !== \"string\") {\n return null;\n }\n\n return (\n <StyledButtonReference aria-hidden=\"true\">\n <Button\n variant={\n (node.variant as ButtonReferenceVariant | undefined) ?? \"primary\"\n }\n size=\"small\"\n type=\"button\"\n tabIndex={-1}\n >\n {node.label}\n </Button>\n </StyledButtonReference>\n );\n};\n\n/* row — a horizontal run of blocks (e.g. two button references). */\nconst RowObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Row space={(node.space as Space | undefined) ?? \"sm\"}>{children}</Row>\n);\n\n/* tiles — an equal-size mosaic of blocks. */\nconst TilesObject: PortableTextObjectRenderer = ({ node, children }) => (\n <Tiles\n columns={(node.columns as number | undefined) ?? 3}\n space=\"md\"\n collapseBelow=\"sm\"\n >\n {children}\n </Tiles>\n);\n\n/* split — text beside media, with the one layout rule the messages follow:\n screenshots sit on the right, flat illustrations on the left. `widths` is\n authored as [text, media] and reordered with the columns. */\ninterface SplitMedia {\n src: string;\n alt?: string;\n // Split never carries a video: video media always stays in the vertical flow.\n variant?: PortableTextMediaImageVariant;\n caption?: string;\n}\nconst SplitObject: PortableTextObjectRenderer = ({ node, children }) => {\n const media = node.media as SplitMedia | undefined;\n const widths = (node.widths as number[] | undefined) ?? [1, 1];\n const textColumn = <Stack space=\"lg\">{children}</Stack>;\n\n // A split without media degrades to its text column instead of crashing.\n if (!media?.src) {\n return textColumn;\n }\n\n const screenshot = media.variant === \"screenshot\";\n\n const mediaColumn = (\n <Media\n src={media.src}\n alt={media.alt}\n variant={media.variant}\n caption={media.caption}\n />\n );\n\n return (\n <Columns\n widths={screenshot ? widths : [...widths].reverse()}\n space=\"xl\"\n alignY=\"center\"\n collapseBelow=\"md\"\n >\n {screenshot ? textColumn : mediaColumn}\n {screenshot ? mediaColumn : textColumn}\n </Columns>\n );\n};\n\n/* Default-block overrides --------------------------------------------- */\n\n/* The engine's defaults use Body 1 primary; the messages are designed on the\n quieter Body 2 secondary voice, so the catalog overrides the text blocks —\n demonstrating the `blocks` half of the injection contract. */\nconst ParagraphBlock: PortableTextBlockRenderer = ({ children }) => (\n <Body2 color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Body2>\n);\n\nconst ListItemBlock: PortableTextBlockRenderer = ({ children }) => (\n <Typography variant=\"Body 2\" as=\"li\" color=\"secondary\" lineHeight=\"loose\">\n {children}\n </Typography>\n);\n\n/* Titled sections speak in the quiet Header2 subhead voice rather than the\n engine's default Title2 for level 2, and keep a roomier rhythm between a\n titled section's content nodes. */\nconst TitledTextBlock: PortableTextBlockRenderer = ({ block, children }) => {\n const { title, level } = block as PortableTextTitledTextBlock;\n\n return (\n <TitledText title={title} variant={level === 1 ? \"title1\" : \"header2\"}>\n {children ? <Stack space=\"sm\">{children}</Stack> : undefined}\n </TitledText>\n );\n};\n\n/** The demo catalog the presentations inject into the Portable Text engine —\n the stand-in for the application's `messageComponents` map. */\nexport const messageComponents: PortableTextComponents = {\n marks: {\n \"interface-name\": InterfaceNameMark,\n \"keyboard-key\": KeyboardKeyMark,\n \"doc-link\": DocLinkMark,\n },\n objects: {\n callout: CalloutObject,\n \"button-reference\": ButtonReferenceObject,\n row: RowObject,\n tiles: TilesObject,\n split: SplitObject,\n },\n blocks: {\n paragraph: ParagraphBlock,\n \"list-item\": ListItemBlock,\n \"titled-text\": TitledTextBlock,\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AASA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,IAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AACA,IAAAiB,WAAA,GAAAjB,OAAA;AACA,IAAAkB,YAAA,GAAAlB,OAAA;AAAoE,SAAAE,uBAAAiB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAApB,wBAAAoB,CAAA,EAAAG,CAAA,6BAAA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MAAA,CAAAuB,OAAA,CAAAiE,aAAA,CAACzE,MAAA,CAAA4J,KAAK;IAACb,KAAK,EAAC;EAAI,GAAEhD,QAAgB,CAAC,GAAGM,SACzC,CAAC;AAEjB,CAAC;;AAED;AACA;AACO,IAAM8E,iBAAyC,GAAA1F,OAAA,CAAA0F,iBAAA,GAAG;EACvDC,KAAK,EAAE;IACL,gBAAgB,EAAE5E,iBAAiB;IACnC,cAAc,EAAEI,eAAe;IAC/B,UAAU,EAAEI;EACd,CAAC;EACDqE,OAAO,EAAE;IACPC,OAAO,EAAEzD,aAAa;IACtB,kBAAkB,EAAEQ,qBAAqB;IACzCkD,GAAG,EAAE5C,SAAS;IACd6C,KAAK,EAAExC,WAAW;IAClByC,KAAK,EAAEnC;EACT,CAAC;EACDoC,MAAM,EAAE;IACNC,SAAS,EAAErB,cAAc;IACzB,WAAW,EAAEG,aAAa;IAC1B,aAAa,EAAEI;EACjB;AACF,CAAC","ignoreList":[]}
@@ -44,7 +44,9 @@ var _exportNames = {
44
44
  SettingsContent: true,
45
45
  StyledSettingRow: true,
46
46
  RowText: true,
47
- SettingRow: true
47
+ SettingRow: true,
48
+ FeatureAvailability: true,
49
+ DEFAULT_FEATURE_AVAILABILITY: true
48
50
  };
49
51
  Object.defineProperty(exports, "BackupCodesDialogs", {
50
52
  enumerable: true,
@@ -88,12 +90,24 @@ Object.defineProperty(exports, "CreateLoginCodeDialogs", {
88
90
  return _TwoFactorDialogs.CreateLoginCodeDialogs;
89
91
  }
90
92
  });
93
+ Object.defineProperty(exports, "DEFAULT_FEATURE_AVAILABILITY", {
94
+ enumerable: true,
95
+ get: function get() {
96
+ return _FeatureAvailability.DEFAULT_FEATURE_AVAILABILITY;
97
+ }
98
+ });
91
99
  Object.defineProperty(exports, "DocLinkContext", {
92
100
  enumerable: true,
93
101
  get: function get() {
94
102
  return _MessageDialog.DocLinkContext;
95
103
  }
96
104
  });
105
+ Object.defineProperty(exports, "FeatureAvailability", {
106
+ enumerable: true,
107
+ get: function get() {
108
+ return _FeatureAvailability.FeatureAvailability;
109
+ }
110
+ });
97
111
  Object.defineProperty(exports, "FloatingControls", {
98
112
  enumerable: true,
99
113
  get: function get() {
@@ -322,4 +336,5 @@ var _UserMenu = require("./UserMenu");
322
336
  var _TwoFactorShield = require("./TwoFactorShield");
323
337
  var _TwoFactorDialogs = require("./TwoFactorDialogs");
324
338
  var _settings = require("./settings");
339
+ var _FeatureAvailability = require("./FeatureAvailability");
325
340
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_MessageDialog","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs","_settings"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA;AAEA,IAAAgB,QAAA,GAAAhB,OAAA;AAMA,IAAAiB,iBAAA,GAAAjB,OAAA;AACA,IAAAkB,cAAA,GAAAlB,OAAA;AAUA,IAAAmB,mBAAA,GAAAnB,OAAA;AAEA,IAAAoB,sBAAA,GAAApB,OAAA;AACA,IAAAqB,8BAAA,GAAArB,OAAA;AAEA,IAAAsB,wBAAA,GAAAtB,OAAA;AAeA,IAAAuB,kBAAA,GAAAvB,OAAA;AAWA,IAAAwB,kBAAA,GAAAxB,OAAA;AAiBA,IAAAyB,sBAAA,GAAAzB,OAAA;AACA,IAAA0B,gBAAA,GAAA1B,OAAA;AAKA,IAAA2B,SAAA,GAAA3B,OAAA;AAEA,IAAA4B,gBAAA,GAAA5B,OAAA;AAEA,IAAA6B,iBAAA,GAAA7B,OAAA;AAKA,IAAA8B,SAAA,GAAA9B,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_tokens","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_MainLogo","_RoundAvatar","_PresentationShell","_headers","_FloatingControls","_MessageDialog","_HelpAndSupportMenu","_LinkingCommandsButton","_LinkBranchOrPullRequestDialog","_ConnectRepositoryDialog","_WebhookLogsDialog","_SourceCodeSection","_SuggestSubtasksButton","_TaskOptionsMenu","_UserMenu","_TwoFactorShield","_TwoFactorDialogs","_settings","_FeatureAvailability"],"sources":["../../../../src/presentation/shared/index.ts"],"sourcesContent":["/**\n * Shared building blocks for the Presentation mock-ups (`Presentation/*`\n * stories). The application shell, page headers, tab bar and small widgets are\n * defined once here and reused by the List view, Column view, Task sheet and\n * empty-page stories so the chrome stays identical and in one place.\n */\nexport * from \"./tokens\";\nexport { MainLogo } from \"./MainLogo\";\nexport { RoundAvatar } from \"./RoundAvatar\";\nexport { PresentationShell, StyledPagePaper } from \"./PresentationShell\";\nexport type { PresentationShellProps } from \"./PresentationShell\";\nexport { PageHeader, ProjectPageHeader, TabHeader } from \"./headers\";\nexport type {\n PageHeaderProps,\n ProjectPageHeaderProps,\n TabHeaderProps,\n} from \"./headers\";\nexport { FloatingControls } from \"./FloatingControls\";\nexport {\n MessageDialog,\n DocLinkContext,\n messageComponents,\n} from \"./MessageDialog\";\nexport type {\n MessageDialogProps,\n MessageDialogSize,\n OpenArticleHandler,\n} from \"./MessageDialog\";\nexport { HelpAndSupportMenu } from \"./HelpAndSupportMenu\";\nexport type { HelpAndSupportMenuProps } from \"./HelpAndSupportMenu\";\nexport { LinkingCommandsButton } from \"./LinkingCommandsButton\";\nexport { LinkBranchOrPullRequestDialog } from \"./LinkBranchOrPullRequestDialog\";\nexport type { LinkBranchOrPullRequestDialogProps } from \"./LinkBranchOrPullRequestDialog\";\nexport {\n ConnectRepositoryDialog,\n RepositorySelect,\n buildRepoOptions,\n CONNECTIONS,\n PROJECT_REPOSITORIES,\n CONNECTABLE_REPOSITORIES,\n} from \"./ConnectRepositoryDialog\";\nexport type {\n ConnectRepositoryDialogProps,\n RepositorySelectProps,\n Connection,\n ConnectionService,\n Repository,\n} from \"./ConnectRepositoryDialog\";\nexport {\n WebhookLogsDialog,\n WEBHOOK_CONNECTIONS,\n WEBHOOK_REPOSITORIES,\n} from \"./WebhookLogsDialog\";\nexport type {\n WebhookLogsDialogProps,\n WebhookConnection,\n WebhookRepository,\n WebhookLog,\n} from \"./WebhookLogsDialog\";\nexport {\n SourceCodeSection,\n IssueRow,\n CodeRow,\n Spine,\n HistoryDialog,\n CompletedHeader,\n} from \"./SourceCodeSection\";\nexport type {\n IssueEntry,\n CodeEntry,\n Stage,\n HistoryEvent,\n StageState,\n CodeStatus,\n SectionVariant,\n} from \"./SourceCodeSection\";\nexport { SuggestSubtasksButton } from \"./SuggestSubtasksButton\";\nexport { TaskOptionsMenu, TaskListOptionsMenu } from \"./TaskOptionsMenu\";\nexport type {\n TaskOptionsMenuProps,\n TaskListOptionsMenuProps,\n} from \"./TaskOptionsMenu\";\nexport { UserMenu } from \"./UserMenu\";\nexport type { UserMenuProps, UserMenuVariant } from \"./UserMenu\";\nexport { TwoFactorShield } from \"./TwoFactorShield\";\nexport type { TwoFactorShieldProps } from \"./TwoFactorShield\";\nexport { BackupCodesDialogs, CreateLoginCodeDialogs } from \"./TwoFactorDialogs\";\nexport type {\n BackupCodesDialogsProps,\n CreateLoginCodeDialogsProps,\n} from \"./TwoFactorDialogs\";\nexport {\n SettingsHeader,\n SettingsContent,\n StyledSettingRow,\n RowText,\n SettingRow,\n} from \"./settings\";\nexport type { SettingsHeaderProps, SettingRowProps } from \"./settings\";\nexport {\n FeatureAvailability,\n DEFAULT_FEATURE_AVAILABILITY,\n} from \"./FeatureAvailability\";\nexport type {\n FeatureAvailabilityProps,\n AvailabilityRow,\n AvailabilityMark,\n AvailabilityStatus,\n} from \"./FeatureAvailability\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA;AAEA,IAAAgB,QAAA,GAAAhB,OAAA;AAMA,IAAAiB,iBAAA,GAAAjB,OAAA;AACA,IAAAkB,cAAA,GAAAlB,OAAA;AAUA,IAAAmB,mBAAA,GAAAnB,OAAA;AAEA,IAAAoB,sBAAA,GAAApB,OAAA;AACA,IAAAqB,8BAAA,GAAArB,OAAA;AAEA,IAAAsB,wBAAA,GAAAtB,OAAA;AAeA,IAAAuB,kBAAA,GAAAvB,OAAA;AAWA,IAAAwB,kBAAA,GAAAxB,OAAA;AAiBA,IAAAyB,sBAAA,GAAAzB,OAAA;AACA,IAAA0B,gBAAA,GAAA1B,OAAA;AAKA,IAAA2B,SAAA,GAAA3B,OAAA;AAEA,IAAA4B,gBAAA,GAAA5B,OAAA;AAEA,IAAA6B,iBAAA,GAAA7B,OAAA;AAKA,IAAA8B,SAAA,GAAA9B,OAAA;AAQA,IAAA+B,oBAAA,GAAA/B,OAAA","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
- import { PortableTextMediaBlock } from "../PortableText/types";
3
- export interface IMediaProps extends Omit<PortableTextMediaBlock, "type">, React.ComponentPropsWithoutRef<"div"> {
2
+ import { PortableTextMediaBlock, PortableTextMediaImageVariant } from "../PortableText/types";
3
+ export interface IMediaProps extends Omit<PortableTextMediaBlock, "type" | "variant">, React.ComponentPropsWithoutRef<"div"> {
4
+ variant?: PortableTextMediaImageVariant;
4
5
  }
5
6
  /**
6
7
  * An image block: a screenshot renders framed (border, no shadow), a flat
@@ -1 +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"}
1
+ {"version":3,"file":"Media.d.ts","sourceRoot":"","sources":["../../../../src/components/Media/Media.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAG/B,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC,EACtD,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACvC,OAAO,CAAC,EAAE,6BAA6B,CAAC;CACzC;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,oFASjB,CAAC"}
@@ -1 +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":[]}
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 {\n PortableTextMediaBlock,\n PortableTextMediaImageVariant,\n} from \"../PortableText/types\";\nimport { Caption1 } from \"../Typography\";\n\nexport interface IMediaProps\n extends Omit<PortableTextMediaBlock, \"type\" | \"variant\">,\n React.ComponentPropsWithoutRef<\"div\"> {\n variant?: PortableTextMediaImageVariant;\n}\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;AAKtC,SAASC,QAAQ,QAAQ,eAAe;AAQxC;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":[]}
@@ -16,7 +16,25 @@ export declare const StyledCodeBlock: import("styled-components").StyledComponen
16
16
  export declare const StyledTableBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
17
17
  /** The default `divider` block: a themed horizontal rule. */
18
18
  export declare const StyledDivider: import("styled-components").StyledComponent<"hr", any, {}, never>;
19
- /** The default `list` block; rendered as ul or ol through the `as` prop. */
19
+ /**
20
+ * The default `list` block; rendered as ul or ol through the `as` prop, and
21
+ * tagged `data-portable-list` so the depth rules below scope to design-system
22
+ * lists — a stray `<ul>`/`<ol>` from an injected renderer is left untouched.
23
+ *
24
+ * Nesting works structurally: each level is its own StyledList inside a parent
25
+ * `<li>`, so it re-applies its own `padding-left` (indentation compounds) and,
26
+ * for ordered levels, restarts numbering. A nested list carries no vertical
27
+ * margin, so it hugs the item it belongs to.
28
+ *
29
+ * Both bullet and numbered levels change their marker by nesting depth, so
30
+ * levels stay distinct even where the two interleave:
31
+ * bullets disc → circle → square → (disc)
32
+ * numbers decimal → lower-alpha → lower-roman → (upper-alpha)
33
+ * Depth is counted from the list ancestors themselves (not per-tag), so an
34
+ * intervening `<ol>` never throws off a `<ul>`'s depth and vice-versa. The
35
+ * rules are ordered shallow-to-deep; a deeper rule is more specific, so it
36
+ * wins the cascade for the levels it applies to.
37
+ */
20
38
  export declare const StyledList: import("styled-components").StyledComponent<"ul", any, {
21
39
  $ordered: boolean;
22
40
  }, never>;
@@ -1 +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;;;;GAIG;AACH,eAAO,MAAM,eAAe,oEAY3B,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,oEAI5B,CAAC;AAIF,6DAA6D;AAC7D,eAAO,MAAM,aAAa,mEAIzB,CAAC;AAIF,4EAA4E;AAC5E,eAAO,MAAM,UAAU;cAAyB,OAAO;SAQtD,CAAC"}
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;;;;GAIG;AACH,eAAO,MAAM,eAAe,oEAY3B,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,oEAI5B,CAAC;AAIF,6DAA6D;AAC7D,eAAO,MAAM,aAAa,mEAIzB,CAAC;AAIF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU;cAAyB,OAAO;SAgCtD,CAAC"}
@@ -44,11 +44,29 @@ export const StyledDivider = styled.hr.withConfig({
44
44
  })(["margin:0;border:none;border-top:1px solid var(--border-primary);"]);
45
45
  StyledDivider.displayName = "StyledDivider";
46
46
 
47
- /** The default `list` block; rendered as ul or ol through the `as` prop. */
47
+ /**
48
+ * The default `list` block; rendered as ul or ol through the `as` prop, and
49
+ * tagged `data-portable-list` so the depth rules below scope to design-system
50
+ * lists — a stray `<ul>`/`<ol>` from an injected renderer is left untouched.
51
+ *
52
+ * Nesting works structurally: each level is its own StyledList inside a parent
53
+ * `<li>`, so it re-applies its own `padding-left` (indentation compounds) and,
54
+ * for ordered levels, restarts numbering. A nested list carries no vertical
55
+ * margin, so it hugs the item it belongs to.
56
+ *
57
+ * Both bullet and numbered levels change their marker by nesting depth, so
58
+ * levels stay distinct even where the two interleave:
59
+ * bullets disc → circle → square → (disc)
60
+ * numbers decimal → lower-alpha → lower-roman → (upper-alpha)
61
+ * Depth is counted from the list ancestors themselves (not per-tag), so an
62
+ * intervening `<ol>` never throws off a `<ul>`'s depth and vice-versa. The
63
+ * rules are ordered shallow-to-deep; a deeper rule is more specific, so it
64
+ * wins the cascade for the levels it applies to.
65
+ */
48
66
  export const StyledList = styled.ul.withConfig({
49
67
  displayName: "Styles__StyledList",
50
68
  componentId: "sc-1fss4z4-5"
51
- })(["margin:0;padding-left:", ";list-style:", " outside;li + li{margin-top:", ";}"], "1.25rem", _ref => {
69
+ })(["margin:0;padding-left:", ";list-style:", " outside;li + li{margin-top:", ";}& ul[data-portable-list]{list-style-type:circle;}& ol[data-portable-list]{list-style-type:lower-alpha;}& [data-portable-list] ul[data-portable-list]{list-style-type:square;}& [data-portable-list] ol[data-portable-list]{list-style-type:lower-roman;}& [data-portable-list] [data-portable-list] ul[data-portable-list]{list-style-type:disc;}& [data-portable-list] [data-portable-list] ol[data-portable-list]{list-style-type:upper-alpha;}"], "1.25rem", _ref => {
52
70
  let $ordered = _ref.$ordered;
53
71
  return $ordered ? "decimal" : "disc";
54
72
  }, SPACE.xs);
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["styled","SPACE","StyledCode","code","withConfig","displayName","componentId","StyledLink","a","StyledCodeBlock","pre","md","StyledTableBlock","div","StyledDivider","hr","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/**\n * The default `code-block`: quiet preformatted content. It stays a bare\n * `<pre><code>` on purpose — article surfaces inject a Copy button onto\n * every `<pre>` they render.\n */\nexport const StyledCodeBlock = styled.pre`\n margin: 0;\n padding: ${SPACE.md};\n border-radius: ${theme(\"borderRadius.lg\")};\n background-color: var(--color-theme-200);\n overflow-x: auto;\n\n code {\n font-family: \"SFMono-Regular\", Menlo, Consolas, \"Liberation Mono\", monospace;\n font-size: ${theme(\"fontSize.body-2\")};\n color: var(--color-theme-900);\n }\n`;\n\nStyledCodeBlock.displayName = \"StyledCodeBlock\";\n\n/**\n * The default `table` block wrapper: Table ships page-level chrome (outer\n * margins) that flowing content does not want — the PortableText Stack owns\n * the vertical rhythm here.\n */\nexport const StyledTableBlock = styled.div`\n .c-table__wrap {\n margin: 0;\n }\n`;\n\nStyledTableBlock.displayName = \"StyledTableBlock\";\n\n/** The default `divider` block: a themed horizontal rule. */\nexport const StyledDivider = styled.hr`\n margin: 0;\n border: none;\n border-top: 1px solid var(--border-primary);\n`;\n\nStyledDivider.displayName = \"StyledDivider\";\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;AACA;AACA;AACA;AACA,OAAO,MAAMI,eAAe,GAAGT,MAAM,CAACU,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wOAE5BL,KAAK,CAACU,EAAE,EACF,QAAwB,EAM1B,UAAwB,CAGxC;AAEDF,eAAe,CAACJ,WAAW,GAAG,iBAAiB;;AAE/C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMO,gBAAgB,GAAGZ,MAAM,CAACa,GAAG,CAAAT,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iCAIzC;AAEDM,gBAAgB,CAACP,WAAW,GAAG,kBAAkB;;AAEjD;AACA,OAAO,MAAMS,aAAa,GAAGd,MAAM,CAACe,EAAE,CAAAX,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wEAIrC;AAEDQ,aAAa,CAACT,WAAW,GAAG,eAAe;;AAE3C;AACA,OAAO,MAAMW,UAAU,GAAGhB,MAAM,CAACiB,EAAE,CAAAb,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qFAEjB,SAAkB,EACpBY,IAAA;EAAA,IAAGC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAAA,OAAQA,QAAQ,GAAG,SAAS,GAAG,MAAM;AAAA,CAAC,EAG/ClB,KAAK,CAACmB,EAAE,CAEzB;AAEDJ,UAAU,CAACX,WAAW,GAAG,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"Styles.js","names":["styled","SPACE","StyledCode","code","withConfig","displayName","componentId","StyledLink","a","StyledCodeBlock","pre","md","StyledTableBlock","div","StyledDivider","hr","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/**\n * The default `code-block`: quiet preformatted content. It stays a bare\n * `<pre><code>` on purpose — article surfaces inject a Copy button onto\n * every `<pre>` they render.\n */\nexport const StyledCodeBlock = styled.pre`\n margin: 0;\n padding: ${SPACE.md};\n border-radius: ${theme(\"borderRadius.lg\")};\n background-color: var(--color-theme-200);\n overflow-x: auto;\n\n code {\n font-family: \"SFMono-Regular\", Menlo, Consolas, \"Liberation Mono\", monospace;\n font-size: ${theme(\"fontSize.body-2\")};\n color: var(--color-theme-900);\n }\n`;\n\nStyledCodeBlock.displayName = \"StyledCodeBlock\";\n\n/**\n * The default `table` block wrapper: Table ships page-level chrome (outer\n * margins) that flowing content does not want — the PortableText Stack owns\n * the vertical rhythm here.\n */\nexport const StyledTableBlock = styled.div`\n .c-table__wrap {\n margin: 0;\n }\n`;\n\nStyledTableBlock.displayName = \"StyledTableBlock\";\n\n/** The default `divider` block: a themed horizontal rule. */\nexport const StyledDivider = styled.hr`\n margin: 0;\n border: none;\n border-top: 1px solid var(--border-primary);\n`;\n\nStyledDivider.displayName = \"StyledDivider\";\n\n/**\n * The default `list` block; rendered as ul or ol through the `as` prop, and\n * tagged `data-portable-list` so the depth rules below scope to design-system\n * lists — a stray `<ul>`/`<ol>` from an injected renderer is left untouched.\n *\n * Nesting works structurally: each level is its own StyledList inside a parent\n * `<li>`, so it re-applies its own `padding-left` (indentation compounds) and,\n * for ordered levels, restarts numbering. A nested list carries no vertical\n * margin, so it hugs the item it belongs to.\n *\n * Both bullet and numbered levels change their marker by nesting depth, so\n * levels stay distinct even where the two interleave:\n * bullets disc → circle → square → (disc)\n * numbers decimal → lower-alpha → lower-roman → (upper-alpha)\n * Depth is counted from the list ancestors themselves (not per-tag), so an\n * intervening `<ol>` never throws off a `<ul>`'s depth and vice-versa. The\n * rules are ordered shallow-to-deep; a deeper rule is more specific, so it\n * wins the cascade for the levels it applies to.\n */\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 /* Depth 2 */\n & ul[data-portable-list] {\n list-style-type: circle;\n }\n & ol[data-portable-list] {\n list-style-type: lower-alpha;\n }\n\n /* Depth 3 */\n & [data-portable-list] ul[data-portable-list] {\n list-style-type: square;\n }\n & [data-portable-list] ol[data-portable-list] {\n list-style-type: lower-roman;\n }\n\n /* Depth 4 (the producer's cap; deeper content clamps into it) */\n & [data-portable-list] [data-portable-list] ul[data-portable-list] {\n list-style-type: disc;\n }\n & [data-portable-list] [data-portable-list] ol[data-portable-list] {\n list-style-type: upper-alpha;\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;AACA;AACA;AACA;AACA,OAAO,MAAMI,eAAe,GAAGT,MAAM,CAACU,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wOAE5BL,KAAK,CAACU,EAAE,EACF,QAAwB,EAM1B,UAAwB,CAGxC;AAEDF,eAAe,CAACJ,WAAW,GAAG,iBAAiB;;AAE/C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMO,gBAAgB,GAAGZ,MAAM,CAACa,GAAG,CAAAT,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iCAIzC;AAEDM,gBAAgB,CAACP,WAAW,GAAG,kBAAkB;;AAEjD;AACA,OAAO,MAAMS,aAAa,GAAGd,MAAM,CAACe,EAAE,CAAAX,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wEAIrC;AAEDQ,aAAa,CAACT,WAAW,GAAG,eAAe;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMW,UAAU,GAAGhB,MAAM,CAACiB,EAAE,CAAAb,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sgBAEjB,SAAkB,EACpBY,IAAA;EAAA,IAAGC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAAA,OAAQA,QAAQ,GAAG,SAAS,GAAG,MAAM;AAAA,CAAC,EAG/ClB,KAAK,CAACmB,EAAE,CA0BzB;AAEDJ,UAAU,CAACX,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../../src/components/PortableText/renderers.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,yBAAyB,EAEzB,4BAA4B,EAC5B,uBAAuB,EAKvB,wBAAwB,EAKzB,MAAM,SAAS,CAAC;AAWjB;;;;GAIG;AAEH,eAAO,MAAM,gCAAgC,EAAE,MAAM,CACnD,uBAAuB,EACvB,wBAAwB,CAoBzB,CAAC;AA8CF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,4BAA4B,EAC5B,yBAAyB,CA0E1B,CAAC"}
1
+ {"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../../src/components/PortableText/renderers.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,yBAAyB,EAEzB,4BAA4B,EAC5B,uBAAuB,EAKvB,wBAAwB,EAKzB,MAAM,SAAS,CAAC;AAWjB;;;;GAIG;AAEH,eAAO,MAAM,gCAAgC,EAAE,MAAM,CACnD,uBAAuB,EACvB,wBAAwB,CAoBzB,CAAC;AA8CF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,4BAA4B,EAC5B,yBAAyB,CA4F1B,CAAC"}