@flipova/foundation 1.8.0

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 (101) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/LICENSE +21 -0
  3. package/README.md +268 -0
  4. package/dist/config/index.d.mts +128 -0
  5. package/dist/config/index.d.ts +128 -0
  6. package/dist/config/index.js +1104 -0
  7. package/dist/config/index.js.map +1 -0
  8. package/dist/config/index.mjs +1098 -0
  9. package/dist/config/index.mjs.map +1 -0
  10. package/dist/index-D4qJw_Et.d.mts +55 -0
  11. package/dist/index-D4qJw_Et.d.ts +55 -0
  12. package/dist/index.d.mts +9 -0
  13. package/dist/index.d.ts +9 -0
  14. package/dist/index.js +9563 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/index.mjs +9381 -0
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/layout/index.d.mts +2340 -0
  19. package/dist/layout/index.d.ts +2340 -0
  20. package/dist/layout/index.js +9275 -0
  21. package/dist/layout/index.js.map +1 -0
  22. package/dist/layout/index.mjs +9124 -0
  23. package/dist/layout/index.mjs.map +1 -0
  24. package/dist/primitives-DVX2q5St.d.mts +195 -0
  25. package/dist/primitives-nj-4at-g.d.ts +195 -0
  26. package/dist/spacing-CXUulLF9.d.mts +128 -0
  27. package/dist/spacing-CXUulLF9.d.ts +128 -0
  28. package/dist/studio/cli/index.d.mts +1 -0
  29. package/dist/studio/cli/index.d.ts +1 -0
  30. package/dist/studio/cli/index.js +4823 -0
  31. package/dist/studio/cli/index.js.map +1 -0
  32. package/dist/studio/cli/index.mjs +4798 -0
  33. package/dist/studio/cli/index.mjs.map +1 -0
  34. package/dist/studio/index.d.mts +441 -0
  35. package/dist/studio/index.d.ts +441 -0
  36. package/dist/studio/index.js +4919 -0
  37. package/dist/studio/index.js.map +1 -0
  38. package/dist/studio/index.mjs +4876 -0
  39. package/dist/studio/index.mjs.map +1 -0
  40. package/dist/theme/index.d.mts +122 -0
  41. package/dist/theme/index.d.ts +122 -0
  42. package/dist/theme/index.js +840 -0
  43. package/dist/theme/index.js.map +1 -0
  44. package/dist/theme/index.mjs +826 -0
  45. package/dist/theme/index.mjs.map +1 -0
  46. package/dist/tokens/index.d.mts +288 -0
  47. package/dist/tokens/index.d.ts +288 -0
  48. package/dist/tokens/index.js +404 -0
  49. package/dist/tokens/index.js.map +1 -0
  50. package/dist/tokens/index.mjs +390 -0
  51. package/dist/tokens/index.mjs.map +1 -0
  52. package/dist/web/index.d.mts +778 -0
  53. package/dist/web/index.d.ts +778 -0
  54. package/dist/web/index.js +5813 -0
  55. package/dist/web/index.js.map +1 -0
  56. package/dist/web/index.mjs +5708 -0
  57. package/dist/web/index.mjs.map +1 -0
  58. package/package.json +196 -0
  59. package/studio/README.md +154 -0
  60. package/studio/app/dist/_expo/static/js/web/entry-39d36897d2758a1d36b9ce16995ecc83.js +15379 -0
  61. package/studio/app/dist/_expo/static/js/web/index-f0c66517963047bf2c0bdd371afb8d31.js +4 -0
  62. package/studio/app/dist/_expo/static/js/web/index-fb59148d0b266219e66b19aeca8e2086.js +3 -0
  63. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/AntDesign.3f78af31cca60105799838a1a7a59fbd.ttf +0 -0
  64. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Entypo.31b5ffea3daddc69dd01a1f3d6cf63c5.ttf +0 -0
  65. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/EvilIcons.140c53a7643ea949007aa9a282153849.ttf +0 -0
  66. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Feather.ca4b48e04dc1ce10bfbddb262c8b835f.ttf +0 -0
  67. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome.b06871f281fee6b241d60582ae9369b9.ttf +0 -0
  68. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Brands.3b89dd103490708d19a95adcae52210e.ttf +0 -0
  69. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Regular.1f77739ca9ff2188b539c36f30ffa2be.ttf +0 -0
  70. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Solid.605ed7926cf39a2ad5ec2d1f9d391d3d.ttf +0 -0
  71. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Brands.56c8d80832e37783f12c05db7c8849e2.ttf +0 -0
  72. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Regular.370dd5af19f8364907b6e2c41f45dbbf.ttf +0 -0
  73. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Solid.adec7d6f310bc577f05e8fe06a5daccf.ttf +0 -0
  74. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Fontisto.b49ae8ab2dbccb02c4d11caaacf09eab.ttf +0 -0
  75. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Foundation.e20945d7c929279ef7a6f1db184a4470.ttf +0 -0
  76. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.b4eb097d35f44ed943676fd56f6bdc51.ttf +0 -0
  77. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.6e435534bd35da5fef04168860a9b8fa.ttf +0 -0
  78. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialIcons.4e85bc9ebe07e0340c9c4fc2f6c38908.ttf +0 -0
  79. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Octicons.871378c6eab492a3e689a9385dc45a12.ttf +0 -0
  80. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/SimpleLineIcons.d2285965fe34b05465047401b8595dd0.ttf +0 -0
  81. package/studio/app/dist/assets/__node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Zocial.1681f34aaca71b8dfb70756bca331eb2.ttf +0 -0
  82. package/studio/app/dist/assets/__node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png +0 -0
  83. package/studio/app/dist/assets/__node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png +0 -0
  84. package/studio/app/dist/assets/__node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png +0 -0
  85. package/studio/app/dist/assets/__node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png +0 -0
  86. package/studio/app/dist/assets/__node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png +0 -0
  87. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png +0 -0
  88. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png +0 -0
  89. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png +0 -0
  90. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png +0 -0
  91. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png +0 -0
  92. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png +0 -0
  93. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png +0 -0
  94. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png +0 -0
  95. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png +0 -0
  96. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png +0 -0
  97. package/studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png +0 -0
  98. package/studio/app/dist/assets/__node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png +0 -0
  99. package/studio/app/dist/assets/__node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png +0 -0
  100. package/studio/app/dist/index.html +37 -0
  101. package/studio/app/dist/metadata.json +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,107 @@
