@carto/meridian-ds 0.1.0 → 0.1.1-alpha.1

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.
@@ -1,320 +0,0 @@
1
- import { w as C, x as b } from "./createSvgIcon-CcKa-Sbo.js";
2
- import { alpha as i } from "@mui/material";
3
- import * as E from "cartocolor";
4
- function m(e, n = 0, a = 1) {
5
- return process.env.NODE_ENV !== "production" && (e < n || e > a) && console.error(`MUI: The value provided ${e} is out of range [${n}, ${a}].`), C(e, n, a);
6
- }
7
- function x(e) {
8
- e = e.slice(1);
9
- const n = new RegExp(`.{1,${e.length >= 6 ? 2 : 1}}`, "g");
10
- let a = e.match(n);
11
- return a && a[0].length === 1 && (a = a.map((r) => r + r)), a ? `rgb${a.length === 4 ? "a" : ""}(${a.map((r, s) => s < 3 ? parseInt(r, 16) : Math.round(parseInt(r, 16) / 255 * 1e3) / 1e3).join(", ")})` : "";
12
- }
13
- function p(e) {
14
- if (e.type)
15
- return e;
16
- if (e.charAt(0) === "#")
17
- return p(x(e));
18
- const n = e.indexOf("("), a = e.substring(0, n);
19
- if (["rgb", "rgba", "hsl", "hsla", "color"].indexOf(a) === -1)
20
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${e}\` color.
21
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : b(9, e));
22
- let r = e.substring(n + 1, e.length - 1), s;
23
- if (a === "color") {
24
- if (r = r.split(" "), s = r.shift(), r.length === 4 && r[3].charAt(0) === "/" && (r[3] = r[3].slice(1)), ["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].indexOf(s) === -1)
25
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${s}\` color space.
26
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : b(10, s));
27
- } else
28
- r = r.split(",");
29
- return r = r.map((o) => parseFloat(o)), {
30
- type: a,
31
- values: r,
32
- colorSpace: s
33
- };
34
- }
35
- function k(e) {
36
- const {
37
- type: n,
38
- colorSpace: a
39
- } = e;
40
- let {
41
- values: r
42
- } = e;
43
- return n.indexOf("rgb") !== -1 ? r = r.map((s, o) => o < 3 ? parseInt(s, 10) : s) : n.indexOf("hsl") !== -1 && (r[1] = `${r[1]}%`, r[2] = `${r[2]}%`), n.indexOf("color") !== -1 ? r = `${a} ${r.join(" ")}` : r = `${r.join(", ")}`, `${n}(${r})`;
44
- }
45
- function D(e, n) {
46
- return e = p(e), n = m(n), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${n}` : e.values[3] = n, k(e);
47
- }
48
- function v(e, n) {
49
- if (e = p(e), n = m(n), e.type.indexOf("hsl") !== -1)
50
- e.values[2] += (100 - e.values[2]) * n;
51
- else if (e.type.indexOf("rgb") !== -1)
52
- for (let a = 0; a < 3; a += 1)
53
- e.values[a] += (255 - e.values[a]) * n;
54
- else if (e.type.indexOf("color") !== -1)
55
- for (let a = 0; a < 3; a += 1)
56
- e.values[a] += (1 - e.values[a]) * n;
57
- return k(e);
58
- }
59
- const d = "#2C3032", g = "#FFFFFF", l = "#e91e63", t = {
60
- common: {
61
- black: d,
62
- white: g
63
- },
64
- neutral: {
65
- 50: "#f8f9f9",
66
- 100: "#e1e3e4",
67
- 200: "#cbcdcf",
68
- 300: "#b4b8ba",
69
- 400: "#9da2a6",
70
- 500: "#868d91",
71
- 600: "#6f777c",
72
- 700: "#595f63",
73
- 800: "#43474a",
74
- 900: d,
75
- A100: "#ddddde",
76
- A200: "#b9babb",
77
- A400: "#7c7e7f",
78
- A700: "#16191A"
79
- },
80
- blue: {
81
- 100: "#B9DAF9",
82
- 200: "#5DB2F6",
83
- 300: "#358BE7",
84
- 400: "#036FE2",
85
- 500: "#024D9E"
86
- },
87
- green: {
88
- 300: "#6BE2AD",
89
- 400: "#47DB99",
90
- 500: "#31996B"
91
- },
92
- lightGreen: {
93
- 300: "#8CB24A",
94
- 400: "#709F1D",
95
- 500: "#435F11"
96
- },
97
- indigo: {
98
- 300: "#34689F",
99
- 400: "#024388",
100
- 500: "#012C5A"
101
- },
102
- orange: {
103
- 300: "#F4B134",
104
- 400: "#F29E02",
105
- 500: "#A96E01"
106
- },
107
- red: {
108
- 300: "#CD593B",
109
- 400: "#C1300B",
110
- 500: "#872107"
111
- },
112
- qualitative: {
113
- // CARTO colors
114
- // TODO: Related discussion https://app.shortcut.com/cartoteam/story/264834/
115
- bold: {
116
- 0: "#7F3C8D",
117
- 1: "#11A579",
118
- 2: "#3969AC",
119
- 3: "#F2B701",
120
- 4: "#E73F74",
121
- 5: "#80BA5A",
122
- 6: "#E68310",
123
- 7: "#008695",
124
- 8: "#CF1C90",
125
- 9: "#f97b72",
126
- 10: "#4b4b8f",
127
- 11: "#A5AA99"
128
- }
129
- },
130
- shades: {
131
- dark: {
132
- 90: i(d, 0.9),
133
- 60: i(d, 0.6),
134
- 40: i(d, 0.4),
135
- 25: i(d, 0.25),
136
- 12: i(d, 0.12),
137
- 8: i(d, 0.08),
138
- 4: i(d, 0.04)
139
- },
140
- light: {
141
- 90: i(g, 0.9),
142
- 60: i(g, 0.6),
143
- 40: i(g, 0.4),
144
- 25: i(g, 0.25),
145
- 12: i(g, 0.12),
146
- 8: i(g, 0.08),
147
- 4: i(g, 0.04)
148
- }
149
- }
150
- }, c = {
151
- mode: "light",
152
- contrastThreshold: 3,
153
- tonalOffset: 0.2,
154
- common: { ...t.common },
155
- primary: {
156
- main: t.blue[400],
157
- dark: t.blue[500],
158
- light: t.blue[300],
159
- contrastText: t.common.white,
160
- background: i(t.blue[400], 0.08),
161
- relatedLight: "#EAF2FC",
162
- relatedDark: l
163
- },
164
- secondary: {
165
- main: t.green[400],
166
- dark: t.green[500],
167
- light: t.green[300],
168
- contrastText: t.common.black,
169
- background: i(t.green[400], 0.08),
170
- relatedLight: "#EFFCF5",
171
- relatedDark: l
172
- },
173
- text: {
174
- primary: t.common.black,
175
- secondary: t.shades.dark[60],
176
- disabled: t.shades.dark[25],
177
- hint: t.shades.dark[40]
178
- },
179
- background: {
180
- paper: t.common.white,
181
- default: t.neutral[50]
182
- },
183
- action: {
184
- active: t.shades.dark[40],
185
- hover: t.shades.dark[8],
186
- disabledBackground: t.neutral[100],
187
- disabled: t.shades.dark[25],
188
- selected: t.shades.dark[12],
189
- focus: t.shades.dark[12],
190
- activatedOpacity: 0.12,
191
- hoverOpacity: 0.04,
192
- selectedOpacity: 0.08,
193
- disabledOpacity: 0.38,
194
- focusOpacity: 0.12
195
- },
196
- info: {
197
- main: t.indigo[400],
198
- dark: t.indigo[500],
199
- light: t.indigo[300],
200
- contrastText: t.common.white,
201
- relatedDark: "#0D2B4A",
202
- relatedLight: "#E9EEF4",
203
- background: l
204
- },
205
- success: {
206
- main: t.lightGreen[400],
207
- dark: t.lightGreen[500],
208
- light: t.lightGreen[300],
209
- contrastText: t.common.white,
210
- relatedDark: "#3D541A",
211
- relatedLight: "#F2F5EB",
212
- background: l
213
- },
214
- warning: {
215
- main: t.orange[400],
216
- dark: t.orange[500],
217
- light: t.orange[300],
218
- contrastText: t.common.black,
219
- relatedDark: "#78540F",
220
- relatedLight: "#FEF6EA",
221
- background: l
222
- },
223
- error: {
224
- main: t.red[400],
225
- light: t.red[300],
226
- dark: t.red[500],
227
- contrastText: t.common.white,
228
- relatedDark: "#622215",
229
- relatedLight: "#F9EDEA",
230
- background: l
231
- },
232
- grey: {
233
- ...t.neutral
234
- },
235
- divider: t.shades.dark[12],
236
- // Custom common colors
237
- default: {
238
- main: t.neutral[100],
239
- dark: t.neutral[200],
240
- light: t.neutral[50],
241
- outlinedBorder: t.shades.dark[25],
242
- background: t.shades.dark[4],
243
- relatedLight: l,
244
- relatedDark: l,
245
- contrastText: l
246
- },
247
- brand: {
248
- navyBlue: "#162945",
249
- locationRed: "#EB1510",
250
- predictionBlue: "#1785FB",
251
- softBlue: "#F2F6F9",
252
- appBarMain: "#162945",
253
- appBarContrastText: t.common.white
254
- },
255
- white: {
256
- ...t.shades.light
257
- },
258
- black: {
259
- ...t.shades.dark
260
- },
261
- qualitative: {
262
- ...t.qualitative
263
- }
264
- };
265
- function y(e, n) {
266
- var f;
267
- const a = E[e];
268
- let r = n;
269
- if (!a)
270
- throw new Error(
271
- `Palette "${e}" not found. Expected a CARTOColors string`
272
- );
273
- const s = Object.keys(a).filter((F) => F !== "tags").map(Number), o = Math.max(...s), u = Math.min(...s);
274
- !Number.isInteger(n) || n > o ? r = o : n < u && (r = u);
275
- let h = a[r];
276
- return (f = a.tags) != null && f.includes("qualitative") && (h = h == null ? void 0 : h.slice(0, -1)), h;
277
- }
278
- function w(e, n) {
279
- return typeof e == "string" ? y(e, n) : e.map((a) => {
280
- if (Array.isArray(a)) {
281
- const [r, s, o] = a;
282
- return A(r, s, o);
283
- } else
284
- return a;
285
- });
286
- }
287
- function A(e, n, a) {
288
- return "#" + ((1 << 24) + (e << 16) + (n << 8) + a).toString(16).slice(1);
289
- }
290
- function $(e, n) {
291
- var o;
292
- const a = (o = c == null ? void 0 : c.qualitative) == null ? void 0 : o.bold, r = Object.values(a ?? {}), s = n % r.length;
293
- return {
294
- backgroundColor: r[s],
295
- color: e.palette.getContrastText(r[s])
296
- };
297
- }
298
- function T(e, {
299
- palette: n,
300
- fallbackColor: a,
301
- colorMapping: r
302
- }) {
303
- if (r[e])
304
- return r[e];
305
- if (!n || n.length === 0)
306
- return a;
307
- const o = Math.min(
308
- Object.keys(r).length,
309
- n.length - 1
310
- ), u = n[o];
311
- return r[e] = u, u;
312
- }
313
- export {
314
- D as a,
315
- T as b,
316
- c,
317
- w as d,
318
- $ as g,
319
- v as l
320
- };
@@ -1,3 +0,0 @@
1
- "use strict";const p=require("./createSvgIcon-BhsoeSAN.cjs"),o=require("@mui/material"),F=require("cartocolor");function y(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const E=y(F);function m(e,n=0,a=1){return process.env.NODE_ENV!=="production"&&(e<n||e>a)&&console.error(`MUI: The value provided ${e} is out of range [${n}, ${a}].`),p.clamp(e,n,a)}function O(e){e=e.slice(1);const n=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let a=e.match(n);return a&&a[0].length===1&&(a=a.map(r=>r+r)),a?`rgb${a.length===4?"a":""}(${a.map((r,s)=>s<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function f(e){if(e.type)return e;if(e.charAt(0)==="#")return f(O(e));const n=e.indexOf("("),a=e.substring(0,n);if(["rgb","rgba","hsl","hsla","color"].indexOf(a)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
2
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:p.formatMuiErrorMessage(9,e));let r=e.substring(n+1,e.length-1),s;if(a==="color"){if(r=r.split(" "),s=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(s)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${s}\` color space.
3
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:p.formatMuiErrorMessage(10,s))}else r=r.split(",");return r=r.map(l=>parseFloat(l)),{type:a,values:r,colorSpace:s}}function k(e){const{type:n,colorSpace:a}=e;let{values:r}=e;return n.indexOf("rgb")!==-1?r=r.map((s,l)=>l<3?parseInt(s,10):s):n.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),n.indexOf("color")!==-1?r=`${a} ${r.join(" ")}`:r=`${r.join(", ")}`,`${n}(${r})`}function x(e,n){return e=f(e),n=m(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,k(e)}function A(e,n){if(e=f(e),n=m(n),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*n;else if(e.type.indexOf("rgb")!==-1)for(let a=0;a<3;a+=1)e.values[a]+=(255-e.values[a])*n;else if(e.type.indexOf("color")!==-1)for(let a=0;a<3;a+=1)e.values[a]+=(1-e.values[a])*n;return k(e)}const i="#2C3032",c="#FFFFFF",d="#e91e63",t={common:{black:i,white:c},neutral:{50:"#f8f9f9",100:"#e1e3e4",200:"#cbcdcf",300:"#b4b8ba",400:"#9da2a6",500:"#868d91",600:"#6f777c",700:"#595f63",800:"#43474a",900:i,A100:"#ddddde",A200:"#b9babb",A400:"#7c7e7f",A700:"#16191A"},blue:{100:"#B9DAF9",200:"#5DB2F6",300:"#358BE7",400:"#036FE2",500:"#024D9E"},green:{300:"#6BE2AD",400:"#47DB99",500:"#31996B"},lightGreen:{300:"#8CB24A",400:"#709F1D",500:"#435F11"},indigo:{300:"#34689F",400:"#024388",500:"#012C5A"},orange:{300:"#F4B134",400:"#F29E02",500:"#A96E01"},red:{300:"#CD593B",400:"#C1300B",500:"#872107"},qualitative:{bold:{0:"#7F3C8D",1:"#11A579",2:"#3969AC",3:"#F2B701",4:"#E73F74",5:"#80BA5A",6:"#E68310",7:"#008695",8:"#CF1C90",9:"#f97b72",10:"#4b4b8f",11:"#A5AA99"}},shades:{dark:{90:o.alpha(i,.9),60:o.alpha(i,.6),40:o.alpha(i,.4),25:o.alpha(i,.25),12:o.alpha(i,.12),8:o.alpha(i,.08),4:o.alpha(i,.04)},light:{90:o.alpha(c,.9),60:o.alpha(c,.6),40:o.alpha(c,.4),25:o.alpha(c,.25),12:o.alpha(c,.12),8:o.alpha(c,.08),4:o.alpha(c,.04)}}},h={mode:"light",contrastThreshold:3,tonalOffset:.2,common:{...t.common},primary:{main:t.blue[400],dark:t.blue[500],light:t.blue[300],contrastText:t.common.white,background:o.alpha(t.blue[400],.08),relatedLight:"#EAF2FC",relatedDark:d},secondary:{main:t.green[400],dark:t.green[500],light:t.green[300],contrastText:t.common.black,background:o.alpha(t.green[400],.08),relatedLight:"#EFFCF5",relatedDark:d},text:{primary:t.common.black,secondary:t.shades.dark[60],disabled:t.shades.dark[25],hint:t.shades.dark[40]},background:{paper:t.common.white,default:t.neutral[50]},action:{active:t.shades.dark[40],hover:t.shades.dark[8],disabledBackground:t.neutral[100],disabled:t.shades.dark[25],selected:t.shades.dark[12],focus:t.shades.dark[12],activatedOpacity:.12,hoverOpacity:.04,selectedOpacity:.08,disabledOpacity:.38,focusOpacity:.12},info:{main:t.indigo[400],dark:t.indigo[500],light:t.indigo[300],contrastText:t.common.white,relatedDark:"#0D2B4A",relatedLight:"#E9EEF4",background:d},success:{main:t.lightGreen[400],dark:t.lightGreen[500],light:t.lightGreen[300],contrastText:t.common.white,relatedDark:"#3D541A",relatedLight:"#F2F5EB",background:d},warning:{main:t.orange[400],dark:t.orange[500],light:t.orange[300],contrastText:t.common.black,relatedDark:"#78540F",relatedLight:"#FEF6EA",background:d},error:{main:t.red[400],light:t.red[300],dark:t.red[500],contrastText:t.common.white,relatedDark:"#622215",relatedLight:"#F9EDEA",background:d},grey:{...t.neutral},divider:t.shades.dark[12],default:{main:t.neutral[100],dark:t.neutral[200],light:t.neutral[50],outlinedBorder:t.shades.dark[25],background:t.shades.dark[4],relatedLight:d,relatedDark:d,contrastText:d},brand:{navyBlue:"#162945",locationRed:"#EB1510",predictionBlue:"#1785FB",softBlue:"#F2F6F9",appBarMain:"#162945",appBarContrastText:t.common.white},white:{...t.shades.light},black:{...t.shades.dark},qualitative:{...t.qualitative}};function B(e,n){var b;const a=E[e];let r=n;if(!a)throw new Error(`Palette "${e}" not found. Expected a CARTOColors string`);const s=Object.keys(a).filter(C=>C!=="tags").map(Number),l=Math.max(...s),u=Math.min(...s);!Number.isInteger(n)||n>l?r=l:n<u&&(r=u);let g=a[r];return(b=a.tags)!=null&&b.includes("qualitative")&&(g=g==null?void 0:g.slice(0,-1)),g}function D(e,n){return typeof e=="string"?B(e,n):e.map(a=>{if(Array.isArray(a)){const[r,s,l]=a;return v(r,s,l)}else return a})}function v(e,n,a){return"#"+((1<<24)+(e<<16)+(n<<8)+a).toString(16).slice(1)}function w(e,n){var l;const a=(l=h==null?void 0:h.qualitative)==null?void 0:l.bold,r=Object.values(a??{}),s=n%r.length;return{backgroundColor:r[s],color:e.palette.getContrastText(r[s])}}function T(e,{palette:n,fallbackColor:a,colorMapping:r}){if(r[e])return r[e];if(!n||n.length===0)return a;const l=Math.min(Object.keys(r).length,n.length-1),u=n[l];return r[e]=u,u}exports.alpha=x;exports.commonPalette=h;exports.getCartoColorStylePropsForItem=w;exports.getColorByCategory=T;exports.getPalette=D;exports.lighten=A;
@@ -1 +0,0 @@
1
- "use strict";const H=require("./jsx-runtime-Cek9Ww4S.cjs"),n=require("@mui/material");function e(V){return H.jsxRuntimeExports.jsx(n.SvgIcon,{width:"720",height:"124",viewBox:"0 0 720 124",...V,children:H.jsxRuntimeExports.jsx("path",{d:"M0.74707 123C11.8168 119.656 26.7934 118.37 53.4909 102.164C73.1959 90.2031 92.5604 81.3284 108.188 76.6983C122.841 72.357 136.188 74.3832 144.653 75.1549C150.496 75.6876 195.443 82.8718 207.164 83.6435C218.885 84.4152 241.676 87.502 274.234 80.5567C306.791 73.6115 305.869 75.4585 330.233 67.438C388.837 48.1456 433.461 2.6348 458.511 1.07229C495.627 -1.24279 512.557 52.7758 539.255 58.1776C565.952 63.5795 583.534 64.3512 601.766 55.0909C619.999 45.8305 625.859 40.4287 646.045 38.1136C666.231 35.7985 683.812 41.972 718.975 70.5247",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})})}function t(V){return H.jsxRuntimeExports.jsx(n.SvgIcon,{...V,children:H.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM17.625 19V17.625H19V15.375H17.625V13.125H19V10.875H17.625V8.625H19V6.375H17.625V5H15.375V6.375H13.125V5H10.875V6.375H8.625V5H6.375V6.375H5V8.625H6.375V10.875H5V13.125H6.375V15.375H5V17.625H6.375V19H8.625V17.625H10.875V19H13.125V17.625H15.375V19H17.625ZM15.375 15.375H17.625V17.625H15.375V15.375ZM13.125 15.375H15.375V13.125H17.625V10.875H15.375V8.625H17.625V6.375H15.375V8.625H13.125V6.375H10.875V8.625H8.625V6.375H6.375V8.625H8.625V10.875H6.375V13.125H8.625V15.375H6.375V17.625H8.625V15.375H10.875V17.625H13.125V15.375ZM13.125 13.125H15.375V10.875H13.125V8.625H10.875V10.875H8.625V13.125H10.875V15.375H13.125V13.125ZM13.125 13.125H10.875V10.875H13.125V13.125Z"})})}function r(V){return H.jsxRuntimeExports.jsx(n.SvgIcon,{...V,children:H.jsxRuntimeExports.jsx("path",{d:"M11,4 C14.8659932,4 18,7.13400675 18,11 C18,12.7003211 17.3937669,14.2590489 16.3856562,15.4718279 L19.4748737,18.5606602 L18.0606602,19.9748737 L14.8998887,16.8138615 C13.7854137,17.5629194 12.4437497,18 11,18 C7.13400675,18 4,14.8659932 4,11 C4,7.13400675 7.13400675,4 11,4 Z M11,6 C8.23857625,6 6,8.23857625 6,11 C6,13.7614237 8.23857625,16 11,16 C13.7614237,16 16,13.7614237 16,11 C16,8.23857625 13.7614237,6 11,6 Z",fill:"currentColor"})})}exports.GraphLineIcon=e;exports.OpacityIcon=t;exports.SearchIcon=r;