werewolf-ui 0.1.0-beta.1 → 0.1.0-beta.3

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.
Files changed (92) hide show
  1. package/README.md +32 -6
  2. package/data/manifest.json +5526 -628
  3. package/data/native/android/WerewolfAlert.kt +210 -0
  4. package/data/native/android/WerewolfAlertDialog.kt +156 -0
  5. package/data/native/android/WerewolfAvatar.kt +393 -0
  6. package/data/native/android/WerewolfBackdropBlur.kt +89 -0
  7. package/data/native/android/WerewolfBadge.kt +307 -0
  8. package/data/native/android/WerewolfBottomNav.kt +333 -0
  9. package/data/native/android/WerewolfButton.kt +692 -0
  10. package/data/native/android/WerewolfButtonGroup.kt +54 -0
  11. package/data/native/android/WerewolfCard.kt +134 -0
  12. package/data/native/android/WerewolfCheckbox.kt +387 -0
  13. package/data/native/android/WerewolfCounter.kt +640 -0
  14. package/data/native/android/WerewolfDialog.kt +131 -0
  15. package/data/native/android/WerewolfEmptyState.kt +94 -0
  16. package/data/native/android/WerewolfField.kt +66 -0
  17. package/data/native/android/WerewolfFonts.kt +69 -0
  18. package/data/native/android/WerewolfIcons.kt +132 -0
  19. package/data/native/android/WerewolfInput.kt +558 -0
  20. package/data/native/android/WerewolfKbd.kt +103 -0
  21. package/data/native/android/WerewolfLabel.kt +236 -0
  22. package/data/native/android/WerewolfLayers.kt +385 -0
  23. package/data/native/android/WerewolfLink.kt +163 -0
  24. package/data/native/android/WerewolfList.kt +504 -0
  25. package/data/native/android/WerewolfListRuntime.kt +384 -0
  26. package/data/native/android/WerewolfMetadata.kt +180 -0
  27. package/data/native/android/WerewolfMeter.kt +189 -0
  28. package/data/native/android/WerewolfModifiers.kt +191 -0
  29. package/data/native/android/WerewolfProgress.kt +281 -0
  30. package/data/native/android/WerewolfRadioGroup.kt +382 -0
  31. package/data/native/android/WerewolfSelect.kt +330 -0
  32. package/data/native/android/WerewolfSeparator.kt +90 -0
  33. package/data/native/android/WerewolfSheet.kt +204 -0
  34. package/data/native/android/WerewolfSkeleton.kt +170 -0
  35. package/data/native/android/WerewolfSpinner.kt +79 -0
  36. package/data/native/android/WerewolfSpinnerArc.kt +53 -0
  37. package/data/native/android/WerewolfSwitch.kt +437 -0
  38. package/data/native/android/WerewolfTabs.kt +591 -0
  39. package/data/native/android/WerewolfTextarea.kt +329 -0
  40. package/data/native/android/WerewolfTheme.kt +37 -0
  41. package/data/native/android/WerewolfToast.kt +226 -0
  42. package/data/native/android/WerewolfToaster.kt +282 -0
  43. package/data/native/android/WerewolfToggle.kt +395 -0
  44. package/data/native/android/WerewolfToggleGroup.kt +427 -0
  45. package/data/native/android/WerewolfToken.kt +240 -0
  46. package/data/native/ios/WerewolfAlert.swift +284 -0
  47. package/data/native/ios/WerewolfAlertDialog.swift +185 -0
  48. package/data/native/ios/WerewolfAvatar.swift +552 -0
  49. package/data/native/ios/WerewolfBadge.swift +439 -0
  50. package/data/native/ios/WerewolfBottomNav.swift +422 -0
  51. package/data/native/ios/WerewolfButton.swift +721 -0
  52. package/data/native/ios/WerewolfButtonGroup.swift +62 -0
  53. package/data/native/ios/WerewolfCard.swift +189 -0
  54. package/data/native/ios/WerewolfCheckbox.swift +621 -0
  55. package/data/native/ios/WerewolfCounter.swift +768 -0
  56. package/data/native/ios/WerewolfDialog.swift +170 -0
  57. package/data/native/ios/WerewolfEmptyState.swift +122 -0
  58. package/data/native/ios/WerewolfField.swift +103 -0
  59. package/data/native/ios/WerewolfFonts.swift +140 -0
  60. package/data/native/ios/WerewolfIcons.swift +47 -0
  61. package/data/native/ios/WerewolfInput.swift +670 -0
  62. package/data/native/ios/WerewolfKbd.swift +136 -0
  63. package/data/native/ios/WerewolfLabel.swift +270 -0
  64. package/data/native/ios/WerewolfLayers.swift +376 -0
  65. package/data/native/ios/WerewolfLink.swift +188 -0
  66. package/data/native/ios/WerewolfList.swift +603 -0
  67. package/data/native/ios/WerewolfListRuntime.swift +414 -0
  68. package/data/native/ios/WerewolfMetadata.swift +205 -0
  69. package/data/native/ios/WerewolfMeter.swift +186 -0
  70. package/data/native/ios/WerewolfModifiers.swift +213 -0
  71. package/data/native/ios/WerewolfProgress.swift +338 -0
  72. package/data/native/ios/WerewolfRadioGroup.swift +483 -0
  73. package/data/native/ios/WerewolfSelect.swift +418 -0
  74. package/data/native/ios/WerewolfSeparator.swift +120 -0
  75. package/data/native/ios/WerewolfSheet.swift +208 -0
  76. package/data/native/ios/WerewolfSkeleton.swift +238 -0
  77. package/data/native/ios/WerewolfSpinner.swift +108 -0
  78. package/data/native/ios/WerewolfSpinnerArc.swift +24 -0
  79. package/data/native/ios/WerewolfSwitch.swift +678 -0
  80. package/data/native/ios/WerewolfTabs.swift +756 -0
  81. package/data/native/ios/WerewolfTextarea.swift +403 -0
  82. package/data/native/ios/WerewolfTheme.swift +62 -0
  83. package/data/native/ios/WerewolfToast.swift +278 -0
  84. package/data/native/ios/WerewolfToaster.swift +269 -0
  85. package/data/native/ios/WerewolfToggle.swift +647 -0
  86. package/data/native/ios/WerewolfToggleGroup.swift +511 -0
  87. package/data/native/ios/WerewolfToken.swift +320 -0
  88. package/dist/cli.mjs +13252 -7400
  89. package/dist/core.mjs +9326 -4503
  90. package/dist/lint.mjs +159 -19
  91. package/dist/project.mjs +74 -4
  92. package/package.json +2 -1
