@proulr/sdui-components 0.1.61 → 0.1.63
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/package.json
CHANGED
|
@@ -52,6 +52,8 @@ type DiscoverMapProps = LayoutProps & {
|
|
|
52
52
|
labelRef?: string;
|
|
53
53
|
pinsRef?: string;
|
|
54
54
|
height?: number;
|
|
55
|
+
/** When set, overrides default (interactive only while pins are empty). */
|
|
56
|
+
interactive?: boolean;
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
export const DiscoverMap: BdcComponent = (props) => layoutBlock('discover_map', props as DiscoverMapProps);
|
|
@@ -380,6 +380,9 @@ export function SduiDiscoverMapBlock({ block, data, onAction }: SduiBlockRenderP
|
|
|
380
380
|
const centerMoveToken =
|
|
381
381
|
typeof data.map_center_move_token === 'number' ? data.map_center_move_token : 0;
|
|
382
382
|
const pins = pinsRef ? readMapPins(data, pinsRef) : [];
|
|
383
|
+
const interactiveOverride = block.props.interactive;
|
|
384
|
+
const interactive =
|
|
385
|
+
typeof interactiveOverride === 'boolean' ? interactiveOverride : pins.length === 0;
|
|
383
386
|
|
|
384
387
|
if (hybrid.renderDiscoverMap) {
|
|
385
388
|
return (
|
|
@@ -389,7 +392,7 @@ export function SduiDiscoverMapBlock({ block, data, onAction }: SduiBlockRenderP
|
|
|
389
392
|
label: regionLabel,
|
|
390
393
|
height,
|
|
391
394
|
pins,
|
|
392
|
-
interactive
|
|
395
|
+
interactive,
|
|
393
396
|
centerMoveToken,
|
|
394
397
|
onCenterChange: hybrid.onDiscoverMapCenterChange ?? (() => {}),
|
|
395
398
|
onPinPress: (profileId) => onAction('open_profile', { profile_id: profileId }),
|
|
@@ -593,60 +593,45 @@ export function AppChromeFireGlyph({ color = m3Colors.primary, size = 24 }: AppC
|
|
|
593
593
|
);
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
/**
|
|
596
|
+
/**
|
|
597
|
+
* Right Now — flame (🔥). Source SVG: assets/icons/right-now.svg
|
|
598
|
+
* Outline teardrop + solid inner tongue (reads at 12–24px chrome sizes).
|
|
599
|
+
*/
|
|
597
600
|
export function AppChromeRightNowGlyph({ color = m3Colors.primary, size = 24 }: AppChromeGlyphProps) {
|
|
598
601
|
const stroke = strokeFor(size);
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
top: number;
|
|
604
|
-
rotate: string;
|
|
605
|
-
filled?: boolean;
|
|
606
|
-
}) => (
|
|
607
|
-
<View
|
|
608
|
-
key={`${opts.left}-${opts.top}`}
|
|
609
|
-
style={{
|
|
610
|
-
position: 'absolute',
|
|
611
|
-
left: opts.left,
|
|
612
|
-
top: opts.top,
|
|
613
|
-
width: opts.width,
|
|
614
|
-
height: opts.height,
|
|
615
|
-
borderTopLeftRadius: opts.width * 0.55,
|
|
616
|
-
borderTopRightRadius: opts.width * 0.55,
|
|
617
|
-
borderBottomLeftRadius: opts.width * 0.5,
|
|
618
|
-
borderBottomRightRadius: opts.width * 0.15,
|
|
619
|
-
borderWidth: stroke,
|
|
620
|
-
borderColor: color,
|
|
621
|
-
backgroundColor: opts.filled ? color : 'transparent',
|
|
622
|
-
transform: [{ rotate: opts.rotate }],
|
|
623
|
-
}}
|
|
624
|
-
/>
|
|
625
|
-
);
|
|
602
|
+
const outerW = size * 0.5;
|
|
603
|
+
const outerH = size * 0.74;
|
|
604
|
+
const innerW = outerW * 0.4;
|
|
605
|
+
const innerH = outerH * 0.42;
|
|
626
606
|
return (
|
|
627
607
|
<View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
608
|
+
<View
|
|
609
|
+
style={{
|
|
610
|
+
width: outerW,
|
|
611
|
+
height: outerH,
|
|
612
|
+
borderTopLeftRadius: outerW * 0.58,
|
|
613
|
+
borderTopRightRadius: outerW * 0.58,
|
|
614
|
+
borderBottomLeftRadius: outerW * 0.46,
|
|
615
|
+
borderBottomRightRadius: outerW * 0.46,
|
|
616
|
+
borderWidth: stroke,
|
|
617
|
+
borderColor: color,
|
|
618
|
+
alignItems: 'center',
|
|
619
|
+
justifyContent: 'flex-end',
|
|
620
|
+
paddingBottom: size * 0.11,
|
|
621
|
+
}}
|
|
622
|
+
>
|
|
623
|
+
<View
|
|
624
|
+
style={{
|
|
625
|
+
width: innerW,
|
|
626
|
+
height: innerH,
|
|
627
|
+
backgroundColor: color,
|
|
628
|
+
borderTopLeftRadius: innerW * 0.55,
|
|
629
|
+
borderTopRightRadius: innerW * 0.55,
|
|
630
|
+
borderBottomLeftRadius: innerW * 0.42,
|
|
631
|
+
borderBottomRightRadius: innerW * 0.42,
|
|
632
|
+
}}
|
|
633
|
+
/>
|
|
634
|
+
</View>
|
|
650
635
|
</View>
|
|
651
636
|
);
|
|
652
637
|
}
|