timvir 0.2.0 → 0.2.2

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/core/layout.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export declare const noLayout: import("@linaria/core").LinariaClassName;
2
2
  export declare const grid: import("@linaria/core").LinariaClassName;
3
- export declare const extendedWidth: string;
4
- export declare const fullWidth: string;
3
+ export declare const extendedWidth: import("@linaria/core").LinariaClassName;
4
+ export declare const fullWidth: import("@linaria/core").LinariaClassName;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "timvir",
4
- "version": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -22,10 +22,11 @@
22
22
  "prism-react-renderer": "^1",
23
23
  "react-feather": "^2",
24
24
  "use-immer": "^0.7.0",
25
- "wonka": "^4"
25
+ "wonka": "^6"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@mdx-js/react": "*",
29
- "react": "*"
29
+ "react": "*",
30
+ "react-dom": "*"
30
31
  }
31
32
  }
package/search/index.js CHANGED
@@ -18,27 +18,36 @@ import { useCombobox } from 'downshift';
18
18
  * @returns the combined, space separated class names that can be applied directly to the class attribute
19
19
  */
20
20
  const cx = function cx() {
21
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
21
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
22
+ .call(arguments).filter(Boolean);
22
23
  const atomicClasses = {};
23
24
  const nonAtomicClasses = [];
24
-
25
- for (const className of presentClassNames) {
25
+ presentClassNames.forEach(arg => {
26
26
  // className could be the output of a previous cx call, so split by ' ' first
27
- const individualClassNames = className.split(' ');
28
-
29
- for (const className of individualClassNames) {
27
+ const individualClassNames = arg ? arg.split(' ') : [];
28
+ individualClassNames.forEach(className => {
30
29
  if (className.startsWith('atm_')) {
31
30
  const [, keyHash] = className.split('_');
32
31
  atomicClasses[keyHash] = className;
33
32
  } else {
34
33
  nonAtomicClasses.push(className);
35
34
  }
35
+ });
36
+ });
37
+ const result = []; // eslint-disable-next-line no-restricted-syntax
38
+
39
+ for (const keyHash in atomicClasses) {
40
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
41
+ result.push(atomicClasses[keyHash]);
36
42
  }
37
43
  }
38
44
 
39
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
45
+ result.push(...nonAtomicClasses);
46
+ return result.join(' ');
40
47
  };
41
48
 
49
+ var cx$1 = cx;
50
+
42
51
  /**
43
52
  * The underlying DOM element which is rendered by this component.
44
53
  */
@@ -110,6 +119,8 @@ const Highlight = ({
110
119
  });
111
120
  };
112
121
 
122
+ var Highlight$1 = Highlight;
123
+
113
124
  /**
114
125
  * The underlying DOM element which is rendered by this component.
115
126
  */
@@ -167,7 +178,7 @@ function Dialog(props, ref) {
167
178
  return /*#__PURE__*/React.createElement(Root, {
168
179
  ref: ref,
169
180
  ...rest,
170
- className: cx(className, "r5ea8qd")
181
+ className: cx$1(className, "r5ea8qd")
171
182
  }, /*#__PURE__*/React.createElement("div", {
172
183
  className: "dp0smwa"
173
184
  }, /*#__PURE__*/React.createElement("div", {
@@ -215,7 +226,7 @@ function Dialog(props, ref) {
215
226
  }), /*#__PURE__*/React.createElement("path", {
216
227
  d: "M9.5 0.5L9.5 5.5 14.5 5.5"
217
228
  }))),
218
- label: /*#__PURE__*/React.createElement(Highlight, {
229
+ label: /*#__PURE__*/React.createElement(Highlight$1, {
219
230
  string: item.node.path,
220
231
  query: value
221
232
  }),