@rise-x/apps-sdk 0.6.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 (185) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +553 -0
  3. package/build/_internal.d.ts +2 -0
  4. package/build/_internal.js +23 -0
  5. package/build/accessors.d.ts +8 -0
  6. package/build/accessors.js +40 -0
  7. package/build/cli/index.d.ts +13 -0
  8. package/build/cli/index.js +54 -0
  9. package/build/cli/init.d.ts +6 -0
  10. package/build/cli/init.js +179 -0
  11. package/build/cli/templating.d.ts +2 -0
  12. package/build/cli/templating.js +84 -0
  13. package/build/connectors/agents.d.ts +85 -0
  14. package/build/connectors/agents.js +404 -0
  15. package/build/connectors/assets.d.ts +76 -0
  16. package/build/connectors/assets.js +204 -0
  17. package/build/connectors/deps.d.ts +4 -0
  18. package/build/connectors/deps.js +2 -0
  19. package/build/connectors/errors.d.ts +11 -0
  20. package/build/connectors/errors.js +67 -0
  21. package/build/connectors/flows.d.ts +37 -0
  22. package/build/connectors/flows.js +191 -0
  23. package/build/connectors/index.d.ts +8 -0
  24. package/build/connectors/index.js +50 -0
  25. package/build/connectors/sse.d.ts +12 -0
  26. package/build/connectors/sse.js +157 -0
  27. package/build/connectors/types.d.ts +285 -0
  28. package/build/connectors/types.js +419 -0
  29. package/build/connectors/work.d.ts +84 -0
  30. package/build/connectors/work.js +224 -0
  31. package/build/hooks.d.ts +4 -0
  32. package/build/hooks.js +28 -0
  33. package/build/index.d.ts +6 -0
  34. package/build/index.js +34 -0
  35. package/build/lifecycle.d.ts +23 -0
  36. package/build/lifecycle.js +6 -0
  37. package/build/mockShell.d.ts +10 -0
  38. package/build/mockShell.js +55 -0
  39. package/build/query/agents.d.ts +80 -0
  40. package/build/query/agents.js +143 -0
  41. package/build/query/assets.d.ts +73 -0
  42. package/build/query/assets.js +152 -0
  43. package/build/query/client.d.ts +5 -0
  44. package/build/query/client.js +68 -0
  45. package/build/query/context.d.ts +2 -0
  46. package/build/query/context.js +34 -0
  47. package/build/query/flows.d.ts +54 -0
  48. package/build/query/flows.js +81 -0
  49. package/build/query/index.d.ts +10 -0
  50. package/build/query/index.js +85 -0
  51. package/build/query/keys.d.ts +51 -0
  52. package/build/query/keys.js +79 -0
  53. package/build/query/layer.d.ts +175 -0
  54. package/build/query/layer.js +35 -0
  55. package/build/query/shared.d.ts +43 -0
  56. package/build/query/shared.js +116 -0
  57. package/build/query/work.d.ts +75 -0
  58. package/build/query/work.js +172 -0
  59. package/build/shell/index.d.ts +1 -0
  60. package/build/shell/index.js +6 -0
  61. package/build/shell/installShellBridge.d.ts +11 -0
  62. package/build/shell/installShellBridge.js +104 -0
  63. package/build/shellBridge.d.ts +36 -0
  64. package/build/shellBridge.js +10 -0
  65. package/build/topBar.d.ts +25 -0
  66. package/build/topBar.js +17 -0
  67. package/build/ui/components/ai.d.ts +49 -0
  68. package/build/ui/components/alert-dialog.d.ts +27 -0
  69. package/build/ui/components/alert.d.ts +14 -0
  70. package/build/ui/components/avatar.d.ts +17 -0
  71. package/build/ui/components/badge.d.ts +19 -0
  72. package/build/ui/components/button.d.ts +13 -0
  73. package/build/ui/components/calendar.d.ts +21 -0
  74. package/build/ui/components/card.d.ts +16 -0
  75. package/build/ui/components/chart.d.ts +124 -0
  76. package/build/ui/components/checkbox.d.ts +4 -0
  77. package/build/ui/components/data-table.d.ts +70 -0
  78. package/build/ui/components/dialog.d.ts +17 -0
  79. package/build/ui/components/dropdown-menu.d.ts +29 -0
  80. package/build/ui/components/empty-state.d.ts +7 -0
  81. package/build/ui/components/file-upload.d.ts +17 -0
  82. package/build/ui/components/input.d.ts +8 -0
  83. package/build/ui/components/label.d.ts +4 -0
  84. package/build/ui/components/list.d.ts +24 -0
  85. package/build/ui/components/map.d.ts +26 -0
  86. package/build/ui/components/message.d.ts +24 -0
  87. package/build/ui/components/nav.d.ts +12 -0
  88. package/build/ui/components/page-header.d.ts +27 -0
  89. package/build/ui/components/popover.d.ts +10 -0
  90. package/build/ui/components/progress.d.ts +4 -0
  91. package/build/ui/components/radio.d.ts +6 -0
  92. package/build/ui/components/resizable.d.ts +7 -0
  93. package/build/ui/components/scroll-area.d.ts +5 -0
  94. package/build/ui/components/segmented.d.ts +6 -0
  95. package/build/ui/components/select.d.ts +15 -0
  96. package/build/ui/components/separator.d.ts +4 -0
  97. package/build/ui/components/sheet.d.ts +14 -0
  98. package/build/ui/components/skeleton.d.ts +3 -0
  99. package/build/ui/components/slider.d.ts +15 -0
  100. package/build/ui/components/snackbar.d.ts +3 -0
  101. package/build/ui/components/sonner.d.ts +4 -0
  102. package/build/ui/components/spinner.d.ts +5 -0
  103. package/build/ui/components/statistic.d.ts +19 -0
  104. package/build/ui/components/stepper.d.ts +12 -0
  105. package/build/ui/components/switch.d.ts +6 -0
  106. package/build/ui/components/table.d.ts +24 -0
  107. package/build/ui/components/textarea.d.ts +3 -0
  108. package/build/ui/components/timeline.d.ts +15 -0
  109. package/build/ui/components/toggle-group.d.ts +10 -0
  110. package/build/ui/components/toggle.d.ts +9 -0
  111. package/build/ui/components/tooltip.d.ts +7 -0
  112. package/build/ui/index.d.ts +46 -0
  113. package/build/ui/index.js +8 -0
  114. package/build/ui/lib/utils.d.ts +2 -0
  115. package/build/ui/reference/README.md +11 -0
  116. package/build/ui/reference/components/ai.tsx +291 -0
  117. package/build/ui/reference/components/alert-dialog.tsx +208 -0
  118. package/build/ui/reference/components/alert.tsx +112 -0
  119. package/build/ui/reference/components/avatar.tsx +158 -0
  120. package/build/ui/reference/components/badge.tsx +160 -0
  121. package/build/ui/reference/components/button.tsx +100 -0
  122. package/build/ui/reference/components/calendar.tsx +119 -0
  123. package/build/ui/reference/components/card.tsx +144 -0
  124. package/build/ui/reference/components/chart.tsx +1394 -0
  125. package/build/ui/reference/components/checkbox.tsx +44 -0
  126. package/build/ui/reference/components/data-table.tsx +480 -0
  127. package/build/ui/reference/components/dialog.tsx +172 -0
  128. package/build/ui/reference/components/dropdown-menu.tsx +245 -0
  129. package/build/ui/reference/components/empty-state.tsx +63 -0
  130. package/build/ui/reference/components/file-upload.tsx +116 -0
  131. package/build/ui/reference/components/input.tsx +114 -0
  132. package/build/ui/reference/components/label.tsx +19 -0
  133. package/build/ui/reference/components/list.tsx +191 -0
  134. package/build/ui/reference/components/map.css +251 -0
  135. package/build/ui/reference/components/map.tsx +294 -0
  136. package/build/ui/reference/components/message.tsx +171 -0
  137. package/build/ui/reference/components/nav.tsx +113 -0
  138. package/build/ui/reference/components/page-header.tsx +213 -0
  139. package/build/ui/reference/components/popover.tsx +76 -0
  140. package/build/ui/reference/components/progress.tsx +31 -0
  141. package/build/ui/reference/components/radio.tsx +65 -0
  142. package/build/ui/reference/components/resizable.tsx +40 -0
  143. package/build/ui/reference/components/scroll-area.tsx +55 -0
  144. package/build/ui/reference/components/segmented.tsx +45 -0
  145. package/build/ui/reference/components/select.tsx +185 -0
  146. package/build/ui/reference/components/separator.tsx +26 -0
  147. package/build/ui/reference/components/sheet.tsx +173 -0
  148. package/build/ui/reference/components/skeleton.tsx +15 -0
  149. package/build/ui/reference/components/slider.tsx +161 -0
  150. package/build/ui/reference/components/snackbar.tsx +27 -0
  151. package/build/ui/reference/components/sonner.tsx +43 -0
  152. package/build/ui/reference/components/spinner.tsx +27 -0
  153. package/build/ui/reference/components/statistic.tsx +122 -0
  154. package/build/ui/reference/components/stepper.tsx +138 -0
  155. package/build/ui/reference/components/switch.tsx +47 -0
  156. package/build/ui/reference/components/table.tsx +233 -0
  157. package/build/ui/reference/components/textarea.tsx +28 -0
  158. package/build/ui/reference/components/timeline.tsx +94 -0
  159. package/build/ui/reference/components/toggle-group.tsx +86 -0
  160. package/build/ui/reference/components/toggle.tsx +46 -0
  161. package/build/ui/reference/components/tooltip.tsx +53 -0
  162. package/build/ui/reference/index.ts +49 -0
  163. package/build/ui/reference/lib/utils.ts +34 -0
  164. package/build/ui/standalone-stub.js +5 -0
  165. package/build/ui/standalone.js +135 -0
  166. package/build/ui/styles.css +3 -0
  167. package/connectors/package.json +8 -0
  168. package/package.json +114 -0
  169. package/query/package.json +8 -0
  170. package/shell/package.json +8 -0
  171. package/template/AGENTS.md +70 -0
  172. package/template/CLAUDE.md +4 -0
  173. package/template/README.md +102 -0
  174. package/template/_gitignore +6 -0
  175. package/template/commitlint.config.js +12 -0
  176. package/template/package.json +31 -0
  177. package/template/public/index.html +13 -0
  178. package/template/src/App.tsx +171 -0
  179. package/template/src/bootstrap.tsx +13 -0
  180. package/template/src/index.tsx +1 -0
  181. package/template/src/lifecycle.ts +20 -0
  182. package/template/tsconfig.json +31 -0
  183. package/template/webpack.config.js +112 -0
  184. package/template/webpack.local.config.js +68 -0
  185. package/ui/package.json +8 -0
