timvir 0.2.38 → 0.2.42

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 (113) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
  3. package/blocks/Arbitrary/index.js +232 -78
  4. package/blocks/Arbitrary/samples/basic.d.ts +1 -1
  5. package/blocks/Arbitrary/styles.css +166 -6
  6. package/blocks/Code/Code.d.ts +0 -6
  7. package/blocks/Code/docs/index.mdx +0 -11
  8. package/blocks/Code/index.js +213 -112
  9. package/blocks/Code/samples/basic.d.ts +1 -1
  10. package/blocks/Code/samples/toggle.d.ts +1 -2
  11. package/blocks/Code/styles.css +100 -15
  12. package/blocks/ColorBar/docs/index.mdx +8 -2
  13. package/blocks/ColorBar/index.js +223 -68
  14. package/blocks/ColorBar/samples/basic.d.ts +1 -2
  15. package/blocks/ColorBar/styles.css +103 -4
  16. package/blocks/ColorBook/docs/index.mdx +1 -1
  17. package/blocks/ColorBook/index.js +222 -60
  18. package/blocks/ColorBook/samples/basic.d.ts +1 -2
  19. package/blocks/ColorBook/styles.css +166 -6
  20. package/blocks/Cover/index.js +177 -48
  21. package/blocks/Cover/samples/basic.d.ts +1 -2
  22. package/blocks/Cover/styles.css +18 -0
  23. package/blocks/Exhibit/index.js +205 -50
  24. package/blocks/Exhibit/samples/basic.d.ts +1 -2
  25. package/blocks/Exhibit/samples/bleed.d.ts +1 -1
  26. package/blocks/Exhibit/samples/usage.d.ts +1 -2
  27. package/blocks/Exhibit/styles.css +66 -3
  28. package/blocks/Font/index.js +239 -98
  29. package/blocks/Font/samples/basic.d.ts +1 -1
  30. package/blocks/Font/samples/timvir/body1.d.ts +1 -1
  31. package/blocks/Font/samples/timvir/caption.d.ts +1 -1
  32. package/blocks/Font/samples/timvir/h1.d.ts +1 -1
  33. package/blocks/Font/samples/timvir/h2.d.ts +1 -1
  34. package/blocks/Font/samples/timvir/h3.d.ts +1 -1
  35. package/blocks/Font/samples/timvir/h4.d.ts +1 -1
  36. package/blocks/Font/styles.css +82 -8
  37. package/blocks/Grid/docs/index.mdx +4 -4
  38. package/blocks/Grid/index.js +181 -36
  39. package/blocks/Grid/samples/basic.d.ts +1 -2
  40. package/blocks/Grid/styles.css +20 -1
  41. package/blocks/Icon/docs/index.mdx +13 -13
  42. package/blocks/Icon/index.js +93 -100
  43. package/blocks/Icon/internal/Canvas.d.ts +1 -1
  44. package/blocks/Icon/samples/basic.d.ts +1 -2
  45. package/blocks/Icon/styles.css +117 -5
  46. package/blocks/Icon/types.d.ts +3 -2
  47. package/blocks/Message/docs/index.mdx +5 -8
  48. package/blocks/Message/index.js +238 -55
  49. package/blocks/Message/samples/basic.d.ts +1 -1
  50. package/blocks/Message/styles.css +94 -6
  51. package/blocks/Swatch/docs/index.mdx +16 -16
  52. package/blocks/Swatch/index.js +199 -45
  53. package/blocks/Swatch/samples/basic.d.ts +1 -2
  54. package/blocks/Swatch/styles.css +82 -4
  55. package/blocks/Viewport/index.js +360 -237
  56. package/blocks/Viewport/internal/Caption.d.ts +1 -1
  57. package/blocks/Viewport/internal/Handle.d.ts +1 -1
  58. package/blocks/Viewport/internal/Ruler.d.ts +1 -2
  59. package/blocks/Viewport/samples/basic.d.ts +1 -2
  60. package/blocks/Viewport/styles.css +259 -14
  61. package/blocks/WebLink/index.js +217 -62
  62. package/blocks/WebLink/samples/basic.d.ts +1 -1
  63. package/blocks/WebLink/styles.css +170 -8
  64. package/blocks/styles.css +1460 -97
  65. package/builtins/components.d.ts +2 -2
  66. package/builtins/index.js +306 -239
  67. package/builtins/styles.css +267 -14
  68. package/context/index.d.ts +6 -1
  69. package/core/components/Commands/Commands.d.ts +2 -0
  70. package/core/components/Commands/internal/Action.d.ts +1 -1
  71. package/core/components/Commands/internal/Dialog.d.ts +1 -2
  72. package/core/components/Commands/internal/index.d.ts +0 -1
  73. package/core/components/Footer/samples/basic.d.ts +1 -1
  74. package/core/components/NavigationFooter/NavigationFooter.d.ts +4 -2
  75. package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
  76. package/core/components/Page/Page.d.ts +12 -3
  77. package/core/components/Page/docs/index.mdx +44 -11
  78. package/core/components/Page/internal/Section.d.ts +1 -2
  79. package/core/components/Page/internal/Sidebar.d.ts +1 -1
  80. package/core/components/Page/internal/SidebarItem.d.ts +1 -2
  81. package/core/components/Page/internal/index.d.ts +0 -1
  82. package/core/components/Page/samples/basic.d.ts +1 -2
  83. package/core/components/Page/samples/layout.d.ts +1 -2
  84. package/core/index.d.ts +191 -2
  85. package/core/index.js +674 -449
  86. package/core/layout.d.ts +40 -0
  87. package/core/styles.css +857 -88
  88. package/core/theme/detector.js +1 -1
  89. package/global.css +79 -0
  90. package/internal/cx.d.ts +1 -0
  91. package/knip.config.d.ts +5 -0
  92. package/package.json +1 -2
  93. package/search/Search/samples/basic.d.ts +1 -2
  94. package/search/index.js +2 -208
  95. package/styles.css +2670 -222
  96. package/blocks/Code/theme.d.ts +0 -2
  97. package/bus/styles.css +0 -1
  98. package/context/styles.css +0 -1
  99. package/core/theme/index.d.ts +0 -1
  100. package/hooks/styles.css +0 -1
  101. package/search/Search/internal/Dialog.d.ts +0 -20
  102. package/search/Search/internal/index.d.ts +0 -1
  103. package/search/SearchBoxInput/SearchBoxInput.d.ts +0 -11
  104. package/search/SearchBoxInput/docs/api.mdx +0 -76
  105. package/search/SearchBoxInput/docs/index.mdx +0 -6
  106. package/search/SearchBoxInput/index.d.ts +0 -1
  107. package/search/SearchBoxInput/samples/basic.d.ts +0 -2
  108. package/search/SearchBoxListItem/SearchBoxListItem.d.ts +0 -13
  109. package/search/SearchBoxListItem/docs/api.mdx +0 -76
  110. package/search/SearchBoxListItem/docs/index.mdx +0 -30
  111. package/search/SearchBoxListItem/index.d.ts +0 -1
  112. package/search/SearchBoxListItem/samples/basic.d.ts +0 -2
  113. package/search/styles.css +0 -16
