@hanzo/gui 4.8.0 → 7.2.2

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 (152) hide show
  1. package/dist/cjs/{createGui.cjs → createHanzogui.cjs} +14 -14
  2. package/dist/cjs/{createGui.native.js → createHanzogui.native.js} +15 -15
  3. package/dist/cjs/createHanzogui.native.js.map +1 -0
  4. package/dist/cjs/index.cjs +105 -34
  5. package/dist/cjs/index.native.js +105 -34
  6. package/dist/cjs/index.native.js.map +1 -1
  7. package/dist/cjs/{views/GuiProvider.cjs → linear-gradient.cjs} +5 -6
  8. package/dist/cjs/{views/GuiProvider.native.js → linear-gradient.native.js} +6 -7
  9. package/dist/cjs/linear-gradient.native.js.map +1 -0
  10. package/dist/cjs/views/Anchor.cjs +29 -3
  11. package/dist/cjs/views/Anchor.native.js +31 -3
  12. package/dist/cjs/views/Anchor.native.js.map +1 -1
  13. package/dist/cjs/views/Fieldset.cjs +43 -0
  14. package/dist/cjs/views/Fieldset.native.js +46 -0
  15. package/dist/cjs/views/Fieldset.native.js.map +1 -0
  16. package/dist/cjs/views/HanzoguiProvider.cjs +46 -0
  17. package/dist/cjs/views/HanzoguiProvider.native.js +50 -0
  18. package/dist/cjs/views/HanzoguiProvider.native.js.map +1 -0
  19. package/dist/cjs/views/Text.cjs +1 -1
  20. package/dist/cjs/views/Text.native.js +1 -1
  21. package/dist/cjs/views/Text.native.js.map +1 -1
  22. package/dist/{jsx/createGui.mjs → esm/createHanzogui.mjs} +13 -13
  23. package/dist/esm/createHanzogui.mjs.map +1 -0
  24. package/dist/esm/{createGui.native.js → createHanzogui.native.js} +13 -13
  25. package/dist/esm/createHanzogui.native.js.map +1 -0
  26. package/dist/esm/index.js +47 -28
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/index.mjs +47 -28
  29. package/dist/esm/index.mjs.map +1 -1
  30. package/dist/esm/index.native.js +47 -28
  31. package/dist/esm/index.native.js.map +1 -1
  32. package/dist/esm/linear-gradient.mjs +3 -0
  33. package/dist/esm/linear-gradient.mjs.map +1 -0
  34. package/dist/esm/linear-gradient.native.js +3 -0
  35. package/dist/esm/linear-gradient.native.js.map +1 -0
  36. package/dist/esm/views/Anchor.mjs +29 -3
  37. package/dist/esm/views/Anchor.mjs.map +1 -1
  38. package/dist/esm/views/Anchor.native.js +31 -3
  39. package/dist/esm/views/Anchor.native.js.map +1 -1
  40. package/dist/esm/views/Fieldset.mjs +18 -0
  41. package/dist/esm/views/Fieldset.mjs.map +1 -0
  42. package/dist/esm/views/Fieldset.native.js +18 -0
  43. package/dist/esm/views/Fieldset.native.js.map +1 -0
  44. package/dist/esm/views/HanzoguiProvider.mjs +21 -0
  45. package/dist/esm/views/HanzoguiProvider.mjs.map +1 -0
  46. package/dist/esm/views/HanzoguiProvider.native.js +22 -0
  47. package/dist/esm/views/HanzoguiProvider.native.js.map +1 -0
  48. package/dist/esm/views/Text.mjs +3 -3
  49. package/dist/esm/views/Text.mjs.map +1 -1
  50. package/dist/esm/views/Text.native.js +3 -3
  51. package/dist/esm/views/Text.native.js.map +1 -1
  52. package/dist/{esm/createGui.mjs → jsx/createHanzogui.mjs} +13 -13
  53. package/dist/jsx/createHanzogui.mjs.map +1 -0
  54. package/dist/jsx/{createGui.native.js → createHanzogui.native.js} +15 -15
  55. package/dist/jsx/createHanzogui.native.js.map +1 -0
  56. package/dist/jsx/index.js +47 -28
  57. package/dist/jsx/index.js.map +1 -1
  58. package/dist/jsx/index.mjs +47 -28
  59. package/dist/jsx/index.mjs.map +1 -1
  60. package/dist/jsx/index.native.js +105 -34
  61. package/dist/jsx/index.native.js.map +1 -1
  62. package/dist/jsx/linear-gradient.mjs +3 -0
  63. package/dist/jsx/linear-gradient.mjs.map +1 -0
  64. package/dist/jsx/{views/GuiProvider.native.js → linear-gradient.native.js} +6 -7
  65. package/dist/jsx/linear-gradient.native.js.map +1 -0
  66. package/dist/jsx/views/Anchor.mjs +29 -3
  67. package/dist/jsx/views/Anchor.mjs.map +1 -1
  68. package/dist/jsx/views/Anchor.native.js +31 -3
  69. package/dist/jsx/views/Anchor.native.js.map +1 -1
  70. package/dist/jsx/views/Fieldset.mjs +18 -0
  71. package/dist/jsx/views/Fieldset.mjs.map +1 -0
  72. package/dist/jsx/views/Fieldset.native.js +46 -0
  73. package/dist/jsx/views/Fieldset.native.js.map +1 -0
  74. package/dist/jsx/views/HanzoguiProvider.mjs +21 -0
  75. package/dist/jsx/views/HanzoguiProvider.mjs.map +1 -0
  76. package/dist/jsx/views/HanzoguiProvider.native.js +50 -0
  77. package/dist/jsx/views/HanzoguiProvider.native.js.map +1 -0
  78. package/dist/jsx/views/Text.mjs +3 -3
  79. package/dist/jsx/views/Text.mjs.map +1 -1
  80. package/dist/jsx/views/Text.native.js +1 -1
  81. package/dist/jsx/views/Text.native.js.map +1 -1
  82. package/dist/native.cjs +32307 -0
  83. package/dist/test.cjs +32369 -0
  84. package/package.json +85 -85
  85. package/src/{createGui.ts → createHanzogui.ts} +13 -13
  86. package/src/index.ts +181 -39
  87. package/src/linear-gradient.ts +1 -0
  88. package/src/views/Anchor.tsx +38 -4
  89. package/src/views/Fieldset.tsx +22 -0
  90. package/src/views/HanzoguiProvider.tsx +14 -0
  91. package/src/views/Text.tsx +3 -3
  92. package/types/createHanzogui.d.ts +6 -0
  93. package/types/createHanzogui.d.ts.map +1 -0
  94. package/types/index.d.ts +47 -28
  95. package/types/index.d.ts.map +1 -0
  96. package/types/linear-gradient.d.ts +2 -0
  97. package/types/linear-gradient.d.ts.map +1 -0
  98. package/types/setup.d.ts.map +1 -0
  99. package/types/viewTypes.d.ts.map +1 -0
  100. package/types/views/Anchor.d.ts +14 -2
  101. package/types/views/Anchor.d.ts.map +1 -0
  102. package/types/views/EnsureFlexed.d.ts +1 -1
  103. package/types/views/EnsureFlexed.d.ts.map +1 -0
  104. package/types/views/Fieldset.d.ts +8 -0
  105. package/types/views/Fieldset.d.ts.map +1 -0
  106. package/types/views/HanzoguiProvider.d.ts +3 -0
  107. package/types/views/HanzoguiProvider.d.ts.map +1 -0
  108. package/types/views/Text.d.ts +1 -1
  109. package/types/views/Text.d.ts.map +1 -0
  110. package/types/views/VisuallyHidden.d.ts +1 -1
  111. package/types/views/VisuallyHidden.d.ts.map +1 -0
  112. package/dist/cjs/createGui.native.js.map +0 -1
  113. package/dist/cjs/views/GuiProvider.native.js.map +0 -1
  114. package/dist/esm/createGui.mjs.map +0 -1
  115. package/dist/esm/createGui.native.js.map +0 -1
  116. package/dist/esm/views/GuiProvider.mjs +0 -4
  117. package/dist/esm/views/GuiProvider.mjs.map +0 -1
  118. package/dist/esm/views/GuiProvider.native.js +0 -4
  119. package/dist/esm/views/GuiProvider.native.js.map +0 -1
  120. package/dist/jsx/createGui.mjs.map +0 -1
  121. package/dist/jsx/createGui.native.js.map +0 -1
  122. package/dist/jsx/views/GuiProvider.mjs +0 -4
  123. package/dist/jsx/views/GuiProvider.mjs.map +0 -1
  124. package/dist/jsx/views/GuiProvider.native.js.map +0 -1
  125. package/gui.config.ts +0 -4
  126. package/linear-gradient/index.cjs +0 -2
  127. package/linear-gradient/index.d.ts +0 -1
  128. package/linear-gradient/index.js +0 -2
  129. package/linear-gradient/index.native.cjs +0 -2
  130. package/linear-gradient/index.native.js +0 -2
  131. package/native/index.cjs +0 -2
  132. package/native/index.js +0 -2
  133. package/native-test/index.cjs +0 -2
  134. package/native-test/index.js +0 -2
  135. package/native-test/index.native.cjs +0 -2
  136. package/native-test/index.native.js +0 -2
  137. package/native-test.d.ts +0 -1
  138. package/native.d.ts +0 -1
  139. package/package.json.bak +0 -169
  140. package/react-native-web/index.cjs +0 -2
  141. package/react-native-web/index.js +0 -2
  142. package/react-native-web/index.native.cjs +0 -2
  143. package/react-native-web/index.native.js +0 -2
  144. package/scripts/publish.sh +0 -50
  145. package/src/views/GuiProvider.tsx +0 -5
  146. package/tsconfig.json +0 -171
  147. package/types/createGui.d.ts +0 -6
  148. package/types/views/GuiProvider.d.ts +0 -4
  149. package/web/index.cjs +0 -2
  150. package/web/index.js +0 -2
  151. package/web/index.native.cjs +0 -2
  152. package/web/index.native.js +0 -2
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@hanzo/gui",
3
- "version": "4.8.0",
3
+ "version": "7.2.2",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "description": "Style and UI for React (web and native) meet an optimizing compiler",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/hanzoai/gui.git",
9
- "directory": "code/ui/gui"
9
+ "directory": "pkgs/ui/hanzogui"
10
10
  },
