@colixsystems/widget-sdk 0.331.0 → 0.331.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 -1
- package/dist/filepicker.js +10 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,7 +91,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
91
91
|
|
|
92
92
|
## Status
|
|
93
93
|
|
|
94
|
-
`v0.331.
|
|
94
|
+
`v0.331.1` — pre-publish. The package surface (types, function names, export paths) is the v1 contract; runtime behaviour for some hooks is stubbed (each hook documents what's wired and what isn't). It is **not yet published to npm**.
|
|
95
|
+
|
|
96
|
+
### What's new in 0.331.1 (contract 1.270.0)
|
|
97
|
+
|
|
98
|
+
**`<FilePicker>` lays out its content the same on the web as on a device.** The web picker wrapped its child in an inline row, so a child with no width of its own, such as a full-width drop area, shrank to its content on the web Player while the exported app stretched it across the picker. The web picker now stacks its child in a stretching column, as the native `Pressable` does, and sizes itself like any other `View`. A button you wrap in `<FilePicker>` fills the picker's width on the web, as it already did on native; to keep it narrow, give the picker a row parent or the button `alignSelf: "flex-start"`. The widget contract is unchanged.
|
|
95
99
|
|
|
96
100
|
### What's new in 0.331.0 (contract 1.270.0)
|
|
97
101
|
|
package/dist/filepicker.js
CHANGED
|
@@ -39,8 +39,17 @@ const HIDDEN_INPUT_STYLE = {
|
|
|
39
39
|
border: 0,
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
// Lays out like the native picker, a Pressable: a react-native View's flex
|
|
43
|
+
// column, so a child with no width fills the picker on both hosts.
|
|
42
44
|
const LABEL_STYLE = {
|
|
43
|
-
display: "
|
|
45
|
+
display: "flex",
|
|
46
|
+
flexDirection: "column",
|
|
47
|
+
alignItems: "stretch",
|
|
48
|
+
flexBasis: "auto",
|
|
49
|
+
flexShrink: 0,
|
|
50
|
+
minWidth: 0,
|
|
51
|
+
minHeight: 0,
|
|
52
|
+
position: "relative",
|
|
44
53
|
cursor: "pointer",
|
|
45
54
|
};
|
|
46
55
|
|
package/dist/index.d.ts
CHANGED
|
@@ -5648,6 +5648,7 @@ export interface PickedFile {
|
|
|
5648
5648
|
* The system file picker. Its children are the visible trigger. Web wraps a
|
|
5649
5649
|
* hidden file input; native opens the OS document picker. `isSupported` is
|
|
5650
5650
|
* false on a host with no picker. For an upload field use `<FileUpload>`.
|
|
5651
|
+
* It lays its children out like a `View`, a stretching column, on both hosts.
|
|
5651
5652
|
*/
|
|
5652
5653
|
export const FilePicker: ((props: {
|
|
5653
5654
|
/** An HTML accept value: "image/*", ".pdf", "application/pdf". */
|
package/package.json
CHANGED