@@ -1,53 +1,198 @@
1
1
  import * as React from 'react';
2
+ import { layoutStyles } from 'timvir/core';
3
+ import { jsx } from 'react/jsx-runtime';
2
4
 
3
- // src/css.ts
5
+ function cx(...args) {
6
+ let str = "";
7
+ for (let i = 0; i < args.length; i++) {
8
+ const arg = args[i];
9
+ if (typeof arg === "string") {
10
+ str += (str && " ") + arg;
11
+ }
12
+ }
13
+ return str;
14
+ }
4
15
 
5
- // src/cx.ts
6
- var cx = function cx2() {
7
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
8
- const atomicClasses = {};
9
- const nonAtomicClasses = [];
10
- presentClassNames.forEach((arg) => {
11
- const individualClassNames = arg ? arg.split(" ") : [];
12
- individualClassNames.forEach((className) => {
13
- if (className.startsWith("atm_")) {
14
- const [, keyHash] = className.split("_");
15
- atomicClasses[keyHash] = className;
16
- } else {
17
- nonAtomicClasses.push(className);
18
- }
16
+ var styleq = {};
17
+ var hasRequiredStyleq;
18
+ function requireStyleq() {
19
+ if (hasRequiredStyleq) return styleq;
20
+ hasRequiredStyleq = 1;
21
+ Object.defineProperty(styleq, "__esModule", {
22
+ value: true
19
23
  });
20
- });
21
- const result = [];
22
- for (const keyHash in atomicClasses) {
23
- if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
24
- result.push(atomicClasses[keyHash]);
24
+ styleq.styleq = void 0;
25
+ var cache = new WeakMap();
26
+ var compiledKey = '$$css';
27
+ function createStyleq(options) {
28
+ var disableCache;
29
+ var disableMix;
30
+ var transform;
31
+ if (options != null) {
32
+ disableCache = options.disableCache === true;
33
+ disableMix = options.disableMix === true;
34
+ transform = options.transform;
35
+ }
36
+ return function styleq() {
37
+ var definedProperties = [];
38
+ var className = '';
39
+ var inlineStyle = null;
40
+ var debugString = '';
41
+ var nextCache = disableCache ? null : cache;
42
+ var styles = new Array(arguments.length);
43
+ for(var i = 0; i < arguments.length; i++){
44
+ styles[i] = arguments[i];
45
+ }
46
+ while(styles.length > 0){
47
+ var possibleStyle = styles.pop();
48
+ if (possibleStyle == null || possibleStyle === false) {
49
+ continue;
50
+ }
51
+ if (Array.isArray(possibleStyle)) {
52
+ for(var _i = 0; _i < possibleStyle.length; _i++){
53
+ styles.push(possibleStyle[_i]);
54
+ }
55
+ continue;
56
+ }
57
+ var style = transform != null ? transform(possibleStyle) : possibleStyle;
58
+ if (style.$$css != null) {
59
+ var classNameChunk = '';
60
+ if (nextCache != null && nextCache.has(style)) {
61
+ var cacheEntry = nextCache.get(style);
62
+ if (cacheEntry != null) {
63
+ classNameChunk = cacheEntry[0];
64
+ debugString = cacheEntry[2];
65
+ definedProperties.push.apply(definedProperties, cacheEntry[1]);
66
+ nextCache = cacheEntry[3];
67
+ }
68
+ } else {
69
+ var definedPropertiesChunk = [];
70
+ for(var prop in style){
71
+ var value = style[prop];
72
+ if (prop === compiledKey) {
73
+ var compiledKeyValue = style[prop];
74
+ if (compiledKeyValue !== true) {
75
+ debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;
76
+ }
77
+ continue;
78
+ }
79
+ if (typeof value === 'string' || value === null) {
80
+ if (!definedProperties.includes(prop)) {
81
+ definedProperties.push(prop);
82
+ if (nextCache != null) {
83
+ definedPropertiesChunk.push(prop);
84
+ }
85
+ if (typeof value === 'string') {
86
+ classNameChunk += classNameChunk ? ' ' + value : value;
87
+ }
88
+ }
89
+ } else {
90
+ console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
91
+ }
92
+ }
93
+ if (nextCache != null) {
94
+ var weakMap = new WeakMap();
95
+ nextCache.set(style, [
96
+ classNameChunk,
97
+ definedPropertiesChunk,
98
+ debugString,
99
+ weakMap
100
+ ]);
101
+ nextCache = weakMap;
102
+ }
103
+ }
104
+ if (classNameChunk) {
105
+ className = className ? classNameChunk + ' ' + className : classNameChunk;
106
+ }
107
+ } else {
108
+ if (disableMix) {
109
+ if (inlineStyle == null) {
110
+ inlineStyle = {};
111
+ }
112
+ inlineStyle = Object.assign({}, style, inlineStyle);
113
+ } else {
114
+ var subStyle = null;
115
+ for(var _prop in style){
116
+ var _value = style[_prop];
117
+ if (_value !== undefined) {
118
+ if (!definedProperties.includes(_prop)) {
119
+ if (_value != null) {
120
+ if (inlineStyle == null) {
121
+ inlineStyle = {};
122
+ }
123
+ if (subStyle == null) {
124
+ subStyle = {};
125
+ }
126
+ subStyle[_prop] = _value;
127
+ }
128
+ definedProperties.push(_prop);
129
+ nextCache = null;
130
+ }
131
+ }
132
+ }
133
+ if (subStyle != null) {
134
+ inlineStyle = Object.assign(subStyle, inlineStyle);
135
+ }
136
+ }
137
+ }
138
+ }
139
+ var styleProps = [
140
+ className,
141
+ inlineStyle,
142
+ debugString
143
+ ];
144
+ return styleProps;
145
+ };
25
146
  }
26
- }
27
- result.push(...nonAtomicClasses);
28
- return result.join(" ");
29
- };
30
- var cx_default = cx;
147
+ var styleq$1 = styleq.styleq = createStyleq();
148
+ styleq$1.factory = createStyleq;
149
+ return styleq;
150
+ }
151
+ var styleqExports = requireStyleq();
152
+ function props(...styles) {
153
+ const [className, style, dataStyleSrc] = styleqExports.styleq(styles);
154
+ const result = {};
155
+ if (className != null && className !== '') {
156
+ result.className = className;
157
+ }
158
+ if (style != null && Object.keys(style).length > 0) {
159
+ result.style = style;
160
+ }
161
+ if (dataStyleSrc != null && dataStyleSrc !== '') {
162
+ result['data-style-src'] = dataStyleSrc;
163
+ }
164
+ return result;
165
+ }
31
166
 
32
- /**
33
- * The underlying DOM element which is rendered by this component.
34
- */
35
167
  const Root = "div";
36
- function Grid(props, ref) {
168
+ function Grid(props$1, ref) {
37
169
  const {
38
170
  children,
39
171
  className,
40
172
  ...rest
41
- } = props;
42
- return /*#__PURE__*/React.createElement(Root, {
173
+ } = props$1;
174
+ const rootStyleProps = props(layoutStyles.block, styles.root);
175
+ return /*#__PURE__*/jsx(Root, {
43
176
  ref: ref,
44
- className: cx_default(className, classes.root),
45
- ...rest
46
- }, children);
177
+ ...rest,
178
+ ...rootStyleProps,
179
+ style: {
180
+ ...rootStyleProps.style,
181
+ ...rest.style
182
+ },
183
+ className: cx(className, rootStyleProps.className),
184
+ children: children
185
+ });
47
186
  }
48
187
  var Grid$1 = /*#__PURE__*/React.forwardRef(Grid);
49
- const classes = {
50
- root: "r1c1ozpm"
188
+ const styles = {
189
+ root: {
190
+ k1xSpc: "timvir-s-rvj5dj",
191
+ kumcoG: "timvir-s-1ayh3g3",
192
+ kOIVth: "timvir-s-fww3rt",
193
+ "--timvir-margin": "timvir-s-1cca2ej",
194
+ $$css: true
195
+ }
51
196
  };
52
197
 
53
198
  export { Grid$1 as Grid };
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- export default function Sample(): React.JSX.Element;
1
+ export default function Sample(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,21 @@
1
- .r1c1ozpm{display:-ms-grid;display:grid;-ms-grid-columns:repeat(auto-fit, minmax(220px, 1fr));grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));gap:var(--timvir-page-margin, 24px);--timvir-margin:calc(var(--timvir-page-margin, 24px) * 0.5);}
1
+ @layer priority1 {
2
+ .timvir-s-1cca2ej {
3
+ --timvir-margin: calc(var(--timvir-page-margin, 24px) * .5);
4
+ }
5
+ }
2
6
 
7
+ @layer priority2 {
8
+ .timvir-s-fww3rt {
9
+ gap: var(--timvir-page-margin, 24px);
10
+ }
11
+ }
12
+
13
+ @layer priority3 {
14
+ .timvir-s-rvj5dj {
15
+ display: grid;
16
+ }
17
+
18
+ .timvir-s-1ayh3g3 {
19
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
20
+ }
21
+ }
@@ -17,7 +17,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
17
17
  {
18
18
  size: 12,
19
19
  Component: () => (
20
- <svg width="12px" height="12px" viewBox="0 0 12 12">
20
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
21
21
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
22
22
  </svg>
23
23
  ),
@@ -42,7 +42,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
42
42
  {
43
43
  size: 12,
44
44
  Component: () => (
45
- <svg width="12px" height="12px" viewBox="0 0 12 12">
45
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
46
46
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
47
47
  </svg>
48
48
  ),
@@ -57,7 +57,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
57
57
  {
58
58
  size: 12,
59
59
  Component: () => (
60
- <svg width="12px" height="12px" viewBox="0 0 12 12">
60
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
61
61
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
62
62
  </svg>
63
63
  ),
@@ -72,7 +72,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
72
72
  {
73
73
  size: 12,
74
74
  Component: () => (
75
- <svg width="12px" height="12px" viewBox="0 0 12 12">
75
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
76
76
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
77
77
  </svg>
78
78
  ),
@@ -87,7 +87,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
87
87
  {
88
88
  size: 12,
89
89
  Component: () => (
90
- <svg width="12px" height="12px" viewBox="0 0 12 12">
90
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
91
91
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
92
92
  </svg>
93
93
  ),
@@ -102,7 +102,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
102
102
  {
103
103
  size: 12,
104
104
  Component: () => (
105
- <svg width="12px" height="12px" viewBox="0 0 12 12">
105
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
106
106
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
107
107
  </svg>
108
108
  ),
@@ -117,7 +117,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
117
117
  {
118
118
  size: 12,
119
119
  Component: () => (
120
- <svg width="12px" height="12px" viewBox="0 0 12 12">
120
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
121
121
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
122
122
  </svg>
123
123
  ),
@@ -132,7 +132,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
132
132
  {
133
133
  size: 12,
134
134
  Component: () => (
135
- <svg width="12px" height="12px" viewBox="0 0 12 12">
135
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
136
136
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
137
137
  </svg>
138
138
  ),
@@ -147,7 +147,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
147
147
  {
148
148
  size: 12,
149
149
  Component: () => (
150
- <svg width="12px" height="12px" viewBox="0 0 12 12">
150
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
151
151
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
152
152
  </svg>
153
153
  ),
@@ -162,7 +162,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
162
162
  {
163
163
  size: 12,
164
164
  Component: () => (
165
- <svg width="12px" height="12px" viewBox="0 0 12 12">
165
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
166
166
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
167
167
  </svg>
168
168
  ),
@@ -177,7 +177,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
177
177
  {
178
178
  size: 12,
179
179
  Component: () => (
180
- <svg width="12px" height="12px" viewBox="0 0 12 12">
180
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
181
181
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
182
182
  </svg>
183
183
  ),
@@ -192,7 +192,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
192
192
  {
193
193
  size: 12,
194
194
  Component: () => (
195
- <svg width="12px" height="12px" viewBox="0 0 12 12">
195
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
196
196
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
197
197
  </svg>
198
198
  ),
@@ -207,7 +207,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
207
207
  {
208
208
  size: 12,
209
209
  Component: () => (
210
- <svg width="12px" height="12px" viewBox="0 0 12 12">
210
+ <svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
211
211
  <path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
212
212
  </svg>
213
213
  ),
@@ -1,40 +1,20 @@
1
+ 'use client';
1
2
  import { useResizeObserverEntry } from 'timvir/hooks';
2
3
  import * as React from 'react';
4
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
5
 
4
- // src/css.ts
5
-
6
- // src/cx.ts
7
- var cx = function cx2() {
8
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
9
- const atomicClasses = {};
10
- const nonAtomicClasses = [];
11
- presentClassNames.forEach((arg) => {
12
- const individualClassNames = arg ? arg.split(" ") : [];
13
- individualClassNames.forEach((className) => {
14
- if (className.startsWith("atm_")) {
15
- const [, keyHash] = className.split("_");
16
- atomicClasses[keyHash] = className;
17
- } else {
18
- nonAtomicClasses.push(className);
19
- }
20
- });
21
- });
22
- const result = [];
23
- for (const keyHash in atomicClasses) {
24
- if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
25
- result.push(atomicClasses[keyHash]);
6
+ function cx(...args) {
7
+ let str = "";
8
+ for (let i = 0; i < args.length; i++) {
9
+ const arg = args[i];
10
+ if (typeof arg === "string") {
11
+ str += (str && " ") + arg;
26
12
  }
27
13
  }
28
- result.push(...nonAtomicClasses);
29
- return result.join(" ");
30
- };
31
- var cx_default = cx;
14
+ return str;
15
+ }
32
16
 
33
17
  const Root$1 = "div";
34
- const classes$1 = {
35
- backdrop: "b1a0xzv7",
36
- grid: "g10obtzp"
37
- };
38
18
  function Canvas(props) {
39
19
  const {
40
20
  width,
@@ -42,23 +22,27 @@ function Canvas(props) {
42
22
  size,
43
23
  Component
44
24
  } = props;
45
- return /*#__PURE__*/React.createElement(Root$1, {
46
- className: "r1bcczis",
25
+ return /*#__PURE__*/jsxs(Root$1, {
26
+ className: "timvir-s-rvj5dj timvir-s-1ku5rj1 timvir-s-1ypdohk timvir-s-dtfvks timvir-s-d2wi23",
47
27
  style: {
48
28
  width,
49
29
  height
50
- }
51
- }, /*#__PURE__*/React.createElement("div", {
52
- className: classes$1.backdrop
53
- }), /*#__PURE__*/React.createElement(Grid, {
54
- className: classes$1.grid,
55
- size: size
56
- }), /*#__PURE__*/React.createElement("div", {
57
- style: {
58
- fontSize: `${size}px`,
59
- zIndex: 1
60
- }
61
- }, /*#__PURE__*/React.createElement(Component, null)));
30
+ },
31
+ children: [/*#__PURE__*/jsx("div", {
32
+ className: "timvir-s-gkxs2y timvir-s-1ms6mhf timvir-s-12peec7 timvir-s-1lhehjl timvir-s-1cum3z5 timvir-s-zhuw26 timvir-s-1ww5jgt"
33
+ }), /*#__PURE__*/jsx(Grid, {
34
+ className: "timvir-s-gkxs2y timvir-s-1ms6mhf timvir-s-1lliihq timvir-s-1j5ulbg timvir-s-zhuw26 timvir-s-47corl",
35
+ size: size
36
+ }), /*#__PURE__*/jsx("div", {
37
+ style: {
38
+ gridColumn: 1,
39
+ gridRow: 1,
40
+ fontSize: `${size}px`,
41
+ zIndex: 1
42
+ },
43
+ children: /*#__PURE__*/jsx(Component, {})
44
+ })]
45
+ });
62
46
  }
63
47
  function Grid({
64
48
  size,
@@ -70,78 +54,87 @@ function Grid({
70
54
  const Corner = ({
71
55
  dx,
72
56
  dy
73
- }) => /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("line", {
74
- x1: dx(center, halfSize),
75
- x2: dx(center, halfSize + whiskerLength),
76
- y1: dy(center, halfSize),
77
- y2: dy(center, halfSize),
78
- strokeWidth: 1,
79
- stroke: "#EEEEEE"
80
- }), /*#__PURE__*/React.createElement("line", {
81
- x1: dx(center, halfSize),
82
- x2: dx(center, halfSize),
83
- y1: dy(center, halfSize),
84
- y2: dy(center, halfSize + whiskerLength),
85
- strokeWidth: 1,
86
- stroke: "#EEEEEE"
87
- }));
57
+ }) => /*#__PURE__*/jsxs("g", {
58
+ children: [/*#__PURE__*/jsx("line", {
59
+ x1: dx(center, halfSize),
60
+ x2: dx(center, halfSize + whiskerLength),
61
+ y1: dy(center, halfSize),
62
+ y2: dy(center, halfSize),
63
+ strokeWidth: 1,
64
+ stroke: "#EEEEEE"
65
+ }), /*#__PURE__*/jsx("line", {
66
+ x1: dx(center, halfSize),
67
+ x2: dx(center, halfSize),
68
+ y1: dy(center, halfSize),
69
+ y2: dy(center, halfSize + whiskerLength),
70
+ strokeWidth: 1,
71
+ stroke: "#EEEEEE"
72
+ })]
73
+ });
88
74
  const add = (a, b) => a + b;
89
75
  const sub = (a, b) => a - b;
90
- return /*#__PURE__*/React.createElement("svg", {
76
+ return /*#__PURE__*/jsxs("svg", {
91
77
  width: "120",
92
78
  height: "120",
93
79
  viewBox: "0 0 120 120",
94
- ...rest
95
- }, /*#__PURE__*/React.createElement("rect", {
96
- x: center - halfSize,
97
- y: center - halfSize,
98
- width: size,
99
- height: size,
100
- fill: "#FFBBFF88"
101
- }), /*#__PURE__*/React.createElement(Corner, {
102
- dx: sub,
103
- dy: sub
104
- }), /*#__PURE__*/React.createElement(Corner, {
105
- dx: add,
106
- dy: sub
107
- }), /*#__PURE__*/React.createElement(Corner, {
108
- dx: add,
109
- dy: add
110
- }), /*#__PURE__*/React.createElement(Corner, {
111
- dx: sub,
112
- dy: add
113
- }));
80
+ ...rest,
81
+ children: [/*#__PURE__*/jsx("rect", {
82
+ x: center - halfSize,
83
+ y: center - halfSize,
84
+ width: size,
85
+ height: size,
86
+ fill: "#FFBBFF88"
87
+ }), /*#__PURE__*/jsx(Corner, {
88
+ dx: sub,
89
+ dy: sub
90
+ }), /*#__PURE__*/jsx(Corner, {
91
+ dx: add,
92
+ dy: sub
93
+ }), /*#__PURE__*/jsx(Corner, {
94
+ dx: add,
95
+ dy: add
96
+ }), /*#__PURE__*/jsx(Corner, {
97
+ dx: sub,
98
+ dy: add
99
+ })]
100
+ });
114
101
  }
115
102
 
116
- /**
117
- * The underlying DOM element which is rendered by this component.
118
- */
119
103
  const Root = "div";
120
- const classes = {
121
- name: "n1xsexuc"
122
- };
123
104
  function Icon(props, ref) {
124
105
  const {
125
106
  descriptor,
126
- className,
127
107
  ...rest
128
108
  } = props;
129
109
  const [roRef, roe] = useResizeObserverEntry();
130
110
  const width = roe?.contentRect.width;
131
- return /*#__PURE__*/React.createElement(Root, {
111
+ const rootStyleProps = {
112
+ className: "timvir-s-1n2onr6 timvir-s-1vjfegm timvir-s-dtfvks timvir-s-d2wi23"
113
+ };
114
+ return /*#__PURE__*/jsx(Root, {
132
115
  ref: ref,
133
- className: cx_default(className, "r1k0w618"),
134
- ...rest
135
- }, /*#__PURE__*/React.createElement("div", {
136
- ref: roRef
137
- }, width !== undefined && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Canvas, {
138
- width: width,
139
- height: width,
140
- size: 32 /*descriptor.instances[0].size as number */,
141
- Component: descriptor.instances[0].Component
142
- }), /*#__PURE__*/React.createElement("div", {
143
- className: classes.name
144
- }, descriptor.name))));
116
+ ...rest,
117
+ ...rootStyleProps,
118
+ className: cx(rest.className, rootStyleProps.className),
119
+ style: {
120
+ ...rootStyleProps.style,
121
+ ...rest.style
122
+ },
123
+ children: /*#__PURE__*/jsx("div", {
124
+ ref: roRef,
125
+ children: width !== undefined && /*#__PURE__*/jsxs(Fragment, {
126
+ children: [/*#__PURE__*/jsx(Canvas, {
127
+ width: width,
128
+ height: width,
129
+ size: 32,
130
+ Component: descriptor.instances[0].Component
131
+ }), /*#__PURE__*/jsx("div", {
132
+ className: "timvir-s-dj266r timvir-s-uxw1ft timvir-s-boafo0 timvir-s-1j5ulbg timvir-s-zhuw26 timvir-s-8knxv4 timvir-s-1cdhzux timvir-s-2b8uid timvir-s-87ps6o timvir-s-47corl timvir-s-10l6tqk timvir-s-1nrll8i timvir-s-1kuhel0 timvir-s-1nc5ocm",
133
+ children: descriptor.name
134
+ })]
135
+ })
136
+ })
137
+ });
145
138
  }
146
139
  var Icon$1 = /*#__PURE__*/React.forwardRef(Icon);
147
140
 
@@ -5,5 +5,5 @@ interface Props {
5
5
  size: number;
6
6
  Component: React.ElementType;
7
7
  }
8
- declare function Canvas(props: Props): React.JSX.Element;
8
+ declare function Canvas(props: Props): import("react/jsx-runtime").JSX.Element;
9
9
  export default Canvas;
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- export default function Sample(): React.JSX.Element;
1
+ export default function Sample(): import("react/jsx-runtime").JSX.Element;