11
11
  "source": "src/index.ts",
12
12
  "type": "module",
@@ -68,93 +68,81 @@
68
68
  }
69
69
  },
70
70
  "scripts": {
71
- "build": "hanzo-gui-build",
72
- "build:all": "cd ../../.. && npx turbo run build --filter=@hanzo/gui --force",
73
- "afterBuild": "echo 'native bundle skipped - UI packages moved to hanzo/ui'",
74
- "watch": "hanzo-gui-build --watch",
75
- "clean": "hanzo-gui-build clean",
76
- "clean:build": "hanzo-gui-build clean:build",
71
+ "build": "hanzogui-build",
72
+ "afterBuild": "node bundle-native.mjs",
73
+ "watch": "hanzogui-build --watch",
74
+ "clean": "hanzogui-build clean",
75
+ "clean:build": "hanzogui-build clean:build",
77
76
  "check": "bun run check-circular-deps",
78
- "check-circular-deps": "npx madge --circular ./src/index.ts",
79
- "pub": "./scripts/publish.sh"
77
+ "check-circular-deps": "npx madge --circular ./src/index.ts"
80
78
  },
81
79
  "dependencies": {
82
- "@hanzogui/compose-refs": "4.4.0",
83
- "@hanzogui/config-default": "4.4.0",
84
- "@hanzogui/constants": "4.4.0",
85
- "@hanzogui/core": "4.4.0",
86
- "@hanzogui/create-context": "4.4.0",
87
- "@hanzogui/element": "4.4.0",
88
- "@hanzogui/get-button-sized": "4.4.0",
89
- "@hanzogui/get-font-sized": "4.4.0",
90
- "@hanzogui/get-token": "4.4.0",
91
- "@hanzogui/helpers": "4.4.0",
92
- "@hanzogui/polyfill-dev": "4.4.0",
93
- "@hanzogui/react-native-media-driver": "4.4.0",
94
- "@hanzogui/theme": "4.4.0",
95
- "@hanzogui/use-controllable-state": "4.4.0",
96
- "@hanzogui/use-debounce": "4.4.0",
97
- "@hanzogui/use-force-update": "4.4.0",
98
- "@hanzogui/use-window-dimensions": "4.4.0",
99
- "@hanzogui/font-size": "4.4.0",
100
- "@hanzogui/shorthands": "4.4.0",
101
- "@hanzogui/shapes": "3.0.2",
102
- "@hanzogui/stacks": "3.0.2",
103
- "@hanzogui/web": "4.4.0",
104
- "@hanzogui/spacer": "3.0.2",
105
- "@hanzogui/animate-presence": "3.0.2",
106
- "@hanzogui/button": "3.0.3",
107
- "@hanzogui/popover": "3.0.2",
108
- "@hanzogui/radio-group": "3.0.2",
109
- "@hanzogui/tooltip": "3.0.2",
110
- "@hanzogui/switch": "3.0.2",
111
- "@hanzogui/checkbox": "3.0.3",
112
- "@hanzogui/dialog": "3.0.2",
113
- "@hanzogui/sheet": "3.0.2",
114
- "@hanzogui/adapt": "3.0.2",
115
- "@hanzogui/label": "3.0.2",
116
- "@hanzogui/input": "3.0.2",
117
- "@hanzogui/select": "3.0.2",
118
- "@hanzogui/separator": "3.0.2",
119
- "@hanzogui/slider": "3.0.2",
120
- "@hanzogui/tabs": "3.0.2",
121
- "@hanzogui/toggle-group": "3.0.2",
122
- "@hanzogui/accordion": "3.0.2",
123
- "@hanzogui/avatar": "3.0.2",
124
- "@hanzogui/card": "3.0.2",
125
- "@hanzogui/form": "3.0.2",
126
- "@hanzogui/group": "3.0.2",
127
- "@hanzogui/image": "3.0.2",
128
- "@hanzogui/list-item": "3.0.3",
129
- "@hanzogui/portal": "3.0.2",
130
- "@hanzogui/progress": "3.0.2",
131
- "@hanzogui/scroll-view": "3.0.2",
132
- "@hanzogui/spinner": "3.0.2",
133
- "@hanzogui/text": "3.0.2",
134
- "@hanzogui/toast": "3.0.2",
135
- "@hanzogui/visually-hidden": "3.0.2",
136
- "@hanzogui/z-index-stack": "3.0.2",
137
- "@hanzogui/focusable": "3.0.2",
138
- "@hanzogui/focus-scope": "3.0.2",
139
- "@hanzogui/focus-guard": "3.0.2",
140
- "@hanzogui/dismissable": "3.0.2",
141
- "@hanzogui/collection": "3.0.2",
142
- "@hanzogui/remove-scroll": "3.0.2",
143
- "@hanzogui/roving-focus": "3.0.2",
144
- "@hanzogui/popper": "3.0.2",
145
- "@hanzogui/animate": "3.0.2",
146
- "@hanzogui/context-menu": "3.0.2",
147
- "@hanzogui/create-menu": "3.0.2",
148
- "@hanzogui/elements": "3.0.2",
149
- "@hanzogui/menu": "3.0.2",
150
- "@hanzogui/checkbox-headless": "3.0.2",
151
- "@hanzogui/radio-headless": "3.0.2",
152
- "@hanzogui/switch-headless": "3.0.2",
153
- "@hanzogui/tabs-headless": "3.0.2",
154
- "@hanzogui/theme-builder": "4.4.0"
80
+ "@hanzogui/accordion": "102.0.0-rc.41-hanzoai.1",
81
+ "@hanzogui/adapt": "102.0.0-rc.41-hanzoai.1",
82
+ "@hanzogui/alert-dialog": "102.0.0-rc.41-hanzoai.1",
83
+ "@hanzogui/animate": "102.0.0-rc.41-hanzoai.1",
84
+ "@hanzogui/animate-presence": "102.0.0-rc.41-hanzoai.1",
85
+ "@hanzogui/avatar": "102.0.0-rc.41-hanzoai.1",
86
+ "@hanzogui/button": "102.0.0-rc.41-hanzoai.1",
87
+ "@hanzogui/card": "102.0.0-rc.41-hanzoai.1",
88
+ "@hanzogui/checkbox": "102.0.0-rc.41-hanzoai.1",
89
+ "@hanzogui/collapsible": "102.0.0-rc.41-hanzoai.1",
90
+ "@hanzogui/compose-refs": "102.0.0-rc.41-hanzoai.1",
91
+ "@hanzogui/constants": "102.0.0-rc.41-hanzoai.1",
92
+ "@hanzogui/context-menu": "102.0.0-rc.41-hanzoai.1",
93
+ "@hanzogui/core": "102.0.0-rc.41-hanzoai.1",
94
+ "@hanzogui/create-context": "102.0.0-rc.41-hanzoai.1",
95
+ "@hanzogui/create-menu": "102.0.0-rc.41-hanzoai.1",
96
+ "@hanzogui/dialog": "102.0.0-rc.41-hanzoai.1",
97
+ "@hanzogui/element": "102.0.0-rc.41-hanzoai.1",
98
+ "@hanzogui/elements": "102.0.0-rc.41-hanzoai.1",
99
+ "@hanzogui/fake-react-native": "102.0.0-rc.41-hanzoai.1",
100
+ "@hanzogui/focusable": "102.0.0-rc.41-hanzoai.1",
101
+ "@hanzogui/form": "102.0.0-rc.41-hanzoai.1",
102
+ "@hanzogui/get-button-sized": "102.0.0-rc.41-hanzoai.1",
103
+ "@hanzogui/get-font-sized": "102.0.0-rc.41-hanzoai.1",
104
+ "@hanzogui/get-token": "102.0.0-rc.41-hanzoai.1",
105
+ "@hanzogui/group": "102.0.0-rc.41-hanzoai.1",
106
+ "@hanzogui/component-helpers": "102.0.0-rc.41-hanzoai.1",
107
+ "@hanzogui/image": "102.0.0-rc.41-hanzoai.1",
108
+ "@hanzogui/input": "102.0.0-rc.41-hanzoai.1",
109
+ "@hanzogui/label": "102.0.0-rc.41-hanzoai.1",
110
+ "@hanzogui/linear-gradient": "102.0.0-rc.41-hanzoai.1",
111
+ "@hanzogui/list-item": "102.0.0-rc.41-hanzoai.1",
112
+ "@hanzogui/menu": "102.0.0-rc.41-hanzoai.1",
113
+ "@hanzogui/polyfill-dev": "102.0.0-rc.41-hanzoai.1",
114
+ "@hanzogui/popover": "102.0.0-rc.41-hanzoai.1",
115
+ "@hanzogui/popper": "102.0.0-rc.41-hanzoai.1",
116
+ "@hanzogui/portal": "102.0.0-rc.41-hanzoai.1",
117
+ "@hanzogui/progress": "102.0.0-rc.41-hanzoai.1",
118
+ "@hanzogui/radio-group": "102.0.0-rc.41-hanzoai.1",
119
+ "@hanzogui/react-native-media-driver": "102.0.0-rc.41-hanzoai.1",
120
+ "@hanzogui/scroll-view": "102.0.0-rc.41-hanzoai.1",
121
+ "@hanzogui/select": "102.0.0-rc.41-hanzoai.1",
122
+ "@hanzogui/separator": "102.0.0-rc.41-hanzoai.1",
123
+ "@hanzogui/shapes": "102.0.0-rc.41-hanzoai.1",
124
+ "@hanzogui/sheet": "102.0.0-rc.41-hanzoai.1",
125
+ "@hanzogui/slider": "102.0.0-rc.41-hanzoai.1",
126
+ "@hanzogui/spacer": "102.0.0-rc.41-hanzoai.1",
127
+ "@hanzogui/spinner": "102.0.0-rc.41-hanzoai.1",
128
+ "@hanzogui/stacks": "102.0.0-rc.41-hanzoai.1",
129
+ "@hanzogui/switch": "102.0.0-rc.41-hanzoai.1",
130
+ "@hanzogui/tabs": "102.0.0-rc.41-hanzoai.1",
131
+ "@hanzogui/text": "102.0.0-rc.41-hanzoai.1",
132
+ "@hanzogui/theme": "102.0.0-rc.41-hanzoai.1",
133
+ "@hanzogui/toast": "102.0.0-rc.41-hanzoai.1",
134
+ "@hanzogui/toggle-group": "102.0.0-rc.41-hanzoai.1",
135
+ "@hanzogui/tooltip": "102.0.0-rc.41-hanzoai.1",
136
+ "@hanzogui/use-controllable-state": "102.0.0-rc.41-hanzoai.1",
137
+ "@hanzogui/use-debounce": "102.0.0-rc.41-hanzoai.1",
138
+ "@hanzogui/use-force-update": "102.0.0-rc.41-hanzoai.1",
139
+ "@hanzogui/use-window-dimensions": "102.0.0-rc.41-hanzoai.1",
140
+ "@hanzogui/visually-hidden": "102.0.0-rc.41-hanzoai.1",
141
+ "@hanzogui/font-size": "102.0.0-rc.41-hanzoai.1",
142
+ "@hanzogui/z-index-stack": "102.0.0-rc.41-hanzoai.1"
155
143
  },
