@preply/ds-core 0.45.0 → 0.47.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * AUTO GENERATED @Thu Oct 20 2022 08:03:30 GMT+0000 (Coordinated Universal Time)
2
+ * AUTO GENERATED @Thu Nov 10 2022 09:32:35 GMT+0000 (Coordinated Universal Time)
3
3
  */
4
4
  /**
5
5
  * avatar.size.*
@@ -12,7 +12,7 @@ export declare type BoxPadding = 'none' | '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l'
12
12
  /**
13
13
  * box.radius.*
14
14
  */
15
- export declare type BoxRadius = 'm' | 'l';
15
+ export declare type BoxRadius = 'none' | 'm' | 'l';
16
16
  /**
17
17
  * responsive.breakpoints.*
18
18
  */
@@ -28,7 +28,7 @@ export declare type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'quat
28
28
  /**
29
29
  * color.*
30
30
  */
31
- export declare type ColorName = 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'teal-100' | 'teal-200' | 'teal-300' | 'teal-400' | 'teal-500' | 'green-100' | 'green-200' | 'green-300' | 'green-400' | 'green-500' | 'yellow-100' | 'yellow-200' | 'yellow-300' | 'yellow-400' | 'yellow-500' | 'red-100' | 'red-200' | 'red-300' | 'red-400' | 'red-500' | 'blue-100' | 'blue-200' | 'blue-300' | 'blue-400' | 'blue-500' | 'magenta-100' | 'magenta-200' | 'magenta-300' | 'magenta-400' | 'magenta-500';
31
+ export declare type ColorName = 'white' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'teal-100' | 'teal-200' | 'teal-300' | 'teal-400' | 'teal-500' | 'green-100' | 'green-200' | 'green-300' | 'green-400' | 'green-500' | 'yellow-100' | 'yellow-200' | 'yellow-300' | 'yellow-400' | 'yellow-500' | 'red-100' | 'red-200' | 'red-300' | 'red-400' | 'red-500' | 'blue-100' | 'blue-200' | 'blue-300' | 'blue-400' | 'blue-500' | 'magenta-100' | 'magenta-200' | 'magenta-300' | 'magenta-400' | 'magenta-500';
32
32
  /**
33
33
  * core.colorScheme.*
34
34
  */
@@ -76,7 +76,7 @@ export declare type LayoutPadding = 'none' | '3xs' | '2xs' | 'xs' | 's' | 'm' |
76
76
  /**
77
77
  * layout.tag.*
78
78
  */
79
- export declare type LayoutTag = 'div' | 'main' | 'header' | 'footer' | 'article' | 'section' | 'ul' | 'ol' | 'li' | 'p' | 'span';
79
+ export declare type LayoutTag = 'div' | 'main' | 'header' | 'footer' | 'article' | 'section' | 'ul' | 'ol' | 'li' | 'p' | 'span' | 'fieldset' | 'table' | 'th' | 'tr' | 'td' | 'thead' | 'tfoot' | 'tbody' | 'caption' | 'figure' | 'figcaption';
80
80
  /**
81
81
  * panel.padding.*.padding
82
82
  */
@@ -0,0 +1 @@
1
+ export * from './utils/generators';
@@ -0,0 +1,2 @@
1
+ export { makeTinyId } from './utils/generators.js';
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -0,0 +1 @@
1
+ export declare const makeTinyId: () => string;
@@ -0,0 +1,13 @@
1
+ const TINY_ID_LENGTH = 8;
2
+ const CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
3
+ const generateId = (length) => {
4
+ let s = '';
5
+ while (s.length < length) {
6
+ s += CHARS[Math.floor(Math.random() * CHARS.length)];
7
+ }
8
+ return s;
9
+ };
10
+ const makeTinyId = () => generateId(TINY_ID_LENGTH);
11
+
12
+ export { makeTinyId };
13
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdG9ycy5q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yxjQUFjOzs7OyJ9
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './generated/options';
6
6
  export * from './avatar';
7
7
  export * from './color-scheme';
8
8
  export * from './dataset';
9
+ export * from './id';
9
10
  export * from './layout';
10
11
  export * from './responsive';
11
12
  export * from './theme';
package/dist/index.js CHANGED
@@ -4,7 +4,8 @@ export { action, avatar, background, box, content, heading, icon, panel, root, s
4
4
  export { AVATAR_SIZE_OPTIONS, BOX_PADDING_OPTIONS, BOX_RADIUS_OPTIONS, BUTTON_SIZE_OPTIONS, BUTTON_VARIANT_OPTIONS, COLOR_NAME_OPTIONS, COLOR_SCHEME_OPTIONS, HEADING_LEVEL_OPTIONS, HEADING_TAG_OPTIONS, ICON_SIZE_OPTIONS, LAYOUT_ALIGN_ITEMS_OPTIONS, LAYOUT_ALIGN_SELF_OPTIONS, LAYOUT_FLEX_DIRECTION_OPTIONS, LAYOUT_GAP_OPTIONS, LAYOUT_JUSTIFY_CONTENT_OPTIONS, LAYOUT_JUSTIFY_ITEMS_OPTIONS, LAYOUT_PADDING_OPTIONS, LAYOUT_TAG_OPTIONS, PANEL_PADDING_OPTIONS, PREPLY_LOGO_VARIANT_OPTIONS, TEXT_ACCENT_OPTIONS, TEXT_HIGHLIGHT_OPTIONS, TEXT_INLINE_TAG_OPTIONS, TEXT_SIZE_OPTIONS, TEXT_TAG_OPTIONS, TEXT_VARIANT_OPTIONS, TEXT_WEIGHT_OPTIONS, THEME_OPTIONS } from './generated/options.js';
5
5
  export { AVATAR_SRC_DEFAULT } from './avatar/constants.js';
6
6
  export { colorSchemeConfig } from './color-scheme/config.js';
7
+ export { makeTinyId } from './id/utils/generators.js';
7
8
  export { LAYOUT_DISPLAY_DEFAULT } from './layout/constants.js';
8
9
  export { isToken } from './token/utils/isToken.js';
9
10
  export { normalizeShorthand } from './props/normalizeShorthand.js';
10
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OzsifQ==
11
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7In0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preply/ds-core",
3
- "version": "0.45.0",
3
+ "version": "0.47.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -19,10 +19,10 @@
19
19
  "dev": "run build:rollup -w"
20
20
  },
21
21
  "dependencies": {
22
- "@preply/ds-core-types": "0.45.0"
22
+ "@preply/ds-core-types": "0.47.0"
23
23
  },
24
24
  "peerDependencies": {
25
- "@preply/ds-core-types": "0.45.0"
25
+ "@preply/ds-core-types": "0.47.0"
26
26
  },
27
- "gitHead": "03d6ddbd1905f16d4ab455162cd178410904a8bd"
27
+ "gitHead": "9c70f1ccd45196cc6e404e1d4f59ebfe90f33e9d"
28
28
  }