app-studio 0.1.44 → 0.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.
package/README.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # App Studio
3
2
 
4
3
  [![npm version](https://img.shields.io/npm/v/app-studio.svg?style=for-the-badge)](https://www.npmjs.com/package/app-studio)
@@ -25,11 +24,11 @@
25
24
  [issues-helper-url]: https://github.com/actions-cool/issues-helper
26
25
 
27
26
 
27
+
28
28
  `App-studio` provides CSS design props for layout, spacing, sizing, shadows with the 'shadow' prop, event management through the `on` prop, and theming. Components include `Element` for fundamental design, `View` based on the `div`, `Text` for text styles, `Form` for form-related designs, and `Image` based on the `img` tag.
29
29
 
30
30
  Supported events: `hover`, `active`, `focus`, and `disabled`.
31
31
 
32
-
33
32
  ## ✨ Features
34
33
 
35
34
  - 🌈 Add styled props to your application.
@@ -40,55 +39,55 @@ Supported events: `hover`, `active`, `focus`, and `disabled`.
40
39
  ## 📦 Install
41
40
 
42
41
  ```bash
43
- npm install app-studio styled-components --save
42
+ npm install app-studio --save
44
43
  ```
45
44
 
46
45
  ## 🔨 Usage
47
46
 
48
- The `<View>` component supports all of the default [CSSProperties](https://developer.mozilla.org/fr/docs/Web/CSS/CSS_Properties_Reference) as props. The styles transformed and handled by [Styled Components](https://styled-components.com/).
47
+ The `<View>` component supports all of the default [CSSProperties](https://developer.mozilla.org/fr/docs/Web/CSS/CSS_Properties_Reference) as props. The styles are transformed.
49
48
 
50
-
51
- 1. Add Responsive and Theme Provider to your application root :
49
+ 1. Add Responsive and Theme Provider to your application root:
52
50
 
53
51
  ```jsx
54
52
  import React from 'react';
55
53
  import { ResponsiveProvider, ThemeProvider } from 'app-studio';
56
54
 
57
55
  const Root = () => {
58
- return (<ResponsiveProvider>
59
- <ThemeProvider>
60
- <App />
61
- </ThemeProvider>
62
- </ResponsiveProvider>);
56
+ return (
57
+ <ResponsiveProvider>
58
+ <ThemeProvider>
59
+ <App />
60
+ </ThemeProvider>
61
+ </ResponsiveProvider>
62
+ );
63
63
  };
64
-
65
64
  ```
66
65
 
66
+ 2. Use components in your application:
67
67
 
68
68
  ```jsx
69
69
  import React from 'react';
70
70
  import { View } from 'app-studio';
71
71
 
72
72
  function Example() {
73
- return (
74
- <View
75
- backgroundColor="color.grey"
76
- padding={20}
77
- on={{ hover: { backgroundColor: 'color.blue.100' } }}
78
- >
79
- Hello
80
- </View>
81
- );
73
+ return (
74
+ <View
75
+ backgroundColor="color.grey"
76
+ padding={20}
77
+ on={{ hover: { backgroundColor: 'color.blue.100' } }}
78
+ >
79
+ Hello
80
+ </View>
81
+ );
82
82
  }
83
83
  ```
84
84
 
85
+ You can use View for a `<div>` tag. You can also use Div, Span, Form, Input, and Image components if you need another tag.
85
86
 
86
- You can Use View is use <div> tag you can use Div, Span, Form, Input, Image components if you need another tag.
87
-
88
- ## Advanced Example
87
+ ## Advanced Example
89
88
 
90
- ```javascript
91
- import { ThemeProvider, ResponsiveProvider, View, Span, Text } from 'app-studio';
89
+ ```jsx
90
+ import { ThemeProvider, ResponsiveProvider, View, Span, Text, Button } from 'app-studio';
92
91
 
93
92
  const theme = {
94
93
  main: { primary: '#fff7ed' },
@@ -103,54 +102,57 @@ const colors = {
103
102
  function Example() {
104
103
  return (
105
104
  <ResponsiveProvider>
106
- <ThemeProvider theme={theme} colors={colors}>
107
- <Span
108
- backgroundColor="color.blue"
109
- padding={10}
110
- media={{
111
- mobile: {
112
- padding: 20
113
- }
114
- }}
115
- >
116
- Base element
117
- </Span>
118
- <View
119
- backgroundColor="theme.primary"
120
- margin={10}
121
- width={200}
122
- on={{ hover: { backgroundColor: 'color.blueGray.500' } }}
123
- >
124
- Hover to change color
125
- </View>
126
- <Button backgroundColor="theme.button.background">Click here </Button>
127
- <Text color="theme.primary">Hello</Text>
128
- </ThemeProvider>
105
+ <ThemeProvider theme={theme} colors={colors}>
106
+ <Span
107
+ backgroundColor="color.blue"
108
+ padding={10}
109
+ media={{
110
+ mobile: {
111
+ padding: 20
112
+ }
113
+ }}
114
+ >
115
+ Base element
116
+ </Span>
117
+ <View
118
+ backgroundColor="theme.primary"
119
+ margin={10}
120
+ width={200}
121
+ on={{ hover: { backgroundColor: 'color.blueGray.500' } }}
122
+ >
123
+ Hover to change color
124
+ </View>
125
+ <Button backgroundColor="theme.button.background">Click here</Button>
126
+ <Text color="theme.primary">Hello</Text>
127
+ </ThemeProvider>
129
128
  </ResponsiveProvider>
130
-
131
129
  );
132
130
  }
133
131
  ```
134
132
 
135
-
136
133
  ## Transform JavaScript/TypeScript JSX
137
134
 
138
- - Save the code from **Section 2** into a folder named `codemod` and within that, a file named `to-app-studio.js`.
139
- - Use `jscodeshift` to run the transformation:
135
+ To transform your existing JavaScript/TypeScript JSX code to use App-Studio:
136
+
137
+ 1. Install the codemod tool:
140
138
 
141
139
  ```bash
142
- npx @app-studio/codemod to-app-studio <path_to_your_js_or_tsx_files> --assetsDir=src/assets --assetsUrl=/assets
140
+ npm install -g @app-studio/codemod
143
141
  ```
144
142
 
145
- Replace `<path_to_your_js_or_tsx_files>` with the actual path to your JavaScript/TypeScript files.
143
+ 2. Run the transformation:
146
144
 
145
+ ```bash
146
+ app-studio-codemod to-app-studio <path_to_your_js_or_tsx_files> --assetsDir=src/assets --assetsUrl=/assets
147
+ ```
148
+
149
+ Replace `<path_to_your_js_or_tsx_files>` with the actual path to your JavaScript/TypeScript files.
147
150
 
148
151
  ## 🔗 Links
149
152
  - [Change Log](CHANGELOG.md)
150
153
  - [Versioning Release Note](https://github.com/rize-network/app-studio/wiki/)
151
154
  - [How to Apply for Being A Collaborator](https://github.com/rize-network/app-studio/wiki/Collaborators#how-to-apply-for-being-a-collaborator)
152
155
 
153
-
154
156
  ## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
155
157
 
156
158
  Read our [contributing guide](https://ant.design/docs/react/contributing) and let's build a better rize-network together.
@@ -161,8 +163,6 @@ If you are a collaborator, please follow our [Pull Request principle](https://gi
161
163
 
162
164
  [![Let's fund issues in this repository](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/o/rize-network)
163
165
 
164
-
165
-
166
166
  ## Roadmap
167
167
 
168
168
  - Integrate React Native
@@ -171,14 +171,11 @@ If you are a collaborator, please follow our [Pull Request principle](https://gi
171
171
 
172
172
  SteedMonteiro, steed@rize.network
173
173
 
174
-
175
174
  ## ❤️ Sponsors and Backers [![](https://opencollective.com/rize/tiers/sponsors/badge.svg?label=Sponsors&color=brightgreen)](https://opencollective.com/rize#support) [![](https://opencollective.com/rize/tiers/backers/badge.svg?label=Backers&color=brightgreen)](https://opencollective.com/rize#support)
176
175
 
177
176
  [![](https://opencollective.com/rize/tiers/sponsors.svg?avatarHeight=36)](https://opencollective.com/rize#support)
178
177
  [![](https://opencollective.com/rize/tiers/backers.svg?avatarHeight=36)](https://opencollective.com/rize#support)
179
178
 
180
-
181
-
182
179
  ## License
183
180
 
184
- App Studio is available under the MIT license. See the LICENSE file for more info.
181
+ App Studio is available under the MIT license. See the LICENSE file for more info.