@mittwald/flow-remote-vue-components 1.6.0-next.21 → 1.6.0-next.23

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.
@@ -15,23 +15,29 @@ var DeprecationWarningProvider = defineComponent({
15
15
  default: void 0
16
16
  } },
17
17
  setup(props, { slots }) {
18
- provide(deprecationWarningKey, (message) => props.onWarning?.(message));
18
+ const reported = /* @__PURE__ */ new Set();
19
+ provide(deprecationWarningKey, (message) => {
20
+ const onWarning = props.onWarning;
21
+ if (!onWarning || reported.has(message)) return;
22
+ reported.add(message);
23
+ onWarning(message);
24
+ });
19
25
  return () => slots.default?.();
20
26
  }
21
27
  });
28
+ /** Messages already written to `console.warn`, across all providers. */
29
+ var consoleReported = /* @__PURE__ */ new Set();
22
30
  /**
23
- * Warns once per message, in the console and to the provider.
24
- *
25
- * Deduplicated per call site, like Flow's hook: a component that warns on every
26
- * render must not fill the console.
31
+ * Warns once per message, like Flow's hook: in the console once for the whole
32
+ * app, and once to each provider.
27
33
  */
28
34
  var useWarnDeprecation = () => {
29
35
  const onWarning = inject(deprecationWarningKey, void 0);
30
- const reported = /* @__PURE__ */ new Set();
31
36
  return (message) => {
32
- if (reported.has(message)) return;
33
- reported.add(message);
34
- console.warn(message);
37
+ if (!consoleReported.has(message)) {
38
+ consoleReported.add(message);
39
+ console.warn(message);
40
+ }
35
41
  onWarning?.(message);
36
42
  };
37
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DeprecationWarningProvider.mjs","names":[],"sources":["../../../../../src/components/DeprecationWarningProvider.ts"],"sourcesContent":["import {\n defineComponent,\n inject,\n provide,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { composition } from \"@/lib/composition\";\n\nexport type DeprecationWarningHandler = (message: string) => void;\n\nconst deprecationWarningKey: InjectionKey<DeprecationWarningHandler> = Symbol(\n \"flowDeprecationWarning\",\n);\n\n/**\n * Collects the deprecation warnings a remote app triggers.\n *\n * `RemoteRoot` installs one that forwards to the host, which is how mStudio\n * learns which deprecated paths an extension still uses.\n */\nexport const DeprecationWarningProvider = defineComponent({\n name: \"DeprecationWarningProvider\",\n\n props: {\n onWarning: {\n type: Function as PropType<DeprecationWarningHandler>,\n default: undefined,\n },\n },\n\n setup(props, { slots }) {\n provide(deprecationWarningKey, (message: string) =>\n props.onWarning?.(message),\n );\n\n return () => slots.default?.();\n },\n});\n\n/**\n * Warns once per message, in the console and to the provider.\n *\n * Deduplicated per call site, like Flow's hook: a component that warns on every\n * render must not fill the console.\n */\nexport const useWarnDeprecation = (): DeprecationWarningHandler => {\n const onWarning = inject(deprecationWarningKey, undefined);\n const reported = new Set<string>();\n\n return (message: string) => {\n if (reported.has(message)) {\n return;\n }\n reported.add(message);\n console.warn(message);\n onWarning?.(message);\n };\n};\n\ncomposition(DeprecationWarningProvider);\n\nexport default DeprecationWarningProvider;\n"],"mappings":";;;AAWA,IAAM,wBAAiE,OACrE,wBACF;;;;;;;AAQA,IAAa,6BAA6B,gBAAgB;CACxD,MAAM;CAEN,OAAO,EACL,WAAW;EACT,MAAM;EACN,SAAS,KAAA;CACX,EACF;CAEA,MAAM,OAAO,EAAE,SAAS;EACtB,QAAQ,wBAAwB,YAC9B,MAAM,YAAY,OAAO,CAC3B;EAEA,aAAa,MAAM,UAAU;CAC/B;AACF,CAAC;;;;;;;AAQD,IAAa,2BAAsD;CACjE,MAAM,YAAY,OAAO,uBAAuB,KAAA,CAAS;CACzD,MAAM,2BAAW,IAAI,IAAY;CAEjC,QAAQ,YAAoB;EAC1B,IAAI,SAAS,IAAI,OAAO,GACtB;EAEF,SAAS,IAAI,OAAO;EACpB,QAAQ,KAAK,OAAO;EACpB,YAAY,OAAO;CACrB;AACF;AAEA,YAAY,0BAA0B"}
1
+ {"version":3,"file":"DeprecationWarningProvider.mjs","names":[],"sources":["../../../../../src/components/DeprecationWarningProvider.ts"],"sourcesContent":["import {\n defineComponent,\n inject,\n provide,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { composition } from \"@/lib/composition\";\n\nexport type DeprecationWarningHandler = (message: string) => void;\n\nconst deprecationWarningKey: InjectionKey<DeprecationWarningHandler> = Symbol(\n \"flowDeprecationWarning\",\n);\n\n/**\n * Collects the deprecation warnings a remote app triggers.\n *\n * `RemoteRoot` installs one that forwards to the host, which is how mStudio\n * learns which deprecated paths an extension still uses.\n */\nexport const DeprecationWarningProvider = defineComponent({\n name: \"DeprecationWarningProvider\",\n\n props: {\n onWarning: {\n type: Function as PropType<DeprecationWarningHandler>,\n default: undefined,\n },\n },\n\n setup(props, { slots }) {\n const reported = new Set<string>();\n\n provide(deprecationWarningKey, (message: string) => {\n const onWarning = props.onWarning;\n if (!onWarning || reported.has(message)) {\n return;\n }\n reported.add(message);\n onWarning(message);\n });\n\n return () => slots.default?.();\n },\n});\n\n/** Messages already written to `console.warn`, across all providers. */\nconst consoleReported = new Set<string>();\n\n/**\n * Warns once per message, like Flow's hook: in the console once for the whole\n * app, and once to each provider.\n */\nexport const useWarnDeprecation = (): DeprecationWarningHandler => {\n const onWarning = inject(deprecationWarningKey, undefined);\n\n return (message: string) => {\n if (!consoleReported.has(message)) {\n consoleReported.add(message);\n console.warn(message);\n }\n onWarning?.(message);\n };\n};\n\ncomposition(DeprecationWarningProvider);\n\nexport default DeprecationWarningProvider;\n"],"mappings":";;;AAWA,IAAM,wBAAiE,OACrE,wBACF;;;;;;;AAQA,IAAa,6BAA6B,gBAAgB;CACxD,MAAM;CAEN,OAAO,EACL,WAAW;EACT,MAAM;EACN,SAAS,KAAA;CACX,EACF;CAEA,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,2BAAW,IAAI,IAAY;EAEjC,QAAQ,wBAAwB,YAAoB;GAClD,MAAM,YAAY,MAAM;GACxB,IAAI,CAAC,aAAa,SAAS,IAAI,OAAO,GACpC;GAEF,SAAS,IAAI,OAAO;GACpB,UAAU,OAAO;EACnB,CAAC;EAED,aAAa,MAAM,UAAU;CAC/B;AACF,CAAC;;AAGD,IAAM,kCAAkB,IAAI,IAAY;;;;;AAMxC,IAAa,2BAAsD;CACjE,MAAM,YAAY,OAAO,uBAAuB,KAAA,CAAS;CAEzD,QAAQ,YAAoB;EAC1B,IAAI,CAAC,gBAAgB,IAAI,OAAO,GAAG;GACjC,gBAAgB,IAAI,OAAO;GAC3B,QAAQ,KAAK,OAAO;EACtB;EACA,YAAY,OAAO;CACrB;AACF;AAEA,YAAY,0BAA0B"}
@@ -1,7 +1,7 @@
1
1
  import { Version } from "@mittwald/flow-remote-core";
