@fewbox/den 0.1.41 → 0.1.43

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.
@@ -26,4 +26,4 @@ const rootdir = path.dirname(__filename);
26
26
  const projectRoot = process.env.INIT_CWD || process.cwd();
27
27
  const templateDir = path.join(rootdir, '../templates');
28
28
 
29
- copyFolderAsync(templateDir, projectRoot);
29
+ copyFolderAsync(templateDir, projectRoot);
@@ -0,0 +1,41 @@
1
+ const { readFileSync, writeFileSync, mkdirSync } = require('fs');
2
+ const { join } = require('path');
3
+
4
+ const root = join(__dirname, '..');
5
+
6
+ const config = JSON.parse(readFileSync(join(root, 'packages', 'variants.json'), 'utf8'));
7
+ const { common, npm: npmConfig, variants } = config;
8
+
9
+ const registries = ['github', 'npm'];
10
+
11
+ for (const registry of registries) {
12
+ for (const [variant, variantConfig] of Object.entries(variants)) {
13
+ const pkg = {
14
+ name: variantConfig.name,
15
+ version: common.version,
16
+ main: common.main,
17
+ types: variantConfig.types,
18
+ repository: common.repository,
19
+ author: common.author,
20
+ license: common.license,
21
+ type: common.type,
22
+ };
23
+
24
+ if (variantConfig.hasPostinstall) {
25
+ pkg.scripts = { postinstall: 'node scripts/copy-templates.js' };
26
+ }
27
+
28
+ if (registry === 'npm') {
29
+ pkg.publishConfig = npmConfig.publishConfig;
30
+ }
31
+
32
+ const basePeerDeps = variantConfig.overridePeerDependencies ? {} : { ...common.peerDependencies };
33
+ pkg.peerDependencies = { ...basePeerDeps, ...variantConfig.extraPeerDependencies };
34
+
35
+ const dir = join(root, 'packages', registry, variant);
36
+ mkdirSync(dir, { recursive: true });
37
+ writeFileSync(join(dir, 'package.json'), JSON.stringify(pkg, null, 2) + '\n');
38
+ }
39
+ }
40
+
41
+ console.log('Generated package.json files for all variants and registries.');
@@ -38,6 +38,9 @@ export interface IViewProps {
38
38
  overflow?: Property.Overflow;
39
39
  overflowX?: Property.OverflowX;
40
40
  overflowY?: Property.OverflowY;
41
+ selfShrink?: Property.FlexShrink;
42
+ selfGrow?: Property.FlexGrow;
43
+ selfBasis?: Property.FlexBasis;
41
44
  isDefaultValue?: boolean;
42
45
  customAttributes?: Object;
43
46
  }
@@ -122,91 +122,4 @@ export declare enum DirectionType {
122
122
  TopBottom = "top-bottom",
123
123
  LeftRight = "left-right"
124
124
  }
125
- export declare enum ComponentType {
126
- Flex = "Flex",
127
- FlexItem = "FlexItem",
128
- Position = "Position",
129
- PositionArea = "PositionArea",
130
- SBaseline = "SBaseline",
131
- SBottom = "SBottom",
132
- SLeft = "SLeft",
133
- SMiddle = "SMiddle",
134
- SCenter = "SCenter",
135
- SRight = "SRight",
136
- SStretch = "SStretch",
137
- STop = "STop",
138
- X = "X",
139
- XAround = "XAround",
140
- XAutoBoth = "XAutoBoth",
141
- XAutoCenter = "XAutoCenter",
142
- XAutoLeft = "XAutoLeft",
143
- XAutoLefts = "XAutoLefts",
144
- XAutoRight = "XAutoRight",
145
- XAutoRights = "XAutoRights",
146
- XBetween = "XBetween",
147
- XCenter = "XCenter",
148
- XCustom = "XCustom",
149
- XCustomBoth = "XCustomBoth",
150
- XEvenly = "XEvenly",
151
- XLeft = "XLeft",
152
- XRight = "XRight",
153
- XWrap = "XWrap",
154
- XWrapAround = "XWrapAround",
155
- XWrapBetween = "XWrapBetween",
156
- XWrapBottom = "XWrapBottom",
157
- XWrapEvenly = "XWrapEvenly",
158
- XWrapMiddle = "XWrapMiddle",
159
- XWrapTop = "XWrapTop",
160
- Y = "Y",
161
- YAround = "YAround",
162
- YBetween = "YBetween",
163
- YBottom = "YBottom",
164
- YEvenly = "YEvenly",
165
- YMiddle = "YMiddle",
166
- YTop = "YTop",
167
- VEllipse = "VEllipse",
168
- VLine = "VLine",
169
- VRectangle = "VRectangle",
170
- VAvatar = "VAvatar",
171
- VBlock = "VBlock",
172
- VBoundary = "VBoundary",
173
- VButton = "VButton",
174
- VCard = "VCard",
175
- VCardMedia = "VCardMedia",
176
- VCardSocial = "VCardSocial",
177
- VCardWindow = "VCardWindow",
178
- VChromeExtensionValidator = "VChromeExtensionValidator",
179
- VCodePreview = "VCodePreview",
180
- VDesigner = "VDesigner",
181
- VDynamic = "VDynamic",
182
- VBackground = "VBackground",
183
- VForm = "VForm",
184
- VImage = "VImage",
185
- VCheckBox = "VCheckBox",
186
- VColor = "VColor",
187
- VDate = "VDate",
188
- VDatetimeLocal = "VDatetimeLocal",
189
- VEmail = "VEmail",
190
- VFile = "VFile",
191
- VMonth = "VMonth",
192
- VNumber = "VNumber",
193
- VPassword = "VPassword",
194
- VRadio = "VRadio",
195
- VRange = "VRange",
196
- VSearch = "VSearch",
197
- VSubmit = "VSubmit",
198
- VTel = "VTel",
199
- VTextBox = "VTextBox",
200
- VTime = "VTime",
201
- VUrl = "VUrl",
202
- VWeek = "VWeek",
203
- VLabel = "VLabel",
204
- VLink = "VLink",
205
- VPhoto = "VPhoto",
206
- VShadow = "VShadow",
207
- VStack = "VStack",
208
- VSvg = "VSvg",
209
- VText = "VText",
210
- VTooltip = "VTooltip"
211
- }
212
125
  export declare const getGeneratedClassName: (className: string, isDefaultValue: boolean | undefined, sizeType?: FullFontSizeType, isAutoSize?: boolean, weightType?: FontWeightType, frontColorType?: FullColorType, backgroundColorType?: FullColorType, borderColorType?: FullColorType, borderDirection?: DirectionType, pseudoType?: PseudoType, pseudoFrontColor?: FullColorType, pseudoBackgroundColor?: FullColorType, pseudoBorderColor?: FullColorType, pseudoBorderDirection?: DirectionType) => string;