156
144
  "devDependencies": {
157
- "@hanzogui/build": "4.4.0",
145
+ "@hanzogui/build": "102.0.0-rc.41-hanzoai.1",
158
146
  "react": ">=19",
159
147
  "react-native": "0.83.2",
160
148
  "react-native-web": "^0.21.0"
@@ -163,6 +151,18 @@
163
151
  "react": ">=19",
164
152
  "react-native": "*"
165
153
  },
154
+ "alsoPublishAs_disabled": [
155
+ "@hanzogui/ui"
156
+ ],
166
157
  "module:jsx": "dist/jsx",
167
- "removeSideEffects": true
158
+ "removeSideEffects": true,
159
+ "files": [
160
+ "dist",
161
+ "src",
162
+ "types",
163
+ "*.cjs",
164
+ "*.mjs",
165
+ "*.css",
166
+ "README.md"
167
+ ]
168
168
  }
@@ -1,12 +1,12 @@
1
- import { createGui as createGuiCore } from '@hanzogui/core'
1
+ import { createHanzogui as createHanzoguiCore } from '@hanzogui/core'
2
2
 
3
3
  /**
4
- * Adds some helpful validation at dev time only for `gui` specifically
4
+ * Adds some helpful validation at dev time only for `hanzogui` specifically
5
5
  **/