2
2
  //#region src/version.ts
3
3
  var communicationVersion = Version.v5;
4
- var packageVersion = "1.6.0-next.21";
4
+ var packageVersion = "1.6.0-next.23";
5
5
  var version = communicationVersion;
6
6
  //#endregion
7
7
  export { communicationVersion, packageVersion, version };
@@ -22,10 +22,8 @@ export declare const DeprecationWarningProvider: import('vue').DefineComponent<i
22
22
  onWarning: DeprecationWarningHandler;
23
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
24
24
  /**
25
- * Warns once per message, in the console and to the provider.
26
- *
27
- * Deduplicated per call site, like Flow's hook: a component that warns on every
28
- * render must not fill the console.
25
+ * Warns once per message, like Flow's hook: in the console once for the whole
26
+ * app, and once to each provider.
29
27
  */
30
28
  export declare const useWarnDeprecation: () => DeprecationWarningHandler;
31
29
  export default DeprecationWarningProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-remote-vue-components",
3
- "version": "1.6.0-next.21",
3
+ "version": "1.6.0-next.23",
4
4
  "type": "module",
5
5
  "description": "Vue components that can be used in a remote environment",
6
6
  "homepage": "https://flow.mittwald.de",
@@ -41,8 +41,8 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@internationalized/date": "^3.12.3",
44
- "@mittwald/flow-remote-core": "1.6.0-next.21",
45
- "@mittwald/flow-remote-elements": "1.6.0-next.21",
44
+ "@mittwald/flow-remote-core": "1.6.0-next.23",
45
+ "@mittwald/flow-remote-elements": "1.6.0-next.23",
46
46
  "@tanstack/table-core": "^8.21.3",
