@a4banana/react-layout-primitives 1.0.0 → 1.1.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.
- package/dist/index.cjs +10 -10
- package/dist/index.d.ts +79 -52
- package/dist/index.js +222 -204
- package/package.json +1 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react"),ye={Start:"start",End:"end",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly"},we={Top:"top",Bottom:"bottom",Center:"center",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly"},xe={Start:"start",Center:"center",End:"end",Stretch:"stretch"},Te={Top:"top",Center:"center",Bottom:"bottom",Stretch:"stretch"},ve={start:"flex-start",end:"flex-end",top:"flex-start",bottom:"flex-end",center:"center",stretch:"stretch","space-between":"space-between","space-around":"space-around","space-evenly":"space-evenly"};var N={exports:{}},R={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var be;function Pe(){if(be)return R;be=1;var s=Symbol.for("react.transitional.element"),w=Symbol.for("react.fragment");function b(x,c,i){var f=null;if(i!==void 0&&(f=""+i),c.key!==void 0&&(f=""+c.key),"key"in c){i={};for(var d in c)d!=="key"&&(i[d]=c[d])}else i=c;return c=i.ref,{$$typeof:s,type:x,key:f,ref:c!==void 0?c:null,props:i}}return R.Fragment=w,R.jsx=b,R.jsxs=b,R}var h={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ge;function Ye(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case he:return"Portal";case K:return"Profiler";case Q:return"StrictMode";case U:return"Suspense";case q:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ee:return(e.displayName||"Context")+".Provider";case D:return(e._context.displayName||"Context")+".Consumer";case z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return r=e.displayName||null,r!==null?r:s(e.type)||"Memo";case B:r=e._payload,e=e._init;try{return s(e(r))}catch{}}return null}function w(e){return""+e}function b(e){try{w(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,o=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),w(e)}}function x(){}function c(){if(A===0){ne=console.log,oe=console.info,ae=console.warn,ue=console.error,le=console.group,se=console.groupCollapsed,ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:x,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}function i(){if(A--,A===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:p({},e,{value:ne}),info:p({},e,{value:oe}),warn:p({},e,{value:ae}),error:p({},e,{value:ue}),group:p({},e,{value:le}),groupCollapsed:p({},e,{value:se}),groupEnd:p({},e,{value:ce})})}0>A&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function f(e){if(G===void 0)try{throw Error()}catch(t){var r=t.stack.trim().match(/\n( *(at )?)/);G=r&&r[1]||"",fe=-1<t.stack.indexOf(`
|
|
18
18
|
at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+
|
|
20
|
-
`),y=
|
|
21
|
-
`);for(n=a=0;a<l.length&&!l[a].includes("DetermineComponentFrameRoot");)a++;for(;n<y.length&&!y[n].includes("DetermineComponentFrameRoot");)n++;if(a===l.length||n===y.length)for(a=l.length-1,n=y.length-1;1<=a&&0<=n&&l[a]!==y[n];)n--;for(;1<=a&&0<=n;a--,n--)if(l[a]!==y[n]){if(a!==1||n!==1)do if(a--,n--,0>n||l[a]!==y[n]){var
|
|
22
|
-
`+l[a].replace(" at new "," at ");return e.displayName&&
|
|
19
|
+
`+G+e+fe}function d(e,r){if(!e||X)return"";var t=L.get(e);if(t!==void 0)return t;X=!0,t=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var o=null;o=g.H,g.H=null,c();try{var u={DetermineComponentFrameRoot:function(){try{if(r){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(m){var O=m}Reflect.construct(e,[],v)}else{try{v.call()}catch(m){O=m}e.call(v.prototype)}}else{try{throw Error()}catch(m){O=m}(v=e())&&typeof v.catch=="function"&&v.catch(function(){})}}catch(m){if(m&&O&&typeof m.stack=="string")return[m.stack,O.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=u.DetermineComponentFrameRoot(),E=n[0],T=n[1];if(E&&T){var l=E.split(`
|
|
20
|
+
`),y=T.split(`
|
|
21
|
+
`);for(n=a=0;a<l.length&&!l[a].includes("DetermineComponentFrameRoot");)a++;for(;n<y.length&&!y[n].includes("DetermineComponentFrameRoot");)n++;if(a===l.length||n===y.length)for(a=l.length-1,n=y.length-1;1<=a&&0<=n&&l[a]!==y[n];)n--;for(;1<=a&&0<=n;a--,n--)if(l[a]!==y[n]){if(a!==1||n!==1)do if(a--,n--,0>n||l[a]!==y[n]){var C=`
|
|
22
|
+
`+l[a].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,C),C}while(1<=a&&0<=n);break}}}finally{X=!1,g.H=o,i(),Error.prepareStackTrace=t}return l=(l=e?e.displayName||e.name:"")?f(l):"",typeof e=="function"&&L.set(e,l),l}function S(e){if(e==null)return"";if(typeof e=="function"){var r=e.prototype;return d(e,!(!r||!r.isReactComponent))}if(typeof e=="string")return f(e);switch(e){case U:return f("Suspense");case q:return f("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case z:return e=d(e.render,!1),e;case H:return S(e.type);case B:r=e._payload,e=e._init;try{return S(e(r))}catch{}}return""}function _(){var e=g.A;return e===null?null:e.getOwner()}function j(e){if(te.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function P(e,r){function t(){ie||(ie=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function Y(){var e=s(this.type);return de[e]||(de[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function M(e,r,t,o,u,a){return t=a.ref,e={$$typeof:W,type:e,key:r,props:a,_owner:u},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:Y}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function k(e,r,t,o,u,a){if(typeof e=="string"||typeof e=="function"||e===V||e===K||e===Q||e===U||e===q||e===je||typeof e=="object"&&e!==null&&(e.$$typeof===B||e.$$typeof===H||e.$$typeof===ee||e.$$typeof===D||e.$$typeof===z||e.$$typeof===Oe||e.getModuleId!==void 0)){var n=r.children;if(n!==void 0)if(o)if(J(n)){for(o=0;o<n.length;o++)I(n[o],e);Object.freeze&&Object.freeze(n)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else I(n,e)}else n="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?o="null":J(e)?o="array":e!==void 0&&e.$$typeof===W?(o="<"+(s(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):o=typeof e,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",o,n);if(te.call(r,"key")){n=s(e);var E=Object.keys(r).filter(function(l){return l!=="key"});o=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",Ee[n+o]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,o,n,
|
|
27
|
+
<%s key={someKey} {...props} />`,o,n,E,n),Ee[n+o]=!0)}if(n=null,t!==void 0&&(b(t),n=""+t),j(r)&&(b(r.key),n=""+r.key),"key"in r){t={};for(var T in r)T!=="key"&&(t[T]=r[T])}else t=r;return n&&P(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),M(e,n,a,u,_(),t)}function I(e,r){if(typeof e=="object"&&e&&e.$$typeof!==Ne){if(J(e))for(var t=0;t<e.length;t++){var o=e[t];$(o)&&Z(o,r)}else if($(e))e._store&&(e._store.validated=1);else if(e===null||typeof e!="object"?t=null:(t=re&&e[re]||e["@@iterator"],t=typeof t=="function"?t:null),typeof t=="function"&&t!==e.entries&&(t=t.call(e),t!==e))for(;!(e=t.next()).done;)$(e.value)&&Z(e.value,r)}}function $(e){return typeof e=="object"&&e!==null&&e.$$typeof===W}function Z(e,r){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,r=Ce(r),!me[r])){me[r]=!0;var t="";e&&e._owner!=null&&e._owner!==_()&&(t=null,typeof e._owner.tag=="number"?t=s(e._owner.type):typeof e._owner.name=="string"&&(t=e._owner.name),t=" It was passed a child from "+t+".");var o=g.getCurrentStack;g.getCurrentStack=function(){var u=S(e.type);return o&&(u+=o()||""),u},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,t),g.getCurrentStack=o}}function Ce(e){var r="",t=_();return t&&(t=s(t.type))&&(r=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+t+"`."),r||(e=
|
|
29
|
+
Check the render method of \``+t+"`."),r||(e=s(e))&&(r=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+e+">."),r}var
|
|
31
|
+
Check the top-level render call using <`+e+">."),r}var Re=F,W=Symbol.for("react.transitional.element"),he=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),je=Symbol.for("react.offscreen"),re=Symbol.iterator,ke=Symbol.for("react.client.reference"),g=Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,p=Object.assign,Oe=Symbol.for("react.client.reference"),J=Array.isArray,A=0,ne,oe,ae,ue,le,se,ce;x.__reactDisabledLog=!0;var G,fe,X=!1,L=new(typeof WeakMap=="function"?WeakMap:Map),Ne=Symbol.for("react.client.reference"),ie,de={},Ee={},me={};h.Fragment=V,h.jsx=function(e,r,t,o,u){return k(e,r,t,!1,o,u)},h.jsxs=function(e,r,t,o,u){return k(e,r,t,!0,o,u)}}()),h}var pe;function Me(){return pe||(pe=1,process.env.NODE_ENV==="production"?N.exports=Pe():N.exports=Ye()),N.exports}var $e=Me();function Se(s){const{direction:w,defaultArrangement:b,defaultAlignment:x}=s;return F.forwardRef(({children:i=null,arrangement:f=b,alignment:d=x,style:S={},className:_="",gap:j=0,as:P="div",...Y},M)=>{const k=F.useMemo(()=>({display:"flex",flexDirection:w,gap:`${j}px`,justifyContent:ve[f]??f,alignItems:ve[d]??d}),[j,f,d]);return $e.jsx(P,{ref:M,style:{...k,...S},className:_,...Y,children:i})})}const _e=Se({direction:"row",defaultArrangement:ye.Start,defaultAlignment:Te.Stretch});_e.displayName="Row";const Ae=Se({direction:"column",defaultArrangement:we.Top,defaultAlignment:xe.Stretch});Ae.displayName="Column";exports.Column=Ae;exports.HorizontalAlignment=xe;exports.HorizontalArrangement=ye;exports.Row=_e;exports.VerticalAlignment=Te;exports.VerticalArrangement=we;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,85 +4,112 @@ import { ElementType } from 'react';
|
|
|
4
4
|
import { ForwardRefExoticComponent } from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
declare type Alignment = Readonly<{
|
|
9
|
-
/** Alignment configuration for horizontal positioning */
|
|
10
|
-
Horizontal: HorizontalAlignment;
|
|
11
|
-
/** Alignment configuration for vertical positioning */
|
|
12
|
-
Vertical: VerticalAlignment;
|
|
13
|
-
}>;
|
|
7
|
+
export declare const Column: ForwardRefExoticComponent<ColumnProps>;
|
|
14
8
|
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Props for the Column component.
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Column arrangement={VerticalArrangement.SpaceBetween} alignment={HorizontalAlignment.Center}>
|
|
14
|
+
* <div>Item 1</div>
|
|
15
|
+
* <div>Item 2</div>
|
|
16
|
+
* </Column>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare interface ColumnProps extends LayoutPrimitivesProps {
|
|
20
|
+
/** Controls vertical distribution of children (main axis) */
|
|
21
|
+
readonly arrangement?: VerticalArrangement;
|
|
22
|
+
/** Controls horizontal alignment of children (cross axis) */
|
|
23
|
+
readonly alignment?: HorizontalAlignment;
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
27
|
+
* Namespace for horizontal alignment options.
|
|
28
|
+
* Used for Column's cross axis alignment.
|
|
26
29
|
*/
|
|
27
|
-
declare const
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
readonly CENTER: "Center";
|
|
33
|
-
readonly START: "Start";
|
|
34
|
-
readonly END: "End";
|
|
35
|
-
readonly TOP: "Top";
|
|
36
|
-
readonly BOTTOM: "Bottom";
|
|
30
|
+
export declare const HorizontalAlignment: {
|
|
31
|
+
readonly Start: "start";
|
|
32
|
+
readonly Center: "center";
|
|
33
|
+
readonly End: "end";
|
|
34
|
+
readonly Stretch: "stretch";
|
|
37
35
|
};
|
|
38
36
|
|
|
39
|
-
export declare
|
|
37
|
+
export declare type HorizontalAlignment = typeof HorizontalAlignment[keyof typeof HorizontalAlignment];
|
|
40
38
|
|
|
41
39
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
40
|
+
* Namespace for horizontal arrangement options.
|
|
41
|
+
* Used for Row's main axis distribution.
|
|
44
42
|
*/
|
|
45
|
-
export declare
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/** Alignment options for horizontal positioning */
|
|
54
|
-
declare type HorizontalAlignment = typeof ArrangementValues.START | typeof ArrangementValues.CENTER | typeof ArrangementValues.END;
|
|
43
|
+
export declare const HorizontalArrangement: {
|
|
44
|
+
readonly Start: "start";
|
|
45
|
+
readonly End: "end";
|
|
46
|
+
readonly Center: "center";
|
|
47
|
+
readonly SpaceBetween: "space-between";
|
|
48
|
+
readonly SpaceAround: "space-around";
|
|
49
|
+
readonly SpaceEvenly: "space-evenly";
|
|
50
|
+
};
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
declare type HorizontalArrangement = typeof ArrangementValues.START | typeof ArrangementValues.END | CommonArrangement;
|
|
52
|
+
export declare type HorizontalArrangement = typeof HorizontalArrangement[keyof typeof HorizontalArrangement];
|
|
58
53
|
|
|
59
54
|
/**
|
|
60
|
-
* Base
|
|
61
|
-
* Extends React's div props while adding custom layout properties
|
|
55
|
+
* Base props for all layout primitive components.
|
|
56
|
+
* Extends React's div props while adding custom layout properties.
|
|
62
57
|
*/
|
|
63
|
-
declare interface LayoutPrimitivesProps extends Omit<ComponentPropsWithRef<'div'>, 'as'> {
|
|
58
|
+
export declare interface LayoutPrimitivesProps extends Omit<ComponentPropsWithRef<'div'>, 'as'> {
|
|
64
59
|
readonly children?: ReactNode;
|
|
65
60
|
readonly style?: CSSProperties;
|
|
66
61
|
readonly className?: string;
|
|
62
|
+
/** Gap between child elements in pixels */
|
|
67
63
|
readonly gap?: number;
|
|
64
|
+
/** The element type to render as */
|
|
68
65
|
readonly as?: ElementType;
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
export declare const Row: ForwardRefExoticComponent<RowProps>;
|
|
72
69
|
|
|
73
70
|
/**
|
|
74
|
-
* Props
|
|
75
|
-
*
|
|
71
|
+
* Props for the Row component.
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* <Row arrangement={HorizontalArrangement.SpaceBetween} alignment={VerticalAlignment.Center}>
|
|
75
|
+
* <div>Item 1</div>
|
|
76
|
+
* <div>Item 2</div>
|
|
77
|
+
* </Row>
|
|
78
|
+
* ```
|
|
76
79
|
*/
|
|
77
80
|
export declare interface RowProps extends LayoutPrimitivesProps {
|
|
78
|
-
|
|
79
|
-
readonly
|
|
81
|
+
/** Controls horizontal distribution of children (main axis) */
|
|
82
|
+
readonly arrangement?: HorizontalArrangement;
|
|
83
|
+
/** Controls vertical alignment of children (cross axis) */
|
|
84
|
+
readonly alignment?: VerticalAlignment;
|
|
80
85
|
}
|
|
81
86
|
|
|
82
|
-
/**
|
|
83
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Namespace for vertical alignment options.
|
|
89
|
+
* Used for Row's cross axis alignment.
|
|
90
|
+
*/
|
|
91
|
+
export declare const VerticalAlignment: {
|
|
92
|
+
readonly Top: "top";
|
|
93
|
+
readonly Center: "center";
|
|
94
|
+
readonly Bottom: "bottom";
|
|
95
|
+
readonly Stretch: "stretch";
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export declare type VerticalAlignment = typeof VerticalAlignment[keyof typeof VerticalAlignment];
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Namespace for vertical arrangement options.
|
|
102
|
+
* Used for Column's main axis distribution.
|
|
103
|
+
*/
|
|
104
|
+
export declare const VerticalArrangement: {
|
|
105
|
+
readonly Top: "top";
|
|
106
|
+
readonly Bottom: "bottom";
|
|
107
|
+
readonly Center: "center";
|
|
108
|
+
readonly SpaceBetween: "space-between";
|
|
109
|
+
readonly SpaceAround: "space-around";
|
|
110
|
+
readonly SpaceEvenly: "space-evenly";
|
|
111
|
+
};
|
|
84
112
|
|
|
85
|
-
|
|
86
|
-
declare type VerticalArrangement = typeof ArrangementValues.TOP | typeof ArrangementValues.BOTTOM | CommonArrangement;
|
|
113
|
+
export declare type VerticalArrangement = typeof VerticalArrangement[keyof typeof VerticalArrangement];
|
|
87
114
|
|
|
88
115
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import Re, { forwardRef as Ae, useMemo as he } from "react";
|
|
2
|
+
const je = {
|
|
3
|
+
Start: "start",
|
|
4
|
+
End: "end",
|
|
5
|
+
Center: "center",
|
|
6
|
+
SpaceBetween: "space-between",
|
|
7
|
+
SpaceAround: "space-around",
|
|
8
|
+
SpaceEvenly: "space-evenly"
|
|
9
|
+
}, ke = {
|
|
10
|
+
Top: "top",
|
|
11
|
+
Bottom: "bottom",
|
|
12
|
+
Center: "center",
|
|
13
|
+
SpaceBetween: "space-between",
|
|
14
|
+
SpaceAround: "space-around",
|
|
15
|
+
SpaceEvenly: "space-evenly"
|
|
16
|
+
}, Oe = {
|
|
17
|
+
Start: "start",
|
|
18
|
+
Center: "center",
|
|
19
|
+
End: "end",
|
|
20
|
+
Stretch: "stretch"
|
|
21
|
+
}, Ne = {
|
|
22
|
+
Top: "top",
|
|
23
|
+
Center: "center",
|
|
24
|
+
Bottom: "bottom",
|
|
25
|
+
Stretch: "stretch"
|
|
26
|
+
}, me = {
|
|
27
|
+
start: "flex-start",
|
|
28
|
+
end: "flex-end",
|
|
29
|
+
top: "flex-start",
|
|
30
|
+
bottom: "flex-end",
|
|
31
|
+
center: "center",
|
|
32
|
+
stretch: "stretch",
|
|
33
|
+
"space-between": "space-between",
|
|
34
|
+
"space-around": "space-around",
|
|
35
|
+
"space-evenly": "space-evenly"
|
|
22
36
|
};
|
|
23
|
-
var
|
|
37
|
+
var N = { exports: {} }, A = {};
|
|
24
38
|
/**
|
|
25
39
|
* @license React
|
|
26
40
|
* react-jsx-runtime.production.js
|
|
@@ -30,29 +44,29 @@ var P = { exports: {} }, O = {};
|
|
|
30
44
|
* This source code is licensed under the MIT license found in the
|
|
31
45
|
* LICENSE file in the root directory of this source tree.
|
|
32
46
|
*/
|
|
33
|
-
var
|
|
34
|
-
function
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
var s = Symbol.for("react.transitional.element"),
|
|
38
|
-
function
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
for (var d in
|
|
43
|
-
d !== "key" && (
|
|
44
|
-
} else
|
|
45
|
-
return
|
|
47
|
+
var ve;
|
|
48
|
+
function Pe() {
|
|
49
|
+
if (ve) return A;
|
|
50
|
+
ve = 1;
|
|
51
|
+
var s = Symbol.for("react.transitional.element"), x = Symbol.for("react.fragment");
|
|
52
|
+
function b(w, c, i) {
|
|
53
|
+
var f = null;
|
|
54
|
+
if (i !== void 0 && (f = "" + i), c.key !== void 0 && (f = "" + c.key), "key" in c) {
|
|
55
|
+
i = {};
|
|
56
|
+
for (var d in c)
|
|
57
|
+
d !== "key" && (i[d] = c[d]);
|
|
58
|
+
} else i = c;
|
|
59
|
+
return c = i.ref, {
|
|
46
60
|
$$typeof: s,
|
|
47
|
-
type:
|
|
48
|
-
key:
|
|
49
|
-
ref:
|
|
50
|
-
props:
|
|
61
|
+
type: w,
|
|
62
|
+
key: f,
|
|
63
|
+
ref: c !== void 0 ? c : null,
|
|
64
|
+
props: i
|
|
51
65
|
};
|
|
52
66
|
}
|
|
53
|
-
return
|
|
67
|
+
return A.Fragment = x, A.jsx = b, A.jsxs = b, A;
|
|
54
68
|
}
|
|
55
|
-
var
|
|
69
|
+
var h = {};
|
|
56
70
|
/**
|
|
57
71
|
* @license React
|
|
58
72
|
* react-jsx-runtime.development.js
|
|
@@ -62,42 +76,42 @@ var N = {};
|
|
|
62
76
|
* This source code is licensed under the MIT license found in the
|
|
63
77
|
* LICENSE file in the root directory of this source tree.
|
|
64
78
|
*/
|
|
65
|
-
var
|
|
66
|
-
function
|
|
67
|
-
return
|
|
79
|
+
var be;
|
|
80
|
+
function Ye() {
|
|
81
|
+
return be || (be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
68
82
|
function s(e) {
|
|
69
83
|
if (e == null) return null;
|
|
70
84
|
if (typeof e == "function")
|
|
71
|
-
return e.$$typeof ===
|
|
85
|
+
return e.$$typeof === _e ? null : e.displayName || e.name || null;
|
|
72
86
|
if (typeof e == "string") return e;
|
|
73
87
|
switch (e) {
|
|
74
|
-
case
|
|
88
|
+
case U:
|
|
75
89
|
return "Fragment";
|
|
76
|
-
case
|
|
90
|
+
case we:
|
|
77
91
|
return "Portal";
|
|
78
|
-
case
|
|
92
|
+
case Q:
|
|
79
93
|
return "Profiler";
|
|
80
94
|
case Z:
|
|
81
95
|
return "StrictMode";
|
|
82
|
-
case
|
|
96
|
+
case z:
|
|
83
97
|
return "Suspense";
|
|
84
|
-
case
|
|
98
|
+
case q:
|
|
85
99
|
return "SuspenseList";
|
|
86
100
|
}
|
|
87
101
|
if (typeof e == "object")
|
|
88
102
|
switch (typeof e.tag == "number" && console.error(
|
|
89
103
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
90
104
|
), e.$$typeof) {
|
|
91
|
-
case ee:
|
|
92
|
-
return (e.displayName || "Context") + ".Provider";
|
|
93
105
|
case D:
|
|
106
|
+
return (e.displayName || "Context") + ".Provider";
|
|
107
|
+
case K:
|
|
94
108
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
95
109
|
case V:
|
|
96
110
|
var r = e.render;
|
|
97
111
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
98
|
-
case
|
|
112
|
+
case B:
|
|
99
113
|
return r = e.displayName || null, r !== null ? r : s(e.type) || "Memo";
|
|
100
|
-
case
|
|
114
|
+
case J:
|
|
101
115
|
r = e._payload, e = e._init;
|
|
102
116
|
try {
|
|
103
117
|
return s(e(r));
|
|
@@ -106,12 +120,12 @@ function he() {
|
|
|
106
120
|
}
|
|
107
121
|
return null;
|
|
108
122
|
}
|
|
109
|
-
function
|
|
123
|
+
function x(e) {
|
|
110
124
|
return "" + e;
|
|
111
125
|
}
|
|
112
|
-
function
|
|
126
|
+
function b(e) {
|
|
113
127
|
try {
|
|
114
|
-
|
|
128
|
+
x(e);
|
|
115
129
|
var r = !1;
|
|
116
130
|
} catch {
|
|
117
131
|
r = !0;
|
|
@@ -123,18 +137,18 @@ function he() {
|
|
|
123
137
|
r,
|
|
124
138
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
125
139
|
o
|
|
126
|
-
),
|
|
140
|
+
), x(e);
|
|
127
141
|
}
|
|
128
142
|
}
|
|
129
|
-
function
|
|
143
|
+
function w() {
|
|
130
144
|
}
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
133
|
-
|
|
145
|
+
function c() {
|
|
146
|
+
if (C === 0) {
|
|
147
|
+
te = console.log, ne = console.info, oe = console.warn, ae = console.error, ue = console.group, le = console.groupCollapsed, se = console.groupEnd;
|
|
134
148
|
var e = {
|
|
135
149
|
configurable: !0,
|
|
136
150
|
enumerable: !0,
|
|
137
|
-
value:
|
|
151
|
+
value: w,
|
|
138
152
|
writable: !0
|
|
139
153
|
};
|
|
140
154
|
Object.defineProperties(console, {
|
|
@@ -147,83 +161,83 @@ function he() {
|
|
|
147
161
|
groupEnd: e
|
|
148
162
|
});
|
|
149
163
|
}
|
|
150
|
-
|
|
164
|
+
C++;
|
|
151
165
|
}
|
|
152
|
-
function
|
|
153
|
-
if (
|
|
166
|
+
function i() {
|
|
167
|
+
if (C--, C === 0) {
|
|
154
168
|
var e = { configurable: !0, enumerable: !0, writable: !0 };
|
|
155
169
|
Object.defineProperties(console, {
|
|
156
|
-
log:
|
|
157
|
-
info:
|
|
158
|
-
warn:
|
|
159
|
-
error:
|
|
160
|
-
group:
|
|
161
|
-
groupCollapsed:
|
|
162
|
-
groupEnd:
|
|
170
|
+
log: p({}, e, { value: te }),
|
|
171
|
+
info: p({}, e, { value: ne }),
|
|
172
|
+
warn: p({}, e, { value: oe }),
|
|
173
|
+
error: p({}, e, { value: ae }),
|
|
174
|
+
group: p({}, e, { value: ue }),
|
|
175
|
+
groupCollapsed: p({}, e, { value: le }),
|
|
176
|
+
groupEnd: p({}, e, { value: se })
|
|
163
177
|
});
|
|
164
178
|
}
|
|
165
|
-
0 >
|
|
179
|
+
0 > C && console.error(
|
|
166
180
|
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
167
181
|
);
|
|
168
182
|
}
|
|
169
|
-
function
|
|
170
|
-
if (
|
|
183
|
+
function f(e) {
|
|
184
|
+
if (G === void 0)
|
|
171
185
|
try {
|
|
172
186
|
throw Error();
|
|
173
187
|
} catch (t) {
|
|
174
188
|
var r = t.stack.trim().match(/\n( *(at )?)/);
|
|
175
|
-
|
|
189
|
+
G = r && r[1] || "", ce = -1 < t.stack.indexOf(`
|
|
176
190
|
at`) ? " (<anonymous>)" : -1 < t.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
177
191
|
}
|
|
178
192
|
return `
|
|
179
|
-
` +
|
|
193
|
+
` + G + e + ce;
|
|
180
194
|
}
|
|
181
195
|
function d(e, r) {
|
|
182
196
|
if (!e || X) return "";
|
|
183
|
-
var t =
|
|
197
|
+
var t = L.get(e);
|
|
184
198
|
if (t !== void 0) return t;
|
|
185
199
|
X = !0, t = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
186
200
|
var o = null;
|
|
187
|
-
o =
|
|
201
|
+
o = g.H, g.H = null, c();
|
|
188
202
|
try {
|
|
189
203
|
var u = {
|
|
190
204
|
DetermineComponentFrameRoot: function() {
|
|
191
205
|
try {
|
|
192
206
|
if (r) {
|
|
193
|
-
var
|
|
207
|
+
var v = function() {
|
|
194
208
|
throw Error();
|
|
195
209
|
};
|
|
196
|
-
if (Object.defineProperty(
|
|
210
|
+
if (Object.defineProperty(v.prototype, "props", {
|
|
197
211
|
set: function() {
|
|
198
212
|
throw Error();
|
|
199
213
|
}
|
|
200
214
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
201
215
|
try {
|
|
202
|
-
Reflect.construct(
|
|
203
|
-
} catch (
|
|
204
|
-
var
|
|
216
|
+
Reflect.construct(v, []);
|
|
217
|
+
} catch (m) {
|
|
218
|
+
var O = m;
|
|
205
219
|
}
|
|
206
|
-
Reflect.construct(e, [],
|
|
220
|
+
Reflect.construct(e, [], v);
|
|
207
221
|
} else {
|
|
208
222
|
try {
|
|
209
|
-
|
|
210
|
-
} catch (
|
|
211
|
-
|
|
223
|
+
v.call();
|
|
224
|
+
} catch (m) {
|
|
225
|
+
O = m;
|
|
212
226
|
}
|
|
213
|
-
e.call(
|
|
227
|
+
e.call(v.prototype);
|
|
214
228
|
}
|
|
215
229
|
} else {
|
|
216
230
|
try {
|
|
217
231
|
throw Error();
|
|
218
|
-
} catch (
|
|
219
|
-
|
|
232
|
+
} catch (m) {
|
|
233
|
+
O = m;
|
|
220
234
|
}
|
|
221
|
-
(
|
|
235
|
+
(v = e()) && typeof v.catch == "function" && v.catch(function() {
|
|
222
236
|
});
|
|
223
237
|
}
|
|
224
|
-
} catch (
|
|
225
|
-
if (
|
|
226
|
-
return [
|
|
238
|
+
} catch (m) {
|
|
239
|
+
if (m && O && typeof m.stack == "string")
|
|
240
|
+
return [m.stack, O.stack];
|
|
227
241
|
}
|
|
228
242
|
return [null, null];
|
|
229
243
|
}
|
|
@@ -238,44 +252,44 @@ function he() {
|
|
|
238
252
|
"name",
|
|
239
253
|
{ value: "DetermineComponentFrameRoot" }
|
|
240
254
|
);
|
|
241
|
-
var n = u.DetermineComponentFrameRoot(),
|
|
242
|
-
if (
|
|
243
|
-
var l =
|
|
244
|
-
`),
|
|
255
|
+
var n = u.DetermineComponentFrameRoot(), E = n[0], T = n[1];
|
|
256
|
+
if (E && T) {
|
|
257
|
+
var l = E.split(`
|
|
258
|
+
`), y = T.split(`
|
|
245
259
|
`);
|
|
246
260
|
for (n = a = 0; a < l.length && !l[a].includes(
|
|
247
261
|
"DetermineComponentFrameRoot"
|
|
248
262
|
); )
|
|
249
263
|
a++;
|
|
250
|
-
for (; n <
|
|
264
|
+
for (; n < y.length && !y[n].includes(
|
|
251
265
|
"DetermineComponentFrameRoot"
|
|
252
266
|
); )
|
|
253
267
|
n++;
|
|
254
|
-
if (a === l.length || n ===
|
|
255
|
-
for (a = l.length - 1, n =
|
|
268
|
+
if (a === l.length || n === y.length)
|
|
269
|
+
for (a = l.length - 1, n = y.length - 1; 1 <= a && 0 <= n && l[a] !== y[n]; )
|
|
256
270
|
n--;
|
|
257
271
|
for (; 1 <= a && 0 <= n; a--, n--)
|
|
258
|
-
if (l[a] !==
|
|
272
|
+
if (l[a] !== y[n]) {
|
|
259
273
|
if (a !== 1 || n !== 1)
|
|
260
274
|
do
|
|
261
|
-
if (a--, n--, 0 > n || l[a] !==
|
|
262
|
-
var
|
|
275
|
+
if (a--, n--, 0 > n || l[a] !== y[n]) {
|
|
276
|
+
var R = `
|
|
263
277
|
` + l[a].replace(
|
|
264
278
|
" at new ",
|
|
265
279
|
" at "
|
|
266
280
|
);
|
|
267
|
-
return e.displayName &&
|
|
281
|
+
return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, R), R;
|
|
268
282
|
}
|
|
269
283
|
while (1 <= a && 0 <= n);
|
|
270
284
|
break;
|
|
271
285
|
}
|
|
272
286
|
}
|
|
273
287
|
} finally {
|
|
274
|
-
X = !1,
|
|
288
|
+
X = !1, g.H = o, i(), Error.prepareStackTrace = t;
|
|
275
289
|
}
|
|
276
|
-
return l = (l = e ? e.displayName || e.name : "") ?
|
|
290
|
+
return l = (l = e ? e.displayName || e.name : "") ? f(l) : "", typeof e == "function" && L.set(e, l), l;
|
|
277
291
|
}
|
|
278
|
-
function
|
|
292
|
+
function _(e) {
|
|
279
293
|
if (e == null) return "";
|
|
280
294
|
if (typeof e == "function") {
|
|
281
295
|
var r = e.prototype;
|
|
@@ -284,42 +298,42 @@ function he() {
|
|
|
284
298
|
!(!r || !r.isReactComponent)
|
|
285
299
|
);
|
|
286
300
|
}
|
|
287
|
-
if (typeof e == "string") return
|
|
301
|
+
if (typeof e == "string") return f(e);
|
|
288
302
|
switch (e) {
|
|
303
|
+
case z:
|
|
304
|
+
return f("Suspense");
|
|
289
305
|
case q:
|
|
290
|
-
return
|
|
291
|
-
case G:
|
|
292
|
-
return E("SuspenseList");
|
|
306
|
+
return f("SuspenseList");
|
|
293
307
|
}
|
|
294
308
|
if (typeof e == "object")
|
|
295
309
|
switch (e.$$typeof) {
|
|
296
310
|
case V:
|
|
297
311
|
return e = d(e.render, !1), e;
|
|
312
|
+
case B:
|
|
313
|
+
return _(e.type);
|
|
298
314
|
case J:
|
|
299
|
-
return p(e.type);
|
|
300
|
-
case L:
|
|
301
315
|
r = e._payload, e = e._init;
|
|
302
316
|
try {
|
|
303
|
-
return
|
|
317
|
+
return _(e(r));
|
|
304
318
|
} catch {
|
|
305
319
|
}
|
|
306
320
|
}
|
|
307
321
|
return "";
|
|
308
322
|
}
|
|
309
|
-
function
|
|
310
|
-
var e =
|
|
323
|
+
function S() {
|
|
324
|
+
var e = g.A;
|
|
311
325
|
return e === null ? null : e.getOwner();
|
|
312
326
|
}
|
|
313
327
|
function j(e) {
|
|
314
|
-
if (
|
|
328
|
+
if (re.call(e, "key")) {
|
|
315
329
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
316
330
|
if (r && r.isReactWarning) return !1;
|
|
317
331
|
}
|
|
318
332
|
return e.key !== void 0;
|
|
319
333
|
}
|
|
320
|
-
function
|
|
334
|
+
function P(e, r) {
|
|
321
335
|
function t() {
|
|
322
|
-
|
|
336
|
+
fe || (fe = !0, console.error(
|
|
323
337
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
324
338
|
r
|
|
325
339
|
));
|
|
@@ -329,22 +343,22 @@ function he() {
|
|
|
329
343
|
configurable: !0
|
|
330
344
|
});
|
|
331
345
|
}
|
|
332
|
-
function
|
|
346
|
+
function Y() {
|
|
333
347
|
var e = s(this.type);
|
|
334
|
-
return
|
|
348
|
+
return ie[e] || (ie[e] = !0, console.error(
|
|
335
349
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
336
350
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
337
351
|
}
|
|
338
|
-
function
|
|
352
|
+
function M(e, r, t, o, u, a) {
|
|
339
353
|
return t = a.ref, e = {
|
|
340
|
-
$$typeof:
|
|
354
|
+
$$typeof: W,
|
|
341
355
|
type: e,
|
|
342
356
|
key: r,
|
|
343
357
|
props: a,
|
|
344
358
|
_owner: u
|
|
345
359
|
}, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
|
|
346
360
|
enumerable: !1,
|
|
347
|
-
get:
|
|
361
|
+
get: Y
|
|
348
362
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
349
363
|
configurable: !1,
|
|
350
364
|
enumerable: !1,
|
|
@@ -357,32 +371,32 @@ function he() {
|
|
|
357
371
|
value: null
|
|
358
372
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
359
373
|
}
|
|
360
|
-
function
|
|
361
|
-
if (typeof e == "string" || typeof e == "function" || e ===
|
|
374
|
+
function k(e, r, t, o, u, a) {
|
|
375
|
+
if (typeof e == "string" || typeof e == "function" || e === U || e === Q || e === Z || e === z || e === q || e === Te || typeof e == "object" && e !== null && (e.$$typeof === J || e.$$typeof === B || e.$$typeof === D || e.$$typeof === K || e.$$typeof === V || e.$$typeof === Se || e.getModuleId !== void 0)) {
|
|
362
376
|
var n = r.children;
|
|
363
377
|
if (n !== void 0)
|
|
364
378
|
if (o)
|
|
365
|
-
if (
|
|
379
|
+
if (H(n)) {
|
|
366
380
|
for (o = 0; o < n.length; o++)
|
|
367
|
-
|
|
381
|
+
F(n[o], e);
|
|
368
382
|
Object.freeze && Object.freeze(n);
|
|
369
383
|
} else
|
|
370
384
|
console.error(
|
|
371
385
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
372
386
|
);
|
|
373
|
-
else
|
|
387
|
+
else F(n, e);
|
|
374
388
|
} else
|
|
375
|
-
n = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (n += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? o = "null" :
|
|
389
|
+
n = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (n += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? o = "null" : H(e) ? o = "array" : e !== void 0 && e.$$typeof === W ? (o = "<" + (s(e.type) || "Unknown") + " />", n = " Did you accidentally export a JSX literal instead of a component?") : o = typeof e, console.error(
|
|
376
390
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
377
391
|
o,
|
|
378
392
|
n
|
|
379
393
|
);
|
|
380
|
-
if (
|
|
394
|
+
if (re.call(r, "key")) {
|
|
381
395
|
n = s(e);
|
|
382
|
-
var
|
|
396
|
+
var E = Object.keys(r).filter(function(l) {
|
|
383
397
|
return l !== "key";
|
|
384
398
|
});
|
|
385
|
-
o = 0 <
|
|
399
|
+
o = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", de[n + o] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
386
400
|
`A props object containing a "key" prop is being spread into JSX:
|
|
387
401
|
let props = %s;
|
|
388
402
|
<%s {...props} />
|
|
@@ -391,120 +405,124 @@ React keys must be passed directly to JSX without using spread:
|
|
|
391
405
|
<%s key={someKey} {...props} />`,
|
|
392
406
|
o,
|
|
393
407
|
n,
|
|
394
|
-
|
|
408
|
+
E,
|
|
395
409
|
n
|
|
396
410
|
), de[n + o] = !0);
|
|
397
411
|
}
|
|
398
|
-
if (n = null, t !== void 0 && (
|
|
412
|
+
if (n = null, t !== void 0 && (b(t), n = "" + t), j(r) && (b(r.key), n = "" + r.key), "key" in r) {
|
|
399
413
|
t = {};
|
|
400
|
-
for (var
|
|
401
|
-
|
|
414
|
+
for (var T in r)
|
|
415
|
+
T !== "key" && (t[T] = r[T]);
|
|
402
416
|
} else t = r;
|
|
403
|
-
return n &&
|
|
417
|
+
return n && P(
|
|
404
418
|
t,
|
|
405
419
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
406
|
-
),
|
|
420
|
+
), M(e, n, a, u, S(), t);
|
|
407
421
|
}
|
|
408
|
-
function
|
|
409
|
-
if (typeof e == "object" && e && e.$$typeof !==
|
|
410
|
-
if (
|
|
422
|
+
function F(e, r) {
|
|
423
|
+
if (typeof e == "object" && e && e.$$typeof !== Ce) {
|
|
424
|
+
if (H(e))
|
|
411
425
|
for (var t = 0; t < e.length; t++) {
|
|
412
426
|
var o = e[t];
|
|
413
|
-
$(o) &&
|
|
427
|
+
$(o) && I(o, r);
|
|
414
428
|
}
|
|
415
429
|
else if ($(e))
|
|
416
430
|
e._store && (e._store.validated = 1);
|
|
417
|
-
else if (e === null || typeof e != "object" ? t = null : (t =
|
|
431
|
+
else if (e === null || typeof e != "object" ? t = null : (t = ee && e[ee] || e["@@iterator"], t = typeof t == "function" ? t : null), typeof t == "function" && t !== e.entries && (t = t.call(e), t !== e))
|
|
418
432
|
for (; !(e = t.next()).done; )
|
|
419
|
-
$(e.value) &&
|
|
433
|
+
$(e.value) && I(e.value, r);
|
|
420
434
|
}
|
|
421
435
|
}
|
|
422
436
|
function $(e) {
|
|
423
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
437
|
+
return typeof e == "object" && e !== null && e.$$typeof === W;
|
|
424
438
|
}
|
|
425
|
-
function
|
|
426
|
-
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r =
|
|
427
|
-
|
|
439
|
+
function I(e, r) {
|
|
440
|
+
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r = ye(r), !Ee[r])) {
|
|
441
|
+
Ee[r] = !0;
|
|
428
442
|
var t = "";
|
|
429
|
-
e && e._owner != null && e._owner !==
|
|
430
|
-
var o =
|
|
431
|
-
|
|
432
|
-
var u =
|
|
443
|
+
e && e._owner != null && e._owner !== S() && (t = null, typeof e._owner.tag == "number" ? t = s(e._owner.type) : typeof e._owner.name == "string" && (t = e._owner.name), t = " It was passed a child from " + t + ".");
|
|
444
|
+
var o = g.getCurrentStack;
|
|
445
|
+
g.getCurrentStack = function() {
|
|
446
|
+
var u = _(e.type);
|
|
433
447
|
return o && (u += o() || ""), u;
|
|
434
448
|
}, console.error(
|
|
435
449
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
436
450
|
r,
|
|
437
451
|
t
|
|
438
|
-
),
|
|
452
|
+
), g.getCurrentStack = o;
|
|
439
453
|
}
|
|
440
454
|
}
|
|
441
|
-
function
|
|
442
|
-
var r = "", t =
|
|
455
|
+
function ye(e) {
|
|
456
|
+
var r = "", t = S();
|
|
443
457
|
return t && (t = s(t.type)) && (r = `
|
|
444
458
|
|
|
445
459
|
Check the render method of \`` + t + "`."), r || (e = s(e)) && (r = `
|
|
446
460
|
|
|
447
461
|
Check the top-level render call using <` + e + ">."), r;
|
|
448
462
|
}
|
|
449
|
-
var
|
|
450
|
-
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
return
|
|
454
|
-
},
|
|
455
|
-
return
|
|
463
|
+
var xe = Re, W = Symbol.for("react.transitional.element"), we = Symbol.for("react.portal"), U = Symbol.for("react.fragment"), Z = Symbol.for("react.strict_mode"), Q = Symbol.for("react.profiler"), K = Symbol.for("react.consumer"), D = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), Te = Symbol.for("react.offscreen"), ee = Symbol.iterator, _e = Symbol.for("react.client.reference"), g = xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, re = Object.prototype.hasOwnProperty, p = Object.assign, Se = Symbol.for("react.client.reference"), H = Array.isArray, C = 0, te, ne, oe, ae, ue, le, se;
|
|
464
|
+
w.__reactDisabledLog = !0;
|
|
465
|
+
var G, ce, X = !1, L = new (typeof WeakMap == "function" ? WeakMap : Map)(), Ce = Symbol.for("react.client.reference"), fe, ie = {}, de = {}, Ee = {};
|
|
466
|
+
h.Fragment = U, h.jsx = function(e, r, t, o, u) {
|
|
467
|
+
return k(e, r, t, !1, o, u);
|
|
468
|
+
}, h.jsxs = function(e, r, t, o, u) {
|
|
469
|
+
return k(e, r, t, !0, o, u);
|
|
456
470
|
};
|
|
457
|
-
}()),
|
|
471
|
+
}()), h;
|
|
458
472
|
}
|
|
459
|
-
var
|
|
460
|
-
function
|
|
461
|
-
return
|
|
473
|
+
var ge;
|
|
474
|
+
function Me() {
|
|
475
|
+
return ge || (ge = 1, process.env.NODE_ENV === "production" ? N.exports = Pe() : N.exports = Ye()), N.exports;
|
|
462
476
|
}
|
|
463
|
-
var
|
|
464
|
-
function
|
|
465
|
-
const { direction:
|
|
466
|
-
return
|
|
467
|
-
children:
|
|
468
|
-
arrangement:
|
|
469
|
-
alignment: d =
|
|
470
|
-
style:
|
|
471
|
-
className:
|
|
477
|
+
var $e = Me();
|
|
478
|
+
function pe(s) {
|
|
479
|
+
const { direction: x, defaultArrangement: b, defaultAlignment: w } = s;
|
|
480
|
+
return Ae(({
|
|
481
|
+
children: i = null,
|
|
482
|
+
arrangement: f = b,
|
|
483
|
+
alignment: d = w,
|
|
484
|
+
style: _ = {},
|
|
485
|
+
className: S = "",
|
|
472
486
|
gap: j = 0,
|
|
473
|
-
as:
|
|
474
|
-
...
|
|
475
|
-
},
|
|
476
|
-
const
|
|
487
|
+
as: P = "div",
|
|
488
|
+
...Y
|
|
489
|
+
}, M) => {
|
|
490
|
+
const k = he(() => ({
|
|
477
491
|
display: "flex",
|
|
478
|
-
flexDirection:
|
|
492
|
+
flexDirection: x,
|
|
479
493
|
gap: `${j}px`,
|
|
480
|
-
justifyContent:
|
|
481
|
-
alignItems:
|
|
482
|
-
}), [j,
|
|
483
|
-
return /* @__PURE__ */
|
|
484
|
-
|
|
494
|
+
justifyContent: me[f] ?? f,
|
|
495
|
+
alignItems: me[d] ?? d
|
|
496
|
+
}), [j, f, d]);
|
|
497
|
+
return /* @__PURE__ */ $e.jsx(
|
|
498
|
+
P,
|
|
485
499
|
{
|
|
486
|
-
ref:
|
|
487
|
-
style: { ...
|
|
488
|
-
className:
|
|
489
|
-
...
|
|
490
|
-
children:
|
|
500
|
+
ref: M,
|
|
501
|
+
style: { ...k, ..._ },
|
|
502
|
+
className: S,
|
|
503
|
+
...Y,
|
|
504
|
+
children: i
|
|
491
505
|
}
|
|
492
506
|
);
|
|
493
507
|
});
|
|
494
508
|
}
|
|
495
|
-
const
|
|
509
|
+
const We = pe({
|
|
496
510
|
direction: "row",
|
|
497
|
-
defaultArrangement:
|
|
498
|
-
defaultAlignment:
|
|
511
|
+
defaultArrangement: je.Start,
|
|
512
|
+
defaultAlignment: Ne.Stretch
|
|
499
513
|
});
|
|
500
|
-
|
|
501
|
-
const
|
|
514
|
+
We.displayName = "Row";
|
|
515
|
+
const Ue = pe({
|
|
502
516
|
direction: "column",
|
|
503
|
-
defaultArrangement:
|
|
504
|
-
defaultAlignment:
|
|
517
|
+
defaultArrangement: ke.Top,
|
|
518
|
+
defaultAlignment: Oe.Stretch
|
|
505
519
|
});
|
|
506
|
-
|
|
520
|
+
Ue.displayName = "Column";
|
|
507
521
|
export {
|
|
508
|
-
|
|
509
|
-
|
|
522
|
+
Ue as Column,
|
|
523
|
+
Oe as HorizontalAlignment,
|
|
524
|
+
je as HorizontalArrangement,
|
|
525
|
+
We as Row,
|
|
526
|
+
Ne as VerticalAlignment,
|
|
527
|
+
ke as VerticalArrangement
|
|
510
528
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a4banana/react-layout-primitives",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": ["dist"],
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -22,10 +22,8 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^20.11.24",
|
|
24
24
|
"@types/react": "^19.0.0",
|
|
25
|
-
"@types/react-dom": "^19.0.0",
|
|
26
25
|
"@vitejs/plugin-react-swc": "^3.6.0",
|
|
27
26
|
"react": "^19.0.0",
|
|
28
|
-
"react-dom": "^19.0.0",
|
|
29
27
|
"typescript": "^5.7.0",
|
|
30
28
|
"vite": "^6.0.7",
|
|
31
29
|
"vite-plugin-dts": "^3.7.3"
|