6
6
 
7
- export const createGui: typeof createGuiCore =
7
+ export const createHanzogui: typeof createHanzoguiCore =
8
8
  process.env.NODE_ENV !== 'development'
9
- ? createGuiCore
9
+ ? createHanzoguiCore
10
10
  : (conf) => {
11
11
  const sizeTokenKeys = ['$true']
12
12
 
@@ -14,27 +14,27 @@ export const createGui: typeof createGuiCore =
14
14
  return expectedKeys.every((k) => typeof obj[k] !== 'undefined')
15
15
  }
16
16
 
17
- const guiConfig = createGuiCore(conf)
17
+ const hanzoguiConfig = createHanzoguiCore(conf)
18
18
 
19
19
  // size and space should be fully defined
20
20
  for (const name of ['size', 'space'] as const) {
21
- const tokenSet = guiConfig.tokensParsed[name]
21
+ const tokenSet = hanzoguiConfig.tokensParsed[name]
22
22
  if (!tokenSet) {
23
23
  throw new Error(
24
24
  `Expected tokens for "${name}" in ${Object.keys(
25
- guiConfig.tokensParsed
25
+ hanzoguiConfig.tokensParsed
26
26
  ).join(', ')}`
27
27
  )
28
28
  }
29
29
  if (!hasKeys(sizeTokenKeys, tokenSet)) {
30
30
  throw new Error(`
31
- createGui() missing expected tokens.${name}:
31
+ createHanzogui() missing expected tokens.${name}:
32
32
 
33
33
  Received: ${Object.keys(tokenSet).join(', ')}
34
34
 
35
35
  Expected: ${sizeTokenKeys.join(', ')}
36
36
 
37
- GUI expects a "true" key that is the same value as your default size. This is so
37
+ Hanzogui expects a "true" key that is the same value as your default size. This is so
38
38
  it can size things up or down from the defaults without assuming which keys you use.
39
39
 
40
40
  Please define a "true" or "$true" key on your size and space tokens like so (example):
@@ -51,14 +51,14 @@ size: {
51
51
  }
52
52
 
53
53
  // others must define subset of size tokens
54
- const expected = Object.keys(guiConfig.tokensParsed.size)
54
+ const expected = Object.keys(hanzoguiConfig.tokensParsed.size)
55
55
  for (const name of ['radius', 'zIndex'] as const) {
56
- const tokenSet = guiConfig.tokensParsed[name]
56
+ const tokenSet = hanzoguiConfig.tokensParsed[name]
57
57
  const received = Object.keys(tokenSet)
58
58
  const hasSomeOverlap = received.some((rk) => expected.includes(rk))
59
59
  if (!hasSomeOverlap) {
60
60
  throw new Error(`
61
- createGui() invalid tokens.${name}:
61
+ createHanzogui() invalid tokens.${name}:
62
62
 
63
63
  Received: ${received.join(', ')}
64
64
 
@@ -68,5 +68,5 @@ Expected a subset of: ${expected.join(', ')}
68
68
  }
69
69
  }
70
70
 
71
- return guiConfig
71
+ return hanzoguiConfig
72
72
  }
