@limetech/lime-web-components 6.0.0 → 6.1.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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## [6.1.0](https://github.com/Lundalogik/lime-web-components/compare/v6.0.0...v6.1.0) (2025-06-12)
2
+
3
+
4
+ ### Features
5
+
6
+
7
+ * **view:** add support for typed data in ViewFactoryRegistry ([621e811](https://github.com/Lundalogik/lime-web-components/commit/621e811821375ac66921b17bf8818d959862a5fe))
8
+
1
9
  ## [6.0.0](https://github.com/Lundalogik/lime-web-components/compare/v5.46.0...v6.0.0) (2025-05-15)
2
10
 
3
11
 
@@ -1,9 +1,9 @@
1
1
  import { LimeWebComponentContext } from '../core';
2
- import { LimeObject } from '../limeobject';
3
2
  /**
4
3
  * Registry for view factories
5
4
  *
6
- * A view factory is used to create a view for a {@link LimeObject}.
5
+ * A view factory is used to create a view from some data, typically a
6
+ * {@link LimeObject} but can also be any other data type.
7
7
  * Multiple factories can be registered for the same view type, and when that
8
8
  * is done the factory returned from {@link ViewFactoryRegistry.getFactory} will
9
9
  * invoke each one in the order that they were added, using the return value
@@ -40,19 +40,19 @@ export interface ViewFactoryRegistry {
40
40
  * @param type - the type of view to get a factory for
41
41
  * @returns a factory for the given view type
42
42
  */
43
- getFactory<T = unknown>(type: string): ViewFactory<T> | undefined;
43
+ getFactory<TView = unknown, TData = unknown>(type: string): ViewFactory<TView, TData> | undefined;
44
44
  /**
45
45
  * Register a factory for a given view type
46
46
  *
47
47
  * @param type - the type of view to get a factory for
48
48
  * @param factory - factory function to create a view of the specific type
49
49
  */
50
- registerFactory<T = unknown>(type: string, factory: ViewFactory<T>): void;
50
+ registerFactory<TView = unknown, TData = unknown>(type: string, factory: ViewFactory<TView, TData>): void;
51
51
  }
52
52
  /**
53
- * Factory to create a view for a {@link LimeObject}
53
+ * Factory to create a view from some data
54
54
  *
55
- * @param limeobject - the limeobject to create a view for
55
+ * @param data - the data to create a view for, typically a {@link LimeObject}
56
56
  * @param context - the context of the web component rendering the view
57
57
  * @param view - the view as it was created by the previous factory, or
58
58
  * `undefined` if this is the first factory in the chain
@@ -60,5 +60,5 @@ export interface ViewFactoryRegistry {
60
60
  * @beta
61
61
  * @group Views
62
62
  */
63
- export type ViewFactory<T = unknown> = (limeobject: LimeObject, context: LimeWebComponentContext, view?: T) => T | undefined;
63
+ export type ViewFactory<TView = unknown, TData = unknown> = (data: TData, context: LimeWebComponentContext, view?: TView) => TView | undefined;
64
64
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/view/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;OAKG;IACH,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAElE;;;;;OAKG;IACH,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC7E;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,CACnC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,uBAAuB,EAChC,IAAI,CAAC,EAAE,CAAC,KACP,CAAC,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/view/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;OAKG;IACH,UAAU,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EACvC,IAAI,EAAE,MAAM,GACb,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC;IAEzC;;;;;OAKG;IACH,eAAe,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAC5C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,GACnC,IAAI,CAAC;CACX;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,IAAI,CACxD,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,uBAAuB,EAChC,IAAI,CAAC,EAAE,KAAK,KACX,KAAK,GAAG,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-web-components",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "Lime Web Components",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -29,8 +29,8 @@
29
29
  "lint:fix": "npm run lint:src:fix && npm run lint:json:fix",
30
30
  "lint:json": "prettier -l '{!(package*).json,packages/*/!(package*).json,.prettierrc}'",
31
31
  "lint:json:fix": "prettier --write '{!(package*).json,packages/*/!(package*).json,.prettierrc}'",
32
- "lint:src": "eslint '**/*.{ts,js}' --max-warnings=0",
33
- "lint:src:fix": "eslint '**/*.{ts,js}' --fix --max-warnings=0"
32
+ "lint:src": "eslint '**/*.{ts,js,cjs,mjs}' --max-warnings=0",
33
+ "lint:src:fix": "eslint '**/*.{ts,js,cjs,mjs}' --fix --max-warnings=0"
34
34
  },
35
35
  "dependencies": {
36
36
  "@stencil/core": "^2.22.3",
@@ -40,22 +40,22 @@
40
40
  "devDependencies": {
41
41
  "@commitlint/config-conventional": "^19.8.1",
42
42
  "@eslint/eslintrc": "^3.3.1",
43
- "@eslint/js": "^9.26.0",
43
+ "@eslint/js": "^9.28.0",
44
44
  "@microsoft/api-extractor": "^7.52.8",
45
45
  "@types/jest": "^27.5.0",
46
- "@typescript-eslint/eslint-plugin": "^8.32.1",
46
+ "@typescript-eslint/eslint-plugin": "^8.34.0",
47
47
  "@typescript-eslint/parser": "^8.32.1",
48
48
  "commitizen": "^4.3.1",
49
49
  "cz-conventional-changelog": "^3.3.0",
50
- "eslint": "^9.26.0",
50
+ "eslint": "^9.28.0",
51
51
  "eslint-config-prettier": "^10.1.5",
52
52
  "eslint-plugin-ban": "^2.0.0",
53
53
  "eslint-plugin-prefer-arrow": "^1.2.3",
54
- "eslint-plugin-prettier": "^5.4.0",
54
+ "eslint-plugin-prettier": "^5.4.1",
55
55
  "eslint-plugin-react": "^7.37.5",
56
56
  "eslint-plugin-sonarjs": "^3.0.2",
57
57
  "eslint-plugin-tsdoc": "^0.4.0",
58
- "globals": "^16.1.0",
58
+ "globals": "^16.2.0",
59
59
  "jest": "^27.5.1",
60
60
  "jest-cli": "^27.5.1",
61
61
  "prettier": "^3.5.3",
@@ -66,7 +66,7 @@
66
66
  "typescript": "^4.9.5",
67
67
  "vite": "^6.1.0",
68
68
  "vite-plugin-dts": "^4.5.0",
69
- "yargs": "^17.7.2"
69
+ "yargs": "^18.0.0"
70
70
  },
71
71
  "keywords": [
72
72
  "lime web components",