@mittwald/mstudio-ext-react-components 0.2.0-alpha.1000

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Mittwald CM Service GmbH & Co. KG and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # @mittwald/mstudio-ext-react-components
2
+
3
+ React components that can be used by mStudio extension developers
4
+
5
+ This package is part of
6
+ [Flow – mittwald design system](https://flow.mittwald.de/). See the homepage for
7
+ more details.
8
+
9
+ ## Customize the mStudio page header for your extension
10
+
11
+ This package offers some components, to customize and extend the mStudio page
12
+ header.
13
+
14
+ ### `<Title>`
15
+
16
+ With the `<Title>` component you can overwrite the page title of the mStudio
17
+ header. You will usually need this customization if your extension has
18
+ **subpages**.
19
+
20
+ **Note**: Refer to the existing pages in the mStudio for best practices.
21
+
22
+ ```tsx
23
+ import { Title } from "@mittwald/mstudio-ext-react-components";
24
+
25
+ function DetailsPage() {
26
+ return (
27
+ <>
28
+ <Title>Details</Title>
29
+ {/* your code */}
30
+ </>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ### `<Actions>`
36
+
37
+ With the `<Actions>` component you can extend the mStudio actions menu in the
38
+ page header. Use the regular `<MenuItem>` component from
39
+ `@mittwald/flow-remote-react-components` to define custom menu items.
40
+
41
+ **Note**: Refer to the existing pages in the mStudio for best practices.
42
+
43
+ ```tsx
44
+ import { MenuItem } from "@mittwald/flow-remote-react-components";
45
+ import { Actions } from "@mittwald/mstudio-ext-react-components";
46
+
47
+ function MainPage() {
48
+ return (
49
+ <>
50
+ <Actions>
51
+ <MenuItem onAction={onRename}>Rename</MenuItem>
52
+ <MenuItem onAction={onDelete}>Delete</MenuItem>
53
+ </Actions>
54
+ {/* your code */}
55
+ </>
56
+ );
57
+ }
58
+ ```
59
+
60
+ ### `<Breadcrumb>`
61
+
62
+ With the `<Breadcrumb>` component you can extend the mStudio with your own
63
+ items. Use the regular `<Link>` component from
64
+ `@mittwald/flow-remote-react-components` to define custom links. You will
65
+ usually need this customization if your extension has **multiple subpages**.
66
+
67
+ **Note**: Refer to the existing pages in the mStudio for best practices.
68
+
69
+ ```tsx
70
+ import { Link } from "@mittwald/flow-remote-react-components";
71
+ import { Breadcrumb } from "@mittwald/mstudio-ext-react-components";
72
+
73
+ function ProfilePage() {
74
+ return (
75
+ <>
76
+ <Breadcrumb>
77
+ <Link href="/profiles">Profiles</Link>
78
+ <Link href="/profiles/5">Profile</Link>
79
+ </Breadcrumb>
80
+ {/* your code */}
81
+ </>
82
+ );
83
+ }
84
+ ```
@@ -0,0 +1,9 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { TunnelEntry } from '@mittwald/flow-remote-react-components';
5
+
6
+ const Actions = (props) => /* @__PURE__ */ jsx(TunnelEntry, { id: "@mstudio-ext/actions", children: props.children });
7
+
8
+ export { Actions };
9
+ //# sourceMappingURL=Actions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Actions.mjs","sources":["../../../../src/components/Actions/Actions.tsx"],"sourcesContent":["import { TunnelEntry } from \"@mittwald/flow-remote-react-components\";\nimport type { FC, PropsWithChildren } from \"react\";\n\n/**\n * Use <MenuItem> children to add items to the actions menu.\n *\n * @example\n * <Actions>\n * <MenuItem onAction={onRename}>Rename</MenuItem>\n * <MenuItem onAction={onDelete}>Delete</MenuItem>\n * </Actions>;\n */\nexport const Actions: FC<PropsWithChildren> = (props) => (\n <TunnelEntry id=\"@mstudio-ext/actions\">{props.children}</TunnelEntry>\n);\n\nexport default Actions;\n"],"names":[],"mappings":";;;AAYO,MAAM,OAAA,GAAiC,CAAC,KAAA,qBAC7C,GAAA,CAAC,eAAY,EAAA,EAAG,sBAAA,EAAwB,gBAAM,QAAA,EAAS;;;;"}
@@ -0,0 +1,9 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { TunnelEntry } from '@mittwald/flow-remote-react-components';
5
+
6
+ const Breadcrumb = (props) => /* @__PURE__ */ jsx(TunnelEntry, { id: "@mstudio-ext/breadcrumb", children: props.children });
7
+
8
+ export { Breadcrumb };
9
+ //# sourceMappingURL=Breadcrumb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.mjs","sources":["../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { TunnelEntry } from \"@mittwald/flow-remote-react-components\";\nimport type { FC, PropsWithChildren } from \"react\";\n\n/**\n * Use <Link> children to add items to the breadcrumb.\n *\n * @example\n * <Breadcrumb>\n * <Link href=\"/profiles\">Profiles</Link>\n * <Link href=\"/profiles/5\">Profile</Link>\n * </Breadcrumb>;\n */\nexport const Breadcrumb: FC<PropsWithChildren> = (props) => (\n <TunnelEntry id=\"@mstudio-ext/breadcrumb\">{props.children}</TunnelEntry>\n);\n\nexport default Breadcrumb;\n"],"names":[],"mappings":";;;AAYO,MAAM,UAAA,GAAoC,CAAC,KAAA,qBAChD,GAAA,CAAC,eAAY,EAAA,EAAG,yBAAA,EAA2B,gBAAM,QAAA,EAAS;;;;"}
@@ -0,0 +1,9 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { TunnelEntry } from '@mittwald/flow-remote-react-components';
5
+
6
+ const Title = (props) => /* @__PURE__ */ jsx(TunnelEntry, { id: "@mstudio-ext/title", children: props.children });
7
+
8
+ export { Title };
9
+ //# sourceMappingURL=Title.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Title.mjs","sources":["../../../../src/components/Title/Title.tsx"],"sourcesContent":["import { TunnelEntry } from \"@mittwald/flow-remote-react-components\";\nimport type { FC, PropsWithChildren } from \"react\";\n\n/**\n * Overwrite the title of the current page.\n *\n * @example\n * <Title>My title</Title>;\n */\nexport const Title: FC<PropsWithChildren> = (props) => (\n <TunnelEntry id=\"@mstudio-ext/title\">{props.children}</TunnelEntry>\n);\n\nexport default Title;\n"],"names":[],"mappings":";;;AASO,MAAM,KAAA,GAA+B,CAAC,KAAA,qBAC3C,GAAA,CAAC,eAAY,EAAA,EAAG,oBAAA,EAAsB,gBAAM,QAAA,EAAS;;;;"}
@@ -0,0 +1,5 @@
1
+ export { Title } from './components/Title/Title.mjs';
2
+ export { Actions } from './components/Actions/Actions.mjs';
3
+ export { Breadcrumb } from './components/Breadcrumb/Breadcrumb.mjs';
4
+ export { LoadingFallbackTrigger as LoadingIndicator } from '@mittwald/flow-remote-react-components';
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,13 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ /**
3
+ * Use <MenuItem> children to add items to the actions menu.
4
+ *
5
+ * @example
6
+ * <Actions>
7
+ * <MenuItem onAction={onRename}>Rename</MenuItem>
8
+ * <MenuItem onAction={onDelete}>Delete</MenuItem>
9
+ * </Actions>;
10
+ */
11
+ export declare const Actions: FC<PropsWithChildren>;
12
+ export default Actions;
13
+ //# sourceMappingURL=Actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/Actions/Actions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,iBAAiB,CAEzC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './Actions';
2
+ export * from './Actions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,cAAc,WAAW,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ /**
3
+ * Use <Link> children to add items to the breadcrumb.
4
+ *
5
+ * @example
6
+ * <Breadcrumb>
7
+ * <Link href="/profiles">Profiles</Link>
8
+ * <Link href="/profiles/5">Profile</Link>
9
+ * </Breadcrumb>;
10
+ */
11
+ export declare const Breadcrumb: FC<PropsWithChildren>;
12
+ export default Breadcrumb;
13
+ //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAE5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './Breadcrumb';
2
+ export * from './Breadcrumb';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ /**
3
+ * Overwrite the title of the current page.
4
+ *
5
+ * @example
6
+ * <Title>My title</Title>;
7
+ */
8
+ export declare const Title: FC<PropsWithChildren>;
9
+ export default Title;
10
+ //# sourceMappingURL=Title.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../../src/components/Title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAEvC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './Title';
2
+ export * from './Title';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Title/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './Title';
2
+ export * from './Actions';
3
+ export * from './Breadcrumb';
4
+ export { LoadingFallbackTrigger as LoadingIndicator } from '@mittwald/flow-remote-react-components';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,sBAAsB,IAAI,gBAAgB,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@mittwald/mstudio-ext-react-components",
3
+ "version": "0.2.0-alpha.1000",
4
+ "type": "module",
5
+ "description": "React components that can be used by mStudio extension developers",
6
+ "homepage": "https://flow.mittwald.de",
7
+ "repository": "https://github.com/mittwald/flow",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types/index.d.ts",
11
+ "default": "./dist/js/index.mjs"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "engines": {
18
+ "node": ">=24.0.0"
19
+ },
20
+ "scripts": {
21
+ "build": "vite build --config vite.build.config.ts",
22
+ "clean": "rimraf dist",
23
+ "test:compile": "tsc --noEmit"
24
+ },
25
+ "dependencies": {
26
+ "@types/react": "^19.2"
27
+ },
28
+ "devDependencies": {
29
+ "@mittwald/flow-remote-react-components": "0.2.0-alpha.1000",
30
+ "@mittwald/typescript-config": "",
31
+ "@types/node": "^25.9.3",
32
+ "nx": "^22.7.5",
33
+ "prettier": "^3.8.4",
34
+ "react": "^19.2.0",
35
+ "rimraf": "^6.1.3",
36
+ "rollup-plugin-auto-named-exports": "1.0.0-beta.3",
37
+ "rollup-preserve-directives": "^1.1.3",
38
+ "typescript": "^6.0.3",
39
+ "vite": "7.3.6",
40
+ "vite-plugin-banner": "^0.8.1",
41
+ "vite-plugin-checker": "^0.14.1",
42
+ "vite-plugin-dts": "^5.0.3",
43
+ "vite-plugin-externalize-deps": "^0.10.0"
44
+ },
45
+ "peerDependencies": {
46
+ "@mittwald/flow-remote-react-components": "0.2.0-alpha.1000",
47
+ "react": "^19.2.0"
48
+ },
49
+ "gitHead": "f1c99726006518901e9a77538147ad44a0a12ab1"
50
+ }