amotify 0.3.32 → 0.3.34

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/UI_MAP.md CHANGED
@@ -17,7 +17,7 @@ import { Button, Input, Sheet, ... } from 'amotify'
17
17
 
18
18
  | 型 | 値 |
19
19
  |---|---|
20
- | `Themecolor` | `'comun' \| 'leaf' \| 'heart' \| 'droplet' \| 'brick' \| 'flower' \| 'lip' \| 'wine' \| 'theater' \| 'bat' \| 'poizon' \| 'ufo' \| 'moon' \| 'rain' \| 'gem' \| 'drizzle' \| 'lemon' \| 'pizza' \| 'coffee' \| 'galaxy' \| ...60+` |
20
+ | `$themecolor.Theme` | `'comun' \| 'leaf' \| 'heart' \| 'droplet' \| 'brick' \| 'flower' \| 'lip' \| 'wine' \| 'theater' \| 'bat' \| 'poizon' \| 'ufo' \| 'moon' \| 'rain' \| 'gem' \| 'drizzle' \| 'lemon' \| 'pizza' \| 'coffee' \| 'galaxy' \| ...60+` |
21
21
  | `Darkmode` | `'light' \| 'auto' \| 'dark' \| 'dim'` |
22
22
  | `Roundness` | `0 \| 1 \| 2 \| 3 \| 4 \| 5` |
23
23
  | `Device` | `'' \| 'windows' \| 'android' \| 'iPhone' \| 'iPad' \| 'macOSX'` |
@@ -41,7 +41,7 @@ import { Button, Input, Sheet, ... } from 'amotify'
41
41
 
42
42
  **単位 (Pargins.Unit):** `0 \| '1/12' \| '1/6' \| '1/4' \| '1/3' \| '1/2' \| '2/3' \| '3/4' \| 1 \| 1.5 \| 2 \| 2.5 \| 3 \| 4 \| 6 \| 'auto' \| number`
43
43
 
44
- **色 (UniColors):** `'inherit' \| 'theme' \| 'posi' \| 'nega' \| 'warn' \| 'white' \| 'black' \| 'dark' \| Themecolor`
44
+ **色 (UniColors):** `'inherit' \| 'theme' \| 'posi' \| 'nega' \| 'warn' \| 'white' \| 'black' \| 'dark' \| $themecolor.Theme`
45
45
 
46
46
  **レイヤー色:** `'layer.0' 〜 'layer.6'`
47
47
 
@@ -497,11 +497,13 @@ dragEffect.Start('itemType', { startEvent, dragElement }, ({ idx, end }) => {})
497
497
  dragEffect.AutoScroll(event)
498
498
  ```
499
499
 
500
- ### ThemeColors / ColorRecords
500
+ ### $themecolor
501
501
  ```ts