package/src/index.ts CHANGED
@@ -1,59 +1,201 @@
1
1
  import './setup'
2
2
 
3
- // Core styling engine
4
- export * from '@hanzogui/core'
5
-
6
- // Stack components
7
- export * from '@hanzogui/stacks'
8
-
9
- // Shape primitives (Square, Circle)
10
- export * from '@hanzogui/shapes'
11
-
12
- // UI Components
13
3
  export * from '@hanzogui/spacer'
4
+ export * from '@hanzogui/accordion'
5
+ export * from '@hanzogui/adapt'
6
+ export * from '@hanzogui/alert-dialog'
7
+ export * from '@hanzogui/animate'
14
8
  export * from '@hanzogui/animate-presence'
9
+ export * from '@hanzogui/avatar'
15
10
  export * from '@hanzogui/button'
16
- export * from '@hanzogui/popover'
17
- export * from '@hanzogui/radio-group'
18
- export * from '@hanzogui/tooltip'
19
- export * from '@hanzogui/switch'
11
+ export * from '@hanzogui/card'
20
12
  export * from '@hanzogui/checkbox'
13
+ export * from '@hanzogui/collapsible'
14
+ export * from '@hanzogui/compose-refs'
15
+ export * from '@hanzogui/create-context'
21
16
  export * from '@hanzogui/dialog'
