itmar-block-packages 1.3.11 → 1.3.12

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
@@ -14,6 +14,10 @@ import {関数名又はコンポーネント名} from "itmar-block-packages"
14
14
  npm i @wordpress/scripts@^27.6.0 --save-dev
15
15
 
16
16
  ## 更新履歴
17
+ = 1.3.12 =
18
+ - BlockPlaceの配置タイプが絶対位置の場合に縦横の中央揃えが設定できる機能を追加
19
+ - 中央揃えができるようにしたために、position_prmにそれに対応するCSSプロパティを返す機能を追加
20
+
17
21
  = 1.3.11 =
18
22
  - BlockPlace、BlockWidth、BlockHeightのfreeサイズにpx以外の単位を設定できるように修正
19
23
  - freeサイズにpx以外の単位を設定できるようにしたことから、max_width_prm、width_prm、height_prmがそれに対応できるように修正
@@ -159,6 +163,29 @@ marginやpaddingに設定するプロパティを文字列で返します。
159
163
  #### 引数
160
164
  - `space` object
161
165
  top,right,bottom,leftをキーとしてもつオブジェクト
166
+
167
+ ### position_prm
168
+ 絶対位置のポジションに関するCSSを返します。
169
+ #### 引数
170
+ - `pos` object,boolean
171
+ 次の形式のオブジェクト又はboolean
172
+ ```
173
+ "posValue": {
174
+ "vertBase": "top",
175
+ "horBase": "left",
176
+ "vertValue": "3em",
177
+ "horValue": "3em",
178
+ "isVertCenter": false,
179
+ "isHorCenter": false
180
+ },
181
+ ```
182
+
183
+ - `type` string
184
+ staic, relative,absolute,fixed,stickyのいづれか
185
+
186
+ #### 戻り値
187
+ - typeがabsolute,fixed,stickyのときposの値に応じてtop,buttom,left,rightのcssプロパティを返す。 pos内の中央揃えのフラグがオンならtransformのcssプロパティも返す。
188
+ - posがtrueのとき`top:50%;left: 50%;transform: translate(-50%, -50%);`を返す。
162
189
 
163
190
 
164
191
  ### max_width_prm
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '19f8215aa02dd432f1d5');
1
+ <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '871bd3daa44700fd87b5');