@carto/ps-react-ui 6.4.0 → 6.5.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 (88) hide show
  1. package/dist/{actions-DyWNwvLu.js → actions-D_PVFZaM.js} +4 -4
  2. package/dist/{actions-DyWNwvLu.js.map → actions-D_PVFZaM.js.map} +1 -1
  3. package/dist/{category-BHBd5Pcc.js → category-UIGvFN3D.js} +4 -4
  4. package/dist/{category-BHBd5Pcc.js.map → category-UIGvFN3D.js.map} +1 -1
  5. package/dist/chat.js +472 -470
  6. package/dist/chat.js.map +1 -1
  7. package/dist/{components-CTUpdQuj.js → components-DDJU4m0t.js} +8 -8
  8. package/dist/components-DDJU4m0t.js.map +1 -0
  9. package/dist/components.js +2 -2
  10. package/dist/{download-B4sykOFm.js → download-DIj1Iz0t.js} +2 -2
  11. package/dist/{download-B4sykOFm.js.map → download-DIj1Iz0t.js.map} +1 -1
  12. package/dist/{formula-DJS-JLpk.js → formula-CSHhAoyW.js} +4 -4
  13. package/dist/{formula-DJS-JLpk.js.map → formula-CSHhAoyW.js.map} +1 -1
  14. package/dist/{item-color-B7xkIpDZ.js → item-color-7o7pFBR2.js} +26 -18
  15. package/dist/item-color-7o7pFBR2.js.map +1 -0
  16. package/dist/markdown-B8lLR-NY.js +106 -0
  17. package/dist/markdown-B8lLR-NY.js.map +1 -0
  18. package/dist/{spread-CQwFIwuz.js → spread-BRfPPIep.js} +3 -3
  19. package/dist/{spread-CQwFIwuz.js.map → spread-BRfPPIep.js.map} +1 -1
  20. package/dist/style-DTLuIo84.js +87 -0
  21. package/dist/style-DTLuIo84.js.map +1 -0
  22. package/dist/{styles-BCEBm7xh.js → styles-yKcpfyNV.js} +5 -5
  23. package/dist/styles-yKcpfyNV.js.map +1 -0
  24. package/dist/{table-DEdW_fDj.js → table-Col_FRvb.js} +2 -2
  25. package/dist/{table-DEdW_fDj.js.map → table-Col_FRvb.js.map} +1 -1
  26. package/dist/theme/tailwind.css +373 -0
  27. package/dist/theme.js +123 -0
  28. package/dist/theme.js.map +1 -0
  29. package/dist/types/components/lasso-tool/styles.d.ts +4 -4
  30. package/dist/types/theme/create-carto-theme.d.ts +7 -0
  31. package/dist/types/theme/deep-merge.d.ts +6 -0
  32. package/dist/types/theme/generate-tailwind-css.d.ts +8 -0
  33. package/dist/types/theme/index.d.ts +2 -0
  34. package/dist/types/widgets/markdown/style.d.ts +74 -0
  35. package/dist/types/widgets/utils/spacing-px.d.ts +13 -0
  36. package/dist/{utils-C-eWwOhE.js → utils-Dw4y8tiq.js} +2 -2
  37. package/dist/{utils-C-eWwOhE.js.map → utils-Dw4y8tiq.js.map} +1 -1
  38. package/dist/widgets/actions.js +3 -3
  39. package/dist/widgets/bar.js +54 -54
  40. package/dist/widgets/bar.js.map +1 -1
  41. package/dist/widgets/category.js +1 -1
  42. package/dist/widgets/formula.js +1 -1
  43. package/dist/widgets/histogram.js +70 -70
  44. package/dist/widgets/histogram.js.map +1 -1
  45. package/dist/widgets/markdown.js +1 -1
  46. package/dist/widgets/pie.js +78 -78
  47. package/dist/widgets/pie.js.map +1 -1
  48. package/dist/widgets/scatterplot.js +82 -82
  49. package/dist/widgets/scatterplot.js.map +1 -1
  50. package/dist/widgets/spread.js +1 -1
  51. package/dist/widgets/table.js +1 -1
  52. package/dist/widgets/timeseries.js +62 -62
  53. package/dist/widgets/timeseries.js.map +1 -1
  54. package/dist/widgets/utils.js +1 -1
  55. package/dist/widgets.js +283 -279
  56. package/dist/widgets.js.map +1 -1
  57. package/dist/{zoom-toggle-MmLjMTEw.js → zoom-toggle-DqrV_0Ji.js} +2 -2
  58. package/dist/{zoom-toggle-MmLjMTEw.js.map → zoom-toggle-DqrV_0Ji.js.map} +1 -1
  59. package/package.json +8 -1
  60. package/src/chat/bubbles/styles.ts +2 -0
  61. package/src/components/lasso-tool/lasso-tool-inline.test.tsx +4 -4
  62. package/src/components/lasso-tool/lasso-tool-inline.tsx +6 -6
  63. package/src/components/lasso-tool/styles.ts +4 -4
  64. package/src/theme/create-carto-theme.test.ts +53 -0
  65. package/src/theme/create-carto-theme.ts +21 -0
  66. package/src/theme/deep-merge.test.ts +25 -0
  67. package/src/theme/deep-merge.ts +22 -0
  68. package/src/theme/generate-tailwind-css.test.ts +87 -0
  69. package/src/theme/generate-tailwind-css.ts +178 -0
  70. package/src/theme/index.ts +2 -0
  71. package/src/theme/tailwind-compile.test.ts +71 -0
  72. package/src/theme/tailwind.css +373 -0
  73. package/src/widgets/bar/options.ts +7 -6
  74. package/src/widgets/histogram/options.ts +7 -6
  75. package/src/widgets/markdown/style.ts +40 -0
  76. package/src/widgets/note/widget-note.tsx +4 -1
  77. package/src/widgets/pie/options.ts +5 -4
  78. package/src/widgets/scatterplot/options.ts +7 -6
  79. package/src/widgets/timeseries/options.ts +7 -6
  80. package/src/widgets/utils/css-variables-theme.test.ts +32 -0
  81. package/src/widgets/utils/option-builders.ts +4 -6
  82. package/src/widgets/utils/spacing-px.test.ts +42 -0
  83. package/src/widgets/utils/spacing-px.ts +24 -0
  84. package/dist/components-CTUpdQuj.js.map +0 -1
  85. package/dist/item-color-B7xkIpDZ.js.map +0 -1
  86. package/dist/markdown-DmvLi3vx.js +0 -159
  87. package/dist/markdown-DmvLi3vx.js.map +0 -1
  88. package/dist/styles-BCEBm7xh.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"item-color-B7xkIpDZ.js","names":["resolveThemeColor","niceNum","value","absValue","base","rounded","buildLegendConfig","hasLegend","labelFormatter","name","buildGridConfig","theme","buildAxisLabelStyle","createTooltipPositioner","position","size","point","createTooltipFormatter","items","params","tooltip","callback","values","item","marginStyle","marker","seriesName","buildSeriesLabelConfig","formatter","encodeIndex","encodeKey","dimName","row","createItemColorResolver","templateColor","template","datumColor","readColor","datums","custom","fallback","datum","color"],"sources":["../src/widgets/utils/option-builders.ts","../src/widgets/utils/item-color.ts"],"sourcesContent":["import type { Theme } from '@mui/material'\nimport type { LegendComponentOption } from 'echarts'\nimport type {\n CallbackDataParams,\n TopLevelFormatterParams,\n} from 'echarts/types/dist/shared'\n\n/**\n * Shared EChart configuration builders for chart widgets\n */\n\n/**\n * Rounds a value up to the nearest \"nice\" number.\n * A nice number is a multiple of 10^floor(log10(value)).\n *\n * Examples: 547 → 600, 200 → 200, 1200 → 2000, 18 → 20, 5 → 5, -547 → -500\n */\nexport function niceNum(value: number): number {\n if (value === 0) return 0\n const absValue = Math.abs(value)\n const base = Math.pow(10, Math.floor(Math.log10(absValue)))\n const rounded = Math.ceil(absValue / base) * base\n return value < 0 ? -rounded : rounded\n}\n\n/**\n * Builds standard legend configuration for chart widgets\n *\n * @param params - Legend configuration parameters\n * @param params.hasLegend - Whether to show the legend\n * @param params.labelFormatter - Optional formatter for legend item names\n * @returns Legend configuration object\n */\nexport function buildLegendConfig({\n hasLegend,\n labelFormatter,\n}: {\n hasLegend: boolean\n labelFormatter?: (value: string | number) => string | number\n}): LegendComponentOption {\n return {\n show: hasLegend,\n icon: 'circle' as const,\n left: 0,\n bottom: 0,\n orient: 'horizontal',\n type: 'scroll',\n ...(labelFormatter && {\n formatter: (name: string) => String(labelFormatter(name)),\n }),\n }\n}\n\n/**\n * Builds standard grid configuration with legend-aware spacing\n *\n * @param hasLegend - Whether the chart has a legend\n * @param theme - MUI theme for spacing\n * @param additionalConfig - Additional grid configuration to merge\n * @returns Grid configuration object\n */\nexport function buildGridConfig(hasLegend: boolean, theme: Theme) {\n return {\n ...(!hasLegend && { bottom: parseInt(theme.spacing(3)) }),\n ...(hasLegend && { bottom: parseInt(theme.spacing(7)) }),\n }\n}\n\n/**\n * Builds the shared axis-label text style for chart widgets, matching the\n * design's \"Overline (Delicate)\" token (Inter, 10px) in the secondary text\n * colour (`rgba(44,48,50,0.6)`). Spread into an ECharts `axisLabel` for both\n * x and y axes so every chart's labels stay consistent.\n *\n * Note: the token's `letterSpacing` and `textTransform: uppercase` are not\n * representable in ECharts canvas text, so only font size/family/colour are\n * applied.\n *\n * @param theme - MUI theme providing the typography token and palette\n * @returns `{ fontSize, fontFamily, color }` for an ECharts `axisLabel`\n */\nexport function buildAxisLabelStyle(theme: Theme): {\n fontSize: string | number | undefined\n fontFamily: string | undefined\n color: string\n} {\n return {\n fontSize: theme.typography.overlineDelicate?.fontSize,\n fontFamily: theme.typography.overlineDelicate?.fontFamily,\n color: theme.palette.black?.[60] ?? theme.palette.text.secondary,\n }\n}\n\n/**\n * Creates a tooltip position calculator that handles overflow\n * Used by bar, histogram, and scatterplot widgets\n *\n * @param theme - MUI theme for spacing\n * @returns Tooltip position function\n */\nexport function createTooltipPositioner(theme: Theme) {\n return function (\n point: [number, number],\n _params: unknown,\n _dom: unknown,\n _rect: unknown,\n size: { contentSize: [number, number]; viewSize: [number, number] },\n ) {\n const position = { top: parseInt(theme.spacing(0.5)) } as Record<\n string,\n number\n >\n\n // Position tooltip left or right based on available space\n if (size.contentSize[0] < size.viewSize[0] - point[0]) {\n position.left = point[0]\n } else {\n position.right = size.viewSize[0] - point[0]\n }\n\n return position\n }\n}\n\n/**\n * Creates an axis label formatter for ECharts\n * Used to format numeric axis labels with a widget formatter\n *\n * @param formatter - Optional formatter function from widget config\n * @returns Axis label formatter function or undefined\n */\nexport function createAxisLabelFormatter(\n formatter?: (value: number) => string,\n) {\n if (!formatter) return undefined\n return (value: number) => formatter(value)\n}\n\n/**\n * Applies labelFormatter to xAxis configuration\n * Applies to any xAxis regardless of axis type (category, value, etc.)\n *\n * @param xAxis - Existing xAxis configuration\n * @param labelFormatter - Optional labelFormatter function from widget config\n * @returns Updated xAxis configuration\n */\nexport function applyXAxisFormatter(\n xAxis: unknown,\n formatter?: (value: string | number) => string | number,\n) {\n const xAxisIsObject = xAxis && !Array.isArray(xAxis)\n const xAxisTyped = xAxis as { type?: string; axisLabel?: unknown }\n\n const axisFormatter =\n formatter && xAxisIsObject\n ? (value: string | number) => String(formatter(value))\n : undefined\n\n return {\n ...xAxisTyped,\n axisLabel: {\n ...(typeof xAxisTyped.axisLabel === 'object' && xAxisTyped.axisLabel\n ? xAxisTyped.axisLabel\n : {}),\n formatter: axisFormatter,\n },\n }\n}\n\n/**\n * Applies formatter to yAxis configuration\n * Only applies to single axis objects (not arrays) with type 'value'\n *\n * @param yAxis - Existing yAxis configuration\n * @param formatter - Optional formatter function from widget config\n * @returns Updated yAxis configuration or undefined if no changes needed\n */\nexport function applyYAxisFormatter(\n yAxis: unknown,\n formatter?: (value: number) => string,\n) {\n let axisFormatter = createAxisLabelFormatter(formatter)\n\n const yAxisIsObject = yAxis && !Array.isArray(yAxis)\n const yAxisTyped = yAxis as { type?: string; axisLabel?: unknown }\n\n if (!yAxisIsObject || yAxisTyped.type !== 'value') {\n axisFormatter = undefined\n }\n\n return {\n ...yAxisTyped,\n axisLabel: {\n ...(typeof yAxisTyped.axisLabel === 'object' && yAxisTyped.axisLabel\n ? yAxisTyped.axisLabel\n : {}),\n formatter: axisFormatter,\n },\n }\n}\n\n/**\n * Creates a tooltip formatter for ECharts\n * Formats numeric values in tooltip using widget formatter\n * Handles both axis trigger (array) and item trigger (object) modes\n *\n * @param formatter - Optional formatter function from widget config\n * @returns Tooltip formatter function or undefined\n */\nexport function createTooltipFormatter(\n callback: (\n item: CallbackDataParams,\n items: CallbackDataParams[],\n ) => {\n name: string\n seriesName: string\n marker: string\n value: string | number\n },\n) {\n return (params: TopLevelFormatterParams) => {\n // Handle both array (axis trigger) and object (item trigger)\n const items = Array.isArray(params) ? params : [params]\n\n const tooltip = (name: string, callback: string) =>\n `<div style=\"margin: 0px 0 0;line-height:1;\">${name ? `<div style=\"font-size:11px;color:#FFFFFF;font-weight:400;line-height:1; margin-bottom: 10px\">${name}</div>` : ''}<div style=\"margin: 0;line-height:1;\">${callback}</div><div style=\"clear:both\"></div></div>`\n\n const values = items.map((item) => {\n const { name, seriesName, marker, value } = callback(item, items)\n return {\n name,\n seriesName,\n marker,\n value,\n }\n })\n\n const name = values[0]?.name ?? ''\n // Show margin if name exists or there are multiple items\n const showMargin = name || items.length > 1\n const marginStyle = showMargin\n ? 'margin: 10px 0 0;line-height:1;'\n : 'margin: 0;line-height:1;'\n\n const formattedValues = values.map(\n ({ seriesName, marker, value }) =>\n `<div style=\"${marginStyle}\"><div style=\"margin: 0px 0 0;line-height:1;\">${marker}${seriesName ? `<span style=\"font-size:11px;color:#FFFFFF;font-weight:400;margin-left:2px;margin-right:10px\">${seriesName}</span>` : ''}<span style=\"float:right;margin-left:10px;font-size:11px;color:#FFFFFF;font-weight:900\">${value}</span></div></div>`,\n )\n\n return tooltip(name, formattedValues.join(''))\n }\n}\n\n/**\n * Builds a series `label` config that applies formatter to the data value\n * extracted from a dataset row using ECharts encode/dimensionNames.\n *\n * Does not set `show` — labels remain hidden by default per ECharts defaults.\n *\n * @param formatter - Optional numeric value formatter\n * @param encodeKey - The encode dimension key to extract ('y' for vertical charts, 'x' for horizontal)\n */\nexport function buildSeriesLabelConfig(\n formatter?: (value: number) => string,\n encodeKey = 'y',\n): { label: { formatter: (params: CallbackDataParams) => string } } | object {\n if (!formatter) return {}\n\n return {\n label: {\n formatter: (params: CallbackDataParams) => {\n const encodeIndex = params.encode?.[encodeKey]?.[0]\n if (encodeIndex === undefined) return ''\n const dimName = params.dimensionNames?.[encodeIndex]\n const row = params.value as Record<string, string | number>\n const value = dimName ? row[dimName] : undefined\n return typeof value === 'number'\n ? formatter(value)\n : String(value ?? '')\n },\n },\n }\n}\n\n/**\n * Builds a series `label` config that applies formatter to a raw numeric value.\n * Used by histogram where series data is number[] (not datasets).\n *\n * Does not set `show` — labels remain hidden by default per ECharts defaults.\n *\n * @param formatter - Optional numeric value formatter\n */\nexport function buildHistogramSeriesLabelConfig(\n formatter?: (value: number) => string,\n): { label: { formatter: (params: CallbackDataParams) => string } } | object {\n if (!formatter) return {}\n\n return {\n label: {\n formatter: (params: CallbackDataParams) => {\n const value = params.value as number\n return typeof value === 'number'\n ? formatter(value)\n : String(value ?? '')\n },\n },\n }\n}\n","import type { Theme } from '@mui/material'\nimport type { CallbackDataParams } from 'echarts/types/dist/shared'\nimport { resolveThemeColor } from './resolve-theme-color'\n\n/** ECharts `itemStyle.color` callback, as emitted by the chart widgets. */\nexport type ItemColorCallback = (params: CallbackDataParams) => string\n\n/**\n * Builds the callback that resolves the **base** colour of every item of one\n * series, before any selection dimming. Priority:\n *\n * 1. the datum's own `color` (`datums[params.dataIndex].color`);\n * 2. the consumer's `template.itemStyle.color` (from `optionsOverride`):\n * a string is used as is, a function is called with the ECharts params;\n * 3. `fallback` — the widget's default (series colour / palette).\n *\n * The datum is looked up by `params.dataIndex` in the widget's own data\n * rather than read off `params.data`, so it works whatever the dataset row\n * shape is (object rows, `[label, count]` tuples, `[x, y]` tuples).\n *\n * Datum and template colours go through {@link resolveThemeColor}, same as\n * per-series colours, so palette paths such as `'primary.main'` work.\n */\nexport function createItemColorResolver({\n theme,\n datums,\n template,\n fallback,\n}: {\n theme: Theme\n datums: readonly unknown[]\n template: unknown\n fallback: ItemColorCallback\n}): ItemColorCallback {\n const templateColor = (template as { itemStyle?: { color?: unknown } })\n ?.itemStyle?.color\n return (params) => {\n const datumColor = readColor(datums[params.dataIndex])\n if (datumColor) return resolveThemeColor(theme, datumColor)!\n const custom =\n typeof templateColor === 'function'\n ? (templateColor as (p: CallbackDataParams) => unknown)(params)\n : templateColor\n if (typeof custom === 'string' && custom !== '') {\n return resolveThemeColor(theme, custom)!\n }\n return fallback(params)\n }\n}\n\nfunction readColor(datum: unknown): string | undefined {\n if (datum == null || typeof datum !== 'object') return undefined\n const color = (datum as { color?: unknown }).color\n return typeof color === 'string' && color !== '' ? color : undefined\n}\n"],"mappings":";;AAiBA,SAAgBC,EAAQ,GAAuB;CAC7C,IAAIC,MAAU,GAAG,OAAO;CACxB,IAAMC,IAAW,KAAK,IAAID,CAAK,GACzBE,IAAgB,MAAI,KAAK,MAAM,KAAK,MAAMD,CAAQ,CAAC,GACnDE,IAAU,KAAK,KAAKF,IAAWC,CAAI,IAAIA;CAC7C,OAAOF,IAAQ,I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"./stores-DcBOZlU3.js";
