flet-box 1.0.4 → 1.0.5
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 +10 -0
- package/bin/cli.js +15 -0
- package/bin/commands/checkApi.js +761 -0
- package/bin/commands/create.js +77 -5
- package/bin/utils/dtsProps.js +191 -0
- package/bin/utils/moduleExports.js +165 -0
- package/bin/utils/neutralise.js +64 -0
- package/bin/utils/templates.js +366 -27
- package/docs/CONTRIBUTING.md +156 -0
- package/docs/README.md +68 -0
- package/docs/arquitectura.md +164 -0
- package/docs/cli/README.md +542 -0
- package/docs/guides/README.md +33 -0
- package/docs/guides/app-templates.md +197 -0
- package/docs/guides/compatibility.md +95 -0
- package/docs/guides/embedding.md +284 -0
- package/docs/guides/first-app.md +208 -0
- package/docs/guides/frontend-services.md +171 -0
- package/docs/guides/minification-and-protection.md +260 -0
- package/docs/guides/mobile-and-platforms.md +439 -0
- package/docs/guides/online-updates.md +196 -0
- package/docs/guides/router.md +282 -0
- package/docs/guides/state.md +283 -0
- package/docs/guides/syntax-philosophy.md +150 -0
- package/docs/guides/utilities.md +241 -0
- package/docs/guides/widget-structure.md +163 -0
- package/docs/server/README.md +68 -0
- package/docs/server/START_HERE.md +121 -0
- package/docs/server/api.md +225 -0
- package/docs/server/data-services.md +300 -0
- package/docs/server/deployment.md +113 -0
- package/docs/server/security.md +196 -0
- package/docs/services/README.md +79 -0
- package/docs/services/RamStore.md +84 -0
- package/docs/services/Session.md +84 -0
- package/docs/services/Storage.md +88 -0
- package/docs/services/http.md +86 -0
- package/docs/tools/README.md +138 -0
- package/docs/tools/animation.md +87 -0
- package/docs/tools/async-ids-log.md +80 -0
- package/docs/tools/device.md +132 -0
- package/docs/tools/introspection.md +67 -0
- package/docs/tools/lists.md +96 -0
- package/docs/tools/markdown.md +79 -0
- package/docs/tools/reactivity.md +288 -0
- package/docs/tools/state.md +103 -0
- package/docs/tools/styling.md +92 -0
- package/docs/tools/text-and-time.md +89 -0
- package/docs/tools/theme.md +102 -0
- package/docs/tools/validation.md +75 -0
- package/docs/tools/visual-effects.md +84 -0
- package/docs/widget/Accordion.md +144 -0
- package/docs/widget/AdMob.md +144 -0
- package/docs/widget/AdSense.md +133 -0
- package/docs/widget/AdaptiveScaffold.md +105 -0
- package/docs/widget/AlertDialog.md +103 -0
- package/docs/widget/AnimatedBox.md +130 -0
- package/docs/widget/AnimatedText.md +123 -0
- package/docs/widget/AppBar.md +118 -0
- package/docs/widget/Audio.md +135 -0
- package/docs/widget/Avatar.md +119 -0
- package/docs/widget/Badge.md +128 -0
- package/docs/widget/BottomNavigation.md +116 -0
- package/docs/widget/BottomSheet.md +125 -0
- package/docs/widget/Button.md +137 -0
- package/docs/widget/COMMON_PROPS.md +150 -0
- package/docs/widget/Card.md +125 -0
- package/docs/widget/Carousel.md +151 -0
- package/docs/widget/Chart.md +151 -0
- package/docs/widget/Checkbox.md +118 -0
- package/docs/widget/Chip.md +126 -0
- package/docs/widget/CircularBar.md +168 -0
- package/docs/widget/CircularChart.md +164 -0
- package/docs/widget/CodeViewer.md +130 -0
- package/docs/widget/CollapsibleSideBar.md +112 -0
- package/docs/widget/Column.md +129 -0
- package/docs/widget/Container.md +136 -0
- package/docs/widget/DataTable.md +150 -0
- package/docs/widget/Divider.md +109 -0
- package/docs/widget/DraggBox.md +129 -0
- package/docs/widget/Drawer.md +135 -0
- package/docs/widget/DrawerItem.md +98 -0
- package/docs/widget/Dropdown.md +139 -0
- package/docs/widget/DroppBox.md +152 -0
- package/docs/widget/FloatingActionButton.md +120 -0
- package/docs/widget/GridView.md +140 -0
- package/docs/widget/Icon.md +117 -0
- package/docs/widget/Image.md +125 -0
- package/docs/widget/Input.md +151 -0
- package/docs/widget/Inspector.md +92 -0
- package/docs/widget/InstallButton.md +128 -0
- package/docs/widget/ListTile.md +132 -0
- package/docs/widget/ListView.md +138 -0
- package/docs/widget/Markdown.md +175 -0
- package/docs/widget/MatrixRain.md +122 -0
- package/docs/widget/Modal.md +129 -0
- package/docs/widget/Pagination.md +135 -0
- package/docs/widget/ParallaxBox.md +128 -0
- package/docs/widget/ProgressBar.md +130 -0
- package/docs/widget/QRCode.md +117 -0
- package/docs/widget/README.md +188 -0
- package/docs/widget/Radio.md +123 -0
- package/docs/widget/Rating.md +131 -0
- package/docs/widget/Row.md +131 -0
- package/docs/widget/START_HERE.md +146 -0
- package/docs/widget/Scaffold.md +152 -0
- package/docs/widget/Skeleton.md +130 -0
- package/docs/widget/Slider.md +146 -0
- package/docs/widget/SnackBar.md +102 -0
- package/docs/widget/Stack.md +128 -0
- package/docs/widget/Stepper.md +145 -0
- package/docs/widget/Switch.md +118 -0
- package/docs/widget/Tabs.md +124 -0
- package/docs/widget/Text.md +133 -0
- package/docs/widget/Tooltip.md +145 -0
- package/docs/widget/TreeView.md +176 -0
- package/docs/widget/Video.md +127 -0
- package/docs/widget/_template.md +61 -0
- package/package.json +3 -2
- package/src/animations/animate.js +180 -70
- package/src/animations/index.js +1 -0
- package/src/create-index.sh +1 -1
- package/src/index.d.ts +45 -22
- package/src/index.js +1 -0
- package/src/navigations/AdaptiveScaffold.js +11 -2
- package/src/navigations/BottomNavigation.js +10 -3
- package/src/navigations/Tabs.js +6 -2
- package/src/tools/useState.js +54 -63
- package/src/widget-factory/assignProps.js +23 -1
- package/src/widget-factory/processProps.js +10 -3
- package/src/widget-factory/reactiveValue.js +43 -18
- package/src/widget-factory/translateProps.js +777 -901
- package/src/widgets/AlertDialog.js +7 -5
- package/src/widgets/Checkbox.js +9 -7
- package/src/widgets/CircularBar.js +12 -1
- package/src/widgets/FloatingActionButton.js +4 -7
- package/src/widgets/Image.js +5 -7
- package/src/widgets/Input.js +92 -0
- package/src/widgets/ListView.js +73 -29
- package/src/widgets/Pagination.js +6 -3
- package/src/widgets/ProgressBar.js +16 -13
- package/src/widgets/Radio.js +6 -7
- package/src/widgets/Slider.js +23 -4
- package/src/widgets/Stack.js +36 -3
- package/src/widgets/Stepper.js +4 -3
- package/src/widgets/Switch.js +3 -4
- package/src/widgets/TreeView.js +0 -1
package/README.md
CHANGED
|
@@ -95,8 +95,18 @@ flet-box createBundle www # bundle the app into www/
|
|
|
95
95
|
flet-box build android # Android debug APK
|
|
96
96
|
flet-box build ios # iOS Simulator app (macOS + Xcode)
|
|
97
97
|
flet-box build ios --archive # unsigned iOS archive, sign in Xcode
|
|
98
|
+
|
|
99
|
+
# API lookup + anti-hallucination gate (works offline, in the repo or any app)
|
|
100
|
+
flet-box check-api # scan src/ for invented widgets/props
|
|
101
|
+
flet-box check-api --props Button # print the real props of one widget
|
|
102
|
+
flet-box check-api --list # print every public export
|
|
103
|
+
flet-box check-api --emit-api # (re)generate .fletbox/api/cheatsheet.md
|
|
98
104
|
```
|
|
99
105
|
|
|
106
|
+
In a generated app these are also `npm run check` (and `npm run check -- --props Button`),
|
|
107
|
+
because `flet-box create` writes `scripts/check-app.mjs` plus the `AGENTS.md` contract
|
|
108
|
+
that points any AI assistant at the real API.
|
|
109
|
+
|
|
100
110
|
## Android and iOS
|
|
101
111
|
|
|
102
112
|
`flet-box create` ships the Capacitor config, so the same SPA builds for both platforms. FletBox isn't on the npm registry — link it before installing:
|
package/bin/cli.js
CHANGED
|
@@ -13,6 +13,7 @@ import { createRequire } from "module";
|
|
|
13
13
|
import fs from "fs";
|
|
14
14
|
import path from "path";
|
|
15
15
|
import { createProject } from "./commands/create.js";
|
|
16
|
+
import { checkApi } from "./commands/checkApi.js";
|
|
16
17
|
import { packageManager } from "./commands/package.js";
|
|
17
18
|
import { createBundle } from "./commands/createBundle.js";
|
|
18
19
|
import { buildAndroid } from "./commands/buildAndroid.js";
|
|
@@ -73,6 +74,11 @@ ${cmd(" └─ [dir]", "target folder (default www)")}
|
|
|
73
74
|
${cmd("release [--patch]", "Bump version, rebuild, tag (OTA release)")}
|
|
74
75
|
${cmd(" └─ --minor|--major", "bump that position instead of patch")}
|
|
75
76
|
${cmd(" └─ --push", "push the commit + tag to origin")}
|
|
77
|
+
${cmd("check-api", "Validate the app against the installed flet-box API")}
|
|
78
|
+
${cmd(" └─ --props <Widget>", "print one widget's real props")}
|
|
79
|
+
${cmd(" └─ --list", "list every widget")}
|
|
80
|
+
${cmd(" └─ --emit-api", "write .fletbox/api/cheatsheet.md")}
|
|
81
|
+
${cmd(" └─ alias", "check | checkApi | doctor")}
|
|
76
82
|
${cmd("build android", "Build Android debug APK")}
|
|
77
83
|
${cmd("build android --release", "Build unsigned release APK/AAB to sign yourself")}
|
|
78
84
|
${cmd("build ios", "Build iOS Simulator app (macOS + Xcode)")}
|
|
@@ -262,6 +268,15 @@ async function main() {
|
|
|
262
268
|
await release(args.slice(1));
|
|
263
269
|
break;
|
|
264
270
|
|
|
271
|
+
case "check-api":
|
|
272
|
+
case "checkApi":
|
|
273
|
+
case "check":
|
|
274
|
+
case "doctor": {
|
|
275
|
+
const { exitCode } = await checkApi(args.slice(1));
|
|
276
|
+
if (exitCode) process.exit(exitCode);
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
|
|
265
280
|
case "build":
|
|
266
281
|
if (args[1] === "android") {
|
|
267
282
|
buildAndroid(args.slice(2));
|