47
47
  "country-codes-list": "^2.0.0",
48
48
  "dot-prop": "^10.2.0",
@@ -52,14 +52,14 @@
52
52
  "remeda": "^2.43.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@mittwald/ext-bridge": "1.6.0-next.21",
56
- "@mittwald/flow-components-base": "1.6.0-next.21",
57
- "@mittwald/flow-core": "1.6.0-next.21",
58
- "@mittwald/flow-icons-base": "1.6.0-next.21",
59
- "@mittwald/flow-react-components": "1.6.0-next.21",
60
- "@mittwald/flow-remote-react-components": "1.6.0-next.21",
61
- "@mittwald/flow-remote-react-renderer": "1.6.0-next.21",
62
- "@mittwald/typescript-config": "1.6.0-next.21",
55
+ "@mittwald/ext-bridge": "1.6.0-next.23",
56
+ "@mittwald/flow-components-base": "1.6.0-next.23",
57
+ "@mittwald/flow-core": "1.6.0-next.23",
58
+ "@mittwald/flow-icons-base": "1.6.0-next.23",
59
+ "@mittwald/flow-react-components": "1.6.0-next.23",
60
+ "@mittwald/flow-remote-react-components": "1.6.0-next.23",
61
+ "@mittwald/flow-remote-react-renderer": "1.6.0-next.23",
62
+ "@mittwald/typescript-config": "1.6.0-next.23",
63
63
  "@quilted/threads": "^3.3.1",
64
64
  "@types/node": "^25.9.3",
65
65
  "@types/react": "^19.2",
@@ -79,10 +79,10 @@
79
79
  "vue": "~3.5.38"
80
80
  },
81
81
  "peerDependencies": {
82
- "@mittwald/ext-bridge": "1.6.0-next.21",
83
- "@mittwald/flow-react-components": "1.6.0-next.21",
82
+ "@mittwald/ext-bridge": "1.6.0-next.23",
83
+ "@mittwald/flow-react-components": "1.6.0-next.23",
84
84
  "vue": "^3.5.0"
85
85
  },
86
86
  "flowStatus": "beta",
87
- "gitHead": "c75ca489f4a68d285b3a7513fab391ef31978680"
87
+ "gitHead": "782622840cbf82aa1170c6d0bab099f85e63312f"
88
88
  }