@mittwald/flow-remote-react-renderer 0.2.0-alpha.783 → 0.2.0-alpha.784

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.
Files changed (74) hide show
  1. package/dist/js/RemoteRenderer.mjs +12 -11
  2. package/dist/js/RemoteRenderer.mjs.map +1 -1
  3. package/dist/js/core/src/file.mjs +17 -0
  4. package/dist/js/core/src/file.mjs.map +1 -0
  5. package/dist/js/index.mjs +2 -2
  6. package/dist/js/index.mjs.map +1 -0
  7. package/dist/js/remote-react-renderer/src/RemoteRendererBrowser.mjs +131 -0
  8. package/dist/js/remote-react-renderer/src/RemoteRendererBrowser.mjs.map +1 -0
  9. package/dist/js/remote-react-renderer/src/auto-generated/index.mjs +327 -0
  10. package/dist/js/remote-react-renderer/src/auto-generated/index.mjs.map +1 -0
  11. package/dist/js/remote-react-renderer/src/components/Form.mjs +37 -0
  12. package/dist/js/remote-react-renderer/src/components/Form.mjs.map +1 -0
  13. package/dist/js/remote-react-renderer/src/components/NotificationRenderController.mjs +25 -0
  14. package/dist/js/remote-react-renderer/src/components/NotificationRenderController.mjs.map +1 -0
  15. package/dist/js/remote-react-renderer/src/components/SlotRootWrapper.mjs +10 -0
  16. package/dist/js/remote-react-renderer/src/components/SlotRootWrapper.mjs.map +1 -0
  17. package/dist/js/remote-react-renderer/src/components/lib/prepareFormData.mjs +29 -0
  18. package/dist/js/remote-react-renderer/src/components/lib/prepareFormData.mjs.map +1 -0
  19. package/dist/js/remote-react-renderer/src/components.mjs +55 -0
  20. package/dist/js/remote-react-renderer/src/components.mjs.map +1 -0
  21. package/dist/js/remote-react-renderer/src/hooks/useControllableSuspenseTrigger.mjs +30 -0
  22. package/dist/js/remote-react-renderer/src/hooks/useControllableSuspenseTrigger.mjs.map +1 -0
  23. package/dist/js/remote-react-renderer/src/hooks/useMergedComponents.mjs +24 -0
  24. package/dist/js/remote-react-renderer/src/hooks/useMergedComponents.mjs.map +1 -0
  25. package/dist/js/remote-react-renderer/src/hooks/useUpdateHostPathnameOnRemote.mjs +17 -0
  26. package/dist/js/remote-react-renderer/src/hooks/useUpdateHostPathnameOnRemote.mjs.map +1 -0
  27. package/dist/js/remote-react-renderer/src/integrations/react-hook-form/Form.mjs +16 -0
  28. package/dist/js/remote-react-renderer/src/integrations/react-hook-form/Form.mjs.map +1 -0
  29. package/dist/js/remote-react-renderer/src/lib/createFlowRemoteComponentRenderer.mjs +47 -0
  30. package/dist/js/remote-react-renderer/src/lib/createFlowRemoteComponentRenderer.mjs.map +1 -0
  31. package/dist/js/remote-react-renderer/src/lib/elementFactory.mjs +23 -0
  32. package/dist/js/remote-react-renderer/src/lib/elementFactory.mjs.map +1 -0
  33. package/dist/js/remote-react-renderer/src/lib/mapAttributeToReactProperty.mjs +14 -0
  34. package/dist/js/remote-react-renderer/src/lib/mapAttributeToReactProperty.mjs.map +1 -0
  35. package/dist/js/remote-react-renderer/src/lib/propClassifiers.mjs +7 -0
  36. package/dist/js/remote-react-renderer/src/lib/propClassifiers.mjs.map +1 -0
  37. package/package.json +8 -8
  38. package/dist/js/_virtual/_rolldown/runtime.mjs +0 -26
  39. package/dist/js/node_modules/.pnpm/invariant@2.2.4/node_modules/invariant/browser.mjs +0 -55
  40. package/dist/js/node_modules/.pnpm/invariant@2.2.4/node_modules/invariant/browser.mjs.map +0 -1
  41. package/dist/js/packages/core/src/file.mjs +0 -19
  42. package/dist/js/packages/core/src/file.mjs.map +0 -1
  43. package/dist/js/packages/core/src/index.mjs +0 -3
  44. package/dist/js/packages/remote-react-renderer/src/RemoteRendererBrowser.mjs +0 -89
  45. package/dist/js/packages/remote-react-renderer/src/RemoteRendererBrowser.mjs.map +0 -1
  46. package/dist/js/packages/remote-react-renderer/src/auto-generated/index.mjs +0 -136
  47. package/dist/js/packages/remote-react-renderer/src/auto-generated/index.mjs.map +0 -1
  48. package/dist/js/packages/remote-react-renderer/src/components/Form.mjs +0 -28
  49. package/dist/js/packages/remote-react-renderer/src/components/Form.mjs.map +0 -1
  50. package/dist/js/packages/remote-react-renderer/src/components/NotificationRenderController.mjs +0 -24
  51. package/dist/js/packages/remote-react-renderer/src/components/NotificationRenderController.mjs.map +0 -1
  52. package/dist/js/packages/remote-react-renderer/src/components/SlotRootWrapper.mjs +0 -11
  53. package/dist/js/packages/remote-react-renderer/src/components/SlotRootWrapper.mjs.map +0 -1
  54. package/dist/js/packages/remote-react-renderer/src/components/index.mjs +0 -4
  55. package/dist/js/packages/remote-react-renderer/src/components/lib/prepareFormData.mjs +0 -22
  56. package/dist/js/packages/remote-react-renderer/src/components/lib/prepareFormData.mjs.map +0 -1
  57. package/dist/js/packages/remote-react-renderer/src/components.mjs +0 -48
  58. package/dist/js/packages/remote-react-renderer/src/components.mjs.map +0 -1
  59. package/dist/js/packages/remote-react-renderer/src/hooks/useControllableSuspenseTrigger.mjs +0 -27
  60. package/dist/js/packages/remote-react-renderer/src/hooks/useControllableSuspenseTrigger.mjs.map +0 -1
  61. package/dist/js/packages/remote-react-renderer/src/hooks/useMergedComponents.mjs +0 -14
  62. package/dist/js/packages/remote-react-renderer/src/hooks/useMergedComponents.mjs.map +0 -1
  63. package/dist/js/packages/remote-react-renderer/src/hooks/useUpdateHostPathnameOnRemote.mjs +0 -17
  64. package/dist/js/packages/remote-react-renderer/src/hooks/useUpdateHostPathnameOnRemote.mjs.map +0 -1
  65. package/dist/js/packages/remote-react-renderer/src/integrations/react-hook-form/Form.mjs +0 -26
  66. package/dist/js/packages/remote-react-renderer/src/integrations/react-hook-form/Form.mjs.map +0 -1
  67. package/dist/js/packages/remote-react-renderer/src/lib/createFlowRemoteComponentRenderer.mjs +0 -32
  68. package/dist/js/packages/remote-react-renderer/src/lib/createFlowRemoteComponentRenderer.mjs.map +0 -1
  69. package/dist/js/packages/remote-react-renderer/src/lib/elementFactory.mjs +0 -19
  70. package/dist/js/packages/remote-react-renderer/src/lib/elementFactory.mjs.map +0 -1
  71. package/dist/js/packages/remote-react-renderer/src/lib/mapAttributeToReactProperty.mjs +0 -13
  72. package/dist/js/packages/remote-react-renderer/src/lib/mapAttributeToReactProperty.mjs.map +0 -1
  73. package/dist/js/packages/remote-react-renderer/src/lib/propClassifiers.mjs +0 -9
  74. package/dist/js/packages/remote-react-renderer/src/lib/propClassifiers.mjs.map +0 -1
