create-disposabl-app 0.14.16 → 0.14.18
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/dist/disposabl.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/default/packages/disposabl-kit/mobile/global.css +7 -0
- package/dist/templates/default/packages/skill/references/design.md +3 -1
- package/dist/templates/default/packages/tests/mobile-styling.test.ts +23 -4
- package/package.json +1 -1
package/dist/disposabl.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
8
8
|
import { Command, CommanderError } from "commander";
|
|
9
9
|
import * as p2 from "@clack/prompts";
|
|
10
10
|
// package.json
|
|
11
|
-
var version = "0.14.
|
|
11
|
+
var version = "0.14.18";
|
|
12
12
|
|
|
13
13
|
// ../disposabl-kit/platforms.ts
|
|
14
14
|
var platforms = [
|
|
@@ -58,6 +58,13 @@
|
|
|
58
58
|
--destructive-foreground: #ffffff;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/* NativeWind's Android default currently maps font-serif to sans-serif. */
|
|
62
|
+
@media android {
|
|
63
|
+
:root {
|
|
64
|
+
--font-serif: serif;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
@media (prefers-color-scheme: dark) {
|
|
62
69
|
:root {
|
|
63
70
|
--background: #101a32;
|
|
@@ -12,7 +12,9 @@ Make the design distinctive through choices that suit the product, rather than a
|
|
|
12
12
|
|
|
13
13
|
Use concise copy and real visuals suited to the product. Prioritize useful task UI over decorative filler; do not impose a fixed palette.
|
|
14
14
|
|
|
15
|
-
For native screens,
|
|
15
|
+
For native screens, use NativeWind `className` utilities and the shared theme tokens, such as `bg-background`, `text-foreground`, and `border-border`. Do not introduce StyleSheet definitions or inline layout styles. Pass measured values through NativeWind CSS variables. Keep product-specific light/dark colors in the existing theme system and preserve its appearance preference.
|
|
16
|
+
|
|
17
|
+
Use `useTheme` from `packages/disposabl-kit/mobile/design/use-theme.ts` only where native APIs need resolved colors, such as navigation headers, symbols, and status bars. Reuse the existing provider; fixed light surfaces can become unreadable when Settings switches the system chrome to Dark.
|
|
16
18
|
|
|
17
19
|
When the app exposes Light, Dark, and System settings, verify the rendered guest and signed-in screens in those modes, including after restart and an OS appearance change in System mode. A changed selector label does not prove the screen changed. Add behavior coverage for the visible colors and preference persistence in `packages/tests`.
|
|
18
20
|
|
|
@@ -8,7 +8,7 @@ import config from "../../disposabl.json";
|
|
|
8
8
|
// Compile the actual CSS: component defaults must not hide colors or sizes
|
|
9
9
|
// supplied by a screen, including destructive actions in Settings.
|
|
10
10
|
test(
|
|
11
|
-
"NativeWind
|
|
11
|
+
"NativeWind preserves text overrides and native serif fonts",
|
|
12
12
|
{
|
|
13
13
|
skip: !config.platforms.some((platform) =>
|
|
14
14
|
["android", "ios"].includes(platform),
|
|
@@ -26,9 +26,28 @@ test(
|
|
|
26
26
|
{ from: path },
|
|
27
27
|
);
|
|
28
28
|
type Rule = { s: number[]; d: (Record<string, unknown> | unknown[])[] };
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
);
|
|
29
|
+
const stylesheet = compile(result.css, {
|
|
30
|
+
inlineVariables: false,
|
|
31
|
+
}).stylesheet();
|
|
32
|
+
const rules = new Map<string, Rule[]>(stylesheet.s);
|
|
33
|
+
const variables = new Map<string, [unknown, unknown?][]>(stylesheet.vr);
|
|
34
|
+
for (const [platform, family] of [
|
|
35
|
+
["android", "serif"],
|
|
36
|
+
["ios", "Georgia"],
|
|
37
|
+
]) {
|
|
38
|
+
const resolved = variables
|
|
39
|
+
.get("font-serif")
|
|
40
|
+
?.find(
|
|
41
|
+
([, conditions]) =>
|
|
42
|
+
JSON.stringify(conditions) ===
|
|
43
|
+
JSON.stringify([["=", "platform", platform]]),
|
|
44
|
+
);
|
|
45
|
+
assert.equal(
|
|
46
|
+
resolved?.[0],
|
|
47
|
+
family,
|
|
48
|
+
`${platform} retains its native serif font`,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
32
51
|
for (const [utility, base, property, value] of [
|
|
33
52
|
["text-[#71717a]", "themed-text", "color", "#71717a"],
|
|
34
53
|
["text-[#dc2626]", "themed-text", "color", "#dc2626"],
|