22
- export * from '@hanzogui/sheet'
23
- export * from '@hanzogui/adapt'
24
- export * from '@hanzogui/label'
25
- export * from '@hanzogui/input'
26
- export * from '@hanzogui/select'
27
- export * from '@hanzogui/separator'
28
- export * from '@hanzogui/slider'
29
- export * from '@hanzogui/tabs'
30
- export * from '@hanzogui/toggle-group'
31
- export * from '@hanzogui/accordion'
32
- export * from '@hanzogui/avatar'
33
- export * from '@hanzogui/card'
17
+ export * from '@hanzogui/font-size'
34
18
  export * from '@hanzogui/form'
35
19
  export * from '@hanzogui/group'
20
+ export * from '@hanzogui/react-native-media-driver'
21
+ export * from '@hanzogui/elements'
22
+ export * from '@hanzogui/component-helpers'
36
23
  export * from '@hanzogui/image'
24
+ export * from '@hanzogui/label'
37
25
  export * from '@hanzogui/list-item'
26
+ export * from '@hanzogui/menu'
27
+ export * from '@hanzogui/context-menu'
28
+ export * from '@hanzogui/create-menu'
29
+ export * from '@hanzogui/popover'
30
+ export * from '@hanzogui/popper'
38
31
  export * from '@hanzogui/portal'
39
32
  export * from '@hanzogui/progress'
33
+ export * from '@hanzogui/radio-group'
40
34
  export * from '@hanzogui/scroll-view'
41
- export * from '@hanzogui/spinner'
35
+ export * from '@hanzogui/select'
36
+ export * from '@hanzogui/separator'
37
+ export * from '@hanzogui/shapes'
38
+ export * from '@hanzogui/sheet'
39
+ export * from '@hanzogui/slider'
40
+ export * from '@hanzogui/stacks'
41
+ export * from '@hanzogui/switch'
42
+ export * from '@hanzogui/tabs'
42
43
  export * from '@hanzogui/text'
44
+ export * from '@hanzogui/theme'
43
45
  export * from '@hanzogui/toast'
46
+ export * from '@hanzogui/toggle-group'
47
+ export * from '@hanzogui/tooltip'
48
+ export * from '@hanzogui/use-controllable-state'
49
+ export * from '@hanzogui/use-debounce'
50
+ export * from '@hanzogui/use-force-update'
51
+ export * from '@hanzogui/element'
52
+ export * from '@hanzogui/use-window-dimensions'
44
53
  export * from '@hanzogui/visually-hidden'
