@yahoo/uds-create-sidecar 4.29.0 → 4.30.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.
- package/README.md +5 -0
- package/dist/index.js +33 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -169,6 +169,11 @@ disconnect behavior, and full-screen design preview as the standalone app. A
|
|
|
169
169
|
custom origin remains selected while the component is mounted; a new launch
|
|
170
170
|
returns to production.
|
|
171
171
|
|
|
172
|
+
Full-screen designs fill the device viewport and own their safe-area layout.
|
|
173
|
+
Sidecar hides the native status bar while showing a design and restores the
|
|
174
|
+
host's status bar when returning to settings or component previews. The floating
|
|
175
|
+
Sidecar settings button stays inside the device's safe area.
|
|
176
|
+
|
|
172
177
|
It also accepts an existing Sidecar deep link when the host app routes that URL
|
|
173
178
|
to the component; short-code pairing is the portable default for an embedded
|
|
174
179
|
host with its own URL scheme.
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createUDSCreateSidecarRegistry } from "./registry.js";
|
|
2
2
|
import { Component, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { ActivityIndicator, Linking, Platform, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
|
|
3
|
+
import { ActivityIndicator, Linking, Platform, Pressable, StatusBar, StyleSheet, Text, TextInput, View } from "react-native";
|
|
4
4
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/deep-link.ts
|
|
@@ -13651,39 +13651,42 @@ function UDSCreateSidecarScreen({ linked, registry }) {
|
|
|
13651
13651
|
const Renderer = loadedModule?.UdsRenderer;
|
|
13652
13652
|
if (previewKind === "design" && connectionState === "ready" && Renderer !== void 0 && spec !== void 0 && !settingsOpen) return /* @__PURE__ */ jsxs(View, {
|
|
13653
13653
|
style: styles.designScreen,
|
|
13654
|
-
children: [
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
children: /* @__PURE__ */ jsx(View, {
|
|
13654
|
+
children: [
|
|
13655
|
+
/* @__PURE__ */ jsx(StatusBar, { hidden: true }),
|
|
13656
|
+
/* @__PURE__ */ jsx(View, {
|
|
13657
|
+
style: styles.designCanvas,
|
|
13658
|
+
children: /* @__PURE__ */ jsx(PreviewErrorBoundary, { children: /* @__PURE__ */ jsx(Renderer, { spec }) }, renderRevision)
|
|
13659
|
+
}),
|
|
13660
|
+
/* @__PURE__ */ jsx(SafeAreaView, {
|
|
13661
|
+
edges: [
|
|
13662
|
+
"top",
|
|
13663
|
+
"right",
|
|
13664
|
+
"bottom",
|
|
13665
|
+
"left"
|
|
13666
|
+
],
|
|
13668
13667
|
pointerEvents: "box-none",
|
|
13669
|
-
style: styles.
|
|
13670
|
-
children: /* @__PURE__ */ jsx(
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
|
|
13677
|
-
|
|
13678
|
-
|
|
13679
|
-
|
|
13680
|
-
|
|
13681
|
-
style: styles.
|
|
13682
|
-
|
|
13668
|
+
style: styles.designOverlay,
|
|
13669
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
13670
|
+
pointerEvents: "box-none",
|
|
13671
|
+
style: styles.designOverlayContent,
|
|
13672
|
+
children: /* @__PURE__ */ jsx(Pressable, {
|
|
13673
|
+
accessibilityLabel: "Sidecar settings",
|
|
13674
|
+
accessibilityRole: "button",
|
|
13675
|
+
onPress: () => {
|
|
13676
|
+
setCreateOriginInput(createOrigin);
|
|
13677
|
+
setSettingsError(void 0);
|
|
13678
|
+
setSettingsOpen(true);
|
|
13679
|
+
},
|
|
13680
|
+
style: styles.designSettingsButton,
|
|
13681
|
+
testID: "create-url-settings-button",
|
|
13682
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
13683
|
+
style: styles.designSettingsButtonText,
|
|
13684
|
+
children: "•••"
|
|
13685
|
+
})
|
|
13683
13686
|
})
|
|
13684
13687
|
})
|
|
13685
13688
|
})
|
|
13686
|
-
|
|
13689
|
+
]
|
|
13687
13690
|
});
|
|
13688
13691
|
return /* @__PURE__ */ jsx(SafeAreaView, {
|
|
13689
13692
|
style: styles.screen,
|