1
+ # Changelog
2
+
3
+ ## 1.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 909f5aa: Add isomorphic React Web support directly via the `@flipova/foundation/web` entry point without requiring native dependencies. Added GitHub Packages dual-publishing support.
8
+
9
+ ## 1.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 9771d1d: Add multi-platform Docker support (linux/amd64, linux/arm64) to release workflow
14
+
15
+ ## 1.6.0
16
+
17
+ ### Minor Changes
18
+
19
+ - 3b33f1c: Unified release workflow in release.yml with clear steps for npm, Docker, archive, and CLI releases. Removed publish.yml
20
+
21
+ ## 1.5.0
22
+
23
+ ### Minor Changes
24
+
25
+ - 30fce61: Reorganize GitHub workflows with structured pipeline, concurrency handling, and workflow_run triggers. Remove duplicate npm publish from publish workflow (handled by release workflow)
26
+
27
+ ## 1.4.1
28
+
29
+ ### Patch Changes
30
+
31
+ - 8ae1798: Create new branch for multi-format releases
32
+
33
+ Design Docker image build workflow
34
+
35
+ Design additional release formats (e.g., standalone binaries, archives)
36
+
37
+ Create GitHub workflow for Docker releases
38
+
39
+ Create GitHub workflow for other release formats
40
+
41
+ Update documentation for new release formats
42
+
43
+ Add changeset for multi-format releases
44
+
45
+ ## 1.4.0
46
+
47
+ ### Minor Changes
48
+
49
+ - 751d13e: Added Dockerfile
50
+
51
+ ## 1.3.2
52
+
53
+ ### Patch Changes
54
+
55
+ - 0e0f75f: Restyling of documentation interface
56
+
57
+ ## 1.3.1
58
+
59
+ ### Patch Changes
60
+
61
+ - c1377f2: documentation updates
62
+
63
+ ## 1.3.0
64
+
65
+ ### Minor Changes
66
+
67
+ - 8922e28: Add comprehensive documentation including Getting Started, Theming, Components, Layouts, Design Tokens, and Studio guides. Complete user documentation with examples, best practices, and API references.
68
+
69
+ ## 1.2.0
70
+
71
+ ### Minor Changes
72
+
73
+ - 6fb7929: Fix TypeScript errors in TriggerBlock.tsx and LogicPanel.items.test.tsx. Improve CONTRIBUTING.md with comprehensive Git workflow and version management documentation.
74
+
75
+ ## 1.1.0
76
+
77
+ ### Minor Changes
78
+
79
+ - 9599f87: Add Flipova Studio — visual app builder integrated into foundation.
80
+
81
+ - Studio server (Express + WebSocket) with REST API for project, pages, registry, and code generation
82
+ - Document tree engine with immutable operations (create, insert, remove, move, update)
83
+ - Code generator that produces clean React Native .tsx files importing from @flipova/foundation
84
+ - Project generator that scaffolds screens, navigation, theme config, services, and App.tsx
85
+ - Web UI with device frame preview, drag & drop from registry, props panel, layers panel, and Expo Snack integration
86
+ - CLI: `npx flipova-studio` to start, `npx flipova-studio generate` for headless codegen
87
+ - Component registry with 10 base components (Button, TextInput, TextArea, Checkbox, Switch, Badge, Avatar, IconButton, Chip, Spinner)
88
+ - Block registry with 7 functional blocks (AuthFormBlock, AvatarBlock, HeaderBlock, SearchBarBlock, StatCardBlock, EmptyStateBlock, ListItemBlock)
89
+ - Foundation config system with defineConfig(), FoundationProvider, and token/theme overrides
90
+
91
+ ## 1.0.0 (2025-04-03)
92
+
93
+ ### Features
94
+
95
+ - Design tokens: spacing, breakpoints, radii, shadows, colors, typography, motion, opacity, z-index
96
+ - Theme system: 9 built-in themes (light, dark, neon, spring, summer, autumn, winter, halloween, christmas)
97
+ - `createTheme()` helper for custom themes
98
+ - `FoundationProvider` with `defineConfig()` for project-level token and theme overrides
99
+ - Layout primitives: Box, Stack, Inline, Center, Scroll, Divider
100
+ - 23 layout components with centralized registry (props, defaults, variants, constants, theme mapping)
101
+ - Base UI components: Button, TextInput (with variant and size support)
102
+ - Functional blocks: AuthFormBlock, HeaderBlock
103
+ - Component and block registries for UI builder integration
104
+ - `useBreakpoint()` hook with derived helpers (isMobile, isTablet, isDesktop)
105
+ - `useAdaptiveValue()` hook for responsive prop selection
106
+ - `usePlatformInfo()` hook for platform detection
107
+ - Utility functions: resolveLayoutPadding, resolveBackground
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Flipova
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,268 @@
1
+ # @flipova/foundation
2
+
3
+ Design tokens, theming, layout primitives, and UI components for **React Native** (iOS, Android) and **React web** apps — from a single shared codebase.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @flipova/foundation
9
+ ```
10
+
11
+ One install — no extra deps needed. Works out of the box for **React web** projects.
12
+
13
+ For **React Native / Expo** projects, install the optional native peer dependencies you use:
14
+
15
+ ```bash
16
+ npx expo install expo-linear-gradient expo-haptics react-native-gesture-handler react-native-reanimated react-native-safe-area-context lucide-react-native
17
+ ```
18
+
19
+ ### Other Installation Methods
20
+
21
+ FlipovaFoundation is available in multiple formats for different use cases:
22
+
23
+ - **npm (public)**: `npm install @flipova/foundation` ← default
24
+ - **GitHub Packages**: `npm install @flipova/foundation --registry https://npm.pkg.github.com`
25
+ - **Docker Image**: `docker pull ghcr.io/flipova/foundation:latest` or `docker pull flipova/foundation:latest`
26
+ - **Standalone CLI Binary**: Download from GitHub Releases for Linux, macOS, or Windows
27
+ - **Archive**: Download tar.gz archive from GitHub Releases for offline installation
28
+
29
+ ## Quick start
30
+
31
+ ### React Native / Expo
32
+
33
+ ```tsx
34
+ import { FoundationProvider, defineConfig } from "@flipova/foundation/config";
35
+
36
+ const config = defineConfig({
37
+ defaultTheme: "light",
38
+ });
39
+
40
+ export default function App() {
41
+ return (
42
+ <FoundationProvider config={config}>
43
+ <MyApp />
44
+ </FoundationProvider>
45
+ );
46
+ }
47
+ ```
48
+
49
+ ### React Web
50
+
51
+ ```tsx
52
+ import { ThemeProvider } from "@flipova/foundation/theme";
53
+ import { DashboardLayout, Button, TextInput } from "@flipova/foundation/web";
54
+
55
+ export default function App() {
56
+ return (
57
+ <ThemeProvider defaultTheme="light">
58
+ <DashboardLayout
59
+ header={<nav>My App</nav>}
60
+ sidebar={<aside>Navigation</aside>}
61
+ >
62
+ <Button label="Get started" variant="primary" />
63
+ <TextInput label="Email" placeholder="you@example.com" />
64
+ </DashboardLayout>
65
+ </ThemeProvider>
66
+ );
67
+ }
68
+ ```
69
+
70
+ ## Architecture
71
+
72
+ ```
73
+ foundation/
74
+ ├── tokens/ Static design tokens (spacing, colors, radii, shadows, typography, motion)
75
+ ├── theme/ Theme system (ColorScheme, ThemeProvider, 9 built-in themes)
76
+ ├── config/ Configuration (defineConfig, FoundationProvider, token overrides)
77
+ ├── web/ ← NEW: React web components (no React Native dependency)
78
+ │ ├── primitives/ Box, Stack, Inline, Center, Scroll, Divider
79
+ │ ├── components/ Button, TextInput, Badge, Avatar, Icon, Select, Tabs…
80
+ │ └── layouts/ RootLayout, DashboardLayout, AuthLayout, SidebarLayout…
81
+ └── layout/
82
+ ├── types/ Shared types (LayoutMeta, ComponentMeta, BlockMeta)
83
+ ├── registry/ Declarative registries (layouts, components, blocks) — platform-agnostic
84
+ ├── hooks/ useBreakpoint, useAdaptiveValue, usePlatformInfo, useSafeArea
85
+ ├── utils/ resolveLayoutPadding, resolveBackground, responsive
86
+ └── ui/
87
+ ├── primitives/ Box, Stack, Inline, Center, Scroll, Divider (React Native)
88
+ ├── [layouts] 23 layout components (React Native)
89
+ ├── components/ Button, TextInput… (React Native)
90
+ └── blocks/ AuthFormBlock, HeaderBlock (React Native)
91
+
92
+ studio/
93
+ ├── cli/ CLI entry point (npx flipova-studio)
94
+ ├── server/ Express + WebSocket server with REST API
95
+ └── engine/
96
+ ├── tree/ Document tree (types + immutable operations)
97
+ └── codegen/ Code generation (page → .tsx, project → full app)
98
+ ```
99
+
100
+ ## Modules
101
+
102
+ | Import path | Content | Platform |
103
+ |---|---|---|
104
+ | `@flipova/foundation` | Everything (RN) | React Native |
105
+ | `@flipova/foundation/web` | Web primitives, components & layouts | React Web |
106
+ | `@flipova/foundation/tokens` | Design tokens only | Both |
107
+ | `@flipova/foundation/theme` | Theme system only | Both |
108
+ | `@flipova/foundation/layout` | Layouts, components, blocks, hooks, registry | React Native |
109
+ | `@flipova/foundation/config` | defineConfig, FoundationProvider | Both |
110
+ | `@flipova/foundation/studio` | Studio engine (tree, codegen, server) | Node.js |
111
+
112
+ ## Studio (visual builder)
113
+
114
+ ```bash
115
+ npx flipova-studio
116
+ ```
117
+
118
+ Starts the builder at http://localhost:4200. This single command auto-builds the web UI if needed, starts the server, and serves the React app.
119
+
120
+ | Command | Description |
121
+ |---------|-------------|
122
+ | `npx flipova-studio` | Start the builder |
123
+ | `npx flipova-studio --port 3000` | Custom port |
124
+ | `npx flipova-studio --dev` | Dev mode with Vite HMR |
125
+ | `npx flipova-studio generate` | Generate React Native code |
126
+
127
+ See [studio/README.md](studio/README.md) for the full API documentation.
128
+
129
+ ## Docker
130
+
131
+ You can run Flipova Studio using Docker for an isolated environment with automatic builds and persistence.
132
+
133
+ ### Using Docker Compose (Recommended)
134
+
135
+ ```bash
136
+ docker-compose up -d
137
+ ```
138
+
139
+ This will:
140
+ - Build the Docker image with Foundation and Studio
141
+ - Start the Studio server on port 4200
142
+ - Persist project data in a Docker volume
143
+ - Mount generated code to a volume for easy access
144
+
145
+ Access the Studio at http://localhost:4200
146
+
147
+ ### Using Docker directly
148
+
149
+ ```bash
150
+ # Build the image
151
+ docker build -t flipova-studio .
152
+
153
+ # Run the container
154
+ docker run -d \
155
+ -p 4200:4200 \
156
+ -v studio-data:/app/.flipova-studio \
157
+ -v generated-code:/app/generated \
158
+ --name flipova-studio \
159
+ flipova-studio
160
+ ```
161
+
162
+ ### Using Pre-built Docker Images
163
+
164
+ Pre-built Docker images are available from GitHub Container Registry and Docker Hub:
165
+
166
+ ```bash
167
+ # From GitHub Container Registry
168
+ docker pull ghcr.io/flipova/foundation:latest
169
+
170
+ # From Docker Hub
171
+ docker pull flipova/foundation:latest
172
+
173
+ # Run with pre-built image
174
+ docker run -d \
175
+ -p 4200:4200 \
176
+ -v studio-data:/app/.flipova-studio \
177
+ -v generated-code:/app/generated \
178
+ --name flipova-studio \
179
+ ghcr.io/flipova/foundation:latest
180
+ ```
181
+
182
+ ### Docker Volumes
183
+
184
+ - `studio-data`: Persists your Studio project data (layouts, pages, components)
185
+ - `generated-code`: Contains the generated React Native code
186
+
187
+ ### Accessing Generated Code
188
+
189
+ The generated code is available in the `generated-code` volume. To access it:
190
+
191
+ ```bash
192
+ # Copy generated code to host
193
+ docker cp flipova-studio:/app/generated ./generated
194
+ ```
195
+
196
+ Or mount the volume directly to a host directory by modifying docker-compose.yml:
197
+
198
+ ```yaml
199
+ volumes:
200
+ - ./generated:/app/generated
201
+ ```
202
+
203
+ ## Release Formats
204
+
205
+ Flipova Foundation is distributed in multiple formats for different use cases:
206
+
207
+ ### npm Package
208
+
209
+ For use in React Native projects via npm:
210
+
211
+ ```bash
212
+ npm install @flipova/foundation
213
+ ```
214
+
215
+ Published to: https://npm.pkg.github.com/@flipova/foundation
216
+
217
+ ### Docker Image
218
+
219
+ For containerized deployment of Flipova Studio:
220
+
221
+ ```bash
222
+ docker pull ghcr.io/flipova/foundation:latest
223
+ # or
224
+ docker pull flipova/foundation:latest
225
+ ```
226
+
227
+ Published to:
228
+ - GitHub Container Registry: https://github.com/flipova/foundation/pkgs/container/foundation
229
+ - Docker Hub: https://hub.docker.com/r/flipova/foundation
230
+
231
+ ### Standalone CLI Binary
232
+
233
+ For running Flipova Studio without npm:
234
+
235
+ Download from GitHub Releases:
236
+ - Linux: `flipova-studio-linux-x64`
237
+ - macOS: `flipova-studio-macos-x64`
238
+ - Windows: `flipova-studio-windows-x64.exe`
239
+
240
+ ```bash
241
+ # Make executable (Linux/macOS)
242
+ chmod +x flipova-studio-linux-x64
243
+
244
+ # Run
245
+ ./flipova-studio-linux-x64
246
+ ```
247
+
248
+ ### Archive
249
+
250
+ For offline installation or custom deployment:
251
+
252
+ Download `flipova-foundation-VERSION.tar.gz` from GitHub Releases.
253
+
254
+ ```bash
255
+ # Extract
256
+ tar -xzf flipova-foundation-VERSION.tar.gz
257
+
258
+ # The archive contains:
259
+ # - dist/ (built foundation library)
260
+ # - studio/app/dist/ (built studio web UI)
261
+ # - studio/server/ (Express server)
262
+ # - studio/engine/ (tree operations and codegen)
263
+ # - studio/cli/ (CLI entry point)
264
+ ```
265
+
266
+ ## License
267
+
268
+ MIT
@@ -0,0 +1,128 @@
1
+ import { C as ColorScheme, T as ThemeGradients } from '../index-D4qJw_Et.mjs';
2
+ import React from 'react';
3
+
4
+ /**
5
+ * Foundation configuration types.
6
+ *
7
+ * Used by flipova.config.ts to override tokens, themes, and behavior.
8
+ */
9
+
10
+ interface TokenOverrides {
11
+ spacing?: Record<number, number>;
12
+ breakpoints?: Record<string, number>;
13
+ radii?: Record<string, number>;
14
+ fontSizes?: Record<string, number>;
15
+ fontWeights?: Record<string, string>;
16
+ lineHeights?: Record<string, number>;
17
+ colors?: Record<string, string | Record<string, string>>;
18
+ shadows?: Record<string, {
19
+ shadowColor: string;
20
+ shadowOffset: {
21
+ width: number;
22
+ height: number;
23
+ };
24
+ shadowOpacity: number;
25
+ shadowRadius: number;
26
+ elevation: number;
27
+ }>;
28
+ durations?: Record<string, number>;
29
+ opacity?: Record<number, number>;
30
+ zIndices?: Record<string, number>;
31
+ }
32
+ interface ThemeDefinition {
33
+ colors: Partial<Omit<ColorScheme, "gradients">>;
34
+ gradients?: Partial<ThemeGradients>;
35
+ }
36
+ interface FoundationConfig {
37
+ tokens?: TokenOverrides;
38
+ themes?: Record<string, ThemeDefinition>;
39
+ defaultTheme?: string;
40
+ }
41
+
42
+ /**
43
+ * defineConfig — User-facing config helper.
44
+ *
45
+ * Usage in flipova.config.ts:
46
+ *
47
+ * ```ts
48
+ * import { defineConfig } from "@flipova/foundation/config";
49
+ *
50
+ * export default defineConfig({
51
+ * tokens: {
52
+ * spacing: { 0: 0, 1: 2, 2: 4, 3: 8, 4: 12, 5: 16, 6: 20, 8: 32 },
53
+ * radii: { none: 0, sm: 2, md: 4, lg: 8, xl: 12, full: 9999 },
54
+ * breakpoints: { xs: 0, sm: 480, md: 768, lg: 1024, xl: 1280 },
55
+ * },
56
+ * themes: {
57
+ * brand: {
58
+ * colors: {
59
+ * primary: "#FF6B00",
60
+ * primaryForeground: "#FFFFFF",
61
+ * background: "#FAFAFA",
62
+ * },
63
+ * },
64
+ * },
65
+ * defaultTheme: "brand",
66
+ * });
67
+ * ```
68
+ */
69
+
70
+ declare function defineConfig(config: FoundationConfig): FoundationConfig;
71
+
72
+ /**
73
+ * Config resolver.
74
+ *
75
+ * Merges user overrides with built-in token defaults.
76
+ * Called once at app startup, not per-render.
77
+ */
78
+
79
+ interface ResolvedTokens {
80
+ spacing: Record<number, number>;
81
+ breakpoints: Record<string, number>;
82
+ radii: Record<string, number>;
83
+ shadows: Record<string, unknown>;
84
+ colors: Record<string, unknown>;
85
+ fontSizes: Record<string, number>;
86
+ fontWeights: Record<string, string>;
87
+ lineHeights: Record<string, number>;
88
+ durations: Record<string, number>;
89
+ opacity: Record<number, number>;
90
+ zIndices: Record<string, number>;
91
+ }
92
+ interface ResolvedConfig {
93
+ tokens: ResolvedTokens;
94
+ themes: Record<string, ColorScheme>;
95
+ defaultTheme: string;
96
+ }
97
+ declare function resolveConfig(userConfig?: FoundationConfig): ResolvedConfig;
98
+
99
+ /**
100
+ * FoundationProvider
101
+ *
102
+ * Wraps the app with resolved config (tokens + themes).
103
+ * Replaces the standalone ThemeProvider — this is the single entry point.
104
+ *
105
+ * Usage:
106
+ * ```tsx
107
+ * import { FoundationProvider } from "@flipova/foundation/config";
108
+ * import config from "./flipova.config";
109
+ *
110
+ * export default function App() {
111
+ * return (
112
+ * <FoundationProvider config={config}>
113
+ * <MyApp />
114
+ * </FoundationProvider>
115
+ * );
116
+ * }
117
+ * ```
118
+ */
119
+
120
+ declare function useFoundationConfig(): ResolvedConfig;
121
+ declare function useTokens(): ResolvedConfig["tokens"];
122
+ interface FoundationProviderProps {
123
+ children?: React.ReactNode;
124
+ config?: FoundationConfig;
125
+ }
126
+ declare const FoundationProvider: React.FC<FoundationProviderProps>;
127
+
128
+ export { type FoundationConfig, FoundationProvider, type ResolvedConfig, type ResolvedTokens, type ThemeDefinition, type TokenOverrides, defineConfig, resolveConfig, useFoundationConfig, useTokens };
@@ -0,0 +1,128 @@
1
+ import { C as ColorScheme, T as ThemeGradients } from '../index-D4qJw_Et.js';
2
+ import React from 'react';
3
+
4
+ /**
5
+ * Foundation configuration types.
6
+ *
7
+ * Used by flipova.config.ts to override tokens, themes, and behavior.
8
+ */
9
+
10
+ interface TokenOverrides {
11
+ spacing?: Record<number, number>;
12
+ breakpoints?: Record<string, number>;
13
+ radii?: Record<string, number>;
14
+ fontSizes?: Record<string, number>;
15
+ fontWeights?: Record<string, string>;
16
+ lineHeights?: Record<string, number>;
17
+ colors?: Record<string, string | Record<string, string>>;
18
+ shadows?: Record<string, {
19
+ shadowColor: string;
20
+ shadowOffset: {
21
+ width: number;
22
+ height: number;
23
+ };
24
+ shadowOpacity: number;
25
+ shadowRadius: number;
26
+ elevation: number;
27
+ }>;
28
+ durations?: Record<string, number>;
29
+ opacity?: Record<number, number>;
30
+ zIndices?: Record<string, number>;
31
+ }
32
+ interface ThemeDefinition {
33
+ colors: Partial<Omit<ColorScheme, "gradients">>;
34
+ gradients?: Partial<ThemeGradients>;
35
+ }
36
+ interface FoundationConfig {
37
+ tokens?: TokenOverrides;
38
+ themes?: Record<string, ThemeDefinition>;
39
+ defaultTheme?: string;
40
+ }
41
+
42
+ /**
43
+ * defineConfig — User-facing config helper.
44
+ *
45
+ * Usage in flipova.config.ts:
46
+ *
47
+ * ```ts
48
+ * import { defineConfig } from "@flipova/foundation/config";
49
+ *
50
+ * export default defineConfig({
51
+ * tokens: {
52
+ * spacing: { 0: 0, 1: 2, 2: 4, 3: 8, 4: 12, 5: 16, 6: 20, 8: 32 },
53
+ * radii: { none: 0, sm: 2, md: 4, lg: 8, xl: 12, full: 9999 },
54
+ * breakpoints: { xs: 0, sm: 480, md: 768, lg: 1024, xl: 1280 },
55
+ * },
56
+ * themes: {
57
+ * brand: {
58
+ * colors: {
59
+ * primary: "#FF6B00",
60
+ * primaryForeground: "#FFFFFF",
61
+ * background: "#FAFAFA",
62
+ * },
63
+ * },
64
+ * },
65
+ * defaultTheme: "brand",
66
+ * });
67
+ * ```
68
+ */
69
+
70
+ declare function defineConfig(config: FoundationConfig): FoundationConfig;
71
+
72
+ /**
73
+ * Config resolver.
74
+ *
75
+ * Merges user overrides with built-in token defaults.
76
+ * Called once at app startup, not per-render.
77
+ */
78
+
79
+ interface ResolvedTokens {
80
+ spacing: Record<number, number>;
81
+ breakpoints: Record<string, number>;
82
+ radii: Record<string, number>;
83
+ shadows: Record<string, unknown>;
84
+ colors: Record<string, unknown>;
85
+ fontSizes: Record<string, number>;
86
+ fontWeights: Record<string, string>;
87
+ lineHeights: Record<string, number>;
88
+ durations: Record<string, number>;
89
+ opacity: Record<number, number>;
90
+ zIndices: Record<string, number>;
91
+ }
92
+ interface ResolvedConfig {
93
+ tokens: ResolvedTokens;
94
+ themes: Record<string, ColorScheme>;
95
+ defaultTheme: string;
96
+ }
97
+ declare function resolveConfig(userConfig?: FoundationConfig): ResolvedConfig;
98
+
99
+ /**
100
+ * FoundationProvider
101
+ *
102
+ * Wraps the app with resolved config (tokens + themes).
103
+ * Replaces the standalone ThemeProvider — this is the single entry point.
104
+ *
105
+ * Usage:
106
+ * ```tsx
107
+ * import { FoundationProvider } from "@flipova/foundation/config";
108
+ * import config from "./flipova.config";
109
+ *
110
+ * export default function App() {
111
+ * return (
112
+ * <FoundationProvider config={config}>
113
+ * <MyApp />
114
+ * </FoundationProvider>
115
+ * );
116
+ * }
117
+ * ```
118
+ */
119
+
120
+ declare function useFoundationConfig(): ResolvedConfig;
121
+ declare function useTokens(): ResolvedConfig["tokens"];
122
+ interface FoundationProviderProps {
123
+ children?: React.ReactNode;
124
+ config?: FoundationConfig;
125
+ }
126
+ declare const FoundationProvider: React.FC<FoundationProviderProps>;
127
+
128
+ export { type FoundationConfig, FoundationProvider, type ResolvedConfig, type ResolvedTokens, type ThemeDefinition, type TokenOverrides, defineConfig, resolveConfig, useFoundationConfig, useTokens };