@@ -0,0 +1,37 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import 'react';
5
+ import { prepareFormData } from './lib/prepareFormData.mjs';
6
+
7
+ const Form = (props) => {
8
+ const {
9
+ action: onActionFromProps,
10
+ onSubmit: onSubmitFromProps,
11
+ ref,
12
+ ...rest
13
+ } = props;
14
+ const onSubmit = async (event) => {
15
+ event.preventDefault();
16
+ const resolvedData = await prepareFormData(
17
+ new FormData(event.currentTarget)
18
+ );
19
+ await onSubmitFromProps?.(resolvedData);
20
+ };
21
+ const onAction = async (formData) => {
22
+ const resolvedFormData = await prepareFormData(formData);
23
+ await onActionFromProps?.(resolvedFormData);
24
+ };
25
+ return /* @__PURE__ */ jsx(
26
+ "form",
27
+ {
28
+ ...rest,
29
+ ref,
30
+ action: onActionFromProps ? onAction : void 0,
31
+ onSubmit: onSubmitFromProps ? onSubmit : void 0
32
+ }
33
+ );
34
+ };
35
+
36
+ export { Form };
37
+ //# sourceMappingURL=Form.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.mjs","sources":["../../../../../src/components/Form.tsx"],"sourcesContent":["import {\n type FC,\n type FormEvent,\n type PropsWithChildren,\n type Ref,\n} from \"react\";\nimport { prepareFormData } from \"@/components/lib/prepareFormData\";\n\ntype FormProps = {\n action?: (data: FormData) => void | Promise<void>;\n onSubmit?: (data: FormData) => void | Promise<void>;\n ref?: Ref<HTMLFormElement>;\n} & PropsWithChildren;\n\nexport const Form: FC<FormProps> = (props) => {\n const {\n action: onActionFromProps,\n onSubmit: onSubmitFromProps,\n ref,\n ...rest\n } = props;\n\n const onSubmit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const resolvedData = await prepareFormData(\n new FormData(event.currentTarget),\n );\n await onSubmitFromProps?.(resolvedData);\n };\n\n const onAction = async (formData: FormData) => {\n const resolvedFormData = await prepareFormData(formData);\n await onActionFromProps?.(resolvedFormData);\n };\n\n return (\n <form\n {...rest}\n ref={ref}\n action={onActionFromProps ? onAction : undefined}\n onSubmit={onSubmitFromProps ? onSubmit : undefined}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAcO,MAAM,IAAA,GAAsB,CAAC,KAAA,KAAU;AAC5C,EAAA,MAAM;AAAA,IACJ,MAAA,EAAQ,iBAAA;AAAA,IACR,QAAA,EAAU,iBAAA;AAAA,IACV,GAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,QAAA,GAAW,OAAO,KAAA,KAAsC;AAC5D,IAAA,KAAA,CAAM,cAAA,EAAe;AACrB,IAAA,MAAM,eAAe,MAAM,eAAA;AAAA,MACzB,IAAI,QAAA,CAAS,KAAA,CAAM,aAAa;AAAA,KAClC;AACA,IAAA,MAAM,oBAAoB,YAAY,CAAA;AAAA,EACxC,CAAA;AAEA,EAAA,MAAM,QAAA,GAAW,OAAO,QAAA,KAAuB;AAC7C,IAAA,MAAM,gBAAA,GAAmB,MAAM,eAAA,CAAgB,QAAQ,CAAA;AACvD,IAAA,MAAM,oBAAoB,gBAAgB,CAAA;AAAA,EAC5C,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MACA,MAAA,EAAQ,oBAAoB,QAAA,GAAW,MAAA;AAAA,MACvC,QAAA,EAAU,oBAAoB,QAAA,GAAW;AAAA;AAAA,GAC3C;AAEJ;;;;"}
@@ -0,0 +1,25 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { useNotificationController, Notification } from '@mittwald/flow-react-components';
5
+ import { useRef, useEffect } from 'react';
6
+
7
+ const NotificationRenderController = (props) => {
8
+ const notifications = useNotificationController();
9
+ const isAdded = useRef(false);
10
+ useEffect(() => {
11
+ if (isAdded.current) {
12
+ return;
13
+ }
14
+ const id = notifications.add(/* @__PURE__ */ jsx(Notification, { ...props }));
15
+ isAdded.current = true;
16
+ return () => {
17
+ notifications.remove(id);
18
+ isAdded.current = false;
19
+ };
20
+ }, [notifications]);
21
+ return null;
22
+ };
23
+
24
+ export { NotificationRenderController };
25
+ //# sourceMappingURL=NotificationRenderController.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationRenderController.mjs","sources":["../../../../../src/components/NotificationRenderController.tsx"],"sourcesContent":["import {\n useNotificationController,\n type NotificationProps,\n Notification,\n} from \"@mittwald/flow-react-components\";\nimport { useEffect, useRef, type FC } from \"react\";\n\nexport const NotificationRenderController: FC<NotificationProps> = (props) => {\n const notifications = useNotificationController();\n const isAdded = useRef(false);\n\n useEffect(() => {\n if (isAdded.current) {\n return;\n }\n\n const id = notifications.add(<Notification {...props} />);\n isAdded.current = true;\n\n return () => {\n notifications.remove(id);\n isAdded.current = false;\n };\n }, [notifications]);\n\n return null;\n};\n"],"names":[],"mappings":";;;;AAOO,MAAM,4BAAA,GAAsD,CAAC,KAAA,KAAU;AAC5E,EAAA,MAAM,gBAAgB,yBAAA,EAA0B;AAChD,EAAA,MAAM,OAAA,GAAU,OAAO,KAAK,CAAA;AAE5B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,QAAQ,OAAA,EAAS;AACnB,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,KAAK,aAAA,CAAc,GAAA,qBAAK,YAAA,EAAA,EAAc,GAAG,OAAO,CAAE,CAAA;AACxD,IAAA,OAAA,CAAQ,OAAA,GAAU,IAAA;AAElB,IAAA,OAAO,MAAM;AACX,MAAA,aAAA,CAAc,OAAO,EAAE,CAAA;AACvB,MAAA,OAAA,CAAQ,OAAA,GAAU,KAAA;AAAA,IACpB,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,aAAa,CAAC,CAAA;AAElB,EAAA,OAAO,IAAA;AACT;;;;"}
@@ -0,0 +1,10 @@
1
+ "use client"
2
+ /* */
3
+ import React, { createElement } from 'react';
4
+
5
+ const SlotRootWrapper = (props) => {
6
+ return createElement(React.Fragment, {}, props.children);
7
+ };
8
+
9
+ export { SlotRootWrapper };
10
+ //# sourceMappingURL=SlotRootWrapper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlotRootWrapper.mjs","sources":["../../../../../src/components/SlotRootWrapper.ts"],"sourcesContent":["import React, { createElement, type FC, type PropsWithChildren } from \"react\";\n\nexport const SlotRootWrapper: FC<PropsWithChildren> = (props) => {\n return createElement(React.Fragment, {}, props.children);\n};\n\nexport default SlotRootWrapper;\n"],"names":[],"mappings":";;AAEO,MAAM,eAAA,GAAyC,CAAC,KAAA,KAAU;AAC/D,EAAA,OAAO,cAAc,KAAA,CAAM,QAAA,EAAU,EAAC,EAAG,MAAM,QAAQ,CAAA;AACzD;;;;"}
@@ -0,0 +1,29 @@
1
+ "use client"
2
+ /* */
3
+ import { addAwaitedArrayBuffer } from '../../../../core/src/file.mjs';
4
+
5
+ const prepareFormData = async (formData) => {
6
+ for (const [fieldName] of formData) {
7
+ const fieldValues = formData.getAll(fieldName);
8
+ if (fieldValues.every((v) => v instanceof File)) {
9
+ formData.delete(fieldName);
10
+ }
11
+ for (let value of fieldValues) {
12
+ if (value instanceof File) {
13
+ if (!value.name || value.size <= 0) {
14
+ break;
15
+ }
16
+ value = await addAwaitedArrayBuffer(value);
17
+ if (formData.has(fieldName)) {
18
+ formData.append(fieldName, value);
19
+ } else {
20
+ formData.set(fieldName, value);
21
+ }
22
+ }
23
+ }
24
+ }
25
+ return formData;
26
+ };
27
+
28
+ export { prepareFormData };
29
+ //# sourceMappingURL=prepareFormData.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareFormData.mjs","sources":["../../../../../../src/components/lib/prepareFormData.ts"],"sourcesContent":["import { addAwaitedArrayBuffer } from \"@mittwald/flow-core\";\n\nexport const prepareFormData = async (\n formData: FormData,\n): Promise<FormData> => {\n for (const [fieldName] of formData) {\n const fieldValues = formData.getAll(fieldName);\n\n if (fieldValues.every((v) => v instanceof File)) {\n formData.delete(fieldName);\n }\n\n for (let value of fieldValues) {\n if (value instanceof File) {\n if (!value.name || value.size <= 0) {\n break;\n }\n\n value = await addAwaitedArrayBuffer(value);\n if (formData.has(fieldName)) {\n formData.append(fieldName, value);\n } else {\n formData.set(fieldName, value);\n }\n }\n }\n }\n\n return formData;\n};\n"],"names":[],"mappings":";;AAEO,MAAM,eAAA,GAAkB,OAC7B,QAAA,KACsB;AACtB,EAAA,KAAA,MAAW,CAAC,SAAS,CAAA,IAAK,QAAA,EAAU;AAClC,IAAA,MAAM,WAAA,GAAc,QAAA,CAAS,MAAA,CAAO,SAAS,CAAA;AAE7C,IAAA,IAAI,YAAY,KAAA,CAAM,CAAC,CAAA,KAAM,CAAA,YAAa,IAAI,CAAA,EAAG;AAC/C,MAAA,QAAA,CAAS,OAAO,SAAS,CAAA;AAAA,IAC3B;AAEA,IAAA,KAAA,IAAS,SAAS,WAAA,EAAa;AAC7B,MAAA,IAAI,iBAAiB,IAAA,EAAM;AACzB,QAAA,IAAI,CAAC,KAAA,CAAM,IAAA,IAAQ,KAAA,CAAM,QAAQ,CAAA,EAAG;AAClC,UAAA;AAAA,QACF;AAEA,QAAA,KAAA,GAAQ,MAAM,sBAAsB,KAAK,CAAA;AACzC,QAAA,IAAI,QAAA,CAAS,GAAA,CAAI,SAAS,CAAA,EAAG;AAC3B,UAAA,QAAA,CAAS,MAAA,CAAO,WAAW,KAAK,CAAA;AAAA,QAClC,CAAA,MAAO;AACL,UAAA,QAAA,CAAS,GAAA,CAAI,WAAW,KAAK,CAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,QAAA;AACT;;;;"}
@@ -0,0 +1,55 @@
1
+ "use client"
2
+ /* */
3
+ import { createFlowRemoteComponentRenderer } from './lib/createFlowRemoteComponentRenderer.mjs';
4
+ import { elementFactory } from './lib/elementFactory.mjs';
5
+ import { createRemoteComponentRenderer } from '@mittwald/remote-dom-react/host';
6
+ import flowComponents from './auto-generated/index.mjs';
7
+ import { Form as Form$1 } from './components/Form.mjs';
8
+ import { SlotRootWrapper } from './components/SlotRootWrapper.mjs';
9
+ import { Form } from './integrations/react-hook-form/Form.mjs';
10
+ import { NotificationRenderController } from './components/NotificationRenderController.mjs';
11
+
12
+ const htmlComponentsMap = {
13
+ svg: createRemoteComponentRenderer(elementFactory("svg")),
14
+ circle: createRemoteComponentRenderer(elementFactory("circle")),
15
+ g: createRemoteComponentRenderer(elementFactory("g")),
16
+ path: createRemoteComponentRenderer(elementFactory("path")),
17
+ strong: createRemoteComponentRenderer(elementFactory("strong")),
18
+ s: createRemoteComponentRenderer(elementFactory("s")),
19
+ ul: createRemoteComponentRenderer(elementFactory("ul")),
20
+ ol: createRemoteComponentRenderer(elementFactory("ol")),
21
+ li: createRemoteComponentRenderer(elementFactory("li")),
22
+ small: createRemoteComponentRenderer(elementFactory("small")),
23
+ i: createRemoteComponentRenderer(elementFactory("i")),
24
+ br: createRemoteComponentRenderer(
25
+ elementFactory("br", { isVoidElement: true })
26
+ )
27
+ };
28
+ const skippedComponentsMap = {
29
+ script: () => null
30
+ };
31
+ const flowComponentsMap = {
32
+ "flr-form": createFlowRemoteComponentRenderer("Form", Form$1),
33
+ "flr-rhf-form": createFlowRemoteComponentRenderer("RhfForm", Form),
34
+ "flr-slot-root-wrapper": createFlowRemoteComponentRenderer(
35
+ "SlotRootWrapper",
36
+ SlotRootWrapper
37
+ ),
38
+ "flr-notification": createFlowRemoteComponentRenderer(
39
+ "Notification",
40
+ NotificationRenderController
41
+ ),
42
+ "flr-clear-props-context-content": createFlowRemoteComponentRenderer(
43
+ "ClearPropsContextContent",
44
+ SlotRootWrapper
45
+ )
46
+ };
47
+ const components = {
48
+ ...htmlComponentsMap,
49
+ ...skippedComponentsMap,
50
+ ...flowComponents,
51
+ ...flowComponentsMap
52
+ };
53
+
54
+ export { components };
55
+ //# sourceMappingURL=components.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.mjs","sources":["../../../../src/components.ts"],"sourcesContent":["import { createFlowRemoteComponentRenderer } from \"@/lib/createFlowRemoteComponentRenderer\";\nimport { elementFactory } from \"@/lib/elementFactory\";\nimport { createRemoteComponentRenderer } from \"@mittwald/remote-dom-react/host\";\nimport autoGenerated from \"./auto-generated\";\nimport { Form, SlotRootWrapper } from \"@/components/\";\nimport { Form as RhfForm } from \"@/integrations/react-hook-form/Form\";\nimport { NotificationRenderController } from \"@/components/NotificationRenderController\";\n\nconst htmlComponentsMap = {\n svg: createRemoteComponentRenderer(elementFactory(\"svg\")),\n circle: createRemoteComponentRenderer(elementFactory(\"circle\")),\n g: createRemoteComponentRenderer(elementFactory(\"g\")),\n path: createRemoteComponentRenderer(elementFactory(\"path\")),\n strong: createRemoteComponentRenderer(elementFactory(\"strong\")),\n s: createRemoteComponentRenderer(elementFactory(\"s\")),\n ul: createRemoteComponentRenderer(elementFactory(\"ul\")),\n ol: createRemoteComponentRenderer(elementFactory(\"ol\")),\n li: createRemoteComponentRenderer(elementFactory(\"li\")),\n small: createRemoteComponentRenderer(elementFactory(\"small\")),\n i: createRemoteComponentRenderer(elementFactory(\"i\")),\n br: createRemoteComponentRenderer(\n elementFactory(\"br\", { isVoidElement: true }),\n ),\n} as const;\n\n/**\n * Components that are allowed to be used remotely but should not be rendered on\n * the host.\n */\nconst skippedComponentsMap = {\n script: () => null,\n} as const;\n\nconst flowComponentsMap = {\n \"flr-form\": createFlowRemoteComponentRenderer(\"Form\", Form),\n \"flr-rhf-form\": createFlowRemoteComponentRenderer(\"RhfForm\", RhfForm),\n \"flr-slot-root-wrapper\": createFlowRemoteComponentRenderer(\n \"SlotRootWrapper\",\n SlotRootWrapper,\n ),\n \"flr-notification\": createFlowRemoteComponentRenderer(\n \"Notification\",\n NotificationRenderController,\n ),\n \"flr-clear-props-context-content\": createFlowRemoteComponentRenderer(\n \"ClearPropsContextContent\",\n SlotRootWrapper,\n ),\n};\n\nexport const components = {\n ...htmlComponentsMap,\n ...skippedComponentsMap,\n ...autoGenerated,\n ...flowComponentsMap,\n};\n"],"names":["Form","RhfForm","autoGenerated"],"mappings":";;;;;;;;;AAQA,MAAM,iBAAA,GAAoB;AAAA,EACxB,GAAA,EAAK,6BAAA,CAA8B,cAAA,CAAe,KAAK,CAAC,CAAA;AAAA,EACxD,MAAA,EAAQ,6BAAA,CAA8B,cAAA,CAAe,QAAQ,CAAC,CAAA;AAAA,EAC9D,CAAA,EAAG,6BAAA,CAA8B,cAAA,CAAe,GAAG,CAAC,CAAA;AAAA,EACpD,IAAA,EAAM,6BAAA,CAA8B,cAAA,CAAe,MAAM,CAAC,CAAA;AAAA,EAC1D,MAAA,EAAQ,6BAAA,CAA8B,cAAA,CAAe,QAAQ,CAAC,CAAA;AAAA,EAC9D,CAAA,EAAG,6BAAA,CAA8B,cAAA,CAAe,GAAG,CAAC,CAAA;AAAA,EACpD,EAAA,EAAI,6BAAA,CAA8B,cAAA,CAAe,IAAI,CAAC,CAAA;AAAA,EACtD,EAAA,EAAI,6BAAA,CAA8B,cAAA,CAAe,IAAI,CAAC,CAAA;AAAA,EACtD,EAAA,EAAI,6BAAA,CAA8B,cAAA,CAAe,IAAI,CAAC,CAAA;AAAA,EACtD,KAAA,EAAO,6BAAA,CAA8B,cAAA,CAAe,OAAO,CAAC,CAAA;AAAA,EAC5D,CAAA,EAAG,6BAAA,CAA8B,cAAA,CAAe,GAAG,CAAC,CAAA;AAAA,EACpD,EAAA,EAAI,6BAAA;AAAA,IACF,cAAA,CAAe,IAAA,EAAM,EAAE,aAAA,EAAe,MAAM;AAAA;AAEhD,CAAA;AAMA,MAAM,oBAAA,GAAuB;AAAA,EAC3B,QAAQ,MAAM;AAChB,CAAA;AAEA,MAAM,iBAAA,GAAoB;AAAA,EACxB,UAAA,EAAY,iCAAA,CAAkC,MAAA,EAAQA,MAAI,CAAA;AAAA,EAC1D,cAAA,EAAgB,iCAAA,CAAkC,SAAA,EAAWC,IAAO,CAAA;AAAA,EACpE,uBAAA,EAAyB,iCAAA;AAAA,IACvB,iBAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,kBAAA,EAAoB,iCAAA;AAAA,IAClB,cAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,iCAAA,EAAmC,iCAAA;AAAA,IACjC,0BAAA;AAAA,IACA;AAAA;AAEJ,CAAA;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,GAAG,iBAAA;AAAA,EACH,GAAG,oBAAA;AAAA,EACH,GAAGC,cAAA;AAAA,EACH,GAAG;AACL;;;;"}
@@ -0,0 +1,30 @@
1
+ "use client"
2
+ /* */
3
+ import { usePromise } from '@mittwald/react-use-promise';
4
+ import { useId, useRef, useState } from 'react';
5
+
6
+ const useControllableSuspenseTrigger = () => {
7
+ const localId = useId();
8
+ const promise = useRef(null);
9
+ const [startedCount, setStartedCount] = useState(0);
10
+ usePromise(
11
+ (promise2) => promise2,
12
+ promise.current ? [promise.current.promise] : null,
13
+ {
14
+ keepValueWhileLoading: false,
15
+ loaderId: localId + startedCount
16
+ }
17
+ );
18
+ return {
19
+ start: () => {
20
+ promise.current = Promise.withResolvers();
21
+ setStartedCount((c) => c + 1);
22
+ },
23
+ stop: () => {
24
+ promise.current?.resolve();
25
+ }
26
+ };
27
+ };
28
+
29
+ export { useControllableSuspenseTrigger };
30
+ //# sourceMappingURL=useControllableSuspenseTrigger.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useControllableSuspenseTrigger.mjs","sources":["../../../../../src/hooks/useControllableSuspenseTrigger.ts"],"sourcesContent":["import { usePromise } from \"@mittwald/react-use-promise\";\nimport { useId, useRef, useState } from \"react\";\n\nexport const useControllableSuspenseTrigger = () => {\n const localId = useId();\n const promise = useRef<PromiseWithResolvers<void>>(null);\n const [startedCount, setStartedCount] = useState(0);\n\n usePromise(\n (promise: Promise<void>) => promise,\n promise.current ? [promise.current.promise] : null,\n {\n keepValueWhileLoading: false,\n loaderId: localId + startedCount,\n },\n );\n\n return {\n start: () => {\n promise.current = Promise.withResolvers<void>();\n setStartedCount((c) => c + 1);\n },\n stop: () => {\n promise.current?.resolve();\n },\n };\n};\n"],"names":["promise"],"mappings":";;;AAGO,MAAM,iCAAiC,MAAM;AAClD,EAAA,MAAM,UAAU,KAAA,EAAM;AACtB,EAAA,MAAM,OAAA,GAAU,OAAmC,IAAI,CAAA;AACvD,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,SAAS,CAAC,CAAA;AAElD,EAAA,UAAA;AAAA,IACE,CAACA,QAAAA,KAA2BA,QAAAA;AAAA,IAC5B,QAAQ,OAAA,GAAU,CAAC,OAAA,CAAQ,OAAA,CAAQ,OAAO,CAAA,GAAI,IAAA;AAAA,IAC9C;AAAA,MACE,qBAAA,EAAuB,KAAA;AAAA,MACvB,UAAU,OAAA,GAAU;AAAA;AACtB,GACF;AAEA,EAAA,OAAO;AAAA,IACL,OAAO,MAAM;AACX,MAAA,OAAA,CAAQ,OAAA,GAAU,QAAQ,aAAA,EAAoB;AAC9C,MAAA,eAAA,CAAgB,CAAC,CAAA,KAAM,CAAA,GAAI,CAAC,CAAA;AAAA,IAC9B,CAAA;AAAA,IACA,MAAM,MAAM;AACV,MAAA,OAAA,CAAQ,SAAS,OAAA,EAAQ;AAAA,IAC3B;AAAA,GACF;AACF;;;;"}
@@ -0,0 +1,24 @@
1
+ "use client"
2
+ /* */
3
+ import { components } from '../components.mjs';
4
+ import { useMemo } from 'react';
5
+ import { reduce } from 'remeda';
6
+
7
+ const useMergedComponents = (integrations) => useMemo(
8
+ () => new Map(
9
+ Object.entries(
10
+ reduce(
11
+ [...integrations, components],
12
+ (merged, current) => ({
13
+ ...merged,
14
+ ...current
15
+ }),
16
+ {}
17
+ )
18
+ )
19
+ ),
20
+ [...integrations]
21
+ );
22
+
23
+ export { useMergedComponents };
24
+ //# sourceMappingURL=useMergedComponents.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMergedComponents.mjs","sources":["../../../../../src/hooks/useMergedComponents.ts"],"sourcesContent":["import { components } from \"@/components\";\nimport type { RemoteComponentsMap } from \"@/lib/types\";\nimport type { RemoteComponentRendererProps } from \"@mittwald/remote-dom-react/host\";\nimport { type ComponentType, useMemo } from \"react\";\nimport { reduce } from \"remeda\";\n\nexport const useMergedComponents = (\n integrations: RemoteComponentsMap<never>[],\n) =>\n useMemo(\n () =>\n new Map<string, ComponentType<RemoteComponentRendererProps>>(\n Object.entries(\n reduce(\n [...integrations, components],\n (merged, current) => ({\n ...merged,\n ...current,\n }),\n {},\n ),\n ),\n ),\n [...integrations],\n );\n"],"names":[],"mappings":";;;;AAMO,MAAM,mBAAA,GAAsB,CACjC,YAAA,KAEA,OAAA;AAAA,EACE,MACE,IAAI,GAAA;AAAA,IACF,MAAA,CAAO,OAAA;AAAA,MACL,MAAA;AAAA,QACE,CAAC,GAAG,YAAA,EAAc,UAAU,CAAA;AAAA,QAC5B,CAAC,QAAQ,OAAA,MAAa;AAAA,UACpB,GAAG,MAAA;AAAA,UACH,GAAG;AAAA,SACL,CAAA;AAAA,QACA;AAAC;AACH;AACF,GACF;AAAA,EACF,CAAC,GAAG,YAAY;AAClB;;;;"}
@@ -0,0 +1,17 @@
1
+ "use client"
2
+ /* */
3
+ import '@mittwald/flow-remote-core';
4
+ import { useLayoutEffect } from 'react';
5
+
6
+ const useUpdateHostPathnameOnRemote = (hostPathname, connection) => {
7
+ useLayoutEffect(() => {
8
+ if (hostPathname === void 0 || !connection) {
9
+ return;
10
+ }
11
+ const { updateHostPathname } = connection;
12
+ updateHostPathname(hostPathname);
13
+ }, [hostPathname, connection]);
14
+ };
15
+
16
+ export { useUpdateHostPathnameOnRemote };
17
+ //# sourceMappingURL=useUpdateHostPathnameOnRemote.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateHostPathnameOnRemote.mjs","sources":["../../../../../src/hooks/useUpdateHostPathnameOnRemote.ts"],"sourcesContent":["import { type HostToRemoteConnection } from \"@mittwald/flow-remote-core\";\nimport { useLayoutEffect } from \"react\";\n\n/** Updates the host pathname in the remote connection. */\nexport const useUpdateHostPathnameOnRemote = (\n hostPathname?: string,\n connection?: HostToRemoteConnection,\n) => {\n useLayoutEffect(() => {\n if (hostPathname === undefined || !connection) {\n return;\n }\n\n const { updateHostPathname } = connection;\n updateHostPathname(hostPathname);\n }, [hostPathname, connection]);\n};\n"],"names":[],"mappings":";;;AAIO,MAAM,6BAAA,GAAgC,CAC3C,YAAA,EACA,UAAA,KACG;AACH,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,YAAA,KAAiB,MAAA,IAAa,CAAC,UAAA,EAAY;AAC7C,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,EAAE,oBAAmB,GAAI,UAAA;AAC/B,IAAA,kBAAA,CAAmB,YAAY,CAAA;AAAA,EACjC,CAAA,EAAG,CAAC,YAAA,EAAc,UAAU,CAAC,CAAA;AAC/B;;;;"}
@@ -0,0 +1,16 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import 'react';
5
+
6
+ const Form = (props) => {
7
+ const { onSubmit: onSubmitFromProps, ref, ...rest } = props;
8
+ const onSubmit = async (event) => {
9
+ event.preventDefault();
10
+ await onSubmitFromProps?.();
11
+ };
12
+ return /* @__PURE__ */ jsx("form", { ...rest, ref, onSubmit });
13
+ };
14
+
15
+ export { Form };
16
+ //# sourceMappingURL=Form.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.mjs","sources":["../../../../../../src/integrations/react-hook-form/Form.tsx"],"sourcesContent":["import {\n type FC,\n type FormEvent,\n type PropsWithChildren,\n type Ref,\n} from \"react\";\n\ntype FormProps = {\n onSubmit?: () => void | Promise<void>;\n ref?: Ref<HTMLFormElement>;\n} & PropsWithChildren;\n\n/**\n * ReactHookForm won't send the data over onSubmit, the form state is\n * transferred over onChange. To avoid sending unnecessary data, this RemoteForm\n * sends only the onSubmit without any formData.\n */\nexport const Form: FC<FormProps> = (props) => {\n const { onSubmit: onSubmitFromProps, ref, ...rest } = props;\n\n const onSubmit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n await onSubmitFromProps?.();\n };\n\n return <form {...rest} ref={ref} onSubmit={onSubmit} />;\n};\n"],"names":[],"mappings":";;;AAiBO,MAAM,IAAA,GAAsB,CAAC,KAAA,KAAU;AAC5C,EAAA,MAAM,EAAE,QAAA,EAAU,iBAAA,EAAmB,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAEtD,EAAA,MAAM,QAAA,GAAW,OAAO,KAAA,KAAsC;AAC5D,IAAA,KAAA,CAAM,cAAA,EAAe;AACrB,IAAA,MAAM,iBAAA,IAAoB;AAAA,EAC5B,CAAA;AAEA,EAAA,uBAAO,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,IAAA,EAAM,KAAU,QAAA,EAAoB,CAAA;AACvD;;;;"}
@@ -0,0 +1,47 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { isStyleProp, isReactSuspendedStyle } from './propClassifiers.mjs';
5
+ import { createRemoteComponentRenderer } from '@mittwald/remote-dom-react/host';
6
+ import { FlowRemoteElement } from '@mittwald/flow-remote-elements';
7
+ import { Version } from '@mittwald/flow-remote-core';
8
+ import 'react';
9
+ import { mapValues } from 'remeda';
10
+
11
+ const mapProperty = (val, key) => {
12
+ if (isStyleProp(key)) {
13
+ if (isReactSuspendedStyle(val)) {
14
+ return {
15
+ display: "none"
16
+ };
17
+ }
18
+ return {};
19
+ }
20
+ return val;
21
+ };
22
+ const createFlowRemoteComponentRenderer = (name, Component) => {
23
+ function HostComponent(props) {
24
+ const hostComponentProps = mapValues(
25
+ props,
26
+ (v, k) => mapProperty(v, k)
27
+ );
28
+ const {
29
+ [FlowRemoteElement.versionPropertyName]: version = Version.v1,
30
+ [FlowRemoteElement.initializationPropertyName]: initialized = false,
31
+ ...restProps
32
+ } = hostComponentProps;
33
+ if (version >= Version.v3) {
34
+ if (!initialized) {
35
+ return null;
36
+ }
37
+ }
38
+ return /* @__PURE__ */ jsx(Component, { ...restProps });
39
+ }
40
+ HostComponent.displayName = `FlowRemoteRenderer(${name})`;
41
+ return createRemoteComponentRenderer(HostComponent, {
42
+ name: `RemoteRenderer(${name})`
43
+ });
44
+ };
45
+
46
+ export { createFlowRemoteComponentRenderer };
47
+ //# sourceMappingURL=createFlowRemoteComponentRenderer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFlowRemoteComponentRenderer.mjs","sources":["../../../../../src/lib/createFlowRemoteComponentRenderer.tsx"],"sourcesContent":["import { isReactSuspendedStyle, isStyleProp } from \"@/lib/propClassifiers\";\nimport type { RemoteComponentRendererProps } from \"@mittwald/remote-dom-react/host\";\nimport { createRemoteComponentRenderer } from \"@mittwald/remote-dom-react/host\";\nimport { FlowRemoteElement } from \"@mittwald/flow-remote-elements\";\nimport type { FlowRemoteElementMetaData } from \"@mittwald/flow-remote-elements\";\nimport { Version } from \"@mittwald/flow-remote-core\";\nimport { type ComponentType } from \"react\";\nimport { mapValues } from \"remeda\";\n\nconst mapProperty = (val: unknown, key: string) => {\n if (isStyleProp(key)) {\n if (isReactSuspendedStyle(val)) {\n return {\n display: \"none\",\n };\n }\n return {};\n }\n return val;\n};\n\nexport const createFlowRemoteComponentRenderer = <P extends object>(\n name: string,\n Component: ComponentType<P>,\n): ComponentType<RemoteComponentRendererProps> => {\n function HostComponent(props: P & FlowRemoteElementMetaData) {\n const hostComponentProps = mapValues(props, (v, k) =>\n mapProperty(v, k),\n ) as P & FlowRemoteElementMetaData;\n\n const {\n [FlowRemoteElement.versionPropertyName]: version = Version.v1,\n [FlowRemoteElement.initializationPropertyName]: initialized = false,\n ...restProps\n } = hostComponentProps;\n\n if (version >= Version.v3) {\n // \"initialized\" handling introduced in version 3\n if (!initialized) {\n return null;\n }\n }\n\n return <Component {...(restProps as P)} />;\n }\n HostComponent.displayName = `FlowRemoteRenderer(${name})`;\n return createRemoteComponentRenderer(HostComponent, {\n name: `RemoteRenderer(${name})`,\n });\n};\n"],"names":[],"mappings":";;;;;;;;AASA,MAAM,WAAA,GAAc,CAAC,GAAA,EAAc,GAAA,KAAgB;AACjD,EAAA,IAAI,WAAA,CAAY,GAAG,CAAA,EAAG;AACpB,IAAA,IAAI,qBAAA,CAAsB,GAAG,CAAA,EAAG;AAC9B,MAAA,OAAO;AAAA,QACL,OAAA,EAAS;AAAA,OACX;AAAA,IACF;AACA,IAAA,OAAO,EAAC;AAAA,EACV;AACA,EAAA,OAAO,GAAA;AACT,CAAA;AAEO,MAAM,iCAAA,GAAoC,CAC/C,IAAA,EACA,SAAA,KACgD;AAChD,EAAA,SAAS,cAAc,KAAA,EAAsC;AAC3D,IAAA,MAAM,kBAAA,GAAqB,SAAA;AAAA,MAAU,KAAA;AAAA,MAAO,CAAC,CAAA,EAAG,CAAA,KAC9C,WAAA,CAAY,GAAG,CAAC;AAAA,KAClB;AAEA,IAAA,MAAM;AAAA,MACJ,CAAC,iBAAA,CAAkB,mBAAmB,GAAG,UAAU,OAAA,CAAQ,EAAA;AAAA,MAC3D,CAAC,iBAAA,CAAkB,0BAA0B,GAAG,WAAA,GAAc,KAAA;AAAA,MAC9D,GAAG;AAAA,KACL,GAAI,kBAAA;AAEJ,IAAA,IAAI,OAAA,IAAW,QAAQ,EAAA,EAAI;AAEzB,MAAA,IAAI,CAAC,WAAA,EAAa;AAChB,QAAA,OAAO,IAAA;AAAA,MACT;AAAA,IACF;AAEA,IAAA,uBAAO,GAAA,CAAC,SAAA,EAAA,EAAW,GAAI,SAAA,EAAiB,CAAA;AAAA,EAC1C;AACA,EAAA,aAAA,CAAc,WAAA,GAAc,sBAAsB,IAAI,CAAA,CAAA,CAAA;AACtD,EAAA,OAAO,8BAA8B,aAAA,EAAe;AAAA,IAClD,IAAA,EAAM,kBAAkB,IAAI,CAAA,CAAA;AAAA,GAC7B,CAAA;AACH;;;;"}
@@ -0,0 +1,23 @@
1
+ "use client"
2
+ /* */
3
+ import { mapAttributeToReactProperty } from './mapAttributeToReactProperty.mjs';
4
+ import clsx from 'clsx';
5
+ import { createElement } from 'react';
6
+ import { mapKeys } from 'remeda';
7
+
8
+ const elementFactory = (element, options = {}) => (props) => {
9
+ const result = { ...props };
10
+ const { isVoidElement = false } = options;
11
+ if (isVoidElement) {
12
+ delete result["children"];
13
+ }
14
+ result["className"] = clsx(
15
+ "className" in result && String(result["className"]),
16
+ "class" in result && String(result["class"])
17
+ );
18
+ delete result["class"];
19
+ return createElement(element, mapKeys(result, mapAttributeToReactProperty));
20
+ };
21
+
22
+ export { elementFactory };
23
+ //# sourceMappingURL=elementFactory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementFactory.mjs","sources":["../../../../../src/lib/elementFactory.ts"],"sourcesContent":["import { mapAttributeToReactProperty } from \"@/lib/mapAttributeToReactProperty\";\nimport clsx from \"clsx\";\nimport { createElement } from \"react\";\nimport { mapKeys } from \"remeda\";\n\ntype ElementTagNameMap = HTMLElementTagNameMap &\n Pick<\n SVGElementTagNameMap,\n Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>\n >;\n\ninterface Options {\n isVoidElement?: boolean;\n}\n\nexport const elementFactory =\n <E extends keyof ElementTagNameMap>(element: E, options: Options = {}) =>\n (props: Record<string, unknown>) => {\n const result = { ...props };\n const { isVoidElement = false } = options;\n\n if (isVoidElement) {\n delete result[\"children\"];\n }\n\n // merge className and class\n result[\"className\"] = clsx(\n \"className\" in result && String(result[\"className\"]),\n \"class\" in result && String(result[\"class\"]),\n );\n\n delete result[\"class\"];\n\n return createElement(element, mapKeys(result, mapAttributeToReactProperty));\n };\n"],"names":[],"mappings":";;;;;AAeO,MAAM,iBACX,CAAoC,OAAA,EAAY,UAAmB,EAAC,KACpE,CAAC,KAAA,KAAmC;AAClC,EAAA,MAAM,MAAA,GAAS,EAAE,GAAG,KAAA,EAAM;AAC1B,EAAA,MAAM,EAAE,aAAA,GAAgB,KAAA,EAAM,GAAI,OAAA;AAElC,EAAA,IAAI,aAAA,EAAe;AACjB,IAAA,OAAO,OAAO,UAAU,CAAA;AAAA,EAC1B;AAGA,EAAA,MAAA,CAAO,WAAW,CAAA,GAAI,IAAA;AAAA,IACpB,WAAA,IAAe,MAAA,IAAU,MAAA,CAAO,MAAA,CAAO,WAAW,CAAC,CAAA;AAAA,IACnD,OAAA,IAAW,MAAA,IAAU,MAAA,CAAO,MAAA,CAAO,OAAO,CAAC;AAAA,GAC7C;AAEA,EAAA,OAAO,OAAO,OAAO,CAAA;AAErB,EAAA,OAAO,aAAA,CAAc,OAAA,EAAS,OAAA,CAAQ,MAAA,EAAQ,2BAA2B,CAAC,CAAA;AAC5E;;;;"}
@@ -0,0 +1,14 @@
1
+ "use client"
2
+ /* */
3
+ import { toCamelCase } from 'remeda';
4
+
5
+ const keepWhenStartsWith = ["aria-", "data-"];
6
+ const mapAttributeToReactProperty = (key) => {
7
+ if (keepWhenStartsWith.some((prefix) => key.startsWith(prefix))) {
8
+ return key;
9
+ }
10
+ return toCamelCase(key);
11
+ };
12
+
13
+ export { mapAttributeToReactProperty };
14
+ //# sourceMappingURL=mapAttributeToReactProperty.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapAttributeToReactProperty.mjs","sources":["../../../../../src/lib/mapAttributeToReactProperty.ts"],"sourcesContent":["import { toCamelCase } from \"remeda\";\n\nconst keepWhenStartsWith = [\"aria-\", \"data-\"];\n\nexport const mapAttributeToReactProperty = (key: string) => {\n if (keepWhenStartsWith.some((prefix) => key.startsWith(prefix))) {\n return key;\n }\n\n return toCamelCase(key);\n};\n"],"names":[],"mappings":";;AAEA,MAAM,kBAAA,GAAqB,CAAC,OAAA,EAAS,OAAO,CAAA;AAErC,MAAM,2BAAA,GAA8B,CAAC,GAAA,KAAgB;AAC1D,EAAA,IAAI,kBAAA,CAAmB,KAAK,CAAC,MAAA,KAAW,IAAI,UAAA,CAAW,MAAM,CAAC,CAAA,EAAG;AAC/D,IAAA,OAAO,GAAA;AAAA,EACT;AAEA,EAAA,OAAO,YAAY,GAAG,CAAA;AACxB;;;;"}
@@ -0,0 +1,7 @@
1
+ "use client"
2
+ /* */
3
+ const isStyleProp = (name) => name === "style";
4
+ const isReactSuspendedStyle = (value) => value === "display: none !important;";
5
+
6
+ export { isReactSuspendedStyle, isStyleProp };
7
+ //# sourceMappingURL=propClassifiers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propClassifiers.mjs","sources":["../../../../../src/lib/propClassifiers.ts"],"sourcesContent":["export const isStyleProp = (name: string): boolean => name === \"style\";\n\nexport const isReactSuspendedStyle = (value: unknown): boolean =>\n value === \"display: none !important;\";\n"],"names":[],"mappings":"AAAO,MAAM,WAAA,GAAc,CAAC,IAAA,KAA0B,IAAA,KAAS;AAExD,MAAM,qBAAA,GAAwB,CAAC,KAAA,KACpC,KAAA,KAAU;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-remote-react-renderer",
3
- "version": "0.2.0-alpha.783",
3
+ "version": "0.2.0-alpha.784",
4
4
  "type": "module",
