@salutejs/plasma-sb-utils 0.233.0-next-sbcom.0 → 0.234.0-dev.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/lib/components/BottomSheet/BottomSheet.d.ts +120 -0
- package/lib/components/BottomSheet/BottomSheet.js +40 -0
- package/lib/components/BottomSheet/BottomSheet.js.map +1 -0
- package/lib/components/BottomSheet/fixtures.d.ts +5 -0
- package/lib/components/BottomSheet/fixtures.js +11 -0
- package/lib/components/BottomSheet/fixtures.js.map +1 -0
- package/lib/components/BottomSheet/index.d.ts +1 -0
- package/lib/components/BottomSheet/index.js +2 -0
- package/lib/components/BottomSheet/index.js.map +1 -0
- package/lib/components/BottomSheet/meta.d.ts +109 -0
- package/lib/components/BottomSheet/meta.js +75 -0
- package/lib/components/BottomSheet/meta.js.map +1 -0
- package/lib/components/BottomSheet/stories.d.ts +8 -0
- package/lib/components/BottomSheet/stories.js +58 -0
- package/lib/components/BottomSheet/stories.js.map +1 -0
- package/lib/components/Dropdown/stories.js +1 -1
- package/lib/components/Dropdown/stories.js.map +1 -1
- package/lib/components/Rating/Rating.d.ts +164 -0
- package/lib/components/Rating/Rating.js +46 -0
- package/lib/components/Rating/Rating.js.map +1 -0
- package/lib/components/Rating/fixtures.d.ts +4 -0
- package/lib/components/Rating/fixtures.js +5 -0
- package/lib/components/Rating/fixtures.js.map +1 -0
- package/lib/components/Rating/index.d.ts +1 -0
- package/lib/components/Rating/index.js +2 -0
- package/lib/components/Rating/index.js.map +1 -0
- package/lib/components/Rating/meta.d.ts +147 -0
- package/lib/components/Rating/meta.js +79 -0
- package/lib/components/Rating/meta.js.map +1 -0
- package/lib/components/Rating/stories.d.ts +8 -0
- package/lib/components/Rating/stories.js +44 -0
- package/lib/components/Rating/stories.js.map +1 -0
- package/lib/components/TextArea/TextArea.d.ts +4 -8
- package/lib/components/TextArea/TextArea.js +4 -0
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/TextArea/meta.d.ts +0 -8
- package/lib/components/TextArea/meta.js +0 -2
- package/lib/components/TextArea/meta.js.map +1 -1
- package/lib/components/TextArea/stories.d.ts +1 -1
- package/lib/components/TextArea/stories.js +3 -3
- package/lib/components/TextArea/stories.js.map +1 -1
- package/lib/components/_ai/Answer/Answer.d.ts +131 -0
- package/lib/components/_ai/Answer/Answer.js +22 -0
- package/lib/components/_ai/Answer/Answer.js.map +1 -0
- package/lib/components/_ai/Answer/index.d.ts +1 -0
- package/lib/components/_ai/Answer/index.js +2 -0
- package/lib/components/_ai/Answer/index.js.map +1 -0
- package/lib/components/_ai/Answer/meta.d.ts +126 -0
- package/lib/components/_ai/Answer/meta.js +88 -0
- package/lib/components/_ai/Answer/meta.js.map +1 -0
- package/lib/components/_ai/Answer/stories.d.ts +1 -0
- package/lib/components/_ai/Answer/stories.js +129 -0
- package/lib/components/_ai/Answer/stories.js.map +1 -0
- package/lib/components/_ai/Container/Container.d.ts +208 -0
- package/lib/components/_ai/Container/Container.js +22 -0
- package/lib/components/_ai/Container/Container.js.map +1 -0
- package/lib/components/_ai/Container/index.d.ts +1 -0
- package/lib/components/_ai/Container/index.js +2 -0
- package/lib/components/_ai/Container/index.js.map +1 -0
- package/lib/components/_ai/Container/meta.d.ts +203 -0
- package/lib/components/_ai/Container/meta.js +144 -0
- package/lib/components/_ai/Container/meta.js.map +1 -0
- package/lib/components/_ai/Container/stories.d.ts +1 -0
- package/lib/components/_ai/Container/stories.js +243 -0
- package/lib/components/_ai/Container/stories.js.map +1 -0
- package/lib/components/_ai/Header/Header.d.ts +94 -0
- package/lib/components/_ai/Header/Header.js +22 -0
- package/lib/components/_ai/Header/Header.js.map +1 -0
- package/lib/components/_ai/Header/index.d.ts +1 -0
- package/lib/components/_ai/Header/index.js +2 -0
- package/lib/components/_ai/Header/index.js.map +1 -0
- package/lib/components/_ai/Header/meta.d.ts +89 -0
- package/lib/components/_ai/Header/meta.js +76 -0
- package/lib/components/_ai/Header/meta.js.map +1 -0
- package/lib/components/_ai/Header/stories.d.ts +1 -0
- package/lib/components/_ai/Header/stories.js +36 -0
- package/lib/components/_ai/Header/stories.js.map +1 -0
- package/lib/components/_ai/Input/Input.d.ts +109 -0
- package/lib/components/_ai/Input/Input.js +21 -0
- package/lib/components/_ai/Input/Input.js.map +1 -0
- package/lib/components/_ai/Input/index.d.ts +1 -0
- package/lib/components/_ai/Input/index.js +2 -0
- package/lib/components/_ai/Input/index.js.map +1 -0
- package/lib/components/_ai/Input/meta.d.ts +104 -0
- package/lib/components/_ai/Input/meta.js +95 -0
- package/lib/components/_ai/Input/meta.js.map +1 -0
- package/lib/components/_ai/Input/stories.d.ts +1 -0
- package/lib/components/_ai/Input/stories.js +103 -0
- package/lib/components/_ai/Input/stories.js.map +1 -0
- package/lib/components/_ai/Markdown/Markdown.d.ts +69 -0
- package/lib/components/_ai/Markdown/Markdown.js +19 -0
- package/lib/components/_ai/Markdown/Markdown.js.map +1 -0
- package/lib/components/_ai/Markdown/index.d.ts +1 -0
- package/lib/components/_ai/Markdown/index.js +2 -0
- package/lib/components/_ai/Markdown/index.js.map +1 -0
- package/lib/components/_ai/Markdown/meta.d.ts +36 -0
- package/lib/components/_ai/Markdown/meta.js +41 -0
- package/lib/components/_ai/Markdown/meta.js.map +1 -0
- package/lib/components/_ai/Markdown/stories.d.ts +34 -0
- package/lib/components/_ai/Markdown/stories.js +94 -0
- package/lib/components/_ai/Markdown/stories.js.map +1 -0
- package/lib/components/_ai/UserMessage/UserMessage.d.ts +81 -0
- package/lib/components/_ai/UserMessage/UserMessage.js +22 -0
- package/lib/components/_ai/UserMessage/UserMessage.js.map +1 -0
- package/lib/components/_ai/UserMessage/index.d.ts +1 -0
- package/lib/components/_ai/UserMessage/index.js +2 -0
- package/lib/components/_ai/UserMessage/index.js.map +1 -0
- package/lib/components/_ai/UserMessage/meta.d.ts +76 -0
- package/lib/components/_ai/UserMessage/meta.js +77 -0
- package/lib/components/_ai/UserMessage/meta.js.map +1 -0
- package/lib/components/_ai/UserMessage/stories.d.ts +1 -0
- package/lib/components/_ai/UserMessage/stories.js +115 -0
- package/lib/components/_ai/UserMessage/stories.js.map +1 -0
- package/lib/components/_ai/index.d.ts +6 -0
- package/lib/components/_ai/index.js +7 -0
- package/lib/components/_ai/index.js.map +1 -0
- package/lib/components/disabledToolsParameters.d.ts +30 -0
- package/lib/components/disabledToolsParameters.js +25 -0
- package/lib/components/disabledToolsParameters.js.map +1 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/components/index.js +4 -0
- package/lib/components/index.js.map +1 -1
- package/lib/managerVersions.d.ts +29 -0
- package/lib/managerVersions.js +69 -0
- package/lib/managerVersions.js.map +1 -0
- package/package.json +15 -4
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Globally hides the `Measure`, `Outline` and `Backgrounds` (incl. its grid) toolbar tools.
|
|
3
|
+
*
|
|
4
|
+
* In Storybook 10 these are `type: 'tool'` toolbar items (not panels), so
|
|
5
|
+
* `parameters: { measure: { disable: true } }` does NOT remove them — that key
|
|
6
|
+
* only affects addon panels. Likewise `backgrounds: { grid: { disable: true } }`
|
|
7
|
+
* is legacy SB6/7 syntax: in SB10 `GridConfig` has no `disable` field, the grid is
|
|
8
|
+
* part of the single backgrounds tool and is toggled via the `backgrounds` global.
|
|
9
|
+
*
|
|
10
|
+
* Toolbar tools are hidden via `toolbar[<tool id>].hidden`, which Storybook merges
|
|
11
|
+
* from `parameters.toolbar` (and/or `addons.setConfig`).
|
|
12
|
+
*
|
|
13
|
+
* Tool ids come from Storybook core constants:
|
|
14
|
+
* - measure: `${ADDON_ID}/tool` where ADDON_ID = 'storybook/measure-addon'
|
|
15
|
+
* - outline: ADDON_ID = 'storybook/outline'
|
|
16
|
+
* - backgrounds: ADDON_ID = 'storybook/background' (color switcher + grid live here)
|
|
17
|
+
*/
|
|
18
|
+
export declare const disabledToolsParameters: {
|
|
19
|
+
toolbar: {
|
|
20
|
+
'storybook/measure-addon/tool': {
|
|
21
|
+
hidden: boolean;
|
|
22
|
+
};
|
|
23
|
+
'storybook/outline': {
|
|
24
|
+
hidden: boolean;
|
|
25
|
+
};
|
|
26
|
+
'storybook/background': {
|
|
27
|
+
hidden: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Globally hides the `Measure`, `Outline` and `Backgrounds` (incl. its grid) toolbar tools.
|
|
3
|
+
*
|
|
4
|
+
* In Storybook 10 these are `type: 'tool'` toolbar items (not panels), so
|
|
5
|
+
* `parameters: { measure: { disable: true } }` does NOT remove them — that key
|
|
6
|
+
* only affects addon panels. Likewise `backgrounds: { grid: { disable: true } }`
|
|
7
|
+
* is legacy SB6/7 syntax: in SB10 `GridConfig` has no `disable` field, the grid is
|
|
8
|
+
* part of the single backgrounds tool and is toggled via the `backgrounds` global.
|
|
9
|
+
*
|
|
10
|
+
* Toolbar tools are hidden via `toolbar[<tool id>].hidden`, which Storybook merges
|
|
11
|
+
* from `parameters.toolbar` (and/or `addons.setConfig`).
|
|
12
|
+
*
|
|
13
|
+
* Tool ids come from Storybook core constants:
|
|
14
|
+
* - measure: `${ADDON_ID}/tool` where ADDON_ID = 'storybook/measure-addon'
|
|
15
|
+
* - outline: ADDON_ID = 'storybook/outline'
|
|
16
|
+
* - backgrounds: ADDON_ID = 'storybook/background' (color switcher + grid live here)
|
|
17
|
+
*/
|
|
18
|
+
export var disabledToolsParameters = {
|
|
19
|
+
toolbar: {
|
|
20
|
+
'storybook/measure-addon/tool': { hidden: true },
|
|
21
|
+
'storybook/outline': { hidden: true },
|
|
22
|
+
'storybook/background': { hidden: true },
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=disabledToolsParameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disabledToolsParameters.js","sourceRoot":"","sources":["../../src/components/disabledToolsParameters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAAG;IACnC,OAAO,EAAE;QACL,8BAA8B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;QAChD,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;QACrC,sBAAsB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;KAC3C;CACJ,CAAC"}
|
|
@@ -4,6 +4,7 @@ export { PaletteGrid } from './PaletteGrid';
|
|
|
4
4
|
export { InSpacing as InSpacingDecorator } from './StoryDecorators';
|
|
5
5
|
export { ThemeColors } from './ThemeColors';
|
|
6
6
|
export { withReactStrictMode, reactStrictModePreviewOption } from './ReactStrictModeDecorator';
|
|
7
|
+
export { disabledToolsParameters } from './disabledToolsParameters';
|
|
7
8
|
export * from './Button';
|
|
8
9
|
export * from './EmbeddedButton';
|
|
9
10
|
export * from './TextField';
|
|
@@ -31,6 +32,7 @@ export * from './Slider';
|
|
|
31
32
|
export * from './Select';
|
|
32
33
|
export * from './Combobox';
|
|
33
34
|
export * from './Dropdown';
|
|
35
|
+
export * from './BottomSheet';
|
|
34
36
|
export * from './Popover';
|
|
35
37
|
export * from './Dropzone';
|
|
36
38
|
export * from './Progress';
|
|
@@ -40,3 +42,5 @@ export * from './Badge';
|
|
|
40
42
|
export * from './CodeField';
|
|
41
43
|
export * from './CodeInput';
|
|
42
44
|
export * from './CodeArea';
|
|
45
|
+
export * from './Rating';
|
|
46
|
+
export * from './_ai';
|
package/lib/components/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { PaletteGrid } from './PaletteGrid';
|
|
|
4
4
|
export { InSpacing as InSpacingDecorator } from './StoryDecorators';
|
|
5
5
|
export { ThemeColors } from './ThemeColors';
|
|
6
6
|
export { withReactStrictMode, reactStrictModePreviewOption } from './ReactStrictModeDecorator';
|
|
7
|
+
export { disabledToolsParameters } from './disabledToolsParameters';
|
|
7
8
|
export * from './Button';
|
|
8
9
|
export * from './EmbeddedButton';
|
|
9
10
|
export * from './TextField';
|
|
@@ -31,6 +32,7 @@ export * from './Slider';
|
|
|
31
32
|
export * from './Select';
|
|
32
33
|
export * from './Combobox';
|
|
33
34
|
export * from './Dropdown';
|
|
35
|
+
export * from './BottomSheet';
|
|
34
36
|
export * from './Popover';
|
|
35
37
|
export * from './Dropzone';
|
|
36
38
|
export * from './Progress';
|
|
@@ -40,4 +42,6 @@ export * from './Badge';
|
|
|
40
42
|
export * from './CodeField';
|
|
41
43
|
export * from './CodeInput';
|
|
42
44
|
export * from './CodeArea';
|
|
45
|
+
export * from './Rating';
|
|
46
|
+
export * from './_ai';
|
|
43
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC/F,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;A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C;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type PackageVersion = {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
};
|
|
6
|
+
export type RegisterPackageVersionsOptions = {
|
|
7
|
+
/** Unique addon id. Defaults to `plasma/package-versions`. */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** Toolbar item title (tooltip). Defaults to `Package versions`. */
|
|
10
|
+
title?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Presentational badge that lists packages and their versions.
|
|
14
|
+
* Rendered inside a Storybook manager slot (toolbar, panel, etc.).
|
|
15
|
+
*/
|
|
16
|
+
export declare const PackageVersions: React.FC<{
|
|
17
|
+
packages: PackageVersion[];
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Registers a Storybook manager toolbar item that shows the given packages and versions.
|
|
21
|
+
* Call it from a package `.storybook/manager.{ts,tsx}` alongside `addons.setConfig`.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* registerPackageVersions([
|
|
25
|
+
* { name: 'sdds-serv', version: servVersion },
|
|
26
|
+
* { name: 'sdds-themes', version: themesVersion },
|
|
27
|
+
* ]);
|
|
28
|
+
*/
|
|
29
|
+
export declare const registerPackageVersions: (packages: PackageVersion[], options?: RegisterPackageVersionsOptions) => void;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { addons, types } from 'storybook/manager-api';
|
|
3
|
+
import { styled } from 'storybook/theming';
|
|
4
|
+
var Root = styled.div(function (_a) {
|
|
5
|
+
var theme = _a.theme;
|
|
6
|
+
return ({
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
gap: 12,
|
|
10
|
+
height: '100%',
|
|
11
|
+
padding: '0 10px',
|
|
12
|
+
fontFamily: theme.typography.fonts.base,
|
|
13
|
+
fontSize: theme.typography.size.s1,
|
|
14
|
+
lineHeight: 1,
|
|
15
|
+
color: theme.color.mediumdark,
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
var Item = styled.span({
|
|
20
|
+
display: 'inline-flex',
|
|
21
|
+
gap: 4,
|
|
22
|
+
});
|
|
23
|
+
var Value = styled.b(function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return ({
|
|
26
|
+
fontWeight: theme.typography.weight.bold,
|
|
27
|
+
color: theme.color.defaultText,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Presentational badge that lists packages and their versions.
|
|
32
|
+
* Rendered inside a Storybook manager slot (toolbar, panel, etc.).
|
|
33
|
+
*/
|
|
34
|
+
export var PackageVersions = function (_a) {
|
|
35
|
+
var packages = _a.packages;
|
|
36
|
+
return (React.createElement(Root, null, packages.map(function (_a) {
|
|
37
|
+
var name = _a.name, version = _a.version;
|
|
38
|
+
return (React.createElement(Item, { key: name },
|
|
39
|
+
name,
|
|
40
|
+
" ",
|
|
41
|
+
React.createElement(Value, null,
|
|
42
|
+
"v",
|
|
43
|
+
version)));
|
|
44
|
+
})));
|
|
45
|
+
};
|
|
46
|
+
var DEFAULT_ADDON_ID = 'plasma/package-versions';
|
|
47
|
+
/**
|
|
48
|
+
* Registers a Storybook manager toolbar item that shows the given packages and versions.
|
|
49
|
+
* Call it from a package `.storybook/manager.{ts,tsx}` alongside `addons.setConfig`.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* registerPackageVersions([
|
|
53
|
+
* { name: 'sdds-serv', version: servVersion },
|
|
54
|
+
* { name: 'sdds-themes', version: themesVersion },
|
|
55
|
+
* ]);
|
|
56
|
+
*/
|
|
57
|
+
export var registerPackageVersions = function (packages, options) {
|
|
58
|
+
if (options === void 0) { options = {}; }
|
|
59
|
+
var _a = options.id, id = _a === void 0 ? DEFAULT_ADDON_ID : _a, _b = options.title, title = _b === void 0 ? 'Package versions' : _b;
|
|
60
|
+
addons.register(id, function () {
|
|
61
|
+
addons.add("".concat(id, "/tool"), {
|
|
62
|
+
type: types.TOOLEXTRA,
|
|
63
|
+
title: title,
|
|
64
|
+
match: function () { return true; },
|
|
65
|
+
render: function () { return React.createElement(PackageVersions, { packages: packages }); },
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=managerVersions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managerVersions.js","sourceRoot":"","sources":["../src/managerVersions.tsx"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,EAAE,IAAI;YACV,IAAI;;YAAE,oBAAC,KAAK;;gBAAG,OAAO,CAAS,CAC7B,CACV;IAJoC,CAIpC,CAAC,CACC,CACV;AAR0F,CAQ1F,CAAC;AAEF,IAAM,gBAAgB,GAAG,yBAAyB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,QAA0B,EAAE,OAA4C;IAA5C,wBAAA,EAAA,YAA4C;IACpG,IAAA,KAAsD,OAAO,GAAxC,EAArB,EAAE,mBAAG,gBAAgB,KAAA,EAAE,KAA+B,OAAO,MAAZ,EAA1B,KAAK,mBAAG,kBAAkB,KAAA,CAAa;IAEtE,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE;QAChB,MAAM,CAAC,GAAG,CAAC,UAAG,EAAE,UAAO,EAAE;YACrB,IAAI,EAAE,KAAK,CAAC,SAAS;YACrB,KAAK,OAAA;YACL,KAAK,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;YACjB,MAAM,EAAE,cAAM,OAAA,oBAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,GAAI,EAAvC,CAAuC;SACxD,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salutejs/plasma-sb-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.234.0-dev.0",
|
|
4
4
|
"description": "Code shared between ui libraries.",
|
|
5
5
|
"author": "Salute Frontend Team <salute.developers@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"types": "lib/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
|
+
"default": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./managerVersions": {
|
|
15
|
+
"types": "./lib/managerVersions.d.ts",
|
|
16
|
+
"default": "./lib/managerVersions.js"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
9
20
|
"repository": {
|
|
10
21
|
"type": "git",
|
|
11
22
|
"url": "ssh://git@github.com:salute-developers/plasma.git",
|
|
@@ -21,8 +32,8 @@
|
|
|
21
32
|
"dependencies": {
|
|
22
33
|
"@emotion/react": "11.14.0",
|
|
23
34
|
"@salutejs/plasma-colors": "0.16.0",
|
|
24
|
-
"@salutejs/plasma-core": "1.
|
|
25
|
-
"@salutejs/plasma-icons": "1.
|
|
35
|
+
"@salutejs/plasma-core": "1.233.0-dev.0",
|
|
36
|
+
"@salutejs/plasma-icons": "1.243.0-dev.0",
|
|
26
37
|
"@storybook/react": "10.3.4",
|
|
27
38
|
"param-case": "^3.0.4"
|
|
28
39
|
},
|
|
@@ -46,5 +57,5 @@
|
|
|
46
57
|
"files": [
|
|
47
58
|
"lib"
|
|
48
59
|
],
|
|
49
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "efcc8fe5582bdd90d0db16c3250d021f08b1288b"
|
|
50
61
|
}
|