2
- import { t as n } from "./markdown-content-BpAH_V6S.js";
3
- import { i as r, o as i, t as a } from "./download-B4sykOFm.js";
4
- import { c as o } from "react/compiler-runtime";
5
- import { Box as s, Skeleton as c, Typography as l } from "@mui/material";
6
- import { jsx as u } from "react/jsx-runtime";
7
- //#region src/widgets/markdown/style.ts
8
- var d = {
9
- root: {
10
- color: "text.primary",
11
- "& a": { color: "primary.main" },
12
- "& code": {
13
- bgcolor: "action.hover",
14
- px: .5,
15
- borderRadius: .5,
16
- fontFamily: "monospace",
17
- fontSize: "0.875em"
18
- },
19
- "& pre": {
20
- bgcolor: "action.hover",
21
- p: 1.5,
22
- borderRadius: 1,
23
- overflowX: "auto"
24
- },
25
- "& blockquote": {
26
- borderLeft: "3px solid",
27
- borderColor: "divider",
28
- pl: 1.5,
29
- ml: 0,
30
- color: "text.secondary",
31
- fontStyle: "italic"
32
- },
33
- "& ul, & ol": {
34
- pl: 3,
35
- my: 1
36
- },
37
- "& li": { my: .25 },
38
- "& hr": {
39
- border: "none",
40
- borderTop: "1px solid",
41
- borderColor: "divider",
42
- my: 1.5
43
- },
44
- "& table": {
45
- borderCollapse: "collapse",
46
- width: "100%"
47
- },
48
- "& th, & td": {
49
- border: "1px solid",
50
- borderColor: "divider",
51
- px: 1,
52
- py: .5,
53
- textAlign: "left"
54
- }
55
- },
56
- paragraph: { my: 1 },
57
- heading: {
58
- mt: 2,
59
- mb: 1,
60
- fontWeight: 600
61
- }
62
- }, f = {
63
- h1: (e) => p(e, "h4"),
64
- h2: (e) => p(e, "h5"),
65
- h3: (e) => p(e, "h6"),
66
- h4: (e) => p(e, "subtitle1"),
67
- h5: (e) => p(e, "subtitle2"),
68
- h6: (e) => p(e, "subtitle2"),
69
- p: ({ children: e }) => /* @__PURE__ */ u(l, {
70
- variant: "body2",
71
- component: "p",
72
- sx: d.paragraph,
73
- children: e
74
- })
75
- };
76
- function p(e, t) {
77
- return /* @__PURE__ */ u(l, {
78
- variant: t,
79
- component: "div",
80
- sx: d.heading,
81
- children: e.children
82
- });
83
- }
84
- function m(e) {
85
- let t = o(2), { content: r } = e, i;
86
- return t[0] === r ? i = t[1] : (i = /* @__PURE__ */ u(s, {
87
- sx: d.root,
88
- children: /* @__PURE__ */ u(n, {
89
- content: r,
90
- components: f,
91
- allowHtml: !0,
92
- allowImages: !0
93
- })
94
- }), t[0] = r, t[1] = i), i;
95
- }
96
- //#endregion
97
- //#region src/widgets/markdown/markdown.tsx
98
- function h() {
99
- let n = o(2), r = e(), i = t(r, g), a;
100
- return n[0] === i ? a = n[1] : (a = /* @__PURE__ */ u(m, { content: i }), n[0] = i, n[1] = a), a;
101
- }
102
- function g(e) {
103
- return e.data?.content ?? "";
104
- }
105
- //#endregion
106
- //#region src/widgets/markdown/skeleton.tsx
107
- var _ = {
108
- root: {
109
- display: "flex",
110
- flexDirection: "column",
111
- gap: 1,
112
- py: 1
113
- },
114
- line: (e) => ({
115
- width: e,
116
- height: 18
117
- })
118
- };
119
- function v(e) {
120
- let t = o(2), { lines: n } = e, r = n === void 0 ? 5 : n, i;
121
- if (t[0] !== r) {
122
- let e = [
123
- "100%",
124
- "95%",
125
- "90%",
126
- "85%",
127
- "70%"
128
- ];
129
- i = /* @__PURE__ */ u(s, {
130
- sx: _.root,
131
- children: Array.from({ length: r }).map((t, n) => /* @__PURE__ */ u(c, {
132
- variant: "rectangular",
133
- sx: _.line(e[n % e.length] ?? "85%")
134
- }, `line-${n}`))
135
- }), t[0] = r, t[1] = i;
136
- } else i = t[1];
137
- return i;
138
- }
139
- //#endregion
140
- //#region src/widgets/markdown/download.tsx
141
- function y(e) {
142
- return a(e, {
143
- id: r.markdown,
144
- label: "Markdown",
145
- icon: /* @__PURE__ */ u(i, { fontSize: "small" }),
146
- resolve: (t) => {
147
- let n = e.getData(t), r = new Blob([n.content ?? ""], { type: "text/markdown;charset=utf-8;" }), i = URL.createObjectURL(r);
148
- return Promise.resolve({
149
- url: i,
150
- filename: `${e.filename}.md`,
151
- revoke: () => URL.revokeObjectURL(i)
152
- });
153
- }
154
- });
155
- }
156
- //#endregion
157
- export { m as i, v as n, h as r, y as t };
158
-
159
- //# sourceMappingURL=markdown-DmvLi3vx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-DmvLi3vx.js","names":["styles","{ content }: MarkdownUIProps","<Box sx={styles.root}>\n <MarkdownContent\n content={content}\n components={components}\n allowHtml\n allowImages\n />\n </Box>","styles","_c","(s) => {\n const data = s.data as MarkdownWidgetData | undefined\n return data?.content ?? ''\n }","<MarkdownUI content={content} />","_c","{ lines = 5 }: MarkdownSkeletonProps","lines = 5","<Box sx={styles.root}>\n {Array.from({ length: lines }).map((_, i) => (\n <Skeleton\n key={`line-${i}`}\n variant='rectangular'\n sx={styles.line(widths[i % widths.length] ?? '85%')}\n />\n ))}\n </Box>","_c","useWidgetId","useWidget","MarkdownContent","DOWNLOAD_ITEM_IDS","MarkdownIcon","withPngItem","styles$1","components","mdHeading","props","Typography","MarkdownUI","$","c","t0","t1","content","Box","Markdown","id","_temp","s","styles","MarkdownSkeleton","lines","t2","widths","Skeleton","i","createMarkdownDownloadConfig","args","data","ctx","blob","url"],"sources":["../src/widgets/markdown/style.ts","../src/widgets/markdown/markdown-ui.tsx","../src/widgets/markdown/markdown.tsx","../src/widgets/markdown/skeleton.tsx","../src/widgets/markdown/download.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n color: 'text.primary',\n '& a': { color: 'primary.main' },\n '& code': {\n bgcolor: 'action.hover',\n px: 0.5,\n borderRadius: 0.5,\n fontFamily: 'monospace',\n fontSize: '0.875em',\n },\n '& pre': {\n bgcolor: 'action.hover',\n p: 1.5,\n borderRadius: 1,\n overflowX: 'auto',\n },\n '& blockquote': {\n borderLeft: '3px solid',\n borderColor: 'divider',\n pl: 1.5,\n ml: 0,\n color: 'text.secondary',\n fontStyle: 'italic',\n },\n '& ul, & ol': { pl: 3, my: 1 },\n '& li': { my: 0.25 },\n '& hr': {\n border: 'none',\n borderTop: '1px solid',\n borderColor: 'divider',\n my: 1.5,\n },\n '& table': { borderCollapse: 'collapse', width: '100%' },\n '& th, & td': {\n border: '1px solid',\n borderColor: 'divider',\n px: 1,\n py: 0.5,\n textAlign: 'left',\n },\n },\n paragraph: {\n my: 1,\n },\n heading: {\n mt: 2,\n mb: 1,\n fontWeight: 600,\n },\n} satisfies Record<string, SxProps<Theme>>\n","import { Box, Typography, type TypographyProps } from '@mui/material'\nimport type { Components } from 'react-markdown'\nimport { MarkdownContent } from './markdown-content'\nimport { styles } from './style'\n\nexport interface MarkdownUIProps {\n content: string\n}\n\n/** MUI-styled element mapping for `react-markdown`. */\nconst components: Components = {\n h1: (props) => mdHeading(props, 'h4'),\n h2: (props) => mdHeading(props, 'h5'),\n h3: (props) => mdHeading(props, 'h6'),\n h4: (props) => mdHeading(props, 'subtitle1'),\n h5: (props) => mdHeading(props, 'subtitle2'),\n h6: (props) => mdHeading(props, 'subtitle2'),\n p: ({ children }) => (\n <Typography variant='body2' component='p' sx={styles.paragraph}>\n {children}\n </Typography>\n ),\n}\n\nfunction mdHeading(\n props: { children?: React.ReactNode },\n variant: TypographyProps['variant'],\n) {\n return (\n <Typography variant={variant} component='div' sx={styles.heading}>\n {props.children}\n </Typography>\n )\n}\n\n/**\n * Pure presentational component for the Markdown widget. Delegates the\n * `react-markdown` engine to {@link MarkdownContent} and supplies a\n * document-style MUI element mapping (body2 paragraphs, real heading\n * typography). Opts INTO raw HTML and inline images — the Markdown widget is\n * the one slot in the library where authors can ship rich content. Caption\n * slots like `Note` keep the conservative defaults.\n */\nexport function MarkdownUI({ content }: MarkdownUIProps) {\n return (\n <Box sx={styles.root}>\n <MarkdownContent\n content={content}\n components={components}\n allowHtml\n allowImages\n />\n </Box>\n )\n}\n","import { useWidgetId, useWidget } from '../stores'\nimport { MarkdownUI } from './markdown-ui'\nimport type { MarkdownWidgetData } from './types'\n\n/**\n * Stateful Markdown bridge — reads `data.content` (post-pipeline) from the\n * per-widget store and forwards it to the pure {@link MarkdownUI}. Sits\n * inside `<Widget.Provider>`.\n */\nexport function Markdown() {\n const id = useWidgetId()\n const content = useWidget(id, (s) => {\n const data = s.data as MarkdownWidgetData | undefined\n return data?.content ?? ''\n })\n return <MarkdownUI content={content} />\n}\n","import { Box, Skeleton } from '@mui/material'\nimport type { SxProps, Theme } from '@mui/material'\n\nconst styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n py: 1,\n },\n line: (width: string): SxProps<Theme> => ({ width, height: 18 }),\n} as const\n\nexport interface MarkdownSkeletonProps {\n lines?: number\n}\n\nexport function MarkdownSkeleton({ lines = 5 }: MarkdownSkeletonProps) {\n // Vary widths to mimic prose.\n const widths = ['100%', '95%', '90%', '85%', '70%']\n return (\n <Box sx={styles.root}>\n {Array.from({ length: lines }).map((_, i) => (\n <Skeleton\n key={`line-${i}`}\n variant='rectangular'\n sx={styles.line(widths[i % widths.length] ?? '85%')}\n />\n ))}\n </Box>\n )\n}\n","import {\n DOWNLOAD_ITEM_IDS,\n MarkdownIcon,\n withPngItem,\n toCsvString,\n triggerLinkDownload,\n type DownloadItem,\n type WidgetDownloadArgs,\n} from '../actions/download'\nimport type { MarkdownWidgetData } from './types'\n\n/**\n * Download menu items for the Markdown widget. Always includes a `.md` item\n * that saves the markdown source verbatim. When `getCaptureEl` is given,\n * prepends a PNG item that rasterises the captured element via\n * `html2canvas`.\n */\nexport function createMarkdownDownloadConfig(\n args: WidgetDownloadArgs<MarkdownWidgetData>,\n): DownloadItem[] {\n return withPngItem(args, {\n id: DOWNLOAD_ITEM_IDS.markdown,\n label: 'Markdown',\n icon: <MarkdownIcon fontSize='small' />,\n resolve: (ctx) => {\n const data = args.getData(ctx)\n const blob = new Blob([data.content ?? ''], {\n type: 'text/markdown;charset=utf-8;',\n })\n const url = URL.createObjectURL(blob)\n return Promise.resolve({\n url,\n filename: `${args.filename}.md`,\n revoke: () => URL.revokeObjectURL(url),\n })\n },\n })\n}\n\n// Re-export pure helpers consumers may want when building a custom Download item.\nexport { toCsvString, triggerLinkDownload }\n"],"mappings":";;;;;;;AAEA,IAAaA,IAAS;CACpB,MAAM;EACJ,OAAO;EACP,OAAO,EAAE,OAAO,eAAe;EAC/B,UAAU;GACR,SAAS;GACT,IAAI;GACJ,cAAc;GACd,YAAY;GACZ,UAAU;EACZ;EACA,SAAS;GACP,SAAS;GACT,GAAG;GACH,cAAc;GACd,WAAW;EACb;EACA,gBAAgB;GACd,YAAY;GACZ,aAAa;GACb,IAAI;GACJ,IAAI;GACJ,OAAO;GACP,WAAW;EACb;EACA,cAAc;GAAE,IAAI;GAAG,IAAI;EAAE;EAC7B,QAAQ,EAAE,IAAI,IAAK;EACnB,QAAQ;GACN,QAAQ;GACR,WAAW;GACX,aAAa;GACb,IAAI;EACN;EACA,WAAW;GAAE,gBAAgB;GAAY,OAAO;EAAO;EACvD,cAAc;GACZ,QAAQ;GACR,aAAa;GACb,IAAI;GACJ,IAAI;GACJ,WAAW;EACb;CACF;CACA,WAAW,EACT,IAAI,EACN;CACA,SAAS;EACP,IAAI;EACJ,IAAI;EACJ,YAAY;CACd;AACF,GC1CMmB,IAAyB;CAC7B,KAAK,MAAUC,EAAUC,GAAO,IAAI;CACpC,KAAK,MAAUD,EAAUC,GAAO,IAAI;CACpC,KAAK,MAAUD,EAAUC,GAAO,IAAI;CACpC,KAAK,MAAUD,EAAUC,GAAO,WAAW;CAC3C,KAAK,MAAUD,EAAUC,GAAO,WAAW;CAC3C,KAAK,MAAUD,EAAUC,GAAO,WAAW;CAC3C,IAAI,EAAE,kBACJ,kBAACC,GAAD;EAAY,SAAQ;EAAQ,WAAU;EAAI,IAAInB,EAAO;EAClD;CACS,CAAA;AAEhB;AAEA,SAASiB,EACP,GACA,GACA;CACA,OACE,kBAACE,GAAD;EAAqB;EAAS,WAAU;EAAM,IAAInB,EAAO;EACtD,UAAAkB,EAAM;CACG,CAAA;AAEhB;AAUA,SAAgBE,EAAA,G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QAAS,CAAA;EACtC,UAAU,MAAQ;GAChB,IAAM2B,IAAOD,EAAK,QAAQE,CAAG,GACvBC,IAAO,IAAI,KAAK,CAACF,EAAK,WAAW,EAAE,GAAG,EAC1C,MAAM,+BACR,CAAC,GACKG,IAAM,IAAI,gBAAgBD,CAAI;GACpC,OAAO,QAAQ,QAAQ;IACrB;IACA,UAAU,GAAGH,EAAK,SAAS;IAC3B,cAAc,IAAI,gBAAgBI,CAAG;GACvC,CAAC;EACH;CACF,CAAC;AACH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles-BCEBm7xh.js","names":["{\n copyText,\n onSuccess,\n onError,\n 'aria-label': ariaLabel,\n ...props\n}: CopyButtonProps","async function onCopy() {\n try {\n await copy(copyText)\n onSuccess?.()\n } catch (err) {\n onError?.(err as Error)\n }\n }","err","() => void onCopy()","<ContentCopyOutlined fontSize='small' />","<IconButton\n size='small'\n onClick={() => void onCopy()}\n aria-label={ariaLabel ?? 'Copy'}\n {...props}\n >\n <ContentCopyOutlined fontSize='small' />\n </IconButton>","ariaLabel ?? 'Copy'","_c","err","CopyButton","$","c","ariaLabel","copyText","onError","onSuccess","props","t0","t1","copy","t2","onCopy","t3","t4","ContentCopyOutlined","t5","IconButton","mergeSx","values","entry","MENU_MAX_HEIGHT","styles","spacing","palette","alpha"],"sources":["../src/components/copy-button/copy-button.tsx","../src/components/lasso-tool/styles.ts"],"sourcesContent":["import { IconButton } from '@mui/material'\nimport { ContentCopyOutlined } from '@mui/icons-material'\nimport type { CopyButtonProps } from './types'\nimport { copy } from '@carto/ps-utils'\n\nexport function CopyButton({\n copyText,\n onSuccess,\n onError,\n 'aria-label': ariaLabel,\n ...props\n}: CopyButtonProps) {\n async function onCopy() {\n try {\n await copy(copyText)\n onSuccess?.()\n } catch (err) {\n onError?.(err as Error)\n }\n }\n return (\n <IconButton\n size='small'\n onClick={() => void onCopy()}\n aria-label={ariaLabel ?? 'Copy'}\n {...props}\n >\n <ContentCopyOutlined fontSize='small' />\n </IconButton>\n )\n}\n","import { alpha, type SxProps, type Theme } from '@mui/material'\n\ntype SxEntry = Exclude<\n NonNullable<SxProps<Theme>>,\n readonly unknown[] | boolean\n>\n\n/**\n * Merges a component's own `sx` with the caller's. Needed because `SxProps` is\n * not always an object — a function or an array is silently dropped by an\n * object spread — and MUI's array form rejects falsy entries.\n */\nexport function mergeSx(...values: (SxProps<Theme> | undefined)[]): SxEntry[] {\n return values\n .flat()\n .filter((entry): entry is SxEntry => !!entry && entry !== true)\n}\n\n/**\n * Ceiling for the options menu, replacing the design system's fixed 312px.\n * `dvh` so it follows the mobile address bar.\n *\n * The 96px gutter is MUI's own allowance, and it is not decorative: MUI's\n * Popover measures the paper mid-`Grow` (at scale 0.75), underestimates its\n * height and then fails to shift it up, so a taller ceiling overflows the\n * bottom of a short viewport and the last entries become unreachable — with a\n * 32px gutter, \"Layer filters\" landed off-screen on a 420px-tall window. This\n * leaves room for the anchor offset instead. The whole menu fits from a 511px\n * viewport up and scrolls below that.\n */\nconst MENU_MAX_HEIGHT = 'calc(100dvh - 96px)'\n\nexport const styles = {\n container: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'flex-start',\n overflow: 'hidden',\n width: 'fit-content',\n\n '&.inline': {\n flexDirection: 'column',\n alignItems: 'flex-start',\n gap: ({ spacing }) => spacing(1),\n // Horizontal separators between compound blocks. Blocks own no\n // `<Divider flexItem />` — omitting/reordering never orphans or doubles\n // rules. Vertical Dividers inside Modes/Actions stay in those blocks.\n '& > * + *': {\n borderTop: 1,\n borderColor: 'divider',\n paddingTop: ({ spacing }) => spacing(1),\n },\n },\n },\n actions: {\n icon: {\n width: ({ spacing }) => spacing(4),\n height: ({ spacing }) => spacing(4),\n borderRadius: 0,\n '.MuiTouchRipple-ripple .MuiTouchRipple-child': {\n borderRadius: 0,\n },\n },\n },\n options: {\n // The design system caps menus and their lists at 312px (\"defined by\n // design\"), but this menu is not a plain option list — interaction mode,\n // drawing tools, selection tools and layer filters add up to 415px, so the\n // last entries fell behind an unannounced scroll. Both the paper and the\n // list carry the cap, and the DS selectors are self-qualified (0,2,0), so\n // these have to be too.\n paper: { '&.MuiMenu-paper': { maxHeight: MENU_MAX_HEIGHT } },\n menu: {\n '&.MuiMenu-list': { maxHeight: MENU_MAX_HEIGHT },\n paddingY: ({ spacing }) => spacing(1),\n '&.inline': {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n borderRadius: ({ spacing }) => spacing(0.5),\n\n '& .MuiDivider-root': {\n height: ({ spacing }) => spacing(4),\n\n '&.MuiToggleButtonGroup-groupedHorizontal': {\n height: ({ spacing }) => spacing(4),\n },\n '&.MuiToggleButtonGroup-groupedVertical': {\n height: 'auto',\n width: ({ spacing }) => spacing(4),\n margin: ({ spacing }) => `${spacing(0.5, 0, 1)} !important`,\n borderRadius: '0 !important',\n },\n },\n\n '& .MuiToggleButton-sizeSmall': {\n margin: 0,\n\n '&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)': {\n margin: 0,\n },\n '& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal': {\n height: ({ spacing }) => spacing(3),\n },\n '& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical': {\n height: 'auto',\n width: ({ spacing }) => spacing(3),\n },\n },\n\n '.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)': {\n margin: 0,\n\n '&:first-of-type': {\n marginLeft: 0,\n },\n '&:not(:last-of-type)': {\n marginRight: ({ spacing }) => spacing(0.5),\n },\n },\n '&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)': {\n '.MuiToggleButtonGroup-grouped': {\n margin: ({ spacing }) => spacing(0, 0.5),\n },\n },\n '&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)': {\n '.MuiToggleButtonGroup-grouped': {\n margin: ({ spacing }) => spacing(0, 0, 0.5),\n\n '&:not(:last-of-type)': {\n marginRight: 0,\n },\n '&:last-of-type': {\n marginBottom: 0,\n },\n },\n },\n },\n },\n icon: {\n borderRadius: 0,\n width: ({ spacing }) => spacing(3),\n },\n title: {\n paddingX: ({ spacing }) => spacing(2),\n paddingBottom: ({ spacing }) => spacing(0.5),\n\n '&.inline': {\n paddingX: 0,\n paddingBottom: 0,\n },\n },\n icons: {\n color: ({ palette }) => palette.text.primary,\n },\n tag: {\n borderRadius: ({ spacing }) => spacing(0.25),\n border: '1px solid',\n borderColor: ({ palette }) => palette.primary.main,\n paddingX: ({ spacing }) => spacing(0.5),\n color: ({ palette }) => palette.primary.main,\n backgroundColor: ({ palette }) => alpha(palette.primary.main, 0.08),\n },\n more: {\n width: ({ spacing }) => spacing(4),\n },\n },\n chip: {\n container: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(0.5),\n overflowX: 'auto',\n scrollbarWidth: 'none',\n paddingX: ({ spacing }) => spacing(1),\n\n '&.inline': {\n overflowX: 'visible',\n flexWrap: 'wrap',\n },\n },\n chip: {\n marginRight: ({ spacing }) => spacing(0.5),\n },\n disabled: {\n opacity: ({ palette }) => palette.action.disabledOpacity,\n },\n },\n} satisfies Record<string, SxProps<Theme>>\n"],"mappings":";;;;;;AAKA,SAAgBS,EAAA,GAMI;gBAFJG,GAHdC,GAEAC,GADAC,GAGGC;CALsBhB,AAAAA,EAAAA,OAAAA,0DACzB,wCAGA,cAAcY,GACd,GAAAI,KALyBhB;CAOzBC,IAAAA;CAEe,AAAAS,EAAA,OAAAG,KAAAH,EAAA,OAGXI,KAAAJ,EAAA,OAFAK,KAHJ,IAAA,iBAAwB;EACtB,IAAI;GAEF,AADA,MAAMI,EAAKN,CAAQ,GACnBE,IAAY;EACd,SAASb,GAAK;GACZ,IAAUM,CAAY;EACxB;CACF,GALe,EAAA,KAAAK,GAGX,EAAA,KAAAC,GAFA,EAAA,KAAAC;CAHJ,IAAeM,IAAfpB,GAWaE;CAAW,AAAAO,EAAA,QAAAW,iBAAX,UAAM,KAAKA,EAAO,GAAP,EAAA,MAAAA;CACR,IAAAC,I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