flet-box 1.0.6 → 1.0.7
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 +28 -1
- package/bin/cli.js +77 -11
- package/bin/commands/auditFix.js +682 -0
- package/bin/commands/checkApi.js +7 -5
- package/bin/commands/create.js +40 -10
- package/bin/commands/createBundle.js +54 -1
- package/bin/commands/images.js +349 -0
- package/bin/commands/pruneAssets.js +170 -0
- package/bin/commands/release.js +34 -1
- package/bin/commands/runCloudflare.js +47 -9
- package/bin/commands/runServer.js +81 -24
- package/bin/commands/toPng.js +346 -0
- package/bin/commands/unpack.js +1173 -0
- package/bin/ota/loader.js +90 -0
- package/bin/utils/appSources.js +101 -0
- package/bin/utils/bundleConfig.js +166 -0
- package/bin/utils/dtsProps.js +147 -0
- package/bin/utils/imageTools.js +271 -0
- package/bin/utils/images/bmp.js +99 -0
- package/bin/utils/images/gif.js +244 -0
- package/bin/utils/images/index.js +163 -0
- package/bin/utils/images/jpeg.js +643 -0
- package/bin/utils/images/png.js +486 -0
- package/bin/utils/images/unsupported.js +29 -0
- package/bin/utils/neutralise.js +109 -6
- package/bin/utils/templates.js +307 -64
- package/docs/cli/README.md +82 -0
- package/docs/guides/online-updates.md +57 -9
- package/docs/widget/Accordion.md +1 -0
- package/docs/widget/AdMob.md +1 -0
- package/docs/widget/AdSense.md +1 -0
- package/docs/widget/AnimatedBox.md +1 -0
- package/docs/widget/AnimatedText.md +1 -0
- package/docs/widget/Audio.md +2 -1
- package/docs/widget/Avatar.md +12 -3
- package/docs/widget/Badge.md +1 -0
- package/docs/widget/Button.md +1 -0
- package/docs/widget/Card.md +1 -0
- package/docs/widget/Carousel.md +1 -0
- package/docs/widget/Chart.md +1 -0
- package/docs/widget/Checkbox.md +1 -0
- package/docs/widget/Chip.md +1 -0
- package/docs/widget/CircularBar.md +1 -0
- package/docs/widget/CircularChart.md +1 -0
- package/docs/widget/CodeViewer.md +1 -0
- package/docs/widget/Column.md +1 -0
- package/docs/widget/Container.md +1 -0
- package/docs/widget/DataTable.md +1 -0
- package/docs/widget/Divider.md +1 -0
- package/docs/widget/DraggBox.md +3 -2
- package/docs/widget/Dropdown.md +3 -0
- package/docs/widget/DroppBox.md +2 -1
- package/docs/widget/FloatingActionButton.md +1 -0
- package/docs/widget/GridView.md +1 -0
- package/docs/widget/Icon.md +1 -0
- package/docs/widget/Image.md +11 -3
- package/docs/widget/Input.md +1 -0
- package/docs/widget/InstallButton.md +1 -0
- package/docs/widget/ListTile.md +1 -0
- package/docs/widget/ListView.md +1 -0
- package/docs/widget/Maps.md +188 -0
- package/docs/widget/Markdown.md +1 -0
- package/docs/widget/MatrixRain.md +1 -0
- package/docs/widget/Pagination.md +1 -0
- package/docs/widget/ParallaxBox.md +1 -0
- package/docs/widget/ProgressBar.md +1 -0
- package/docs/widget/QRCode.md +1 -0
- package/docs/widget/README.md +12 -10
- package/docs/widget/Radio.md +1 -0
- package/docs/widget/Rating.md +1 -0
- package/docs/widget/Row.md +1 -0
- package/docs/widget/Skeleton.md +1 -0
- package/docs/widget/Slider.md +1 -0
- package/docs/widget/Stack.md +1 -0
- package/docs/widget/Stepper.md +1 -0
- package/docs/widget/Switch.md +1 -0
- package/docs/widget/Text.md +1 -0
- package/docs/widget/Tooltip.md +11 -13
- package/docs/widget/TreeView.md +1 -0
- package/docs/widget/Video.md +3 -2
- package/package.json +2 -2
- package/src/core/hmr-client.js +129 -34
- package/src/index.d.ts +132 -0
- package/src/index.js +1 -0
- package/src/navigations/AppBar.js +15 -4
- package/src/navigations/Drawer.js +9 -1
- package/src/widget-factory/translateProps.js +32 -1
- package/src/widgets/Avatar.js +228 -131
- package/src/widgets/Container.js +13 -0
- package/src/widgets/Dropdown.js +33 -1
- package/src/widgets/Image.js +102 -3
- package/src/widgets/Maps.js +1495 -0
- package/src/widgets/Tooltip.js +12 -2
- package/src/widgets/index.js +1 -0
package/src/widgets/Tooltip.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @description Hover/focus tooltip rendered as a fixed-position portal on `document.body`.
|
|
4
4
|
*/
|
|
5
5
|
import { WidgetFactory } from "../widget-factory/index.js";
|
|
6
|
+
import { resolveReactive } from "../widget-factory/reactiveValue.js";
|
|
6
7
|
import { colors } from "../utils/themes.js";
|
|
7
8
|
|
|
8
9
|
export const Tooltip = (props) => {
|
|
@@ -10,7 +11,12 @@ export const Tooltip = (props) => {
|
|
|
10
11
|
text,
|
|
11
12
|
child,
|
|
12
13
|
position = "top",
|
|
13
|
-
delay
|
|
14
|
+
// Neither delay prop carries a default: `tooltipDelay` is the deprecated
|
|
15
|
+
// alias of `delay`, so a caller that only sets the alias must not have the
|
|
16
|
+
// 300 ms default of the other name win over it.
|
|
17
|
+
delay = null,
|
|
18
|
+
/** @deprecated Use `delay` instead. */
|
|
19
|
+
tooltipDelay = null,
|
|
14
20
|
bgColor = colors.secondary,
|
|
15
21
|
textColor = "#ffffff",
|
|
16
22
|
fontSize = 12,
|
|
@@ -35,6 +41,10 @@ export const Tooltip = (props) => {
|
|
|
35
41
|
|
|
36
42
|
if (!child) return null;
|
|
37
43
|
|
|
44
|
+
// The wait before the tooltip appears. A live `useState` value is a function,
|
|
45
|
+
// and `setTimeout` would coerce it to NaN — resolve it before using it.
|
|
46
|
+
const showDelay = Number(resolveReactive(delay ?? tooltipDelay) ?? 300);
|
|
47
|
+
|
|
38
48
|
let tooltipElement = null;
|
|
39
49
|
let timeoutId = null;
|
|
40
50
|
let isVisible = false;
|
|
@@ -198,7 +208,7 @@ export const Tooltip = (props) => {
|
|
|
198
208
|
resizeHandler = hideOnScrollOrResize;
|
|
199
209
|
window.addEventListener("scroll", scrollHandler, true);
|
|
200
210
|
window.addEventListener("resize", resizeHandler);
|
|
201
|
-
},
|
|
211
|
+
}, showDelay);
|
|
202
212
|
};
|
|
203
213
|
|
|
204
214
|
const hideTooltip = () => {
|
package/src/widgets/index.js
CHANGED
|
@@ -43,6 +43,7 @@ export { Stepper } from "./Stepper.js";
|
|
|
43
43
|
export { Skeleton } from "./Skeleton.js";
|
|
44
44
|
export { Chart } from "./Chart.js";
|
|
45
45
|
export { QRCode } from "./QRCode.js";
|
|
46
|
+
export { Maps } from "./Maps.js";
|
|
46
47
|
export { Slider } from "./Slider.js";
|
|
47
48
|
export { InstallButton } from "./InstallButton.js";
|
|
48
49
|
export { Video } from "./Video.js";
|