5
5
  "description": "React rendering for Flow Remote Elements",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -27,9 +27,9 @@
27
27
  "test:compile": "tsc --noEmit"
28
28
  },
29
29
  "dependencies": {
30
- "@mittwald/ext-bridge": "0.2.0-alpha.783",
31
- "@mittwald/flow-remote-core": "0.2.0-alpha.783",
32
- "@mittwald/flow-remote-elements": "0.2.0-alpha.783",
30
+ "@mittwald/ext-bridge": "0.2.0-alpha.784",
31
+ "@mittwald/flow-remote-core": "0.2.0-alpha.784",
32
+ "@mittwald/flow-remote-elements": "0.2.0-alpha.784",
33
33
  "@mittwald/react-use-promise": "^4.2.2",
34
34
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
35
35
  "@types/react": "^19.2",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@mittwald/flow-core": "",
42
- "@mittwald/flow-react-components": "0.2.0-alpha.783",
42
+ "@mittwald/flow-react-components": "0.2.0-alpha.784",
43
43
  "@mittwald/typescript-config": "",
44
44
  "@types/node": "^24.10.9",
45
45
  "nx": "^22.4.4",
@@ -50,14 +50,14 @@
50
50
  "rimraf": "^6.1.2",
51
51
  "rollup-preserve-directives": "^1.1.3",
52
52
  "typescript": "^5.9.3",
53
- "vite": "^8.0.8",
53
+ "vite": "^7.3.1",
54
54
  "vite-plugin-banner": "^0.8.1",
55
55
  "vite-plugin-checker": "^0.12.0",
56
56
  "vite-plugin-dts": "^4.5.4",
57
57
  "vite-plugin-externalize-deps": "^0.10.0"
58
58
  },
