@modular-component/with-components 0.1.6 → 0.2.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.
- package/CHANGELOG.md +18 -0
- package/dist/index.d.ts +2 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +5 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @modular-component/with-components
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 83d453f: Rework API for better TypeScript performance and improved DX
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [83d453f]
|
|
12
|
+
- @modular-component/core@0.2.0
|
|
13
|
+
|
|
14
|
+
## 0.1.7
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [31f2966]
|
|
19
|
+
- @modular-component/core@0.1.7
|
|
20
|
+
|
|
3
21
|
## 0.1.6
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
|
|
3
|
-
declare
|
|
4
|
-
interface ModularStages<Args, Value> {
|
|
5
|
-
[withComponents]: {
|
|
6
|
-
restrict: Record<string, ComponentType>;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export declare const WithComponents: {
|
|
11
|
-
readonly Components: {
|
|
12
|
-
readonly symbol: typeof withComponents;
|
|
13
|
-
readonly field: "components";
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
2
|
+
import { ModularStage } from '@modular-component/core';
|
|
3
|
+
export declare function components<Components extends Record<string, ComponentType>>(components: Components): ModularStage<'components', () => Components>;
|
|
17
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,wBAAgB,UAAU,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACzE,UAAU,EAAE,UAAU,GACrB,YAAY,CAAC,YAAY,EAAE,MAAM,UAAU,CAAC,CAE9C"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Components: { symbol: withComponents, field: 'components' },
|
|
5
|
-
});
|
|
1
|
+
export function components(components) {
|
|
2
|
+
return { field: 'components', useStage: () => components };
|
|
3
|
+
}
|
|
6
4
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,UAAU,CACxB,UAAsB;IAEtB,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAA;AAC5D,CAAC"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"Sub-components",
|
|
10
10
|
"Injection"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.2.0",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"publishConfig": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"license": "cp ../../LICENSE ./LICENSE"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@modular-component/core": "0.
|
|
30
|
+
"@modular-component/core": "0.2.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=17 <19"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/react": "^18.0.17",
|
|
37
|
-
"typescript": "^
|
|
37
|
+
"typescript": "^5.2.2"
|
|
38
38
|
},
|
|
39
39
|
"main": "dist/index.js",
|
|
40
40
|
"types": "dist/index.d.ts"
|
package/src/index.ts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
|
+
import { ModularStage } from '@modular-component/core'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare module '@modular-component/core' {
|
|
8
|
-
export interface ModularStages<Args, Value> {
|
|
9
|
-
[withComponents]: {
|
|
10
|
-
restrict: Record<string, ComponentType>
|
|
11
|
-
}
|
|
12
|
-
}
|
|
4
|
+
export function components<Components extends Record<string, ComponentType>>(
|
|
5
|
+
components: Components,
|
|
6
|
+
): ModularStage<'components', () => Components> {
|
|
7
|
+
return { field: 'components', useStage: () => components }
|
|
13
8
|
}
|
|
14
|
-
|
|
15
|
-
export const WithComponents = createMethodRecord({
|
|
16
|
-
Components: { symbol: withComponents, field: 'components' },
|
|
17
|
-
} as const)
|