@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.
Files changed (126) hide show
  1. package/lib/components/BottomSheet/BottomSheet.d.ts +120 -0
  2. package/lib/components/BottomSheet/BottomSheet.js +40 -0
  3. package/lib/components/BottomSheet/BottomSheet.js.map +1 -0
  4. package/lib/components/BottomSheet/fixtures.d.ts +5 -0
  5. package/lib/components/BottomSheet/fixtures.js +11 -0
  6. package/lib/components/BottomSheet/fixtures.js.map +1 -0
  7. package/lib/components/BottomSheet/index.d.ts +1 -0
  8. package/lib/components/BottomSheet/index.js +2 -0
  9. package/lib/components/BottomSheet/index.js.map +1 -0
  10. package/lib/components/BottomSheet/meta.d.ts +109 -0
  11. package/lib/components/BottomSheet/meta.js +75 -0
  12. package/lib/components/BottomSheet/meta.js.map +1 -0
  13. package/lib/components/BottomSheet/stories.d.ts +8 -0
  14. package/lib/components/BottomSheet/stories.js +58 -0
  15. package/lib/components/BottomSheet/stories.js.map +1 -0
  16. package/lib/components/Dropdown/stories.js +1 -1
  17. package/lib/components/Dropdown/stories.js.map +1 -1
  18. package/lib/components/Rating/Rating.d.ts +164 -0
  19. package/lib/components/Rating/Rating.js +46 -0
  20. package/lib/components/Rating/Rating.js.map +1 -0
  21. package/lib/components/Rating/fixtures.d.ts +4 -0
  22. package/lib/components/Rating/fixtures.js +5 -0
  23. package/lib/components/Rating/fixtures.js.map +1 -0
  24. package/lib/components/Rating/index.d.ts +1 -0
  25. package/lib/components/Rating/index.js +2 -0
  26. package/lib/components/Rating/index.js.map +1 -0
  27. package/lib/components/Rating/meta.d.ts +147 -0
  28. package/lib/components/Rating/meta.js +79 -0
  29. package/lib/components/Rating/meta.js.map +1 -0
  30. package/lib/components/Rating/stories.d.ts +8 -0
  31. package/lib/components/Rating/stories.js +44 -0
  32. package/lib/components/Rating/stories.js.map +1 -0
  33. package/lib/components/TextArea/TextArea.d.ts +4 -8
  34. package/lib/components/TextArea/TextArea.js +4 -0
  35. package/lib/components/TextArea/TextArea.js.map +1 -1
  36. package/lib/components/TextArea/meta.d.ts +0 -8
  37. package/lib/components/TextArea/meta.js +0 -2
  38. package/lib/components/TextArea/meta.js.map +1 -1
  39. package/lib/components/TextArea/stories.d.ts +1 -1
  40. package/lib/components/TextArea/stories.js +3 -3
  41. package/lib/components/TextArea/stories.js.map +1 -1
  42. package/lib/components/_ai/Answer/Answer.d.ts +131 -0
  43. package/lib/components/_ai/Answer/Answer.js +22 -0
  44. package/lib/components/_ai/Answer/Answer.js.map +1 -0
  45. package/lib/components/_ai/Answer/index.d.ts +1 -0
  46. package/lib/components/_ai/Answer/index.js +2 -0
  47. package/lib/components/_ai/Answer/index.js.map +1 -0
  48. package/lib/components/_ai/Answer/meta.d.ts +126 -0
  49. package/lib/components/_ai/Answer/meta.js +88 -0
  50. package/lib/components/_ai/Answer/meta.js.map +1 -0
  51. package/lib/components/_ai/Answer/stories.d.ts +1 -0
  52. package/lib/components/_ai/Answer/stories.js +129 -0
  53. package/lib/components/_ai/Answer/stories.js.map +1 -0
  54. package/lib/components/_ai/Container/Container.d.ts +208 -0
  55. package/lib/components/_ai/Container/Container.js +22 -0
  56. package/lib/components/_ai/Container/Container.js.map +1 -0
  57. package/lib/components/_ai/Container/index.d.ts +1 -0
  58. package/lib/components/_ai/Container/index.js +2 -0
  59. package/lib/components/_ai/Container/index.js.map +1 -0
  60. package/lib/components/_ai/Container/meta.d.ts +203 -0
  61. package/lib/components/_ai/Container/meta.js +144 -0
  62. package/lib/components/_ai/Container/meta.js.map +1 -0
  63. package/lib/components/_ai/Container/stories.d.ts +1 -0
  64. package/lib/components/_ai/Container/stories.js +243 -0
  65. package/lib/components/_ai/Container/stories.js.map +1 -0
  66. package/lib/components/_ai/Header/Header.d.ts +94 -0
  67. package/lib/components/_ai/Header/Header.js +22 -0
  68. package/lib/components/_ai/Header/Header.js.map +1 -0
  69. package/lib/components/_ai/Header/index.d.ts +1 -0
  70. package/lib/components/_ai/Header/index.js +2 -0
  71. package/lib/components/_ai/Header/index.js.map +1 -0
  72. package/lib/components/_ai/Header/meta.d.ts +89 -0
  73. package/lib/components/_ai/Header/meta.js +76 -0
  74. package/lib/components/_ai/Header/meta.js.map +1 -0
  75. package/lib/components/_ai/Header/stories.d.ts +1 -0
  76. package/lib/components/_ai/Header/stories.js +36 -0
  77. package/lib/components/_ai/Header/stories.js.map +1 -0
  78. package/lib/components/_ai/Input/Input.d.ts +109 -0
  79. package/lib/components/_ai/Input/Input.js +21 -0
  80. package/lib/components/_ai/Input/Input.js.map +1 -0
  81. package/lib/components/_ai/Input/index.d.ts +1 -0
  82. package/lib/components/_ai/Input/index.js +2 -0
  83. package/lib/components/_ai/Input/index.js.map +1 -0
  84. package/lib/components/_ai/Input/meta.d.ts +104 -0
  85. package/lib/components/_ai/Input/meta.js +95 -0
  86. package/lib/components/_ai/Input/meta.js.map +1 -0
  87. package/lib/components/_ai/Input/stories.d.ts +1 -0
  88. package/lib/components/_ai/Input/stories.js +103 -0
  89. package/lib/components/_ai/Input/stories.js.map +1 -0
  90. package/lib/components/_ai/Markdown/Markdown.d.ts +69 -0
  91. package/lib/components/_ai/Markdown/Markdown.js +19 -0
  92. package/lib/components/_ai/Markdown/Markdown.js.map +1 -0
  93. package/lib/components/_ai/Markdown/index.d.ts +1 -0
  94. package/lib/components/_ai/Markdown/index.js +2 -0
  95. package/lib/components/_ai/Markdown/index.js.map +1 -0
  96. package/lib/components/_ai/Markdown/meta.d.ts +36 -0
  97. package/lib/components/_ai/Markdown/meta.js +41 -0
  98. package/lib/components/_ai/Markdown/meta.js.map +1 -0
  99. package/lib/components/_ai/Markdown/stories.d.ts +34 -0
  100. package/lib/components/_ai/Markdown/stories.js +94 -0
  101. package/lib/components/_ai/Markdown/stories.js.map +1 -0
  102. package/lib/components/_ai/UserMessage/UserMessage.d.ts +81 -0
  103. package/lib/components/_ai/UserMessage/UserMessage.js +22 -0
  104. package/lib/components/_ai/UserMessage/UserMessage.js.map +1 -0
  105. package/lib/components/_ai/UserMessage/index.d.ts +1 -0
  106. package/lib/components/_ai/UserMessage/index.js +2 -0
  107. package/lib/components/_ai/UserMessage/index.js.map +1 -0
  108. package/lib/components/_ai/UserMessage/meta.d.ts +76 -0
  109. package/lib/components/_ai/UserMessage/meta.js +77 -0
  110. package/lib/components/_ai/UserMessage/meta.js.map +1 -0
  111. package/lib/components/_ai/UserMessage/stories.d.ts +1 -0
  112. package/lib/components/_ai/UserMessage/stories.js +115 -0
  113. package/lib/components/_ai/UserMessage/stories.js.map +1 -0
  114. package/lib/components/_ai/index.d.ts +6 -0
  115. package/lib/components/_ai/index.js +7 -0
  116. package/lib/components/_ai/index.js.map +1 -0
  117. package/lib/components/disabledToolsParameters.d.ts +30 -0
  118. package/lib/components/disabledToolsParameters.js +25 -0
  119. package/lib/components/disabledToolsParameters.js.map +1 -0
  120. package/lib/components/index.d.ts +4 -0
  121. package/lib/components/index.js +4 -0
  122. package/lib/components/index.js.map +1 -1
  123. package/lib/managerVersions.d.ts +29 -0
  124. package/lib/managerVersions.js +69 -0
  125. package/lib/managerVersions.js.map +1 -0
  126. package/package.json +15 -4