package/README.md CHANGED
@@ -23,16 +23,18 @@ The export uses the initialized app's configured DTCG seed, preserving its
23
23
  bytes, metadata and file mode. Config, app stylesheet, components and agent rules
24
24
  stay unchanged. Each selection writes both json/dark.json and json/light.json
25
25
  plus only the selected platform's artifacts. Web adds dark.css, light.css,
26
- werewolf.css and tailwind.css in web/; ios adds WerewolfDark.swift and
27
- WerewolfLight.swift in ios/; android adds WerewolfDark.kt and WerewolfLight.kt
28
- in android/. Existing unselected outputs remain untouched. Rebuild each
26
+ werewolf.css and tailwind.css in web/; ios adds WerewolfDark.swift,
27
+ WerewolfLight.swift and WerewolfTokens.swift (both modes, shadows and easing) in
28
+ ios/; android adds WerewolfDark.kt, WerewolfLight.kt and WerewolfTokens.kt in
29
+ android/. Existing unselected outputs remain untouched. Rebuild each
29
30
  platform after changing the seed.
30
31
 
31
32
  Swift and Compose use Joey's decided touch values: sm 28, md 36, lg 44, xl 48,
32
33
  size-target-min 44 and font-size-input 16. Swift dimensions are points; Compose
33
34
  control sizes/targets use dp and input text uses sp. Mode JSON retains the mouse
34
35
  base maps (md 32, lg 36, xl 44, target 24, input 14). Web CSS keeps those base
35
- values and the existing coarse-pointer overrides. Native components remain v2.
36
+ values and the existing coarse-pointer overrides. Native components install
37
+ with init and add --platform; see Native components below.
36
38
 
37
39
  All modes format and pass engine checks before consumer writes. Artifacts and
38
40
  their hashes in .werewolf/managed.json commit through the existing staged
@@ -55,6 +57,30 @@ unchanged read guards; files lists only exported artifacts. Exit 0 succeeds,
55
57
  1 reports operational failure/conflict and 2 reports invalid arguments/config.
56
58
  Cancellation returns 130. No package-manager process runs during export.