@@ -1,3 +1,4 @@
1
+ import { Property } from 'csstype';
1
2
  import { IBaseProps } from '../../Engine/Base';
2
3
  import { FlexAlignContentType, FlexJustifyContentType, FlexWrapType } from '../Flex';
3
4
  import { FlexItemAlignSelfType } from '../FlexItem';
@@ -11,6 +12,7 @@ export declare enum XCrossType {
11
12
  export interface IXBaseProps extends IBaseProps {
12
13
  gap?: string;
13
14
  cross?: XCrossType;
15
+ itemsShrink?: Property.FlexShrink;
14
16
  }
15
- declare const XBase: (props: IXBaseProps, overwriteRenderChildren?: (child: any, childIndex: number, alignSelf?: FlexItemAlignSelfType) => React.JSX.Element, overwriteGetWrap?: () => FlexWrapType, overwriteGetJustifyContent?: () => FlexJustifyContentType, overwriteGetAlignContent?: () => FlexAlignContentType) => React.JSX.Element;
17
+ declare const XBase: (props: IXBaseProps, overwriteRenderChildren?: (child: any, childIndex: number, alignSelf?: FlexItemAlignSelfType, itemsShrink?: Property.FlexShrink) => React.JSX.Element, overwriteGetWrap?: () => FlexWrapType, overwriteGetJustifyContent?: () => FlexJustifyContentType, overwriteGetAlignContent?: () => FlexAlignContentType) => React.JSX.Element;
16
18
  export default XBase;
@@ -1,3 +1,4 @@
1
+ import { Property } from 'csstype';
1
2
  import { IBaseProps } from '../../Engine/Base';
2
3
  import { FlexAlignContentType, FlexWrapType, FlexJustifyContentType } from '../Flex';
3
4
  import { FlexItemAlignSelfType } from '../FlexItem';
@@ -11,6 +12,7 @@ export declare enum YCrossType {
11
12
  export interface IYBaseProps extends IBaseProps {
12
13
  gap?: string;
13
14
  cross?: YCrossType;
15
+ itemsShrink?: Property.FlexShrink;
14
16
  }
15
- declare const YBase: (props: IYBaseProps, overwriteRenderChildren?: (child: any, childIndex: number, alignSelf?: FlexItemAlignSelfType) => React.JSX.Element, overwriteGetWrap?: () => FlexWrapType, overwriteGetAlignContent?: () => FlexAlignContentType, overwriteGetJustifyContent?: () => FlexJustifyContentType) => React.JSX.Element;
17
+ declare const YBase: (props: IYBaseProps, overwriteRenderChildren?: (child: any, childIndex: number, alignSelf?: FlexItemAlignSelfType, itemsShrink?: Property.FlexShrink) => React.JSX.Element, overwriteGetWrap?: () => FlexWrapType, overwriteGetAlignContent?: () => FlexAlignContentType, overwriteGetJustifyContent?: () => FlexJustifyContentType) => React.JSX.Element;
16
18
  export default YBase;
@@ -77,8 +77,8 @@ export declare enum AnimationCategory {
77
77
  RotateOutUpRight = "animate__rotateOutUpRight",
78
78
  Hinge = "animate__hinge",
79
79
  JackInTheBox = "animate__jackInTheBox",
80
- RollIn = "animate__zoomIn",
81
- RollOut = "animate__zoomIn",
80
+ RollIn = "animate__rollIn",
81
+ RollOut = "animate__rollOut",
82
82
  ZoomIn = "animate__zoomIn",
83
83
  ZoomInDown = "animate__zoomInDown",
84
84
  ZoomInLeft = "animate__zoomInLeft",
@@ -0,0 +1,18 @@
1
+ import { Component, ErrorInfo } from 'react';
2
+ export interface IVErrorBoundaryProps {
3
+ children: React.ReactNode;
4
+ fallback?: React.ReactNode | ((error: Error, errorInfo: ErrorInfo) => React.ReactNode);
5
+ onError?: (error: Error, errorInfo: ErrorInfo) => void;
6
+ }
7
+ interface IVErrorBoundaryState {
8
+ hasError: boolean;
9
+ error: Error | null;
10
+ errorInfo: ErrorInfo | null;
11
+ }
12
+ declare class VErrorBoundary extends Component<IVErrorBoundaryProps, IVErrorBoundaryState> {
13
+ constructor(props: IVErrorBoundaryProps);
14
+ static getDerivedStateFromError(error: Error): Partial<IVErrorBoundaryState>;
15
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
16
+ render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null | undefined;
17
+ }
18
+ export default VErrorBoundary;
@@ -9,5 +9,5 @@ export declare enum ImageCategory {
9
9
  export interface IVImageProps extends IBaseProps<'img'> {
10
10
  category?: ImageCategory;
11
11
  }
12
- declare const VImage: (props: IVImageProps) => React.JSX.Element;
13
- export default VImage;
12
+ declare const _default: import("react").MemoExoticComponent<(props: IVImageProps) => React.JSX.Element>;
13
+ export default _default;
@@ -53,4 +53,5 @@ export type IVLabelProps<C extends LabelCategory = LabelCategory.Span> = IBasePr
53
53
  caption: string | React.JSX.Element;
54
54
  };
55
55
  declare const VLabel: <C extends LabelCategory>(props: IVLabelProps<C>) => React.JSX.Element;
56
- export default VLabel;
56
+ declare const _default: typeof VLabel;
57
+ export default _default;
@@ -11,5 +11,5 @@ export interface IVSvgProps extends IBaseProps {
11
11
  onMouseEnter?: React.MouseEventHandler<any>;
12
12
  onMouseLeave?: React.MouseEventHandler<any>;
13
13
  }
14
- declare const VSvg: (props: IVSvgProps) => React.JSX.Element;
15
- export default VSvg;
14
+ declare const _default: import("react").MemoExoticComponent<(props: IVSvgProps) => React.JSX.Element>;
15
+ export default _default;
@@ -3,7 +3,7 @@ export { BreakpointType } from './Layout';
3
3
  export { default as VZone, ZoneCategory } from './View/VZone';
4
4
  export { default as Display, DisplayCategory, DisplayType } from './Layout/Display';
5
5
  export { default as Responsive } from './Layout/Responsive';
6
- export { FontSizeType, FontWeightType, FontFamilyType, BorderRadiusType, LineHeightType, LetterSpacingType, PaddingType, ViewSizeType, FullColorType, ColorType, ComponentType, getGeneratedClassName } from './Engine';
6
+ export { FontSizeType, FontWeightType, FontFamilyType, BorderRadiusType, LineHeightType, LetterSpacingType, PaddingType, ViewSizeType, FullColorType, ColorType, getGeneratedClassName } from './Engine';
7
7
  export { default as Dock, DockCategory, DockAlignment } from './Layout/Dock';
8
8
  export { default as Position, PositionCategory, PositionType } from './Layout/Position';
9
9
  export { default as PositionArea, PositionAreaCategory } from './Layout/PositionArea';
@@ -113,4 +113,5 @@ export { default as VFrame } from './View/VFrame';
113
113
  export { default as VTheme, ThemeCategory } from './View/VTheme';
114
114
  export { default as VTooltip, TooltipCategory } from './View/VTooltip';
115
115
  export { default as VLoading } from './View/VLoading';
116
+ export { default as VErrorBoundary } from './View/VErrorBoundary';
116
117
  export { convertFormDataToJson } from './util';
@@ -2,5 +2,6 @@ export { default as IList } from './IList';
2
2
  export { default as IPaging } from './IPaging';
3
3
  export { default as IContinuePaging } from './IContinuePaging';
4
4
  export { EnumDictionary } from './EnumDictionary';
5
+ export type { Json } from './Json';
5
6
  export { default as IMetaResponse } from './IMetaResponse';
6
7
  export { default as IPayloadResponse } from './IPayloadResponse';