@@ -0,0 +1,191 @@
1
+ import * as React from 'react';
2
+
3
+ import { cn } from '@rise-x/ui/lib/utils';
4
+
5
+ /*
6
+ * Reach for a list instead of a table when there are fewer than four attributes
7
+ * per item, or when the layout has to survive a narrow panel.
8
+ *
9
+ * Dividers are INSET and drawn between items, never as a border on every row —
10
+ * a top-and-bottom border on each row doubles up at every seam, and a divider
11
+ * that runs to the container edge makes the list read as stacked bands rather
12
+ * than one surface.
13
+ */
14
+ function List({ className, ...props }: React.ComponentProps<'div'>) {
15
+ return <div data-slot="list" className={cn('flex flex-col', className)} {...props} />;
16
+ }
17
+
18
+ function ListItem({
19
+ className,
20
+ rich,
21
+ ...props
22
+ }: React.ComponentProps<'div'> & {
23
+ /** Two-line item: aligns to the top and adds room for a description. */
24
+ rich?: boolean;
25
+ }) {
26
+ return (
27
+ <div
28
+ data-slot="list-item"
29
+ data-rich={rich ? '' : undefined}
30
+ className={cn(
31
+ 'flex items-center gap-2.5 border-t border-border-subtle px-4 py-2.5 first:border-t-0',
32
+ rich && 'items-start py-3',
33
+ className,
34
+ )}
35
+ {...props}
36
+ />
37
+ );
38
+ }
39
+
40
+ function ListMain({ className, ...props }: React.ComponentProps<'div'>) {
41
+ return <div data-slot="list-main" className={cn('min-w-0 flex-1', className)} {...props} />;
42
+ }
43
+
44
+ function ListName({ className, ...props }: React.ComponentProps<'span'>) {
45
+ return <span data-slot="list-name" className={cn('block text-ui', className)} {...props} />;
46
+ }
47
+
48
+ function ListMeta({ className, ...props }: React.ComponentProps<'span'>) {
49
+ return (
50
+ <span
51
+ data-slot="list-meta"
52
+ className={cn('block text-micro text-subtle', className)}
53
+ {...props}
54
+ />
55
+ );
56
+ }
57
+
58
+ function ListDescription({ className, ...props }: React.ComponentProps<'span'>) {
59
+ return (
60
+ <span
61
+ data-slot="list-description"
62
+ className={cn('mt-0.5 block text-xs text-muted-foreground', className)}
63
+ {...props}
64
+ />
65
+ );
66
+ }
67
+
68
+ function ListValue({ className, ...props }: React.ComponentProps<'span'>) {
69
+ return <span data-slot="list-value" className={cn('shrink-0 text-ui', className)} {...props} />;
70
+ }
71
+
72
+ /*
73
+ * Inset grouped list — the settings/detail-panel form. A rounded surface with
74
+ * dividers that start at the LABEL rather than the container edge, which is what
75
+ * makes a grouped list read as one object instead of a stack of rows. Rows with
76
+ * an icon indent their divider further so it starts at the text either way.
77
+ */
78
+ function GroupedList({ className, ...props }: React.ComponentProps<'div'>) {
79
+ return (
80
+ <div
81
+ data-slot="grouped-list"
82
+ className={cn('overflow-hidden rounded-xl bg-card shadow-card', className)}
83
+ {...props}
84
+ />
85
+ );
86
+ }
87
+
88
+ function GroupedListRow({
89
+ className,
90
+ icon,
91
+ iconClassName,
92
+ ...props
93
+ }: React.ComponentProps<'button'> & {
94
+ /** Just the glyph. The component owns the tile — passing a wrapper of your own
95
+ * nests a tile inside a tile and the icon-sizing selector stops matching. */
96
+ icon?: React.ReactNode;
97
+ /** Tile background, e.g. "bg-chart-1". */
98
+ iconClassName?: string;
99
+ }) {
100
+ // A row with an onClick is a control and renders as a button; without one it
101
+ // is a static line of settings and must not be focusable.
102
+ const interactive = Boolean(props.onClick);
103
+ const Comp = interactive ? 'button' : ('div' as React.ElementType);
104
+ return (
105
+ <Comp
106
+ data-slot="grouped-list-row"
107
+ type={interactive ? 'button' : undefined}
108
+ className={cn(
109
+ 'relative flex w-full items-center gap-2.5 px-3.5 py-2 text-left text-ui',
110
+ // divider as a pseudo-element between siblings, inset to the label
111
+ 'before:absolute before:top-0 before:right-0 before:left-3.5 before:h-px before:bg-border-subtle first:before:hidden',
112
+ icon && 'before:left-[52px]',
113
+ interactive && 'cursor-pointer transition-colors hover:bg-fill-1',
114
+ className,
115
+ )}
116
+ {...props}
117
+ >
118
+ {icon ? (
119
+ // descendant selector, not child: the glyph may be wrapped by the caller
120
+ <span
121
+ className={cn(
122
+ 'grid size-[26px] shrink-0 place-items-center rounded-[7px] text-white [&_svg]:size-3.5',
123
+ iconClassName ?? 'bg-slate-hue',
124
+ )}
125
+ >
126
+ {icon}
127
+ </span>
128
+ ) : null}
129
+ {props.children}
130
+ </Comp>
131
+ );
132
+ }
133
+
134
+ function GroupedListLabel({ className, ...props }: React.ComponentProps<'span'>) {
135
+ return (
136
+ <span
137
+ data-slot="grouped-list-label"
138
+ className={cn(
139
+ 'min-w-0 flex-1 text-ui [&_small]:block [&_small]:text-micro [&_small]:text-subtle',
140
+ className,
141
+ )}
142
+ {...props}
143
+ />
144
+ );
145
+ }
146
+
147
+ function GroupedListValue({ className, ...props }: React.ComponentProps<'span'>) {
148
+ return (
149
+ <span
150
+ data-slot="grouped-list-value"
151
+ className={cn('shrink-0 text-ui text-muted-foreground', className)}
152
+ {...props}
153
+ />
154
+ );
155
+ }
156
+
157
+ function GroupedListHeading({ className, ...props }: React.ComponentProps<'div'>) {
158
+ return (
159
+ <div
160
+ data-slot="grouped-list-heading"
161
+ className={cn('px-1 pb-[7px] text-micro tracking-[0.03em] text-subtle uppercase', className)}
162
+ {...props}
163
+ />
164
+ );
165
+ }
166
+
167
+ function GroupedListFootnote({ className, ...props }: React.ComponentProps<'div'>) {
168
+ return (
169
+ <div
170
+ data-slot="grouped-list-footnote"
171
+ className={cn('px-1 pt-2 text-micro leading-[1.45] text-subtle', className)}
172
+ {...props}
173
+ />
174
+ );
175
+ }
176
+
177
+ export {
178
+ List,
179
+ ListItem,
180
+ ListMain,
181
+ ListName,
182
+ ListMeta,
183
+ ListDescription,
184
+ ListValue,
185
+ GroupedList,
186
+ GroupedListRow,
187
+ GroupedListLabel,
188
+ GroupedListValue,
189
+ GroupedListHeading,
190
+ GroupedListFootnote,
191
+ };
@@ -0,0 +1,251 @@
1
+ /*
2
+ * Rise-X chrome for Leaflet — zoom cluster, tooltip, popup, attribution, pin.
3
+ *
4
+ * Plain CSS, imported straight after leaflet.css in map.tsx. Leaflet ships its
5
+ * stylesheet UNLAYERED, so it outranks anything in Tailwind's utility layer;
6
+ * matching Leaflet's own selectors and winning on source order is the only
7
+ * override that holds in both hosts. Selectors are prefixed with
8
+ * `.leaflet-container` to clear Leaflet's `.leaflet-touch ...` variants, which
9
+ * are a class more specific than the base rules.
10
+ *
11
+ * Colours come from the runtime tokens in tokens.css, so the map follows
12
+ * light/dark and any ecosystem rebrand for free. Shadows are written out
13
+ * because theme.css declares them in `@theme inline`, which resolves into
14
+ * utilities at build time and emits no custom property to read at runtime —
15
+ * the values below mirror --shadow-pill and --shadow-pop exactly.
16
+ */
17
+
18
+ .leaflet-container {
19
+ /* Inherit the host's typeface rather than Leaflet's Helvetica stack, and use
20
+ * the design system's muted grey as the pre-tile backdrop. */
21
+ font-family: inherit;
22
+ background: var(--muted);
23
+ }
24
+
25
+ /* ---------- control clusters: zoom, layers, anything on .leaflet-bar ------- */
26
+
27
+ .leaflet-container .leaflet-bar {
28
+ border: 1px solid var(--border-strong);
29
+ border-radius: var(--radius);
30
+ background: var(--card);
31
+ box-shadow: 0 1px 2px rgb(16 24 40 / 0.04);
32
+ overflow: hidden;
33
+ }
34
+
35
+ /* A ghost icon button, per button.tsx: muted glyph that comes up to full
36
+ * strength on hover. The stack reads as ONE control, so the buttons are square
37
+ * inside it and only a hairline separates them. */
38
+ .leaflet-container .leaflet-bar a,
39
+ .leaflet-container .leaflet-bar a:hover {
40
+ width: var(--h-sm);
41
+ height: var(--h-sm);
42
+ line-height: var(--h-sm);
43
+ border: 0;
44
+ border-radius: 0;
45
+ background: var(--card);
46
+ color: var(--muted-foreground);
47
+ font-size: 16px;
48
+ font-weight: 400;
49
+ transition:
50
+ background-color 150ms var(--ease),
51
+ color 150ms var(--ease);
52
+ }
53
+
54
+ /* Leaflet rounds the end caps to its own 2px through `.leaflet-touch .leaflet-bar
55
+ * a:first-child` — a pseudo-class more specific than the rule above, so the
56
+ * reset has to be spelled out at the same weight. The cluster's own radius
57
+ * comes from .leaflet-bar, which clips these corners. */
58
+ .leaflet-container .leaflet-bar a:first-child,
59
+ .leaflet-container .leaflet-bar a:last-child {
60
+ border-radius: 0;
61
+ }
62
+
63
+ .leaflet-container .leaflet-bar a + a {
64
+ border-top: 1px solid var(--border);
65
+ }
66
+
67
+ .leaflet-container .leaflet-bar a:hover {
68
+ background: var(--muted);
69
+ color: var(--foreground);
70
+ }
71
+
72
+ .leaflet-container .leaflet-bar a:active {
73
+ background: var(--fill-2);
74
+ }
75
+
76
+ /* Focus is the NEUTRAL ring — these are controls you operate, not fields you
77
+ * type into (button.tsx). Drawn inset because the cluster clips overflow. */
78
+ .leaflet-container .leaflet-bar a:focus-visible {
79
+ outline: none;
80
+ box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--ring-control) 35%, transparent);
81
+ }
82
+
83
+ .leaflet-container .leaflet-bar a.leaflet-disabled,
84
+ .leaflet-container .leaflet-bar a.leaflet-disabled:hover {
85
+ background: var(--card);
86
+ color: var(--muted-foreground);
87
+ opacity: 0.45;
88
+ }
89
+
90
+ /* ---------- attribution ---------------------------------------------------- */
91
+
92
+ .leaflet-container .leaflet-control-attribution {
93
+ padding: 1px 6px;
94
+ border-radius: calc(var(--radius) - 4px) 0 0 0;
95
+ background: color-mix(in srgb, var(--card) 86%, transparent);
96
+ color: var(--text-subtle);
97
+ font-size: 11px;
98
+ line-height: 1.5;
99
+ }
100
+
101
+ .leaflet-container .leaflet-control-attribution a {
102
+ color: var(--text-subtle);
103
+ text-decoration: none;
104
+ }
105
+
106
+ .leaflet-container .leaflet-control-attribution a:hover {
107
+ color: var(--foreground);
108
+ text-decoration: underline;
109
+ }
110
+
111
+ /* The Leaflet flag is the one piece of foreign branding in the chrome. The text
112
+ * credit — the part attribution actually requires — stays. !important is not a
113
+ * shortcut here: Leaflet declares `display: inline !important` on this element,
114
+ * so nothing else can reach it. */
115
+ .leaflet-container .leaflet-attribution-flag {
116
+ display: none !important;
117
+ }
118
+
119
+ /* ---------- tooltip: twin of TooltipContent -------------------------------- */
120
+
121
+ .leaflet-container .leaflet-tooltip {
122
+ padding: 6px 10px;
123
+ border: 0;
124
+ border-radius: calc(var(--radius) - 2px);
125
+ background: var(--foreground);
126
+ color: var(--background);
127
+ font-size: 12px;
128
+ line-height: 1.5;
129
+ font-weight: 400;
130
+ box-shadow: none;
131
+ }
132
+
133
+ .leaflet-container .leaflet-tooltip-top:before {
134
+ border-top-color: var(--foreground);
135
+ }
136
+ .leaflet-container .leaflet-tooltip-bottom:before {
137
+ border-bottom-color: var(--foreground);
138
+ }
139
+ .leaflet-container .leaflet-tooltip-left:before {
140
+ border-left-color: var(--foreground);
141
+ }
142
+ .leaflet-container .leaflet-tooltip-right:before {
143
+ border-right-color: var(--foreground);
144
+ }
145
+
146
+ /* ---------- popup: twin of PopoverContent ---------------------------------- */
147
+
148
+ /*
149
+ * Spacing lives on the WRAPPER, not as a margin on the content. Leaflet spaces
150
+ * its popup with `.leaflet-popup-content { margin: 13px 24px ... }`, which only
151
+ * works because the wrapper carries a 1px padding to block margin collapse.
152
+ * Take that padding away and the child's vertical margins collapse straight
153
+ * out of the wrapper: the white card shrinks to exactly the text box, and the
154
+ * escaped bottom margin pushes the tip clear of the card.
155
+ *
156
+ * The right side is wider on purpose — it is the lane the close button sits in,
157
+ * so a long first line cannot run underneath it.
158
+ */
159
+ .leaflet-container .leaflet-popup-content-wrapper {
160
+ padding: 12px 32px 12px 14px;
161
+ border-radius: calc(var(--radius) + 4px);
162
+ background: var(--popover);
163
+ color: var(--popover-foreground);
164
+ box-shadow:
165
+ 0 8px 28px -6px rgb(16 24 40 / 0.16),
166
+ 0 2px 6px -2px rgb(16 24 40 / 0.08),
167
+ 0 0 0 1px rgb(16 24 40 / 0.04);
168
+ }
169
+
170
+ .leaflet-container .leaflet-popup-content {
171
+ margin: 0;
172
+ font-size: 13px;
173
+ line-height: 1.5;
174
+ }
175
+
176
+ .leaflet-container .leaflet-popup-tip {
177
+ background: var(--popover);
178
+ box-shadow: none;
179
+ }
180
+
181
+ /* Ghost icon button, sized like the xs control. */
182
+ .leaflet-container .leaflet-popup-close-button {
183
+ top: 5px;
184
+ right: 5px;
185
+ width: var(--h-xs);
186
+ height: var(--h-xs);
187
+ border-radius: calc(var(--radius) - 2px);
188
+ color: var(--muted-foreground);
189
+ font-size: 15px;
190
+ font-weight: 400;
191
+ line-height: var(--h-xs);
192
+ transition:
193
+ background-color 150ms var(--ease),
194
+ color 150ms var(--ease);
195
+ }
196
+
197
+ .leaflet-container .leaflet-popup-close-button:hover {
198
+ background: var(--muted);
199
+ color: var(--foreground);
200
+ }
201
+
202
+ /* ---------- pin ------------------------------------------------------------ */
203
+
204
+ /*
205
+ * A ringed dot, not a teardrop: it is what every Rise-X map already draws (ports,
206
+ * vessels, sites), it stays legible where markers cluster, and it does not add a
207
+ * piece of skeuomorphism to an otherwise flat system.
208
+ *
209
+ * The dot is a CHILD of the icon element on purpose — Leaflet positions markers
210
+ * by writing `transform` on the icon itself, so any transform of ours there
211
+ * (the selected state below) would throw the marker off its coordinates.
212
+ */
213
+ .rx-map-pin .rx-map-pin-dot {
214
+ display: block;
215
+ /* Explicit, not inherited from a preflight: the classic host's embed.css
216
+ * deliberately ships no `box-sizing` reset, and content-box would push the
217
+ * ring outside the icon box Leaflet anchors on. */
218
+ box-sizing: border-box;
219
+ width: 100%;
220
+ height: 100%;
221
+ border-radius: 50%;
222
+ background: var(--rx-pin, var(--foreground));
223
+ border: 2px solid var(--card);
224
+ box-shadow:
225
+ 0 1px 2px rgb(16 24 40 / 0.24),
226
+ 0 0 0 1px rgb(16 24 40 / 0.06);
227
+ transition: transform 150ms var(--ease);
228
+ }
229
+
230
+ /* Semantic tones, so a pin can carry the same meaning a Badge does. */
231
+ .rx-map-pin-dot[data-tone='brand'] {
232
+ --rx-pin: var(--brand);
233
+ }
234
+ .rx-map-pin-dot[data-tone='success'] {
235
+ --rx-pin: var(--success);
236
+ }
237
+ .rx-map-pin-dot[data-tone='warning'] {
238
+ --rx-pin: var(--warning);
239
+ }
240
+ .rx-map-pin-dot[data-tone='error'] {
241
+ --rx-pin: var(--error);
242
+ }
243
+ .rx-map-pin-dot[data-tone='info'] {
244
+ --rx-pin: var(--info);
245
+ }
246
+
247
+ /* Toggleable from an app without rebuilding the icon:
248
+ * `marker.getElement()?.classList.add('is-selected')`. */
249
+ .rx-map-pin.is-selected .rx-map-pin-dot {
250
+ transform: scale(1.3);
251
+ }