57
59
 
60
+ ## Native components
61
+
62
+ Set up a SwiftPM, Xcode or Gradle app, then add generated SwiftUI or Jetpack
63
+ Compose components to it:
64
+
65
+ ```bash
66
+ npx werewolf-ui init --platform ios
67
+ npx werewolf-ui add button --platform ios
68
+ npx werewolf-ui init --platform android --module app
69
+ npx werewolf-ui add button --platform android
70
+ ```
71
+
72
+ init --platform writes werewolf.json, the seed, the native token files and the
73
+ runtime. add --platform writes the generated component into the configured
74
+ folder and runs no package manager. Generated today: Alert, AlertDialog,
75
+ Avatar, Badge, BottomNav, Button, ButtonGroup, Card, Checkbox, Counter, Dialog,
76
+ EmptyState, Field, Input, Kbd, Label, Link, List (with ListItem), Metadata,
77
+ Progress, RadioGroup, Select, Separator, Sheet, Skeleton, Spinner, Switch,
78
+ Tabs, Textarea, Toast, Toggle, ToggleGroup and Token. A component without
79
+ native status for that platform returns WW_NATIVE_UNSUPPORTED with its status
80
+ and deferred props. add @<namespace>/<item> --platform installs a remote item
81
+ that ships files for that platform.
82
+ iOS 16 (Xcode 15) and Android minSdk 24 are the baseline.
83
+
58
84
  ## Consumer lint (C3, shipped in PR #129)
59
85
 
60
86
  Select the supported app with `--cwd`:
@@ -442,7 +468,7 @@ npm ci
442
468
  npm run build:cli
443
469
  npm pack --workspace werewolf-ui --pack-destination /absolute/path/to/output
444
470
  cd /absolute/path/to/consumer
445
- npm install /absolute/path/to/output/werewolf-ui-0.1.0-beta.1.tgz --engine-strict
471
+ npm install /absolute/path/to/output/werewolf-ui-0.1.0-beta.3.tgz --engine-strict
446
472
  ```
447
473
 
448
474
  The supported layouts are Next.js app-router (app or src/app), Vite React
@@ -485,4 +511,4 @@ The client must have Node 20+ and npx on its PATH. If it cannot set cwd, launch
485
511
 
486
512
  The six names are list_components, search, get_component, generate_theme, lint and check_page. Successful tools return matching JSON text and structuredContent with schemaVersion, dataVersion, ok, data and diagnostics. Lint findings live in data.diagnostics; ok means the tool ran, rather than that the source is clean. Check coverage for dynamic or unread source. Theme returns artifacts without writing them.
487
513
 
488
- The server exposes six read-only tools. check_page opens only pages on this computer and writes screenshots to a temporary folder, never to the project; it needs playwright-core and Chromium, or CHROME_PATH (see `check` in [docs/cli.md](../../docs/cli.md)). Lint accepts submitted content or explicit source files under the canonical root, with the same file, byte and diagnostic limits as core lint. Directory/glob inputs and symlinks are rejected. No installation, fixes or consumer config execution occurs. EOF drains responses; signals and broken input close with bounded cleanup. See [local MCP connection and tool documentation](../../docs/mcp.md) for the local tarball process config, illustrative future published config, tool examples, result envelopes and troubleshooting. D2 ships in PR #132. D3 packed comparisons and configured CLI-client evidence shipped in PR #133; desktop application registration remains untested. MCP lint uses the packaged default seed, while CLI lint reads the consumer seed for color suggestions.
514
+ The server exposes seven read-only tools. check_page opens only pages on this computer and writes screenshots to a temporary folder, never to the project; it needs playwright-core and Chromium, or CHROME_PATH (see `check` in [docs/cli.md](../../docs/cli.md)). Lint accepts submitted content or explicit source files under the canonical root, with the same file, byte and diagnostic limits as core lint. Directory/glob inputs and symlinks are rejected. No installation, fixes or consumer config execution occurs. EOF drains responses; signals and broken input close with bounded cleanup. See [local MCP connection and tool documentation](../../docs/mcp.md) for the local tarball process config, illustrative future published config, tool examples, result envelopes and troubleshooting. D2 ships in PR #132. D3 packed comparisons and configured CLI-client evidence shipped in PR #133; desktop application registration remains untested. MCP lint uses the packaged default seed, while CLI lint reads the consumer seed for color suggestions.