45
- export * from '@hanzogui/focusable'
46
- export * from '@hanzogui/elements'
47
54
 
48
- // Config utilities — needed by consumer brand configs
49
- export { createThemes, createThemeBuilder } from '@hanzogui/theme-builder'
50
- export { shorthands } from '@hanzogui/shorthands'
51
- export { getDefaultGuiConfig } from '@hanzogui/config-default'
55
+ export * from './createHanzogui'
56
+
57
+ export * from './viewTypes'
58
+ export * from './views/HanzoguiProvider'
59
+
60
+ export * from './views/Anchor'
61
+ export * from './views/EnsureFlexed'
62
+ export * from './views/Fieldset'
63
+ export * from '@hanzogui/input'
64
+ export * from '@hanzogui/spinner'
65
+ export * from './views/Text'
52
66
 
53
- // Explicit re-exports that get lost in the export * chain through
54
- // @hanzogui/core @hanzogui/web in some tsc resolution contexts.
55
- export { Theme, useTheme } from '@hanzogui/web'
56
- export type { ThemeName } from '@hanzogui/web'
67
+ // since we overlap with ViewProps and potentially others
68
+ // lets be explicit on what gets exported
69
+ export type {
70
+ TransitionKeys,
71
+ TransitionProp,
72
+ ColorTokens,
73
+ CreateHanzoguiConfig,
74
+ CreateHanzoguiProps,
75
+ FontColorTokens,
76
+ FontLanguages,
77
+ FontLetterSpacingTokens,
78
+ FontLineHeightTokens,
79
+ FontFamilyTokens,
80
+ FontSizeTokens,
81
+ FontStyleTokens,
82
+ FontTokens,
83
+ FontTransformTokens,
84
+ FontWeightTokens,
85
+ GenericFont,
86
+ GenericStackVariants,
87
+ GenericHanzoguiConfig,
88
+ GenericTextVariants,
89
+ GetAnimationKeys,
90
+ GetProps,
91
+ GetRef,
92
+ GetThemeValueForKey,
93
+ GroupNames,
94
+ Longhands,
95
+ Media,
96
+ MediaPropKeys,
97
+ MediaQueries,
98
+ MediaQueryState,
99
+ RadiusTokens,
100
+ Shorthands,
101
+ SizeTokens,
102
+ SpaceTokens,
103
+ SpecificTokens,
104
+ StackNonStyleProps,
105
+ ViewProps,
106
+ StaticConfig,
107
+ Styleable,
108
+ HanzoguiBaseTheme,
109
+ HanzoguiBuildOptions,
110
+ HanzoguiComponent,
111
+ HanzoguiConfig,
112
+ HanzoguiCustomConfig,
113
+ HanzoguiElement,
114
+ HanzoguiInternalConfig,
115
+ HanzoguiProviderProps,
116
+ HanzoguiSettings,
117
+ HanzoguiTextElement,
118
+ TextNonStyleProps,
119
+ TextProps,
120
+ ThemeKeys,
121
+ ThemeName,
122
+ ThemeParsed,
123
+ ThemeProps,
124
+ Themes,
125
+ ThemeTokens,
126
+ ThemeValueFallback,
127
+ Token,
128
+ Tokens,
129
+ TypeOverride,
130
+ Variable,
131
+ VariantSpreadExtras,
132
+ VariantSpreadFunction,
133
+ ZIndexTokens,
134
+ ViewStyle,
135
+ TextStyle,
136
+ } from '@hanzogui/core'
57
137
 
58
- // Additional exports (ported from tamagui, missing in earlier builds)
59
- export { Anchor, type AnchorProps } from './views/Anchor'
138
+ export {
139
+ ClientOnly,
140
+ Configuration,
141
+ ComponentContext,
142
+ GroupContext,
143
+ FontLanguage,
144
+ // components
145
+ Theme,
146
+ View,
147
+ createComponent,
148
+ createFont,
149
+ createShorthands,
150
+ createStyledContext,
151
+ createTokens,
152
+ createVariable,
153
+ getConfig,
154
+ getMedia,
155
+ getCSSStylesAtomic,
156
+ getThemes,
157
+ getToken,
158
+ getTokenValue,
159
+ getTokens,
160
+ getVariable,
161
+ getVariableName,
162
+ getVariableValue,
163
+ insertFont,
164
+ setConfig,
165
+ setupDev,
166
+ _withStableStyle,
167
+ // constants
168
+ isBrowser,
169
+ isChrome,
170
+ isClient,
171
+ isServer,
172
+ isHanzoguiComponent,
173
+ isHanzoguiElement,
174
+ isTouchable,
175
+ isVariable,
176
+ isWeb,
177
+ isWebTouchable,
178
+ matchMedia,
179
+ mediaObjectToString,
180
+ mediaQueryConfig,
181
+ mediaState,
182
+ setOnLayoutStrategy,
183
+ styled,
184
+ themeable,
185
+ // hooks
186
+ useClientValue,
187
+ useDidFinishSSR,
188
+ useEvent,
189
+ useGet,
190
+ useIsTouchDevice,
191
+ useIsomorphicLayoutEffect,
192
+ useMedia,
193
+ useProps,
194
+ usePropsAndStyle,
195
+ useStyle,
196
+ useConfiguration,
197
+ useTheme,
198
+ useThemeName,
199
+ variableToString,
200
+ withStaticProperties,
201
+ } from '@hanzogui/core'
@@ -0,0 +1 @@
1
+ export { LinearGradient, type LinearGradientProps } from '@hanzogui/linear-gradient'
@@ -1,10 +1,44 @@
1
+ import { isWeb } from '@hanzogui/constants'
1
2
  import { styled } from '@hanzogui/core'
