@ni/ok-react 0.3.0 → 0.4.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.
@@ -9,4 +9,4 @@ export function wrap(elementClass, options = {}) {
9
9
  tagName: customElements.getName(elementClass)
10
10
  });
11
11
  }
12
- //# sourceMappingURL=index.js.map
12
+ //# sourceMappingURL=react-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-wrapper.js","sourceRoot":"","sources":["../../../src/utilities/react-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,MAAM,YAAY,CAAC;AAW5C,MAAM,UAAU,IAAI,CAChB,YAA4B,EAC5B,UAAsB,EAAE;IAExB,OAAO,eAAe,CAAO;QACzB,GAAG,OAAO;QACV,YAAY;QACZ,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,YAAY,CAAE;KACjD,CAAC,CAAC;AACP,CAAC","sourcesContent":["import type { EventName, Options, ReactWebComponent } from '@lit/react';\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nexport { type EventName } from '@lit/react';\nexport interface EventNames {\n [key: string]: EventName | string;\n}\n\ntype Constructor<T> = new () => T;\ntype Opts<\n I extends HTMLElement,\n E extends EventNames = NonNullable<unknown>\n> = Omit<Options<I, E>, 'elementClass' | 'react' | 'tagName'>;\n\nexport function wrap<I extends HTMLElement, E extends EventNames = NonNullable<unknown>>(\n elementClass: Constructor<I>,\n options: Opts<I, E> = {},\n): ReactWebComponent<I, E> {\n return createComponent<I, E>({\n ...options,\n elementClass,\n react: React,\n tagName: customElements.getName(elementClass)!\n });\n}\n"]}
package/package.json CHANGED
@@ -1,12 +1,27 @@
1
1
  {
2
2
  "name": "@ni/ok-react",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "React components for NI Ok Components",
5
5
  "keywords": [
6
6
  "ni",
7
7
  "ok",
8
8
  "react"
9
9
  ],
10
+ "type": "module",
11
+ "exports": {
12
+ "./package.json": "./package.json",
13
+ "./*": {
14
+ "types": "./dist/esm/*.d.ts",
15
+ "import": "./dist/esm/*/index.js"
16
+ }
17
+ },
18
+ "typesVersions": {
19
+ "*": {
20
+ "*": [
21
+ "dist/esm/*/index.d.ts"
22
+ ]
23
+ }
24
+ },
10
25
  "scripts": {
11
26
  "build": "tsc -p ./tsconfig.json",
12
27
  "lint": "eslint .",
@@ -24,13 +39,13 @@
24
39
  "author": "National Instruments",
25
40
  "license": "MIT",
26
41
  "devDependencies": {
27
- "@ni/ok-components": "^0.1.22",
42
+ "@ni/ok-components": "^0.1.23",
28
43
  "@ni-private/eslint-config-nimble": "*",
29
44
  "typescript": "~5.8.3"
30
45
  },
31
46
  "peerDependencies": {
32
47
  "@lit/react": "^1.0.8",
33
- "@ni/ok-components": "^0.1.22",
48
+ "@ni/ok-components": "^0.1.23",
34
49
  "react": "^17 || ^18 || ^19"
35
50
  }
36
51
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/react-wrapper/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,MAAM,YAAY,CAAC;AAW5C,MAAM,UAAU,IAAI,CAChB,YAA4B,EAC5B,UAAsB,EAAE;IAExB,OAAO,eAAe,CAAO;QACzB,GAAG,OAAO;QACV,YAAY;QACZ,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,YAAY,CAAE;KACjD,CAAC,CAAC;AACP,CAAC","sourcesContent":["import type { EventName, Options, ReactWebComponent } from '@lit/react';\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nexport { type EventName } from '@lit/react';\nexport interface EventNames {\n [key: string]: EventName | string;\n}\n\ntype Constructor<T> = new () => T;\ntype Opts<\n I extends HTMLElement,\n E extends EventNames = NonNullable<unknown>\n> = Omit<Options<I, E>, 'elementClass' | 'react' | 'tagName'>;\n\nexport function wrap<I extends HTMLElement, E extends EventNames = NonNullable<unknown>>(\n elementClass: Constructor<I>,\n options: Opts<I, E> = {},\n): ReactWebComponent<I, E> {\n return createComponent<I, E>({\n ...options,\n elementClass,\n react: React,\n tagName: customElements.getName(elementClass)!\n });\n}\n"]}