app-studio 0.7.6 → 0.7.8
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/app-studio.cjs.development.js +45 -10
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +1 -1
- package/dist/app-studio.esm.js +45 -10
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +45 -10
- package/dist/app-studio.umd.development.js.map +1 -1
- package/dist/app-studio.umd.production.min.js +1 -1
- package/dist/hooks/useScroll.d.ts +11 -0
- package/dist/stories/ScrollAnimation.stories.d.ts +2 -17
- package/docs/Animation.md +12 -15
- package/docs/Design.md +5 -7
- package/package.json +1 -1
package/docs/Animation.md
CHANGED
|
@@ -306,11 +306,10 @@ import { View, Animation } from 'app-studio';
|
|
|
306
306
|
For full theme integration, use CSS variables from the theming system. This ensures colors adapt to light/dark mode:
|
|
307
307
|
|
|
308
308
|
```jsx
|
|
309
|
-
import { View, Text } from 'app-studio';
|
|
310
|
-
import { Animation } from 'app-studio';
|
|
309
|
+
import { View, Text, Animation } from 'app-studio';
|
|
311
310
|
|
|
312
311
|
function ThemedFillText({ children, color = 'blue' }) {
|
|
313
|
-
// Map palette names to
|
|
312
|
+
// Map palette names to theme variables
|
|
314
313
|
const colors = {
|
|
315
314
|
blue: {
|
|
316
315
|
fill: 'var(--color-blue-500)',
|
|
@@ -341,16 +340,16 @@ function ThemedFillText({ children, color = 'blue' }) {
|
|
|
341
340
|
fontWeight="bold"
|
|
342
341
|
css={`
|
|
343
342
|
color: ${base};
|
|
344
|
-
|
|
345
|
-
--
|
|
346
|
-
|
|
343
|
+
/* Required by fillTextScroll animation */
|
|
344
|
+
--finish-fill: ${fill};
|
|
345
|
+
|
|
347
346
|
--underline-block-width: 200vmax;
|
|
348
347
|
--underline-width: 100%;
|
|
349
348
|
`}
|
|
350
349
|
backgroundImage={`
|
|
351
|
-
linear-gradient(90deg, transparent calc(100% - 1ch),
|
|
352
|
-
linear-gradient(90deg,
|
|
353
|
-
linear-gradient(90deg,
|
|
350
|
+
linear-gradient(90deg, transparent calc(100% - 1ch), ${accent} calc(100% - 1ch)),
|
|
351
|
+
linear-gradient(90deg, ${fill}, ${fill}),
|
|
352
|
+
linear-gradient(90deg, ${underline}, ${underline})`}
|
|
354
353
|
backgroundSize={`
|
|
355
354
|
var(--underline-block-width) var(--underline-width),
|
|
356
355
|
var(--underline-block-width) var(--underline-width),
|
|
@@ -438,16 +437,14 @@ function FillTextSection() {
|
|
|
438
437
|
fontWeight="bold"
|
|
439
438
|
css={`
|
|
440
439
|
color: color-mix(in srgb, var(--color-blue-500) 15%, transparent);
|
|
441
|
-
--fill
|
|
442
|
-
--accent: var(--color-blue-400);
|
|
443
|
-
--underline-color: color-mix(in srgb, var(--color-blue-500) 20%, transparent);
|
|
440
|
+
--finish-fill: var(--color-blue-500);
|
|
444
441
|
--underline-block-width: 200vmax;
|
|
445
442
|
--underline-width: 100%;
|
|
446
443
|
`}
|
|
447
444
|
backgroundImage={`
|
|
448
|
-
linear-gradient(90deg, transparent calc(100% - 1ch), var(--
|
|
449
|
-
linear-gradient(90deg, var(--
|
|
450
|
-
linear-gradient(90deg, var(--
|
|
445
|
+
linear-gradient(90deg, transparent calc(100% - 1ch), var(--color-blue-400) calc(100% - 1ch)),
|
|
446
|
+
linear-gradient(90deg, var(--color-blue-500), var(--color-blue-500)),
|
|
447
|
+
linear-gradient(90deg, color-mix(in srgb, var(--color-blue-500) 20%, transparent), color-mix(in srgb, var(--color-blue-500) 20%, transparent))`}
|
|
451
448
|
backgroundSize={`
|
|
452
449
|
var(--underline-block-width) var(--underline-width),
|
|
453
450
|
var(--underline-block-width) var(--underline-width),
|
package/docs/Design.md
CHANGED
|
@@ -39,15 +39,13 @@ App-Studio supports CSS custom properties (CSS variables) that start with `--`.
|
|
|
39
39
|
```jsx
|
|
40
40
|
<View
|
|
41
41
|
style={{
|
|
42
|
-
'--
|
|
43
|
-
'--primary-bg': 'lightblue',
|
|
44
|
-
'--spacing': '15px',
|
|
42
|
+
'--local-spacing': '20px',
|
|
45
43
|
}}
|
|
46
|
-
backgroundColor="var(--
|
|
47
|
-
color="var(--
|
|
48
|
-
padding="var(--spacing)"
|
|
44
|
+
backgroundColor="var(--color-blue-500)"
|
|
45
|
+
color="var(--color-white)"
|
|
46
|
+
padding="var(--local-spacing)"
|
|
49
47
|
>
|
|
50
|
-
This component uses CSS variables
|
|
48
|
+
This component uses existing Theme CSS variables
|
|
51
49
|
</View>
|
|
52
50
|
```
|
|
53
51
|
|
package/package.json
CHANGED