502
- ThemeColors.comun.hex // '#...'
503
- ThemeColors.heart.alfa(0.5) // 'rgba(..., 0.5)'
504
- ColorRecords // { name: Themecolor, hex: string, isBrand: boolean }[]
502
+ $themecolor.themes.comun.hex // '#...'
503
+ $themecolor.themes.heart.alfa(0.5) // 'hsla(..., 0.5)'
504
+ $themecolor.themes // { [key in $themecolor.Theme]: { hex: string, alfa(alfa?: number): string, isBrand?: boolean } }
505
+ $themecolor.setContentTag(hex?, id?) // <meta>タグの content を更新
506
+ type X = $themecolor.Theme // 色名のユニオン型 ('comun' | 'leaf' | ...)
505
507
  ```
506
508
 
507
509
  ### LaunchReactApp
@@ -6,11 +6,10 @@ import React,{
6
6
  } from 'react'
7
7
 
8
8
  import {
9
- Themecolor,
9
+ $themecolor,
10
10
  ReactElement,
11
11
  Config,
12
12
  LaunchReactApp,
13
- ThemeColors,
14
13
  Box,
15
14
  Span,
16
15
  Grid,
@@ -2586,7 +2585,7 @@ const Cropping = () => {
2586
2585
  }
2587
2586
 
2588
2587
  const UserConfig = () => {
2589
- let [ val_theme,set_theme ] = useState<Themecolor>( Config.get().themeColor )
2588
+ let [ val_theme,set_theme ] = useState<$themecolor.Theme>( Config.get().themeColor )
2590
2589
  useEffect( () => {
2591
2590
  $$.scope( () => {
2592
2591
  if ( val_theme === Config.get().themeColor ) return
@@ -2654,7 +2653,7 @@ const UserConfig = () => {
2654
2653
  <Row.Left>
2655
2654
  <Literal.Paragraph>Color</Literal.Paragraph>
2656
2655
  <Row.Left gap={ '1/6' }>
2657
- { Object.entries( ThemeColors ).map( ( [ key,themeColor ] ) => {
2656
+ { Object.entries( $themecolor.themes ).map( ( [ key,themeColor ] ) => {
2658
2657
  let isSelected = key === val_theme
2659
2658
 
2660
2659
  return <Button.Clear
@@ -2666,18 +2665,18 @@ const UserConfig = () => {
2666
2665
  isActive={ isSelected }
2667
2666
  isActiveStyles={ {
2668
2667
  boxShadow: '2.remark',
2669
- backgroundColor: key as Themecolor,
2668
+ backgroundColor: key as $themecolor.Theme,
2670
2669
  fontColor: 'white'
2671
2670
  } }
2672
2671
  onClick={ () => {
2673
- set_theme( key as Themecolor )
2672
+ set_theme( key as $themecolor.Theme )
2674
2673
  } }
2675
2674
  >
2676
2675
  <Column gap={ '1/2' } textAlign='center'>
2677
2676
  <Box
2678
2677
  position={ 'relative' }
2679
2678
  margin={ 'auto' }
2680
- backgroundColor={ key as Themecolor }
2679
+ backgroundColor={ key as $themecolor.Theme }
2681
2680
  ssSquare={ 2 }
2682
2681
  borderRadius={ '1.tone.primary' }
2683
2682
  >
@@ -12,7 +12,7 @@
12
12
  "cross-env": "^7.0.3",
13
13
  "dotenv": "^16.4.5",
14
14
  "express": "^4.19.2",
15
- "jmini": "^0.0.123",
15
+ "jmini": "^0.0.129",
16
16
  "next": "^16.2.1",
17
17
  "node-cron": "^4.1.1",
18
18
  "nodemon": "^3.1.4",
@@ -35,4 +35,4 @@
35
35
  "react-dom": "^19.2.3",
36
36
  "typescript": "^5"
37
37
  }
38
- }
38
+ }
@@ -4,14 +4,11 @@ export type Device = '' | 'windows' | 'android' | 'iPhone' | 'iPad' | 'macOSX' |
4
4
  export type Browser = '' | 'chrome' | 'firefox' | 'safari' | 'opera' | 'ie' | 'edge' | 'undefined';
5
5
  export type ReactElement = React.ReactNode | React.ReactNode[];
6
6
  export type Roundness = 0 | 1 | 2 | 3 | 4 | 5;
7
- /** @deprecated Use Darkmode instead of DarkMode */
8
- export type DarkMode = 'light' | 'auto' | 'dark' | 'dim';
9
7
  export type Darkmode = 'light' | 'auto' | 'dark' | 'dim';
10
- /** @deprecated Use Themecolor instead of ThemeColor */
11
- export type ThemeColor = 'comun' | 'leaf' | 'heart' | 'droplet' | 'brick' | 'flower' | 'lip' | 'wine' | 'theater' | 'bat' | 'poizon' | 'eggplant' | 'ufo' | 'alien' | 'tombstone' | 'ninja' | 'moon' | 'rain' | 'unicorn' | 'axe' | 'gem' | 'soap' | 'drizzle' | 'building' | 'fish' | 'icicles' | 'water' | 'tree1' | 'tree2' | 'tree3' | 'battery' | 'seedle' | 'greenTea' | 'oak' | 'salad' | 'cloudy' | 'lemon' | 'angel' | 'parasol' | 'pizza' | 'thunder' | 'latte' | 'island' | 'shovel' | 'coffee' | 'carrot' | 'cactus' | 'volcano' | 'choco' | 'industry' | 'gun' | 'galaxy' | 'line' | 'twitter' | 'amazon' | 'facebook' | 'android' | 'slackBlue' | 'slackGreen' | 'slackRed' | 'slackYellow' | 'slackBase' | 'googleBlue' | 'googleGreen' | 'googleYellow' | 'googleRed';
12
- export type Themecolor = 'comun' | 'leaf' | 'heart' | 'droplet' | 'brick' | 'flower' | 'lip' | 'wine' | 'theater' | 'bat' | 'poizon' | 'eggplant' | 'ufo' | 'alien' | 'tombstone' | 'ninja' | 'moon' | 'rain' | 'unicorn' | 'axe' | 'gem' | 'soap' | 'drizzle' | 'building' | 'fish' | 'icicles' | 'water' | 'tree1' | 'tree2' | 'tree3' | 'battery' | 'seedle' | 'greenTea' | 'oak' | 'salad' | 'cloudy' | 'lemon' | 'angel' | 'parasol' | 'pizza' | 'thunder' | 'latte' | 'island' | 'shovel' | 'coffee' | 'carrot' | 'cactus' | 'volcano' | 'choco' | 'industry' | 'gun' | 'galaxy' | 'line' | 'twitter' | 'amazon' | 'facebook' | 'android' | 'slackBlue' | 'slackGreen' | 'slackRed' | 'slackYellow' | 'slackBase' | 'googleBlue' | 'googleGreen' | 'googleYellow' | 'googleRed';
13
8
  import * as _StyleTags from './property';
14
9
  /** @deprecated Use StyleProps instead of StyleTags */
15
10
  export type StyleTags = typeof _StyleTags;
11
+ /** @deprecated Use Darkmode instead of DarkMode */
12
+ export type DarkMode = Darkmode;
16
13
  import * as StyleProps from './property';
17
14
  export type { StyleProps };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="react" />
3
- import { Themecolor } from '.';
3
+ import { $themecolor } from '../@utils/$themecolor';
4
4
  export type BasicElement = BasicTag & States;
5
5
  export type BasicTag = {
6
6
  className?: string;
@@ -124,7 +124,7 @@ export type gapUnit = 0 | '1/12' | '1/6' | '1/4' | '1/3' | '1/2' | '2/3' | '3/4'
124
124
  export type gap = gapUnit | [gapUnit, gapUnit];
125
125
  export type overflowUnit = 'auto' | 'hidden' | 'scroll' | 'visible' | 'unset';
126
126
  export type overflow = overflowUnit | [overflowUnit, overflowUnit];
127
- export type UniColors = 'inherit' | 'theme' | 'posi' | 'nega' | 'warn' | 'white' | 'black' | 'dark' | Themecolor;
127
+ export type UniColors = 'inherit' | 'theme' | 'posi' | 'nega' | 'warn' | 'white' | 'black' | 'dark' | $themecolor.Theme;
128
128
  export type LayerColors = 'layer.0' | 'layer.1' | 'layer.2' | 'layer.3' | 'layer.4' | 'layer.5' | 'layer.6';
129
129
  export type BackgroundColor = UniColors | LayerColors | 'layer.0.opa.few' | 'layer.0.opa.low' | 'layer.0.opa.middle' | 'layer.0.opa.high' | 'layer.1.opa.few' | 'layer.1.opa.low' | 'layer.1.opa.middle' | 'layer.1.opa.high' | 'layer.4.opa.few' | 'layer.4.opa.low' | 'layer.4.opa.middle' | 'layer.4.opa.high' | 'theme.opa.few' | 'theme.opa.low' | 'theme.opa.middle' | 'theme.opa.high' | 'theme.lighten' | 'theme.lighter' | 'theme.lightest' | 'theme.darken' | 'theme.darker' | 'theme.darkest' | 'dark.opa.few' | 'dark.opa.low' | 'dark.opa.middle' | 'dark.opa.high' | 'nega.opa.low' | 'nega.opa.middle' | 'posi.opa.low' | 'posi.opa.middle' | 'mono.positive' | 'mono.negative' | 'cloud' | 'gray' | 'trans' | 'none';
130
130
  export type TRBL = 0 | '1/12' | '1/6' | '1/4' | '1/3' | '1/2' | '2/3' | '3/4' | 1 | 2 | 3 | 4 | '50%' | '100%';