@vaadin/component-base 24.8.4 → 24.9.0-alpha1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/component-base",
3
- "version": "24.8.4",
3
+ "version": "24.9.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,10 +38,10 @@
38
38
  "lit": "^3.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@vaadin/chai-plugins": "~24.8.4",
42
- "@vaadin/test-runner-commands": "~24.8.4",
41
+ "@vaadin/chai-plugins": "24.9.0-alpha1",
42
+ "@vaadin/test-runner-commands": "24.9.0-alpha1",
43
43
  "@vaadin/testing-helpers": "^1.1.0",
44
44
  "sinon": "^18.0.0"
45
45
  },
46
- "gitHead": "849e54e967563080a685965e2dced02060b3ab23"
46
+ "gitHead": "cc13d59f0e3cd1a3b0c19c1a900a5308446fe7ac"
47
47
  }
package/src/define.js CHANGED
@@ -13,7 +13,7 @@ function dashToCamelCase(dash) {
13
13
 
14
14
  const experimentalMap = {};
15
15
 
16
- export function defineCustomElement(CustomElement, version = '24.8.4') {
16
+ export function defineCustomElement(CustomElement, version = '24.9.0-alpha1') {
17
17
  Object.defineProperty(CustomElement, 'version', {
18
18
  get() {
19
19
  return version;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+
7
+ /**
8
+ * Issues a warning in the browser console if it has not been issued before.
9
+ */
10
+ export declare function issueWarning(warning: string): void;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+
7
+ const issuedWarnings = new Set();
8
+
9
+ /**
10
+ * Issues a warning in the browser console if it has not been issued before.
11
+ * @param {string} warning
12
+ */
13
+ export function issueWarning(warning) {
14
+ if (issuedWarnings.has(warning)) {
15
+ return;
16
+ }
17
+
18
+ issuedWarnings.add(warning);
19
+ console.warn(warning);
20
+ }
21
+
22
+ /**
23
+ * Clears all issued warnings. Only intended for testing purposes.
24
+ */
25
+ export function clearWarnings() {
26
+ issuedWarnings.clear();
27
+ }