@hubstr/kit 0.1.3 → 0.1.5
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/editor/src/codemirror/index.ts +1 -1
- package/editor/src/plugins/code/plugin/index.ts +2 -1
- package/editor/src/plugins/codeblock/plugin/index.ts +2 -1
- package/editor/src/plugins/codemirror-block/plugin/index.ts +2 -1
- package/editor/src/plugins/common/plugin/index.ts +5 -4
- package/editor/src/plugins/common/utils/index.ts +2 -1
- package/editor/src/plugins/file/plugin/index.ts +2 -1
- package/editor/src/plugins/litexml/index.ts +1 -0
- package/editor/src/plugins/litexml/service/litexml-service.ts +11 -1
- package/editor/src/plugins/table/plugin/index.ts +2 -1
- package/icons/es/components/AgentGuideCard/index.js +107 -107
- package/icons/es/components/ColorPreview/index.js +34 -34
- package/icons/es/components/Dashboard/IconItem.js +140 -140
- package/icons/es/components/Dashboard/Text.js +65 -65
- package/icons/es/components/Dashboard/index.js +102 -102
- package/icons/es/components/DownloadButton/index.js +27 -27
- package/icons/es/components/Editor/Color.js +46 -46
- package/icons/es/components/Editor/Mono.js +44 -44
- package/icons/es/components/Editor/Preview.js +53 -53
- package/icons/es/components/Editor/Text.js +44 -44
- package/icons/es/components/Editor/index.js +135 -135
- package/icons/es/components/IconPreview/ColorPreview.js +37 -37
- package/icons/es/components/IconPreview/index.js +66 -66
- package/icons/es/features/index.d.ts +1 -5
- package/icons/es/features/index.js +1 -1
- package/icons/es/features/ui-runtime.js +1 -5
- package/package.json +329 -310
- package/ui/src/Markdown/SyntaxMarkdown/CachedMarkdown.tsx +1 -3
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _excluded = ["className", "onClick"];
|
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { ActionIcon } from '@hubstr/kit/ui';
|
|
13
|
-
import { Download } from 'lucide-react';
|
|
14
|
-
import { memo } from 'react';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
var DownloadButton = /*#__PURE__*/memo(function (_ref) {
|
|
17
|
-
var className = _ref.className,
|
|
18
|
-
onClick = _ref.onClick,
|
|
19
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread({}, rest), {}, {
|
|
21
|
-
className: className,
|
|
22
|
-
glass: true,
|
|
23
|
-
icon: Download,
|
|
24
|
-
onClick: onClick,
|
|
25
|
-
title: 'Download'
|
|
26
|
-
}));
|
|
27
|
-
});
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
var _excluded = ["className", "onClick"];
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
import { ActionIcon } from '@hubstr/kit/ui';
|
|
13
|
+
import { Download } from 'lucide-react';
|
|
14
|
+
import { memo } from 'react';
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
var DownloadButton = /*#__PURE__*/memo(function (_ref) {
|
|
17
|
+
var className = _ref.className,
|
|
18
|
+
onClick = _ref.onClick,
|
|
19
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return /*#__PURE__*/_jsx(ActionIcon, _objectSpread(_objectSpread({}, rest), {}, {
|
|
21
|
+
className: className,
|
|
22
|
+
glass: true,
|
|
23
|
+
icon: Download,
|
|
24
|
+
onClick: onClick,
|
|
25
|
+
title: 'Download'
|
|
26
|
+
}));
|
|
27
|
+
});
|
|
28
28
|
export default DownloadButton;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
var _templateObject;
|
|
4
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
|
-
import { Flexbox, Highlighter } from '@hubstr/kit/ui';
|
|
6
|
-
import { createStaticStyles } from 'antd-style';
|
|
7
|
-
import { memo } from 'react';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
var styles = createStaticStyles(function (_ref) {
|
|
11
|
-
var css = _ref.css;
|
|
12
|
-
return {
|
|
13
|
-
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
17
|
-
var svg = _ref2.svg,
|
|
18
|
-
title = _ref2.title,
|
|
19
|
-
viewbox = _ref2.viewbox,
|
|
20
|
-
textMode = _ref2.textMode;
|
|
21
|
-
var sizeAttributes = textMode ? "height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}" : "height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n width={size}";
|
|
22
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
23
|
-
flex: 'none',
|
|
24
|
-
gap: 16,
|
|
25
|
-
style: {
|
|
26
|
-
position: 'relative',
|
|
27
|
-
width: '100%'
|
|
28
|
-
},
|
|
29
|
-
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
30
|
-
align: 'center',
|
|
31
|
-
gap: 8,
|
|
32
|
-
horizontal: true,
|
|
33
|
-
children: /*#__PURE__*/_jsx("h3", {
|
|
34
|
-
style: {
|
|
35
|
-
lineHeight: 1,
|
|
36
|
-
margin: 0
|
|
37
|
-
},
|
|
38
|
-
children: title
|
|
39
|
-
})
|
|
40
|
-
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
41
|
-
className: styles.code,
|
|
42
|
-
language: 'tsx',
|
|
43
|
-
children: "'use client';\n\nimport { memo } from 'react';\nimport type { IconType } from '@/types';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n ".concat(sizeAttributes, "\n viewBox=\"").concat(viewbox, "\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n ").concat(svg, "\n </svg>\n );\n});\n\nexport default Icon;\n")
|
|
44
|
-
})]
|
|
45
|
-
});
|
|
46
|
-
});
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
|
+
import { Flexbox, Highlighter } from '@hubstr/kit/ui';
|
|
6
|
+
import { createStaticStyles } from 'antd-style';
|
|
7
|
+
import { memo } from 'react';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
var styles = createStaticStyles(function (_ref) {
|
|
11
|
+
var css = _ref.css;
|
|
12
|
+
return {
|
|
13
|
+
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
17
|
+
var svg = _ref2.svg,
|
|
18
|
+
title = _ref2.title,
|
|
19
|
+
viewbox = _ref2.viewbox,
|
|
20
|
+
textMode = _ref2.textMode;
|
|
21
|
+
var sizeAttributes = textMode ? "height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}" : "height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n width={size}";
|
|
22
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
23
|
+
flex: 'none',
|
|
24
|
+
gap: 16,
|
|
25
|
+
style: {
|
|
26
|
+
position: 'relative',
|
|
27
|
+
width: '100%'
|
|
28
|
+
},
|
|
29
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
30
|
+
align: 'center',
|
|
31
|
+
gap: 8,
|
|
32
|
+
horizontal: true,
|
|
33
|
+
children: /*#__PURE__*/_jsx("h3", {
|
|
34
|
+
style: {
|
|
35
|
+
lineHeight: 1,
|
|
36
|
+
margin: 0
|
|
37
|
+
},
|
|
38
|
+
children: title
|
|
39
|
+
})
|
|
40
|
+
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
41
|
+
className: styles.code,
|
|
42
|
+
language: 'tsx',
|
|
43
|
+
children: "'use client';\n\nimport { memo } from 'react';\nimport type { IconType } from '@/types';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n ".concat(sizeAttributes, "\n viewBox=\"").concat(viewbox, "\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n ").concat(svg, "\n </svg>\n );\n});\n\nexport default Icon;\n")
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
47
|
export default Preview;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
var _templateObject;
|
|
4
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
|
-
import { Flexbox, Highlighter } from '@hubstr/kit/ui';
|
|
6
|
-
import { createStaticStyles } from 'antd-style';
|
|
7
|
-
import { memo } from 'react';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
var styles = createStaticStyles(function (_ref) {
|
|
11
|
-
var css = _ref.css;
|
|
12
|
-
return {
|
|
13
|
-
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
17
|
-
var svg = _ref2.svg,
|
|
18
|
-
title = _ref2.title,
|
|
19
|
-
viewbox = _ref2.viewbox;
|
|
20
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
21
|
-
flex: 'none',
|
|
22
|
-
gap: 16,
|
|
23
|
-
style: {
|
|
24
|
-
position: 'relative',
|
|
25
|
-
width: '100%'
|
|
26
|
-
},
|
|
27
|
-
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
28
|
-
align: 'center',
|
|
29
|
-
gap: 8,
|
|
30
|
-
horizontal: true,
|
|
31
|
-
children: /*#__PURE__*/_jsx("h3", {
|
|
32
|
-
style: {
|
|
33
|
-
lineHeight: 1,
|
|
34
|
-
margin: 0
|
|
35
|
-
},
|
|
36
|
-
children: title
|
|
37
|
-
})
|
|
38
|
-
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
39
|
-
className: styles.code,
|
|
40
|
-
language: 'tsx',
|
|
41
|
-
children: "'use client';\n\nimport { memo } from 'react';\nimport type { IconType } from '@/types';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"".concat(viewbox, "\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n ").concat(svg, "\n </svg>\n );\n});\n\nexport default Icon;\n")
|
|
42
|
-
})]
|
|
43
|
-
});
|
|
44
|
-
});
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
|
+
import { Flexbox, Highlighter } from '@hubstr/kit/ui';
|
|
6
|
+
import { createStaticStyles } from 'antd-style';
|
|
7
|
+
import { memo } from 'react';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
var styles = createStaticStyles(function (_ref) {
|
|
11
|
+
var css = _ref.css;
|
|
12
|
+
return {
|
|
13
|
+
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
17
|
+
var svg = _ref2.svg,
|
|
18
|
+
title = _ref2.title,
|
|
19
|
+
viewbox = _ref2.viewbox;
|
|
20
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
21
|
+
flex: 'none',
|
|
22
|
+
gap: 16,
|
|
23
|
+
style: {
|
|
24
|
+
position: 'relative',
|
|
25
|
+
width: '100%'
|
|
26
|
+
},
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
28
|
+
align: 'center',
|
|
29
|
+
gap: 8,
|
|
30
|
+
horizontal: true,
|
|
31
|
+
children: /*#__PURE__*/_jsx("h3", {
|
|
32
|
+
style: {
|
|
33
|
+
lineHeight: 1,
|
|
34
|
+
margin: 0
|
|
35
|
+
},
|
|
36
|
+
children: title
|
|
37
|
+
})
|
|
38
|
+
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
39
|
+
className: styles.code,
|
|
40
|
+
language: 'tsx',
|
|
41
|
+
children: "'use client';\n\nimport { memo } from 'react';\nimport type { IconType } from '@/types';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"".concat(viewbox, "\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n ").concat(svg, "\n </svg>\n );\n});\n\nexport default Icon;\n")
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
45
|
export default Preview;
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox, Highlighter, Tag } from '@hubstr/kit/ui';
|
|
4
|
-
import { createStaticStyles } from 'antd-style';
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
import IconPreview from "../IconPreview/index.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
var styles = createStaticStyles(function (_ref) {
|
|
10
|
-
var css = _ref.css;
|
|
11
|
-
return {
|
|
12
|
-
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n height: 96px;\n\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
13
|
-
};
|
|
14
|
-
});
|
|
15
|
-
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
16
|
-
var svg = _ref2.svg,
|
|
17
|
-
title = _ref2.title,
|
|
18
|
-
precent = _ref2.precent,
|
|
19
|
-
ref = _ref2.ref;
|
|
20
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
21
|
-
flex: 'none',
|
|
22
|
-
gap: 16,
|
|
23
|
-
style: {
|
|
24
|
-
position: 'relative',
|
|
25
|
-
width: '100%'
|
|
26
|
-
},
|
|
27
|
-
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
28
|
-
align: 'center',
|
|
29
|
-
gap: 8,
|
|
30
|
-
horizontal: true,
|
|
31
|
-
children: [/*#__PURE__*/_jsx("h3", {
|
|
32
|
-
style: {
|
|
33
|
-
lineHeight: 1,
|
|
34
|
-
margin: 0
|
|
35
|
-
},
|
|
36
|
-
children: title
|
|
37
|
-
}), precent && /*#__PURE__*/_jsx(Tag, {
|
|
38
|
-
children: precent
|
|
39
|
-
})]
|
|
40
|
-
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
41
|
-
gap: 8,
|
|
42
|
-
horizontal: true,
|
|
43
|
-
ref: ref,
|
|
44
|
-
children: [/*#__PURE__*/_jsx(IconPreview, {
|
|
45
|
-
children: svg
|
|
46
|
-
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
47
|
-
className: styles.code,
|
|
48
|
-
language: 'tsx',
|
|
49
|
-
children: svg
|
|
50
|
-
})]
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
});
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { Flexbox, Highlighter, Tag } from '@hubstr/kit/ui';
|
|
4
|
+
import { createStaticStyles } from 'antd-style';
|
|
5
|
+
import { memo } from 'react';
|
|
6
|
+
import IconPreview from "../IconPreview/index.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
var styles = createStaticStyles(function (_ref) {
|
|
10
|
+
var css = _ref.css;
|
|
11
|
+
return {
|
|
12
|
+
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n height: 96px;\n\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
16
|
+
var svg = _ref2.svg,
|
|
17
|
+
title = _ref2.title,
|
|
18
|
+
precent = _ref2.precent,
|
|
19
|
+
ref = _ref2.ref;
|
|
20
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
21
|
+
flex: 'none',
|
|
22
|
+
gap: 16,
|
|
23
|
+
style: {
|
|
24
|
+
position: 'relative',
|
|
25
|
+
width: '100%'
|
|
26
|
+
},
|
|
27
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
28
|
+
align: 'center',
|
|
29
|
+
gap: 8,
|
|
30
|
+
horizontal: true,
|
|
31
|
+
children: [/*#__PURE__*/_jsx("h3", {
|
|
32
|
+
style: {
|
|
33
|
+
lineHeight: 1,
|
|
34
|
+
margin: 0
|
|
35
|
+
},
|
|
36
|
+
children: title
|
|
37
|
+
}), precent && /*#__PURE__*/_jsx(Tag, {
|
|
38
|
+
children: precent
|
|
39
|
+
})]
|
|
40
|
+
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
41
|
+
gap: 8,
|
|
42
|
+
horizontal: true,
|
|
43
|
+
ref: ref,
|
|
44
|
+
children: [/*#__PURE__*/_jsx(IconPreview, {
|
|
45
|
+
children: svg
|
|
46
|
+
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
47
|
+
className: styles.code,
|
|
48
|
+
language: 'tsx',
|
|
49
|
+
children: svg
|
|
50
|
+
})]
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
54
|
export default Preview;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
var _templateObject;
|
|
4
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
|
-
import { Flexbox, Highlighter } from '@hubstr/kit/ui';
|
|
6
|
-
import { createStaticStyles } from 'antd-style';
|
|
7
|
-
import { memo } from 'react';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
var styles = createStaticStyles(function (_ref) {
|
|
11
|
-
var css = _ref.css;
|
|
12
|
-
return {
|
|
13
|
-
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
17
|
-
var svg = _ref2.svg,
|
|
18
|
-
title = _ref2.title,
|
|
19
|
-
viewbox = _ref2.viewbox;
|
|
20
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
21
|
-
flex: 'none',
|
|
22
|
-
gap: 16,
|
|
23
|
-
style: {
|
|
24
|
-
position: 'relative',
|
|
25
|
-
width: '100%'
|
|
26
|
-
},
|
|
27
|
-
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
28
|
-
align: 'center',
|
|
29
|
-
gap: 8,
|
|
30
|
-
horizontal: true,
|
|
31
|
-
children: /*#__PURE__*/_jsx("h3", {
|
|
32
|
-
style: {
|
|
33
|
-
lineHeight: 1,
|
|
34
|
-
margin: 0
|
|
35
|
-
},
|
|
36
|
-
children: title
|
|
37
|
-
})
|
|
38
|
-
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
39
|
-
className: styles.code,
|
|
40
|
-
language: 'tsx',
|
|
41
|
-
children: "'use client';\n\nimport { memo } from 'react';\nimport type { IconType } from '@/types';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"".concat(viewbox, "\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n ").concat(svg, "\n </svg>\n );\n});\n\nexport default Icon;\n")
|
|
42
|
-
})]
|
|
43
|
-
});
|
|
44
|
-
});
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
|
+
import { Flexbox, Highlighter } from '@hubstr/kit/ui';
|
|
6
|
+
import { createStaticStyles } from 'antd-style';
|
|
7
|
+
import { memo } from 'react';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
var styles = createStaticStyles(function (_ref) {
|
|
11
|
+
var css = _ref.css;
|
|
12
|
+
return {
|
|
13
|
+
code: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pre {\n padding: 8px !important;\n }\n\n code {\n font-size: 12px;\n text-wrap: initial;\n }\n "])))
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
var Preview = /*#__PURE__*/memo(function (_ref2) {
|
|
17
|
+
var svg = _ref2.svg,
|
|
18
|
+
title = _ref2.title,
|
|
19
|
+
viewbox = _ref2.viewbox;
|
|
20
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
21
|
+
flex: 'none',
|
|
22
|
+
gap: 16,
|
|
23
|
+
style: {
|
|
24
|
+
position: 'relative',
|
|
25
|
+
width: '100%'
|
|
26
|
+
},
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
28
|
+
align: 'center',
|
|
29
|
+
gap: 8,
|
|
30
|
+
horizontal: true,
|
|
31
|
+
children: /*#__PURE__*/_jsx("h3", {
|
|
32
|
+
style: {
|
|
33
|
+
lineHeight: 1,
|
|
34
|
+
margin: 0
|
|
35
|
+
},
|
|
36
|
+
children: title
|
|
37
|
+
})
|
|
38
|
+
}), /*#__PURE__*/_jsx(Highlighter, {
|
|
39
|
+
className: styles.code,
|
|
40
|
+
language: 'tsx',
|
|
41
|
+
children: "'use client';\n\nimport { memo } from 'react';\nimport type { IconType } from '@/types';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"".concat(viewbox, "\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n ").concat(svg, "\n </svg>\n );\n});\n\nexport default Icon;\n")
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
45
|
export default Preview;
|