@modular-component/with-components 0.1.3 → 0.1.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @modular-component/with-components
2
2
 
3
+ ## 0.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 820a836: Refactor tuple system for better typescript performance
8
+ - Updated dependencies [f7af9ea]
9
+ - Updated dependencies [820a836]
10
+ - @modular-component/core@0.1.4
11
+
3
12
  ## 0.1.3
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,8 +1,17 @@
1
1
  import { ComponentType } from 'react';
2
+ declare const withComponents: unique symbol;
3
+ declare module '@modular-component/core' {
4
+ interface ModularStages<Args, Value> {
5
+ [withComponents]: {
6
+ restrict: Record<string, ComponentType>;
7
+ };
8
+ }
9
+ }
2
10
  export declare const WithComponents: {
3
- readonly withComponents: {
11
+ readonly Components: {
12
+ readonly symbol: typeof withComponents;
4
13
  readonly field: "components";
5
- readonly restrict: Record<string, ComponentType<any>>;
6
14
  };
7
15
  };
16
+ export {};
8
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,eAAO,MAAM,cAAc;;;;;CAKhB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAIrC,QAAA,MAAM,cAAc,eAAW,CAAA;AAE/B,OAAO,QAAQ,yBAAyB,CAAC;IACvC,UAAiB,aAAa,CAAC,IAAI,EAAE,KAAK;QACxC,CAAC,cAAc,CAAC,EAAE;YAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;SACxC,CAAA;KACF;CACF;AAED,eAAO,MAAM,cAAc;;;;;CAEhB,CAAA"}
package/dist/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import { createMethodRecord } from '@modular-component/core';
2
+ const withComponents = Symbol();
2
3
  export const WithComponents = createMethodRecord({
3
- withComponents: {
4
- field: 'components',
5
- restrict: {},
6
- },
4
+ Components: { symbol: withComponents, field: 'components' },
7
5
  });
8
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAI5D,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC;IAC/C,cAAc,EAAE;QACd,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,EAAwC;KACnD;CACO,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,cAAc,GAAG,MAAM,EAAE,CAAA;AAU/B,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC;IAC/C,UAAU,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE;CACnD,CAAC,CAAA"}
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "Sub-components",
10
10
  "Injection"
11
11
  ],
12
- "version": "0.1.3",
12
+ "version": "0.1.4",
13
13
  "type": "module",
14
14
  "license": "MIT",
15
15
  "publishConfig": {
@@ -27,7 +27,7 @@
27
27
  "license": "cp ../../LICENSE ./LICENSE"
28
28
  },
29
29
  "dependencies": {
30
- "@modular-component/core": "0.1.3"
30
+ "@modular-component/core": "0.1.4"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=17 <19"
package/src/index.ts CHANGED
@@ -1,10 +1,17 @@
1
+ import { ComponentType } from 'react'
2
+
1
3
  import { createMethodRecord } from '@modular-component/core'
2
4
 
3
- import { ComponentType } from 'react'
5
+ const withComponents = Symbol()
6
+
7
+ declare module '@modular-component/core' {
8
+ export interface ModularStages<Args, Value> {
9
+ [withComponents]: {
10
+ restrict: Record<string, ComponentType>
11
+ }
12
+ }
13
+ }
4
14
 
5
15
  export const WithComponents = createMethodRecord({
6
- withComponents: {
7
- field: 'components',
8
- restrict: {} as Record<string, ComponentType<any>>,
9
- },
16
+ Components: { symbol: withComponents, field: 'components' },
10
17
  } as const)