@@ -0,0 +1,109 @@
1
+ export declare const getInputStories: ({ component, IconButton, decorators }: any) => {
2
+ meta: {
3
+ title: string;
4
+ decorators: any;
5
+ component: any;
6
+ parameters: {
7
+ controls: {
8
+ disableSaveFromUI: boolean;
9
+ };
10
+ };
11
+ args: {
12
+ size: string;
13
+ mode: string;
14
+ placeholder: string;
15
+ autoFocus: boolean;
16
+ minRows: number;
17
+ maxRows: number;
18
+ submitOnEnter: boolean;
19
+ clearOnSubmit: boolean;
20
+ loading: boolean;
21
+ hasActionBefore: boolean;
22
+ hasActionAfter: boolean;
23
+ };
24
+ argTypes: {
25
+ size: {
26
+ description: string;
27
+ control: string;
28
+ options: string[];
29
+ table: {
30
+ category: string;
31
+ };
32
+ };
33
+ mode: {
34
+ description: string;
35
+ control: string;
36
+ options: string[];
37
+ table: {
38
+ category: string;
39
+ };
40
+ };
41
+ placeholder: {
42
+ description: string;
43
+ control: string;
44
+ table: {
45
+ category: string;
46
+ };
47
+ };
48
+ autoFocus: {
49
+ description: string;
50
+ control: string;
51
+ table: {
52
+ category: string;
53
+ };
54
+ };
55
+ minRows: {
56
+ description: string;
57
+ control: string;
58
+ table: {
59
+ category: string;
60
+ };
61
+ };
62
+ maxRows: {
63
+ description: string;
64
+ control: string;
65
+ table: {
66
+ category: string;
67
+ };
68
+ };
69
+ submitOnEnter: {
70
+ description: string;
71
+ control: string;
72
+ table: {
73
+ category: string;
74
+ };
75
+ };
76
+ clearOnSubmit: {
77
+ description: string;
78
+ control: string;
79
+ table: {
80
+ category: string;
81
+ };
82
+ };
83
+ loading: {
84
+ description: string;
85
+ control: string;
86
+ table: {
87
+ category: string;
88
+ };
89
+ };
90
+ hasActionBefore: {
91
+ description: string;
92
+ control: string;
93
+ table: {
94
+ category: string;
95
+ };
96
+ };
97
+ hasActionAfter: {
98
+ description: string;
99
+ control: string;
100
+ table: {
101
+ category: string;
102
+ };
103
+ };
104
+ };
105
+ };
106
+ Default: {
107
+ render: (args: any) => JSX.Element;
108
+ };
109
+ };
@@ -0,0 +1,21 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ import { createMeta } from './meta';
14
+ import { createDefaultStory } from './stories';
15
+ export var getInputStories = function (_a) {
16
+ var component = _a.component, IconButton = _a.IconButton, decorators = _a.decorators;
17
+ var meta = createMeta({ component: component, decorators: decorators });
18
+ var Story = createDefaultStory(component, IconButton);
19
+ return { meta: meta, Default: { render: function (args) { return React.createElement(Story, __assign({}, args)); } } };
20
+ };
21
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/components/_ai/Input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,EAA0C;QAAxC,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,UAAU,gBAAA;IAC/D,IAAM,IAAI,GAAG,UAAU,CAAC,EAAE,SAAS,WAAA,EAAE,UAAU,YAAA,EAAE,CAAC,CAAC;IACnD,IAAM,KAAK,GAAG,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAExD,OAAO,EAAE,IAAI,MAAA,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,UAAC,IAAS,IAAK,OAAA,oBAAC,KAAK,eAAK,IAAI,EAAI,EAAnB,CAAmB,EAAE,EAAE,CAAC;AAC7E,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Input';
@@ -0,0 +1,2 @@
1
+ export * from './Input';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/_ai/Input/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,104 @@
1
+ export declare const createMeta: ({ component, decorators }: any) => {
2
+ title: string;
3
+ decorators: any;
4
+ component: any;
5
+ parameters: {
6
+ controls: {
7
+ disableSaveFromUI: boolean;
8
+ };
9
+ };
10
+ args: {
11
+ size: string;
12
+ mode: string;
13
+ placeholder: string;
14
+ autoFocus: boolean;
15
+ minRows: number;
16
+ maxRows: number;
17
+ submitOnEnter: boolean;
18
+ clearOnSubmit: boolean;
19
+ loading: boolean;
20
+ hasActionBefore: boolean;
21
+ hasActionAfter: boolean;
22
+ };
23
+ argTypes: {
24
+ size: {
25
+ description: string;
26
+ control: string;
27
+ options: string[];
28
+ table: {
29
+ category: string;
30
+ };
31
+ };
32
+ mode: {
33
+ description: string;
34
+ control: string;
35
+ options: string[];
36
+ table: {
37
+ category: string;
38
+ };
39
+ };
40
+ placeholder: {
41
+ description: string;
42
+ control: string;
43
+ table: {
44
+ category: string;
45
+ };
46
+ };
47
+ autoFocus: {
48
+ description: string;
49
+ control: string;
50
+ table: {
51
+ category: string;
52
+ };
53
+ };
54
+ minRows: {
55
+ description: string;
56
+ control: string;
57
+ table: {
58
+ category: string;
59
+ };
60
+ };
61
+ maxRows: {
62
+ description: string;
63
+ control: string;
64
+ table: {
65
+ category: string;
66
+ };
67
+ };
68
+ submitOnEnter: {
69
+ description: string;
70
+ control: string;
71
+ table: {
72
+ category: string;
73
+ };
74
+ };
75
+ clearOnSubmit: {
76
+ description: string;
77
+ control: string;
78
+ table: {
79
+ category: string;
80
+ };
81
+ };
82
+ loading: {
83
+ description: string;
84
+ control: string;
85
+ table: {
86
+ category: string;
87
+ };
88
+ };
89
+ hasActionBefore: {
90
+ description: string;
91
+ control: string;
92
+ table: {
93
+ category: string;
94
+ };
95
+ };
96
+ hasActionAfter: {
97
+ description: string;
98
+ control: string;
99
+ table: {
100
+ category: string;
101
+ };
102
+ };
103
+ };
104
+ };
@@ -0,0 +1,95 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { disableProps } from '../../../index';
13
+ export var createMeta = function (_a) {
14
+ var component = _a.component, _b = _a.decorators, decorators = _b === void 0 ? [] : _b;
15
+ return {
16
+ title: 'AI Kit/Input',
17
+ decorators: decorators,
18
+ component: component,
19
+ parameters: {
20
+ controls: {
21
+ disableSaveFromUI: true,
22
+ },
23
+ },
24
+ args: {
25
+ size: 'm',
26
+ mode: 'condensed',
27
+ placeholder: 'Введите сообщение',
28
+ autoFocus: false,
29
+ minRows: 1,
30
+ maxRows: 4,
31
+ submitOnEnter: true,
32
+ clearOnSubmit: true,
33
+ loading: false,
34
+ hasActionBefore: true,
35
+ hasActionAfter: true,
36
+ },
37
+ argTypes: __assign({ size: {
38
+ description: 'Размер компонента',
39
+ control: 'select',
40
+ options: ['xs', 's', 'm', 'l', 'xl'],
41
+ table: { category: 'variation' },
42
+ }, mode: {
43
+ description: 'Режим отображения компонента',
44
+ control: 'select',
45
+ options: ['condensed', 'extended'],
46
+ table: { category: 'variation' },
47
+ }, placeholder: {
48
+ description: 'Плейсхолдер поля ввода',
49
+ control: 'text',
50
+ table: { category: 'content-related' },
51
+ }, autoFocus: {
52
+ description: 'Автофокус на поле ввода',
53
+ control: 'boolean',
54
+ table: { category: 'content-related' },
55
+ }, minRows: {
56
+ description: 'Минимальное количество строк textarea',
57
+ control: 'number',
58
+ table: { category: 'layout-related' },
59
+ }, maxRows: {
60
+ description: 'Максимальное количество строк textarea',
61
+ control: 'number',
62
+ table: { category: 'layout-related' },
63
+ }, submitOnEnter: {
64
+ description: 'Отправлять сообщение по Enter (Shift+Enter — новая строка)',
65
+ control: 'boolean',
66
+ table: { category: 'behavior-related' },
67
+ }, clearOnSubmit: {
68
+ description: 'Очищать текст после отправки',
69
+ control: 'boolean',
70
+ table: { category: 'behavior-related' },
71
+ }, loading: {
72
+ description: 'Состояние загрузки кнопки отправки',
73
+ control: 'boolean',
74
+ table: { category: 'state-related' },
75
+ }, hasActionBefore: {
76
+ description: 'Показывать слот перед полем ввода',
77
+ control: 'boolean',
78
+ table: { category: 'story-related' },
79
+ }, hasActionAfter: {
80
+ description: 'Показывать слот после поля ввода',
81
+ control: 'boolean',
82
+ table: { category: 'story-related' },
83
+ } }, disableProps([
84
+ 'value',
85
+ 'onChange',
86
+ 'attachments',
87
+ 'onAttachmentRemove',
88
+ 'onSend',
89
+ 'actionBefore',
90
+ 'actionAfter',
91
+ 'sendNode',
92
+ ])),
93
+ };
94
+ };
95
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../../src/components/_ai/Input/meta.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,EAAmC;QAAjC,SAAS,eAAA,EAAE,kBAAe,EAAf,UAAU,mBAAG,EAAE,KAAA;IACnD,OAAO;QACH,KAAK,EAAE,cAAc;QACrB,UAAU,YAAA;QACV,SAAS,WAAA;QACT,UAAU,EAAE;YACR,QAAQ,EAAE;gBACN,iBAAiB,EAAE,IAAI;aAC1B;SACJ;QACD,IAAI,EAAE;YACF,IAAI,EAAE,GAAG;YACT,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,mBAAmB;YAChC,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;YACV,aAAa,EAAE,IAAI;YACnB,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE,KAAK;YACd,eAAe,EAAE,IAAI;YACrB,cAAc,EAAE,IAAI;SACvB;QACD,QAAQ,aACJ,IAAI,EAAE;gBACF,WAAW,EAAE,mBAAmB;gBAChC,OAAO,EAAE,QAAQ;gBACjB,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC;gBACpC,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;aACnC,EACD,IAAI,EAAE;gBACF,WAAW,EAAE,8BAA8B;gBAC3C,OAAO,EAAE,QAAQ;gBACjB,OAAO,EAAE,CAAC,WAAW,EAAE,UAAU,CA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AAO;YACP,UAAU;YACV,aAAa;YACb,oBAAoB;YACpB,QAAQ;YACR,cAAc;YACd,aAAa;YACb,UAAU;SACb,CAAC,CACL;KACJ,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const createDefaultStory: (Input: any, IconButton: any) => (args: any) => JSX.Element;
@@ -0,0 +1,103 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import React, { useState } from 'react';
17
+ import styled from 'styled-components';
18
+ import { IconMic } from '@salutejs/plasma-icons';
19
+ import { action } from 'storybook/actions';
20
+ export var createDefaultStory = function (Input, IconButton) {
21
+ var onSendAction = action('onSend');
22
+ var onAttachmentRemoveAction = action('onAttachmentRemove');
23
+ var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n max-width: 620px;\n "], ["\n width: 100%;\n max-width: 620px;\n "])));
24
+ var attachmentsData = [
25
+ {
26
+ id: 1,
27
+ type: 'image',
28
+ thumbUrl: 'https://avatars.githubusercontent.com/u/1813468?v=4',
29
+ },
30
+ {
31
+ id: 2,
32
+ type: 'image',
33
+ thumbUrl: 'https://avatars.githubusercontent.com/u/1813468?v=4',
34
+ },
35
+ {
36
+ id: 3,
37
+ type: 'file',
38
+ label: 'Document1.pdf',
39
+ size: '1.2MB',
40
+ thumbUrl: 'https://avatars.githubusercontent.com/u/1813468?v=4',
41
+ },
42
+ {
43
+ id: 4,
44
+ type: 'file',
45
+ label: 'Document2.pdf',
46
+ size: '2.4MB',
47
+ thumbUrl: 'https://avatars.githubusercontent.com/u/1813468?v=4',
48
+ },
49
+ {
50
+ id: 5,
51
+ type: 'file',
52
+ label: 'Document1.pdf',
53
+ size: '1.2MB',
54
+ thumbUrl: 'https://avatars.githubusercontent.com/u/1813468?v=4',
55
+ },
56
+ ];
57
+ var mapSizeToIconButtonSize = function (size) {
58
+ switch (size) {
59
+ case 'xl':
60
+ return 'l';
61
+ case 'l':
62
+ return 'm';
63
+ case 'm':
64
+ return 's';
65
+ case 's':
66
+ return 'xs';
67
+ case 'xs':
68
+ return 'xs';
69
+ default:
70
+ return 'xs';
71
+ }
72
+ };
73
+ var mapSizeToIconSize = function (size) {
74
+ switch (size) {
75
+ case 'xl':
76
+ case 'l':
77
+ case 'm': {
78
+ return 's';
79
+ }
80
+ case 's':
81
+ case 'xs': {
82
+ return 'xs';
83
+ }
84
+ default: {
85
+ return 's';
86
+ }
87
+ }
88
+ };
89
+ var StoryDefault = function (args) {
90
+ var _a = useState(attachmentsData), attachments = _a[0], setAttachments = _a[1];
91
+ var handleAttachmentRemove = function (attachment) {
92
+ onAttachmentRemoveAction(attachment);
93
+ setAttachments(function (prev) { return prev.filter(function (item) { return item.id !== attachment.id; }); });
94
+ };
95
+ return (React.createElement(Wrapper, null,
96
+ React.createElement(Input, __assign({ attachments: attachments, onAttachmentRemove: handleAttachmentRemove, actionBefore: args.hasActionBefore && (React.createElement(IconButton, { view: "clear", size: mapSizeToIconButtonSize(args.size) },
97
+ React.createElement(IconMic, { size: mapSizeToIconSize(args.size), color: "inherit" }))), actionAfter: args.hasActionAfter && (React.createElement(IconButton, { view: "clear", size: mapSizeToIconButtonSize(args.size) },
98
+ React.createElement(IconMic, { size: mapSizeToIconSize(args.size), color: "inherit" }))), onSend: onSendAction }, args))));
99
+ };
100
+ return StoryDefault;
101
+ };
102
+ var templateObject_1;
103
+ //# sourceMappingURL=stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories.js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IAAI,CAAC;oBAC7D,oBAAC,OAAO,IAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,SAAS,GAAG,CACtD,CAChB,EAEL,WAAW,EACP,IAAI,CAAC,cAAc,IAAI,CACnB,oBAAC,UAAU,IAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC7D,oBAAC,OAAO,IAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,SAAS,GAAG,CACtD,CAChB,EAEL,MAAM,EAAE,YAAY,IAChB,IAAI,EACV,CACI,CACb,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,YAAY,CAAC;AACxB,CAAC,CAAC"}
@@ -0,0 +1,69 @@
1
+ export declare const getMarkdownStories: ({ component, componentConfig, decorators, markedKatex }: any) => {
2
+ Default: {
3
+ render: ({ storyWidth, ...args }: any) => JSX.Element;
4
+ };
5
+ Latex: {
6
+ render: ({ storyWidth, size, view, shouldParseIncompleteMarkdown }: {
7
+ storyWidth: any;
8
+ size: any;
9
+ view: any;
10
+ shouldParseIncompleteMarkdown: any;
11
+ }) => JSX.Element;
12
+ args: {
13
+ storyWidth: number;
14
+ size: string;
15
+ view: string;
16
+ shouldParseIncompleteMarkdown: boolean;
17
+ };
18
+ };
19
+ Streaming: {
20
+ render: ({ storyWidth, size, view, shouldParseIncompleteMarkdown }: {
21
+ storyWidth: any;
22
+ size: any;
23
+ view: any;
24
+ shouldParseIncompleteMarkdown: any;
25
+ }) => JSX.Element;
26
+ args: {
27
+ storyWidth: number;
28
+ size: string;
29
+ view: string;
30
+ shouldParseIncompleteMarkdown: boolean;
31
+ };
32
+ };
33
+ meta: {
34
+ title: string;
35
+ component: any;
36
+ decorators: any;
37
+ argTypes: {
38
+ view: {
39
+ options: any;
40
+ control: {
41
+ type: string;
42
+ };
43
+ };
44
+ size: {
45
+ options: any;
46
+ control: {
47
+ type: string;
48
+ };
49
+ };
50
+ storyWidth: {
51
+ control: {
52
+ type: string;
53
+ };
54
+ };
55
+ shouldParseIncompleteMarkdown: {
56
+ control: {
57
+ type: string;
58
+ };
59
+ };
60
+ };
61
+ args: {
62
+ view: string;
63
+ size: string;
64
+ content: string;
65
+ storyWidth: number;
66
+ shouldParseIncompleteMarkdown: boolean;
67
+ };
68
+ };
69
+ };
@@ -0,0 +1,19 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { getConfigVariations } from '../../../helpers';
13
+ import { createMeta } from './meta';
14
+ import { createStories } from './stories';
15
+ export var getMarkdownStories = function (_a) {
16
+ var component = _a.component, componentConfig = _a.componentConfig, decorators = _a.decorators, markedKatex = _a.markedKatex;
17
+ return (__assign({ meta: createMeta({ component: component, componentConfig: getConfigVariations(componentConfig), decorators: decorators }) }, createStories(component, markedKatex)));
18
+ };
19
+ //# sourceMappingURL=Markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.js","sourceRoot":"","sources":["../../../../src/components/_ai/Markdown/Markdown.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,EAA4D;QAA1D,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAE,UAAU,gBAAA,EAAE,WAAW,iBAAA;IAAY,OAAA,YAChG,IAAI,EAAE,UAAU,CAAC,EAAE,SAAS,WAAA,EAAE,eAAe,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAAE,UAAU,YAAA,EAAE,CAAC,IAC/F,aAAa,CAAC,SAAS,EAAE,WAAW,CAAC,EAC1C;AAHkG,CAGlG,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Markdown';
@@ -0,0 +1,2 @@
1
+ export * from './Markdown';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/_ai/Markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,36 @@
1
+ export declare const createMeta: ({ component, componentConfig, decorators }: any) => {
2
+ title: string;
3
+ component: any;
4
+ decorators: any;
5
+ argTypes: {
6
+ view: {
7
+ options: any;
8
+ control: {
9
+ type: string;
10
+ };
11
+ };
12
+ size: {
13
+ options: any;
14
+ control: {
15
+ type: string;
16
+ };
17
+ };
18
+ storyWidth: {
19
+ control: {
20
+ type: string;
21
+ };
22
+ };
23
+ shouldParseIncompleteMarkdown: {
24
+ control: {
25
+ type: string;
26
+ };
27
+ };
28
+ };
29
+ args: {
30
+ view: string;
31
+ size: string;
32
+ content: string;
33
+ storyWidth: number;
34
+ shouldParseIncompleteMarkdown: boolean;
35
+ };
36
+ };
@@ -0,0 +1,41 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { disableProps } from '../../../index';
13
+ import { markdownTemplate } from './stories';
14
+ export var createMeta = function (_a) {
15
+ var component = _a.component, componentConfig = _a.componentConfig, _b = _a.decorators, decorators = _b === void 0 ? [] : _b;
16
+ var views = componentConfig.views, sizes = componentConfig.sizes;
17
+ return {
18
+ title: 'AI Kit/Markdown',
19
+ component: component,
20
+ decorators: decorators,
21
+ argTypes: __assign({ view: {
22
+ options: views,
23
+ control: { type: 'select' },
24
+ }, size: {
25
+ options: sizes,
26
+ control: { type: 'select' },
27
+ }, storyWidth: {
28
+ control: { type: 'number' },
29
+ }, shouldParseIncompleteMarkdown: {
30
+ control: { type: 'boolean' },
31
+ } }, disableProps(['tokenRenderer', 'markedOptions'])),
32
+ args: {
33
+ view: 'default',
34
+ size: 'm',
35
+ content: markdownTemplate,
36
+ storyWidth: 1000,
37
+ shouldParseIncompleteMarkdown: true,
38
+ },
39
+ };
40
+ };
41
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../../src/components/_ai/Markdown/meta.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,EAAoD;QAAlD,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAE,kBAAe,EAAf,UAAU,mBAAG,EAAE,KAAA;IAC5D,IAAA,KAAK,GAAY,eAAe,MAA3B,EAAE,KAAK,GAAK,eAAe,MAApB,CAAqB;IAEzC,OAAO;QACH,KAAK,EAAE,iBAAiB;QACxB,SAAS,WAAA;QACT,UAAU,YAAA;QACV,QAAQ,aACJ,IAAI,EAAE;gBACF,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC9B,EACD,IAAI,EAAE;gBACF,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC9B,EACD,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC9B,EACD,6BAA6B,EAAE;gBAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;aAC/B,IACE,YAAY,CAAC,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CACtD;QACD,IAAI,EAAE;YACF,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE,IAAI;YAChB,6BAA6B,EAAE,IAAI;SACtC;KACJ,CAAC;AACN,CAAC,CAAC"}