3
+ import type { SizableTextProps } from '@hanzogui/text'
2
4
  import { SizableText } from '@hanzogui/text'
5
+ import { Linking } from 'react-native'
3
6
 
4
- export const Anchor = styled(SizableText, {
7
+ export interface AnchorExtraProps {
8
+ href?: string
9
+ target?: string
10
+ rel?: string
11
+ }
12
+
13
+ export type AnchorProps = SizableTextProps & AnchorExtraProps
14
+
15
+ const AnchorFrame = styled(SizableText, {
5
16
  name: 'Anchor',
6
- tag: 'a',
7
- accessibilityRole: 'link',
17
+ render: 'a',
18
+ role: 'link',
8
19
  })
9
20
 
10
- export type AnchorProps = React.ComponentProps<typeof Anchor>
21
+ export const Anchor = AnchorFrame.styleable<AnchorExtraProps>(
22
+ ({ href, target, rel, ...props }, ref) => {
23
+ return (
24
+ <AnchorFrame
25
+ {...props}
26
+ {...(isWeb
27
+ ? {
28
+ href,
29
+ target,
30
+ rel,
31
+ }
32
+ : {
33
+ onPress: (event) => {
34
+ props.onPress?.(event)
35
+ if (href !== undefined) {
36
+ Linking.openURL(href)
37
+ }
38
+ },
39
+ })}
40
+ ref={ref as any}
41
+ />
42
+ )
43
+ }
44
+ )
@@ -0,0 +1,22 @@
1
+ import type { GetProps } from '@hanzogui/core'
2
+ import { styled } from '@hanzogui/core'
3
+ import { YStack } from '@hanzogui/stacks'
4
+
5
+ export const Fieldset = styled(YStack, {
6
+ name: 'Fieldset',
7
+ render: 'fieldset',
8
+
9
+ // remove browser default styling
10
+ borderWidth: 0,
11
+
12
+ variants: {
13
+ horizontal: {
14
+ true: {
15
+ flexDirection: 'row',
16
+ alignItems: 'center',
17
+ },
18
+ },
19
+ } as const,
20
+ })
21
+
22
+ export type FieldsetProps = GetProps<typeof Fieldset>
@@ -0,0 +1,14 @@
1
+ import type { HanzoguiProviderProps } from '@hanzogui/core'
2
+ import { HanzoguiProvider as OGProvider } from '@hanzogui/core'
3
+ import { PortalProvider } from '@hanzogui/portal'
4
+ import { ZIndexStackContext } from '@hanzogui/z-index-stack'
5
+
6
+ export const HanzoguiProvider = ({ children, ...props }: HanzoguiProviderProps) => {
7
+ return (
8
+ <OGProvider {...props}>
9
+ <ZIndexStackContext.Provider value={1}>
10
+ <PortalProvider shouldAddRootHost>{children}</PortalProvider>
11
+ </ZIndexStackContext.Provider>
12
+ </OGProvider>
13
+ )
14
+ }
@@ -1,6 +1,6 @@
1
- import { Text as GuiText, styled } from '@hanzogui/core'
1
+ import { Text as HanzoguiText, styled } from '@hanzogui/core'
2
2
 
3
- export const Text = styled(GuiText, {
3
+ export const Text = styled(HanzoguiText, {
4
4
  variants: {
5
5
  unstyled: {
6
6
  false: {
@@ -10,6 +10,6 @@ export const Text = styled(GuiText, {
10
10
  } as const,
11
11
 
12
12
  defaultVariants: {
13
- unstyled: process.env.GUI_HEADLESS === '1',
13
+ unstyled: process.env.HANZOGUI_HEADLESS === '1',
14
14
  },
15
15
  })
@@ -0,0 +1,6 @@
1
+ import { createHanzogui as createHanzoguiCore } from '@hanzogui/core';
2
+ /**
3
+ * Adds some helpful validation at dev time only for `hanzogui` specifically
4
+ **/
5
+ export declare const createHanzogui: typeof createHanzoguiCore;
6
+ //# sourceMappingURL=createHanzogui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createHanzogui.d.ts","sourceRoot":"","sources":["../src/createHanzogui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAErE;;IAEI;AAEJ,eAAO,MAAM,cAAc,EAAE,OAAO,kBAiE7B,CAAA"}