59
59
  "peerDependencies": {
60
- "@mittwald/flow-react-components": "0.2.0-alpha.782",
60
+ "@mittwald/flow-react-components": "0.2.0-alpha.783",
61
61
  "react": "^19.2.0",
62
62
  "react-dom": "^19.2.0",
63
63
  "react-hook-form": "*"
@@ -67,5 +67,5 @@
67
67
  "optional": true
68
68
  }
69
69
  },
70
- "gitHead": "433184ac008344ac57082a1505fa6041b82e1bcc"
70
+ "gitHead": "38762a66c3e86e5d5613dc18dc111cbeb5b402b4"
71
71
  }
@@ -1,26 +0,0 @@
1
- "use client"
2
- /* */
3
- //#region \0rolldown/runtime.js
4
- var __create = Object.create;
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
13
- key = keys[i];
14
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
- get: ((k) => from[k]).bind(null, key),
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
- value: mod,
23
- enumerable: true
24
- }) : target, mod));
25
- //#endregion
26
- export { __commonJSMin, __toESM };
@@ -1,55 +0,0 @@
1
- "use client"
2
- /* */
3
- "use strict";
4
- import { __commonJSMin } from "../../../../../_virtual/_rolldown/runtime.mjs";
5
- //#region ../../node_modules/.pnpm/invariant@2.2.4/node_modules/invariant/browser.js
6
- var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7
- /**
8
- * Copyright (c) 2013-present, Facebook, Inc.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */
13
- /**
14
- * Use invariant() to assert state which your program assumes to be true.
15
- *
16
- * Provide sprintf-style format (only %s is supported) and arguments
17
- * to provide information about what broke and what you were
18
- * expecting.
19
- *
20
- * The invariant message will be stripped in production, but the invariant
21
- * will remain to ensure logic does not differ in production.
22
- */
23
- var invariant = function(condition, format, a, b, c, d, e, f) {
24
- if (process.env.NODE_ENV !== "production") {
25
- if (format === void 0) throw new Error("invariant requires an error message argument");
26
- }
27
- if (!condition) {
28
- var error;
29
- if (format === void 0) error = /* @__PURE__ */ new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
30
- else {
31
- var args = [
32
- a,
33
- b,
34
- c,
35
- d,
36
- e,
37
- f
38
- ];
39
- var argIndex = 0;
40
- error = new Error(format.replace(/%s/g, function() {
41
- return args[argIndex++];
42
- }));
43
- error.name = "Invariant Violation";
44
- }
45
- error.framesToPop = 1;
46
- throw error;
47
- }
48
- };
49
- module.exports = invariant;
50
- }));
51
- //#endregion
52
- export default require_browser();
53
- export { require_browser };
54
-
55
- //# sourceMappingURL=browser.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/invariant@2.2.4/node_modules/invariant/browser.js"],"sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;CAoBA,IAAI,YAAY,SAAS,WAAW,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAC5D,MAAA,QAAA,IAAA,aAA6B;OACvB,WAAW,KAAA,EACb,OAAM,IAAI,MAAM,+CAA+C;;AAInE,MAAI,CAAC,WAAW;GACd,IAAI;AACJ,OAAI,WAAW,KAAA,EACb,yBAAQ,IAAI,MACV,gIAED;QACI;IACL,IAAI,OAAO;KAAC;KAAG;KAAG;KAAG;KAAG;KAAG;KAAE;IAC7B,IAAI,WAAW;AACf,YAAQ,IAAI,MACV,OAAO,QAAQ,OAAO,WAAW;AAAE,YAAO,KAAK;MAAc,CAC9D;AACD,UAAM,OAAO;;AAGf,SAAM,cAAc;AACpB,SAAM;;;AAIV,QAAO,UAAU"}
@@ -1,19 +0,0 @@
1
- "use client"
2
- /* */
3
- import "../../../_virtual/_rolldown/runtime.mjs";
4
- import { require_browser } from "../../../node_modules/.pnpm/invariant@2.2.4/node_modules/invariant/browser.mjs";
5
- require_browser();
6
- var Key = "mittwald.flow-core.file.awaitedArrayBuffer";
7
- function isFileWithAwaitedArrayBuffer(file) {
8
- return Key in file && file[Key] instanceof ArrayBuffer && !file[Key].detached;
9
- }
10
- var addAwaitedArrayBuffer = async (file) => {
11
- if (isFileWithAwaitedArrayBuffer(file)) return file;
12
- const arrayBuffer = await file.arrayBuffer();
13
- Object.assign(file, { [Key]: arrayBuffer });
14
- return file;
15
- };
16
- //#endregion
17
- export { addAwaitedArrayBuffer, isFileWithAwaitedArrayBuffer };
18
-
19
- //# sourceMappingURL=file.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.mjs","names":[],"sources":["../../../../../../core/src/file.ts"],"sourcesContent":["import invariant from \"invariant\";\n\nconst Key = \"mittwald.flow-core.file.awaitedArrayBuffer\";\n\nexport type FileWithAwaitedArrayBuffer = File & {\n [Key]: ArrayBuffer;\n};\n\nexport function isFileWithAwaitedArrayBuffer(\n file: File | FileWithAwaitedArrayBuffer,\n): file is FileWithAwaitedArrayBuffer {\n return Key in file && file[Key] instanceof ArrayBuffer && !file[Key].detached;\n}\n\nexport const addAwaitedArrayBuffer = async (file: File) => {\n if (isFileWithAwaitedArrayBuffer(file)) {\n return file;\n }\n\n const arrayBuffer = await file.arrayBuffer();\n Object.assign(file, { [Key]: arrayBuffer });\n\n return file;\n};\n\nexport const getAwaitArrayBuffer = (\n file: File | FileWithAwaitedArrayBuffer,\n) => {\n invariant(\n isFileWithAwaitedArrayBuffer(file),\n \"Could not get awaited ArrayBuffer from file\",\n );\n return file[Key];\n};\n"],"mappings":";;;AAEA,IAAM,MAAM;AAMZ,SAAgB,6BACd,MACoC;AACpC,QAAO,OAAO,QAAQ,KAAK,gBAAgB,eAAe,CAAC,KAAK,KAAK;;AAGvE,IAAa,wBAAwB,OAAO,SAAe;AACzD,KAAI,6BAA6B,KAAK,CACpC,QAAO;CAGT,MAAM,cAAc,MAAM,KAAK,aAAa;AAC5C,QAAO,OAAO,MAAM,GAAG,MAAM,aAAa,CAAC;AAE3C,QAAO"}
@@ -1,3 +0,0 @@
1
- "use client"
2
- /* */
3
- import "./file.mjs";