@brightlocal/ui-components 2.26.0 → 3.0.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.
- package/README.md +9 -2
- package/component-meta.json +4010 -255
- package/deprecations.json +189 -2
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +2 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +155 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/progress-state.d.ts +121 -0
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/progress-state.js +368 -0
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +297 -296
- package/dist/brand-illustration-motif.d.ts +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +44 -40
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +23 -23
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +23 -2
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +94 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +6 -1
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +183 -183
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +1 -1
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +47 -44
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +4 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +143 -141
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +74 -77
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +182 -13
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +462 -314
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +29 -25
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +58 -6
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +278 -194
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +523 -494
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +51 -51
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/motion.cjs +1 -1
- package/dist/lib/motion.js +10 -8
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +8 -6
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +52 -20
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +87 -81
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +127 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +189 -98
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +37 -3
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +102 -64
- package/dist/route-progress.cjs +1 -0
- package/dist/route-progress.d.ts +103 -0
- package/dist/route-progress.d.ts.map +1 -0
- package/dist/route-progress.js +106 -0
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +19 -18
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +35 -2
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +103 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +32 -36
- package/dist/spinner.cjs +1 -0
- package/dist/spinner.d.ts +57 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.js +35 -0
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.d.ts.map +1 -1
- package/dist/stepper.js +23 -22
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +36 -29
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +116 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +84 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +113 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +81 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +42 -2
- package/src/blocks/empty-state.tsx +424 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/progress-state.tsx +542 -0
- package/src/blocks/sidebar.tsx +46 -40
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +9 -4
- package/src/components/button.tsx +5 -8
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +52 -17
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +43 -17
- package/src/components/chip.tsx +9 -6
- package/src/components/combobox.tsx +21 -12
- package/src/components/command.tsx +9 -10
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +405 -31
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +8 -4
- package/src/components/global-layout.tsx +264 -65
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +1 -1
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/link.tsx +39 -5
- package/src/components/list.tsx +18 -14
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +279 -1
- package/src/components/progress.tsx +120 -11
- package/src/components/route-progress.tsx +354 -0
- package/src/components/select.tsx +5 -4
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +89 -7
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +5 -14
- package/src/components/spinner.tsx +94 -0
- package/src/components/stepper.tsx +6 -7
- package/src/components/table.tsx +11 -4
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +229 -0
- package/src/components/typography-text.tsx +225 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +12 -0
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
package/dist/list.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("react"),h=require("@radix-ui/react-slot"),R=require("class-variance-authority"),o=require("@brightlocal/ui-components/lib/utils"),v=require("@brightlocal/ui-components/skeleton");function w(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=w(k),d=R.cva(["flex","items-center","gap-4","rounded-lg","py-2","pr-2","pl-4","transition-colors","duration-fast","ease-out"],{variants:{variant:{default:[],filled:["bg-card"],outline:["bg-background","border","border-border"],loading:["p-0"]}},defaultVariants:{variant:"filled"}}),c=i.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:r,...n},l)=>s.jsx("ul",{ref:l,className:o.cn("flex flex-col gap-2",e),"data-hook":a,"data-slot":"list","data-tracking-el":t,"data-tracking-label":r,...n}));c.displayName="List";const m=i.forwardRef(({asChild:e=!1,className:a,variant:t,dataHook:r,trackingEl:n,trackingLabel:l,children:I,...y},N)=>{const j=e?h.Slot:"li";return s.jsx(j,{ref:N,className:o.cn(d({variant:t}),a),"data-hook":r,"data-slot":"item","data-tracking-el":n,"data-tracking-label":l,...y,children:t==="loading"?s.jsx(v.Skeleton,{className:"h-13 w-full rounded-lg"}):I})});m.displayName="Item";const f=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("shrink-0",e),"data-slot":"item-media",...a}));f.displayName="ItemMedia";const u=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("flex flex-1 flex-col gap-1",e),"data-slot":"item-content",...a}));u.displayName="ItemContent";const p=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-foreground text-body",e),"data-slot":"item-title",...a}));p.displayName="ItemTitle";const g=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-body-sm text-muted-foreground",e),"data-slot":"item-description",...a}));g.displayName="ItemDescription";const x=i.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",e),"data-slot":"item-actions",...a}));x.displayName="ItemActions";const b=i.forwardRef(({className:e,dataHook:a,...t},r)=>s.jsx("li",{ref:r,className:o.cn("text-muted-foreground text-label-sm flex items-center pt-4 pr-2 pb-1 pl-4 first:pt-2",e),"data-hook":a,"data-slot":"item-subheader",...t}));b.displayName="ItemSubheader";exports.Item=m;exports.ItemActions=x;exports.ItemContent=u;exports.ItemDescription=g;exports.ItemMedia=f;exports.ItemSubheader=b;exports.ItemTitle=p;exports.List=c;exports.itemVariants=d;
|
package/dist/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/components/list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,QAAA,MAAM,YAAY;;8EA0BjB,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,IAAI,iGAYT,CAAC;AAOF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,8FAqCT,CAAC;AAOF,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,mK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C,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,mKASd,CAAC;AAOF,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;;GAGG;AACH,QAAA,MAAM,WAAW,mKAShB,CAAC;AAOF,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,mKASd,CAAC;AAOF,uFAAuF;AACvF,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/D;;GAEG;AACH,QAAA,MAAM,eAAe,mKASpB,CAAC;AAOF,qFAAqF;AACrF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;GAEG;AACH,QAAA,MAAM,WAAW,mKAYhB,CAAC;AAOF,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IAC5D;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,aAAa,uGAuBlB,CAAC;AAOF,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,WAAW,EACX,SAAS,EACT,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,GACb,CAAC"}
|
package/dist/list.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Skeleton as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { Slot as c } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as p } from "class-variance-authority";
|
|
5
|
+
import { cn as s } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
import { Skeleton as u } from "@brightlocal/ui-components/skeleton";
|
|
7
|
+
const g = p(
|
|
8
8
|
[
|
|
9
9
|
"flex",
|
|
10
10
|
"items-center",
|
|
@@ -23,149 +23,155 @@ const N = x(
|
|
|
23
23
|
default: [],
|
|
24
24
|
filled: ["bg-card"],
|
|
25
25
|
outline: ["bg-background", "border", "border-border"],
|
|
26
|
-
loading: ["
|
|
26
|
+
loading: ["p-0"]
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
defaultVariants: {
|
|
30
30
|
variant: "filled"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
),
|
|
34
|
-
({ className:
|
|
33
|
+
), x = r.forwardRef(
|
|
34
|
+
({ className: e, dataHook: a, trackingEl: t, trackingLabel: i, ...l }, d) => /* @__PURE__ */ o(
|
|
35
35
|
"ul",
|
|
36
36
|
{
|
|
37
37
|
ref: d,
|
|
38
|
-
className:
|
|
38
|
+
className: s("flex flex-col gap-2", e),
|
|
39
39
|
"data-hook": a,
|
|
40
40
|
"data-slot": "list",
|
|
41
|
-
"data-tracking-el":
|
|
42
|
-
"data-tracking-label":
|
|
43
|
-
...
|
|
41
|
+
"data-tracking-el": t,
|
|
42
|
+
"data-tracking-label": i,
|
|
43
|
+
...l
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
);
|
|
47
|
-
|
|
48
|
-
const
|
|
47
|
+
x.displayName = "List";
|
|
48
|
+
const N = r.forwardRef(
|
|
49
49
|
({
|
|
50
|
-
asChild:
|
|
50
|
+
asChild: e = !1,
|
|
51
51
|
className: a,
|
|
52
|
-
variant:
|
|
53
|
-
dataHook:
|
|
54
|
-
trackingEl:
|
|
52
|
+
variant: t,
|
|
53
|
+
dataHook: i,
|
|
54
|
+
trackingEl: l,
|
|
55
55
|
trackingLabel: d,
|
|
56
|
-
children:
|
|
57
|
-
...
|
|
58
|
-
},
|
|
59
|
-
|
|
56
|
+
children: m,
|
|
57
|
+
...n
|
|
58
|
+
}, f) => /* @__PURE__ */ o(
|
|
59
|
+
e ? c : "li",
|
|
60
60
|
{
|
|
61
|
-
ref:
|
|
62
|
-
className:
|
|
63
|
-
"data-hook":
|
|
61
|
+
ref: f,
|
|
62
|
+
className: s(g({ variant: t }), a),
|
|
63
|
+
"data-hook": i,
|
|
64
64
|
"data-slot": "item",
|
|
65
|
-
"data-tracking-el":
|
|
65
|
+
"data-tracking-el": l,
|
|
66
66
|
"data-tracking-label": d,
|
|
67
|
-
...
|
|
68
|
-
children:
|
|
69
|
-
/*
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
...n,
|
|
68
|
+
children: t === "loading" ? (
|
|
69
|
+
/* One skeleton per data row, mirroring the filled row's footprint:
|
|
70
|
+
h-13 = py-2 × 2 + the size-9 actions slot that drives the row's
|
|
71
|
+
height, so nothing shifts when the content arrives. */
|
|
72
|
+
/* @__PURE__ */ o(u, { className: "h-13 w-full rounded-lg" })
|
|
73
|
+
) : m
|
|
72
74
|
}
|
|
73
75
|
)
|
|
74
76
|
);
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
({ className:
|
|
77
|
+
N.displayName = "Item";
|
|
78
|
+
const b = r.forwardRef(
|
|
79
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
78
80
|
"div",
|
|
79
81
|
{
|
|
80
|
-
ref:
|
|
81
|
-
className:
|
|
82
|
+
ref: t,
|
|
83
|
+
className: s("shrink-0", e),
|
|
82
84
|
"data-slot": "item-media",
|
|
83
85
|
...a
|
|
84
86
|
}
|
|
85
87
|
)
|
|
86
88
|
);
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
({ className:
|
|
89
|
+
b.displayName = "ItemMedia";
|
|
90
|
+
const I = r.forwardRef(
|
|
91
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
90
92
|
"div",
|
|
91
93
|
{
|
|
92
|
-
ref:
|
|
93
|
-
className:
|
|
94
|
+
ref: t,
|
|
95
|
+
className: s("flex flex-1 flex-col gap-1", e),
|
|
94
96
|
"data-slot": "item-content",
|
|
95
97
|
...a
|
|
96
98
|
}
|
|
97
99
|
)
|
|
98
100
|
);
|
|
99
|
-
|
|
100
|
-
const y =
|
|
101
|
-
({ className:
|
|
101
|
+
I.displayName = "ItemContent";
|
|
102
|
+
const y = r.forwardRef(
|
|
103
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
102
104
|
"div",
|
|
103
105
|
{
|
|
104
|
-
ref:
|
|
105
|
-
className:
|
|
106
|
-
"text-foreground text-base leading-normal font-medium",
|
|
107
|
-
t
|
|
108
|
-
),
|
|
106
|
+
ref: t,
|
|
107
|
+
className: s("text-foreground text-body", e),
|
|
109
108
|
"data-slot": "item-title",
|
|
110
109
|
...a
|
|
111
110
|
}
|
|
112
111
|
)
|
|
113
112
|
);
|
|
114
113
|
y.displayName = "ItemTitle";
|
|
115
|
-
const
|
|
116
|
-
({ className:
|
|
114
|
+
const k = r.forwardRef(
|
|
115
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
117
116
|
"div",
|
|
118
117
|
{
|
|
119
|
-
ref:
|
|
120
|
-
className:
|
|
121
|
-
"text-muted-foreground text-sm leading-normal font-normal",
|
|
122
|
-
t
|
|
123
|
-
),
|
|
118
|
+
ref: t,
|
|
119
|
+
className: s("text-body-sm text-muted-foreground", e),
|
|
124
120
|
"data-slot": "item-description",
|
|
125
121
|
...a
|
|
126
122
|
}
|
|
127
123
|
)
|
|
128
124
|
);
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
({ className:
|
|
125
|
+
k.displayName = "ItemDescription";
|
|
126
|
+
const h = r.forwardRef(
|
|
127
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
132
128
|
"div",
|
|
133
129
|
{
|
|
134
|
-
ref:
|
|
135
|
-
className:
|
|
130
|
+
ref: t,
|
|
131
|
+
className: s(
|
|
136
132
|
"text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",
|
|
137
|
-
|
|
133
|
+
e
|
|
138
134
|
),
|
|
139
135
|
"data-slot": "item-actions",
|
|
140
136
|
...a
|
|
141
137
|
}
|
|
142
138
|
)
|
|
143
139
|
);
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
({ className:
|
|
140
|
+
h.displayName = "ItemActions";
|
|
141
|
+
const w = r.forwardRef(
|
|
142
|
+
({ className: e, dataHook: a, ...t }, i) => /* @__PURE__ */ o(
|
|
147
143
|
"li",
|
|
148
144
|
{
|
|
149
|
-
ref:
|
|
150
|
-
className:
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
ref: i,
|
|
146
|
+
className: s(
|
|
147
|
+
// A subheader is a caption over its group of items — the same role as a
|
|
148
|
+
// menu or sidebar group label, so text-label-sm (DS-925).
|
|
149
|
+
// Padding is deliberately asymmetric: with the old symmetric py-2 the
|
|
150
|
+
// caption sat equidistant between the previous group and its own
|
|
151
|
+
// (17px each side over the list's 8px gap), so it read as a second
|
|
152
|
+
// title rather than a label for the group below. 16px above / 4px
|
|
153
|
+
// below binds it downwards. The space above only has a job when a
|
|
154
|
+
// group precedes it, so a subheader that opens the list stays tight —
|
|
155
|
+
// that keeps compact surfaces (the Map popover, which sets gap-0
|
|
156
|
+
// inside p-3) from opening up.
|
|
157
|
+
"text-muted-foreground text-label-sm flex items-center pt-4 pr-2 pb-1 pl-4 first:pt-2",
|
|
158
|
+
e
|
|
153
159
|
),
|
|
154
160
|
"data-hook": a,
|
|
155
161
|
"data-slot": "item-subheader",
|
|
156
|
-
...
|
|
162
|
+
...t
|
|
157
163
|
}
|
|
158
164
|
)
|
|
159
165
|
);
|
|
160
|
-
|
|
166
|
+
w.displayName = "ItemSubheader";
|
|
161
167
|
export {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
N as Item,
|
|
169
|
+
h as ItemActions,
|
|
170
|
+
I as ItemContent,
|
|
171
|
+
k as ItemDescription,
|
|
172
|
+
b as ItemMedia,
|
|
173
|
+
w as ItemSubheader,
|
|
168
174
|
y as ItemTitle,
|
|
169
|
-
|
|
170
|
-
|
|
175
|
+
x as List,
|
|
176
|
+
g as itemVariants
|
|
171
177
|
};
|
package/dist/map.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),ae=require("react"),ne=require("class-variance-authority"),P=require("@brightlocal/icons"),R=require("@brightlocal/illustrations"),L=require("@brightlocal/ui-components/button"),T=require("@brightlocal/ui-components/card"),g=require("@brightlocal/ui-components/lib/utils"),j=require("@brightlocal/ui-components/popover");function oe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const p=oe(ae),se={ROADMAP:"roadmap",SATELLITE:"satellite"},le=["water","landscape","road","poi","transit"];function ie(e,t){return[...le.map(a=>({featureType:a,elementType:"geometry",stylers:[{saturation:e,lightness:t}]})),{elementType:"labels.text.fill",stylers:[{saturation:e,lightness:t-10}]},{elementType:"labels.icon",stylers:[{saturation:e,lightness:t}]}]}const E=[{elementType:"geometry",stylers:[{color:"#444444"}]},{elementType:"labels.text.fill",stylers:[{color:"#aaaaaa"}]},{elementType:"labels.text.stroke",stylers:[{color:"#323232"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#30405a"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#4b4b4b"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#5c5c5c"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#3e3e3e"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#525252"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#505050"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]}],A={default:{light:[],dark:E},muted:{light:ie(-40,20),dark:E}},k=new Set;let w=typeof document<"u"&&!!document.body&&document.body.classList.contains("dark"),O=!1;function ce(){if(O||typeof document>"u")return;O=!0,new MutationObserver(()=>{const t=document.body.classList.contains("dark");if(t!==w){w=t;for(const a of k)a()}}).observe(document.body,{attributes:!0,attributeFilter:["class"]})}function de(e){return k.add(e),ce(),()=>{k.delete(e)}}function ue(){return w}function pe(){return!1}function I(){return p.useSyncExternalStore(de,ue,pe)}function me(e="default"){const t=I();return A[e][t?"dark":"light"]}const _={primary:"strong",secondary:"moderate",warning:"moderate",destructive:"unranked",outline:"unranked"};function fe(e){return e in _}function ge(e){return fe(e)?_[e]:e}const h={strong:{className:"bg-primary dark:bg-green-400",cssVar:"--ds-tailwind-colors-green-400",fallback:"#2ae855"},moderate:{className:"bg-chart-4",cssVar:"--ds-tailwind-colors-yellow-400",fallback:"#facc15"},weak:{className:"bg-orange-400",cssVar:"--ds-tailwind-colors-orange-400",fallback:"#fb923c"},unranked:{className:"bg-red-600",cssVar:"--ds-tailwind-colors-red-600",fallback:"#dc2626"},error:{className:"bg-warning-background dark:bg-orange-200",cssVar:"--ds-tailwind-colors-orange-200",fallback:"#fed7aa"}},y=Object.fromEntries(Object.entries(h).map(([e,t])=>[e,t.className])),ye=ne.cva("inline-flex items-center justify-center rounded-full font-sans text-sm font-semibold text-foreground dark:text-neutral-900 border-2 border-white shadow-sm transition-shadow duration-fast ease-out hover:shadow-md",{variants:{variant:{strong:`${y.strong}`,moderate:`${y.moderate}`,weak:`${y.weak}`,unranked:`${y.unranked} text-white dark:text-white`,error:`${y.error}`}},defaultVariants:{variant:"strong"}}),C=p.forwardRef(({value:e,variant:t="strong",loading:a=!1,pulse:n,dataHook:s,className:o,trackingEl:r,trackingLabel:c,style:i,...d},m)=>{const u=ge(t);return l.jsx("div",{ref:m,className:g.cn(a?"border-border bg-accent rounded-full border":ye({variant:u}),"size-8 p-0",o),"data-hook":s,"data-slot":"map-grid-pin","data-state":a?"loading":void 0,"data-tracking-el":r||"map-grid-pin","data-tracking-label":c,style:i,...d,children:u==="error"&&!a?l.jsx(P.TriangleAlert,{"aria-hidden":"true",className:"text-warning-foreground",size:14}):String(e)})});C.displayName="MapGridPin";function D(){const t={colors:Object.fromEntries(Object.entries(h).map(([n,s])=>[n,s.fallback])),fontFamily:"Inter, system-ui, sans-serif",textColor:"#111412"};if(typeof document>"u")return t;const a=getComputedStyle(document.documentElement);return{colors:Object.fromEntries(Object.entries(h).map(([n,{cssVar:s,fallback:o}])=>[n,a.getPropertyValue(s).trim()||o])),fontFamily:a.getPropertyValue("--ds-font-font-sans").trim()||t.fontFamily,textColor:a.getPropertyValue("--ds-tailwind-colors-neutral-950").trim()||t.textColor}}function xe(){return D().colors}const be=Object.fromEntries(Object.entries(h).map(([e,t])=>[e,t.fallback])),M=["strong","moderate","weak","unranked","error"];function N(e,t){const{colors:a,fontFamily:n,textColor:s}=D(),o=40,r=o/2,c=2,i=r-c,d=i*.55,u=[...e].sort((f,x)=>M.indexOf(f.variant)-M.indexOf(x.variant)).filter(f=>f.count>0),W=u.reduce((f,x)=>f+x.count,0)||1,Z=Math.max(Number(t)||0,1);let b;const S=u[0];if(u.length<=1){const f=S?a[S.variant]:"#e5e7eb";b=`<circle cx="${r}" cy="${r}" r="${i}" fill="${f}"/>`}else{b="";let f=-Math.PI/2;for(const x of u){const $=x.count/W*Math.PI*2,v=f+$,Q=r+i*Math.cos(f),X=r+i*Math.sin(f),ee=r+i*Math.cos(v),te=r+i*Math.sin(v),re=$>Math.PI?1:0;b+=`<path d="M${r},${r}L${Q.toFixed(2)},${X.toFixed(2)}A${i},${i} 0 ${re} 1 ${ee.toFixed(2)},${te.toFixed(2)}Z" fill="${a[x.variant]}"/>`,f=v}}const J=Math.round(o*.3);return[`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}" style="filter:drop-shadow(0 1px 2px rgba(0,0,0,.15))">`,`<circle cx="${r}" cy="${r}" r="${r}" fill="white"/>`,b,`<circle cx="${r}" cy="${r}" r="${i}" fill="none" stroke="white" stroke-width="${c}"/>`,`<circle cx="${r}" cy="${r}" r="${d}" fill="white"/>`,`<text x="${r}" y="${r}" text-anchor="middle" dominant-baseline="central" font-family="${n}" font-size="${J}" font-weight="600" fill="${s}">${Z}</text>`,"</svg>"].join("")}function he(e){if(typeof DOMParser>"u")throw new Error("createClusterPinElement requires a browser environment (DOMParser). Use createClusterPinSvg for SSR.");const{markers:t,count:a,getVariant:n}=e,s=new Map;for(const m of t){const u=n(m);s.set(u,(s.get(u)??0)+1)}const o=[];for(const m of M){const u=s.get(m);u&&o.push({variant:m,count:u})}const r=N(o,a),d=new DOMParser().parseFromString(r,"image/svg+xml").documentElement;if(!(d instanceof SVGElement))throw new Error("createClusterPinElement: failed to parse SVG");return d}const V=p.forwardRef(({segments:e,count:t,dataHook:a,className:n,trackingEl:s,trackingLabel:o,...r},c)=>{const i=JSON.stringify(e),d=p.useMemo(()=>N(e,t),[i,t]);return l.jsx("div",{dangerouslySetInnerHTML:{__html:d},ref:c,className:g.cn("inline-flex items-center justify-center",n),"data-hook":a,"data-slot":"map-cluster-pin","data-tracking-el":s||"map-cluster-pin","data-tracking-label":o,...r})});V.displayName="MapClusterPin";const F=p.forwardRef(({icon:e,animateIn:t=!1,value:a,variant:n,pulse:s,dataHook:o,className:r,trackingEl:c,trackingLabel:i,ariaLabel:d,...m},u)=>a!==void 0||n!==void 0||s!==void 0?l.jsx(C,{ref:u,className:r,dataHook:o,pulse:s,trackingEl:c,trackingLabel:i,value:a??1,variant:n,...m}):l.jsx("div",{ref:u,"aria-label":d??"Location",className:g.cn("relative inline-flex h-[46px] w-[38px] items-start justify-center",r),"data-hook":o,"data-slot":"map-location-pin","data-tracking-el":c||"map-location-pin","data-tracking-label":i,role:"img",...m,children:l.jsxs("span",{"aria-hidden":"true",className:g.cn("relative flex size-full",t&&"animate-emphasis-pop origin-bottom will-change-transform"),children:[l.jsxs("svg",{"aria-hidden":"true",className:"size-full overflow-visible drop-shadow-sm",fill:"none",viewBox:"0 0 38 46",children:[l.jsx("path",{className:"fill-white",d:"M38 19.15C38 29.21 29.4 35.77 20.38 44.63C19.61 45.39 18.37 45.41 17.58 44.67C8.01 35.79 0 29.23 0 19.15C0 8.57 8.51 0 19 0C29.49 0 38 8.57 38 19.15Z"}),l.jsx("circle",{className:"fill-sky-500",cx:"19",cy:"19",r:"16"})]}),l.jsx("span",{className:"absolute top-[19px] left-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center text-white",children:e??l.jsx(P.Store,{size:16})})]})}));F.displayName="MapLocationPin";const z=p.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:n,children:s,iconOnly:o=!0,...r},c)=>{const i=I();return l.jsx(L.Button,{ref:c,className:e,"data-slot":"map-control-button",dataHook:t,iconOnly:o,trackingEl:a||"map-control-button",trackingLabel:n,variant:i?"secondary":"outline",...r,children:s})});z.displayName="MapControlButton";const q=p.forwardRef(({className:e,children:t,dataHook:a,trackingEl:n,trackingLabel:s,ariaLabel:o,...r},c)=>l.jsxs("div",{ref:c,"aria-label":o??"Loading map",className:g.cn("border-border relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border",e),"data-hook":a,"data-slot":"map-loading-state","data-tracking-el":n||"map-loading-state","data-tracking-label":s,role:"status",...r,children:[l.jsx(B,{}),t&&l.jsx("div",{className:"relative",children:t})]}));q.displayName="MapLoadingState";const B=p.memo(function({rounded:t}){return l.jsx(R.MapBackground,{"aria-hidden":"true",className:g.cn("absolute inset-0 h-full w-full object-cover",t&&"rounded-[inherit]"),mode:"auto"})}),G=p.forwardRef(({className:e,title:t="We couldn't load your map rankings.",message:a="Reloading usually fixes it, and it won't use any credits",onRetry:n,retryLoading:s=!1,retryLabel:o="Reload",dataHook:r,trackingEl:c,trackingLabel:i,...d},m)=>l.jsxs("div",{ref:m,className:g.cn("border-border relative flex h-full w-full flex-col items-center justify-center gap-4 rounded-lg border p-4 text-center sm:gap-6 sm:p-8",e),"data-hook":r,"data-slot":"map-error-state","data-tracking-el":c||"map-error-state","data-tracking-label":i,role:"alert",...d,children:[l.jsx(B,{rounded:!0}),l.jsxs("div",{className:"relative flex flex-col items-center gap-4 sm:gap-6",children:[l.jsx("div",{"aria-hidden":"true",className:"flex items-center justify-center","data-slot":"map-error-illustration",children:l.jsx(R.GlobeyFixingFault,{className:"h-auto w-full max-w-41"})}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("h3",{className:"text-foreground text-lg font-medium","data-slot":"map-error-title",children:t}),a&&l.jsx("p",{className:"text-muted-foreground text-sm","data-slot":"map-error-message",children:a})]}),n&&l.jsxs(L.Button,{className:"mt-1",dataHook:`${r}-retry`,loading:s,size:"sm",variant:"primary",onClick:n,children:[!s&&l.jsx(P.RefreshCw,{"aria-hidden":"true"}),o]})]})]}));G.displayName="MapErrorState";const K=p.forwardRef(({variant:e,color:t,dataHook:a,className:n,children:s,...o},r)=>{const c=e?y[e]:t;return l.jsxs("span",{ref:r,className:g.cn("text-foreground flex items-center gap-1 font-sans text-xs",n),"data-hook":a,"data-slot":"map-legend-item",...o,children:[l.jsx("span",{"aria-hidden":"true",className:g.cn("inline-block size-2 shrink-0 rounded-full",c)}),s]})});K.displayName="MapLegendItem";const Y=p.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:n,ariaLabel:s,children:o,...r},c)=>l.jsx(T.Card,{ref:c,"aria-label":s??"Map legend",className:g.cn("inline-flex w-auto max-w-none flex-row items-center bg-white font-sans dark:bg-neutral-800",e),"data-slot":"map-legend",dataHook:t,density:"condensed",role:"group",trackingEl:a||"map-legend",trackingLabel:n,variant:"border",...r,children:l.jsx(T.CardContent,{className:"flex items-center gap-3",children:o})}));Y.displayName="MapLegend";function ve(e){const{hoverWhenOpen:t=!1}=e??{},[a,n]=p.useState(null),[s,o]=p.useState(null),r=p.useCallback(d=>{o(d),n(d)},[]),c=p.useCallback(()=>{n(null)},[]),i=p.useCallback(d=>{const m={onClick:()=>r(d)};return t&&(m.onPointerEnter=u=>{u.pointerType==="mouse"&&a!=null&&r(d)}),m},[t,r,a]);return{activeItem:a,anchorItem:s,showItem:r,close:c,getInteractionProps:i}}const ke=j.Popover,H=j.PopoverAnchor;H.displayName="MapPopoverAnchor";const U=p.forwardRef(({className:e,side:t="top",sideOffset:a=4,dataHook:n,trackingEl:s,trackingLabel:o,...r},c)=>l.jsx(j.PopoverContent,{ref:c,className:g.cn("w-auto max-w-68.25 p-3 data-[state=closed]:animate-none data-[state=closed]:opacity-0",e),"data-slot":"map-popover-content","data-tracking-el":s||"map-popover","data-tracking-label":o,dataHook:n,side:t,sideOffset:a,onCloseAutoFocus:i=>i.preventDefault(),onOpenAutoFocus:i=>i.preventDefault(),...r}));U.displayName="MapPopoverContent";exports.MAP_STYLES=A;exports.MapClusterPin=V;exports.MapControlButton=z;exports.MapErrorState=G;exports.MapGridPin=C;exports.MapLegend=Y;exports.MapLegendItem=K;exports.MapLoadingState=q;exports.MapLocationPin=F;exports.MapPopover=ke;exports.MapPopoverAnchor=H;exports.MapPopoverContent=U;exports.MapTypeId=se;exports.clusterPinHexColors=be;exports.createClusterPinElement=he;exports.createClusterPinSvg=N;exports.mapGridPinColorMap=y;exports.resolveClusterPinColors=xe;exports.useMapPopoverClick=ve;exports.useMapStyles=me;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),ne=require("react"),oe=require("class-variance-authority"),v=require("@brightlocal/icons"),R=require("@brightlocal/illustrations"),L=require("@brightlocal/ui-components/button"),T=require("@brightlocal/ui-components/card"),g=require("@brightlocal/ui-components/lib/utils"),j=require("@brightlocal/ui-components/popover"),se=require("./lib/empty-canvas.cjs");function le(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const p=le(ne),ie={ROADMAP:"roadmap",SATELLITE:"satellite"},ce=["water","landscape","road","poi","transit"];function de(e,t){return[...ce.map(r=>({featureType:r,elementType:"geometry",stylers:[{saturation:e,lightness:t}]})),{elementType:"labels.text.fill",stylers:[{saturation:e,lightness:t-10}]},{elementType:"labels.icon",stylers:[{saturation:e,lightness:t}]}]}const E=[{elementType:"geometry",stylers:[{color:"#444444"}]},{elementType:"labels.text.fill",stylers:[{color:"#aaaaaa"}]},{elementType:"labels.text.stroke",stylers:[{color:"#323232"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#30405a"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#4b4b4b"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#5c5c5c"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#3e3e3e"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#525252"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#505050"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]}],A={default:{light:[],dark:E},muted:{light:de(-40,20),dark:E}},M=new Set;let w=typeof document<"u"&&!!document.body&&document.body.classList.contains("dark"),O=!1;function ue(){if(O||typeof document>"u")return;O=!0,new MutationObserver(()=>{const t=document.body.classList.contains("dark");if(t!==w){w=t;for(const r of M)r()}}).observe(document.body,{attributes:!0,attributeFilter:["class"]})}function pe(e){return M.add(e),ue(),()=>{M.delete(e)}}function me(){return w}function fe(){return!1}function I(){return p.useSyncExternalStore(pe,me,fe)}function ge(e="default"){const t=I();return A[e][t?"dark":"light"]}const _={primary:"strong",secondary:"moderate",warning:"moderate",destructive:"unranked",outline:"unranked"};function ye(e){return e in _}function xe(e){return ye(e)?_[e]:e}const h={strong:{className:"bg-primary dark:bg-green-400",cssVar:"--ds-tailwind-colors-green-400",fallback:"#2ae855"},moderate:{className:"bg-chart-4",cssVar:"--ds-tailwind-colors-yellow-400",fallback:"#facc15"},weak:{className:"bg-orange-400",cssVar:"--ds-tailwind-colors-orange-400",fallback:"#fb923c"},unranked:{className:"bg-red-600",cssVar:"--ds-tailwind-colors-red-600",fallback:"#dc2626"},error:{className:"bg-warning-background dark:bg-orange-200",cssVar:"--ds-tailwind-colors-orange-200",fallback:"#fed7aa"}},y=Object.fromEntries(Object.entries(h).map(([e,t])=>[e,t.className])),be=oe.cva("inline-flex items-center justify-center rounded-full text-label font-semibold text-foreground dark:text-neutral-900 border-2 border-white shadow-sm transition-shadow duration-fast ease-out hover:shadow-md",{variants:{variant:{strong:`${y.strong}`,moderate:`${y.moderate}`,weak:`${y.weak}`,unranked:`${y.unranked} text-white dark:text-white`,error:`${y.error}`}},defaultVariants:{variant:"strong"}}),C=p.forwardRef(({value:e,variant:t="strong",loading:r=!1,pulse:n,dataHook:s,className:o,trackingEl:a,trackingLabel:c,style:i,...d},m)=>{const u=xe(t);return l.jsx("div",{ref:m,className:g.cn(r?"border-border bg-accent rounded-full border":be({variant:u}),"size-8 p-0",o),"data-hook":s,"data-slot":"map-grid-pin","data-state":r?"loading":void 0,"data-tracking-el":a||"map-grid-pin","data-tracking-label":c,style:i,...d,children:u==="error"&&!r?l.jsx(v.TriangleAlert,{"aria-hidden":"true",className:"text-warning-foreground",size:14}):String(e)})});C.displayName="MapGridPin";function D(){const t={colors:Object.fromEntries(Object.entries(h).map(([n,s])=>[n,s.fallback])),fontFamily:"Inter, system-ui, sans-serif",textColor:"#111412"};if(typeof document>"u")return t;const r=getComputedStyle(document.documentElement);return{colors:Object.fromEntries(Object.entries(h).map(([n,{cssVar:s,fallback:o}])=>[n,r.getPropertyValue(s).trim()||o])),fontFamily:r.getPropertyValue("--ds-font-font-sans").trim()||t.fontFamily,textColor:r.getPropertyValue("--ds-tailwind-colors-neutral-950").trim()||t.textColor}}function he(){return D().colors}const ve=Object.fromEntries(Object.entries(h).map(([e,t])=>[e,t.fallback])),P=["strong","moderate","weak","unranked","error"];function N(e,t){const{colors:r,fontFamily:n,textColor:s}=D(),o=40,a=o/2,c=2,i=a-c,d=i*.55,u=[...e].sort((f,x)=>P.indexOf(f.variant)-P.indexOf(x.variant)).filter(f=>f.count>0),Z=u.reduce((f,x)=>f+x.count,0)||1,J=Math.max(Number(t)||0,1);let b;const S=u[0];if(u.length<=1){const f=S?r[S.variant]:"#e5e7eb";b=`<circle cx="${a}" cy="${a}" r="${i}" fill="${f}"/>`}else{b="";let f=-Math.PI/2;for(const x of u){const $=x.count/Z*Math.PI*2,k=f+$,X=a+i*Math.cos(f),ee=a+i*Math.sin(f),te=a+i*Math.cos(k),ae=a+i*Math.sin(k),re=$>Math.PI?1:0;b+=`<path d="M${a},${a}L${X.toFixed(2)},${ee.toFixed(2)}A${i},${i} 0 ${re} 1 ${te.toFixed(2)},${ae.toFixed(2)}Z" fill="${r[x.variant]}"/>`,f=k}}const Q=Math.round(o*.3);return[`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}" style="filter:drop-shadow(0 1px 2px rgba(0,0,0,.15))">`,`<circle cx="${a}" cy="${a}" r="${a}" fill="white"/>`,b,`<circle cx="${a}" cy="${a}" r="${i}" fill="none" stroke="white" stroke-width="${c}"/>`,`<circle cx="${a}" cy="${a}" r="${d}" fill="white"/>`,`<text x="${a}" y="${a}" text-anchor="middle" dominant-baseline="central" font-family="${n}" font-size="${Q}" font-weight="600" fill="${s}">${J}</text>`,"</svg>"].join("")}function ke(e){if(typeof DOMParser>"u")throw new Error("createClusterPinElement requires a browser environment (DOMParser). Use createClusterPinSvg for SSR.");const{markers:t,count:r,getVariant:n}=e,s=new Map;for(const m of t){const u=n(m);s.set(u,(s.get(u)??0)+1)}const o=[];for(const m of P){const u=s.get(m);u&&o.push({variant:m,count:u})}const a=N(o,r),d=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;if(!(d instanceof SVGElement))throw new Error("createClusterPinElement: failed to parse SVG");return d}const V=p.forwardRef(({segments:e,count:t,dataHook:r,className:n,trackingEl:s,trackingLabel:o,...a},c)=>{const i=JSON.stringify(e),d=p.useMemo(()=>N(e,t),[i,t]);return l.jsx("div",{dangerouslySetInnerHTML:{__html:d},ref:c,className:g.cn("inline-flex items-center justify-center",n),"data-hook":r,"data-slot":"map-cluster-pin","data-tracking-el":s||"map-cluster-pin","data-tracking-label":o,...a})});V.displayName="MapClusterPin";const F=p.forwardRef(({icon:e,animateIn:t=!1,value:r,variant:n,pulse:s,dataHook:o,className:a,trackingEl:c,trackingLabel:i,ariaLabel:d,...m},u)=>r!==void 0||n!==void 0||s!==void 0?l.jsx(C,{ref:u,className:a,dataHook:o,pulse:s,trackingEl:c,trackingLabel:i,value:r??1,variant:n,...m}):l.jsx("div",{ref:u,"aria-label":d??"Location",className:g.cn("relative inline-flex h-[46px] w-[38px] items-start justify-center",a),"data-hook":o,"data-slot":"map-location-pin","data-tracking-el":c||"map-location-pin","data-tracking-label":i,role:"img",...m,children:l.jsxs("span",{"aria-hidden":"true",className:g.cn("relative flex size-full",t&&"animate-emphasis-pop origin-bottom will-change-transform"),children:[l.jsxs("svg",{"aria-hidden":"true",className:"size-full overflow-visible drop-shadow-sm",fill:"none",viewBox:"0 0 38 46",children:[l.jsx("path",{className:"fill-white",d:"M38 19.15C38 29.21 29.4 35.77 20.38 44.63C19.61 45.39 18.37 45.41 17.58 44.67C8.01 35.79 0 29.23 0 19.15C0 8.57 8.51 0 19 0C29.49 0 38 8.57 38 19.15Z"}),l.jsx("circle",{className:"fill-sky-500",cx:"19",cy:"19",r:"16"})]}),l.jsx("span",{className:"absolute top-[19px] left-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center text-white",children:e??l.jsx(v.Store,{size:16})})]})}));F.displayName="MapLocationPin";const q=p.forwardRef(({className:e,dataHook:t,trackingEl:r,trackingLabel:n,children:s,iconOnly:o=!0,...a},c)=>{const i=I();return l.jsx(L.Button,{ref:c,className:e,"data-slot":"map-control-button",dataHook:t,iconOnly:o,trackingEl:r||"map-control-button",trackingLabel:n,variant:i?"secondary":"outline",...a,children:s})});q.displayName="MapControlButton";const z=p.forwardRef(({className:e,children:t,dataHook:r,trackingEl:n,trackingLabel:s,ariaLabel:o,...a},c)=>l.jsxs("div",{ref:c,"aria-label":o??"Loading map",className:g.cn("border-border relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border",e),"data-hook":r,"data-slot":"map-loading-state","data-tracking-el":n||"map-loading-state","data-tracking-label":s,role:"status",...a,children:[l.jsx(B,{}),t&&l.jsx("div",{className:"relative",children:t})]}));z.displayName="MapLoadingState";const B=p.memo(function({rounded:t}){return l.jsx(R.MapBackground,{"aria-hidden":"true",className:g.cn("absolute inset-0 h-full w-full object-cover",t&&"rounded-[inherit]"),mode:"auto"})}),G=p.forwardRef(({className:e,title:t="We couldn't load your map rankings.",message:r="Reloading usually fixes it, and it won't use any credits",onRetry:n,retryLoading:s=!1,retryLabel:o="Reload",dataHook:a,trackingEl:c,trackingLabel:i,...d},m)=>l.jsxs("div",{ref:m,className:g.cn("border-border relative flex h-full w-full flex-col items-center justify-center gap-4 rounded-lg border p-4 text-center sm:gap-6 sm:p-8",e),"data-hook":a,"data-slot":"map-error-state","data-tracking-el":c||"map-error-state","data-tracking-label":i,role:"alert",...d,children:[l.jsx(B,{rounded:!0}),l.jsxs("div",{className:"relative flex flex-col items-center gap-4 sm:gap-6",children:[l.jsx("div",{"aria-hidden":"true",className:"flex items-center justify-center","data-slot":"map-error-illustration",children:l.jsx(R.GlobeyFixingFault,{className:"h-auto w-full max-w-41"})}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("h3",{className:"text-foreground text-heading-subsection","data-slot":"map-error-title",children:t}),r&&l.jsx("p",{className:"text-muted-foreground text-body-sm","data-slot":"map-error-message",children:r})]}),n&&l.jsxs(L.Button,{className:"mt-1",dataHook:`${a}-retry`,loading:s,size:"sm",variant:"primary",onClick:n,children:[!s&&l.jsx(v.RefreshCw,{"aria-hidden":"true"}),o]})]})]}));G.displayName="MapErrorState";const K=p.forwardRef(({className:e,dataHook:t,icon:r,message:n,trackingEl:s,trackingLabel:o,...a},c)=>l.jsx(se.EmptyCanvas,{ref:c,className:g.cn("h-full w-full rounded-lg",e),dataHook:t,icon:r??l.jsx(v.Map,{strokeWidth:2}),message:n??"No data yet",slot:"map-empty",trackingEl:s,trackingLabel:o,...a}));K.displayName="MapEmpty";const W=p.forwardRef(({variant:e,color:t,dataHook:r,className:n,children:s,...o},a)=>{const c=e?y[e]:t;return l.jsxs("span",{ref:a,className:g.cn("text-foreground text-body-xs flex items-center gap-1",n),"data-hook":r,"data-slot":"map-legend-item",...o,children:[l.jsx("span",{"aria-hidden":"true",className:g.cn("inline-block size-2 shrink-0 rounded-full",c)}),s]})});W.displayName="MapLegendItem";const Y=p.forwardRef(({className:e,dataHook:t,trackingEl:r,trackingLabel:n,ariaLabel:s,children:o,...a},c)=>l.jsx(T.Card,{ref:c,"aria-label":s??"Map legend",className:g.cn("inline-flex w-auto max-w-none flex-row items-center bg-white font-sans dark:bg-neutral-800",e),"data-slot":"map-legend",dataHook:t,density:"condensed",role:"group",trackingEl:r||"map-legend",trackingLabel:n,variant:"border",...a,children:l.jsx(T.CardContent,{className:"flex items-center gap-3",children:o})}));Y.displayName="MapLegend";function Me(e){const{hoverWhenOpen:t=!1}=e??{},[r,n]=p.useState(null),[s,o]=p.useState(null),a=p.useCallback(d=>{o(d),n(d)},[]),c=p.useCallback(()=>{n(null)},[]),i=p.useCallback(d=>{const m={onClick:()=>a(d)};return t&&(m.onPointerEnter=u=>{u.pointerType==="mouse"&&r!=null&&a(d)}),m},[t,a,r]);return{activeItem:r,anchorItem:s,showItem:a,close:c,getInteractionProps:i}}const we=j.Popover,H=j.PopoverAnchor;H.displayName="MapPopoverAnchor";const U=p.forwardRef(({className:e,side:t="top",sideOffset:r=4,dataHook:n,trackingEl:s,trackingLabel:o,...a},c)=>l.jsx(j.PopoverContent,{ref:c,className:g.cn("w-auto max-w-68.25 p-3 data-[state=closed]:animate-none data-[state=closed]:opacity-0",e),"data-slot":"map-popover-content","data-tracking-el":s||"map-popover","data-tracking-label":o,dataHook:n,side:t,sideOffset:r,onCloseAutoFocus:i=>i.preventDefault(),onOpenAutoFocus:i=>i.preventDefault(),...a}));U.displayName="MapPopoverContent";exports.MAP_STYLES=A;exports.MapClusterPin=V;exports.MapControlButton=q;exports.MapEmpty=K;exports.MapErrorState=G;exports.MapGridPin=C;exports.MapLegend=Y;exports.MapLegendItem=W;exports.MapLoadingState=z;exports.MapLocationPin=F;exports.MapPopover=we;exports.MapPopoverAnchor=H;exports.MapPopoverContent=U;exports.MapTypeId=ie;exports.clusterPinHexColors=ve;exports.createClusterPinElement=ke;exports.createClusterPinSvg=N;exports.mapGridPinColorMap=y;exports.resolveClusterPinColors=he;exports.useMapPopoverClick=Me;exports.useMapStyles=ge;
|
package/dist/map.d.ts
CHANGED
|
@@ -385,6 +385,64 @@ interface MapErrorStateProps extends React.ComponentProps<"div"> {
|
|
|
385
385
|
* Pass `onRetry` to render a retry button; omit it to hide the button entirely.
|
|
386
386
|
*/
|
|
387
387
|
declare const MapErrorState: React.ForwardRefExoticComponent<Omit<MapErrorStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
388
|
+
/**
|
|
389
|
+
* Props for the MapEmpty component.
|
|
390
|
+
*/
|
|
391
|
+
interface MapEmptyProps extends Omit<React.ComponentProps<"div">, "children" | "title"> {
|
|
392
|
+
/**
|
|
393
|
+
* Required data-hook attribute for automated testing. The parts derive
|
|
394
|
+
* theirs from it: `-icon`, `-message`.
|
|
395
|
+
* @example "rankings-grid-map-empty"
|
|
396
|
+
*/
|
|
397
|
+
dataHook: string;
|
|
398
|
+
/**
|
|
399
|
+
* The glyph on the surface. The component sizes it.
|
|
400
|
+
* @default <Map strokeWidth={2} />
|
|
401
|
+
*/
|
|
402
|
+
icon?: React.ReactNode;
|
|
403
|
+
/**
|
|
404
|
+
* The one line on the surface. Domain copy — "No ranking data yet" rather
|
|
405
|
+
* than a bare "No data" — with no trailing period.
|
|
406
|
+
* @default "No data yet"
|
|
407
|
+
*/
|
|
408
|
+
message?: string;
|
|
409
|
+
/** Analytics element identifier */
|
|
410
|
+
trackingEl?: string;
|
|
411
|
+
/** Analytics label */
|
|
412
|
+
trackingLabel?: string;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* A map surface with nothing to plot — the map's reserved box filled with a
|
|
416
|
+
* muted surface, a bare icon, and one quiet line.
|
|
417
|
+
*
|
|
418
|
+
* The rule this exists to enforce: **a map never renders pinless with no
|
|
419
|
+
* message.** An empty map and a broken map look identical, so silence here
|
|
420
|
+
* reads as a fault every time.
|
|
421
|
+
*
|
|
422
|
+
* Unlike its `MapLoadingState` and `MapErrorState` siblings it does not draw
|
|
423
|
+
* the decorative map background. Those two are telling the reader that a real
|
|
424
|
+
* map is coming or has failed, so a map-shaped backdrop is honest; here there
|
|
425
|
+
* is nothing to show, and a pinless map behind the message would recreate the
|
|
426
|
+
* exact confusion the message is there to clear up.
|
|
427
|
+
*
|
|
428
|
+
* The surroundings must agree: KPI tiles beside an empty map show em-dashes and
|
|
429
|
+
* drop their trend badges.
|
|
430
|
+
*
|
|
431
|
+
* @example
|
|
432
|
+
* ```tsx
|
|
433
|
+
* <div className="h-[500px]">
|
|
434
|
+
* {hasRuns ? (
|
|
435
|
+
* <GridMap dataHook="rankings-grid-map" {...gridMap} />
|
|
436
|
+
* ) : (
|
|
437
|
+
* <MapEmpty
|
|
438
|
+
* dataHook="rankings-grid-map-empty"
|
|
439
|
+
* message={t("rankings.map.empty")}
|
|
440
|
+
* />
|
|
441
|
+
* )}
|
|
442
|
+
* </div>
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
445
|
+
declare const MapEmpty: React.ForwardRefExoticComponent<Omit<MapEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
388
446
|
/**
|
|
389
447
|
* Props for the MapLegendItem component.
|
|
390
448
|
*/
|
|
@@ -558,6 +616,6 @@ interface MapPopoverContentProps extends PopoverContentProps {
|
|
|
558
616
|
* with `MapPopoverAnchor` and {@link useMapPopoverClick}.
|
|
559
617
|
*/
|
|
560
618
|
declare const MapPopoverContent: React.ForwardRefExoticComponent<Omit<MapPopoverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
561
|
-
export { MAP_STYLES, MapTypeId, MapLocationPin, MapGridPin, MapClusterPin, mapGridPinColorMap, clusterPinHexColors, resolveClusterPinColors, createClusterPinSvg, createClusterPinElement, MapControlButton, MapLoadingState, MapErrorState, MapLegend, MapLegendItem, MapPopover, MapPopoverAnchor, MapPopoverContent, useMapStyles, useMapPopoverClick, };
|
|
562
|
-
export type { MapStyleVariant, MapStyleRule, MapTypeIdValue, ResolvedVariant as MapPinVariant, MapLocationPinProps, MapGridPinProps, MapGridPinVariant, MapClusterPinProps, ClusterPinSegment, CreateClusterPinElementOptions, MapControlButtonProps, MapLoadingStateProps, MapErrorStateProps, MapLegendProps, MapLegendItemProps, MapPopoverProps, MapPopoverAnchorProps, MapPopoverContentProps, UseMapPopoverClickOptions, UseMapPopoverClickReturn, MapPinInteractionProps, };
|
|
619
|
+
export { MAP_STYLES, MapTypeId, MapLocationPin, MapGridPin, MapClusterPin, mapGridPinColorMap, clusterPinHexColors, resolveClusterPinColors, createClusterPinSvg, createClusterPinElement, MapControlButton, MapLoadingState, MapErrorState, MapEmpty, MapLegend, MapLegendItem, MapPopover, MapPopoverAnchor, MapPopoverContent, useMapStyles, useMapPopoverClick, };
|
|
620
|
+
export type { MapStyleVariant, MapStyleRule, MapTypeIdValue, ResolvedVariant as MapPinVariant, MapLocationPinProps, MapGridPinProps, MapGridPinVariant, MapClusterPinProps, ClusterPinSegment, CreateClusterPinElementOptions, MapControlButtonProps, MapLoadingStateProps, MapErrorStateProps, MapEmptyProps, MapLegendProps, MapLegendItemProps, MapPopoverProps, MapPopoverAnchorProps, MapPopoverContentProps, UseMapPopoverClickOptions, UseMapPopoverClickReturn, MapPinInteractionProps, };
|
|
563
621
|
//# sourceMappingURL=map.d.ts.map
|
package/dist/map.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/components/map.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/components/map.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,EACL,OAAO,EAGP,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,oCAAoC,CAAC;AAO5C;;;;GAIG;AACH,QAAA,MAAM,SAAS;IACb,4BAA4B;;IAE5B,gFAAgF;;CAExE,CAAC;AAEX;;GAEG;AACH,KAAK,cAAc,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAMjE;;;;GAIG;AACH,KAAK,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5C,CAAC;AA8DF;;;;;;;GAOG;AACH,QAAA,MAAM,UAAU,EAAE,MAAM,CACtB,eAAe,EACf;IAAE,KAAK,EAAE,YAAY,EAAE,CAAC;IAAC,IAAI,EAAE,YAAY,EAAE,CAAA;CAAE,CAIhD,CAAC;AAkDF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,YAAY,CAAC,OAAO,GAAE,eAA2B,GAAG,YAAY,EAAE,CAG1E;AAMD,K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