@strapi-community/plugin-better-auth-dashboard 1.0.0-alpha.8 → 1.0.0-beta.1

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.
@@ -1,96 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- const PluginIcon = ({
3
- size = 16,
4
- background = "transparent",
5
- opacity = 1,
6
- rotation = 0,
7
- shadow = 0,
8
- flipHorizontal = false,
9
- flipVertical = false,
10
- padding = 0
11
- }) => {
12
- const transforms = [];
13
- if (rotation !== 0) transforms.push(`rotate(${rotation}deg)`);
14
- if (flipHorizontal) transforms.push("scaleX(-1)");
15
- if (flipVertical) transforms.push("scaleY(-1)");
16
- const viewBoxSize = 24 + padding * 2;
17
- const viewBoxOffset = -padding;
18
- const viewBox = `${viewBoxOffset} ${viewBoxOffset} ${viewBoxSize} ${viewBoxSize}`;
19
- return /* @__PURE__ */ jsxs(
20
- "svg",
21
- {
22
- xmlns: "http://www.w3.org/2000/svg",
23
- viewBox,
24
- width: size,
25
- height: size,
26
- fill: "none",
27
- style: {
28
- opacity,
29
- transform: transforms.join(" ") || void 0,
30
- filter: shadow > 0 ? `drop-shadow(0 ${shadow}px ${shadow * 2}px rgba(0,0,0,0.3))` : void 0,
31
- backgroundColor: background !== "transparent" ? background : void 0
32
- },
33
- children: [
34
- /* @__PURE__ */ jsx("title", { children: "Better Auth Logo" }),
35
- /* @__PURE__ */ jsx(
36
- "path",
37
- {
38
- fill: "currentColor",
39
- d: "M0 3.39v17.22h5.783v-5.55h6.434V8.939H5.783V3.39Zm12.217 5.55h5.638v6.122h-5.638v5.548H24V3.391H12.217Z"
40
- }
41
- )
42
- ]
43
- }
44
- );
45
- };
46
- const PLUGIN_ID = "better-auth-dashboard";
47
- const panels = [];
48
- function addEditViewSidePanel(config) {
49
- if (panels.some((p) => p.id === config.id)) {
50
- console.warn(
51
- `[better-auth-dashboard] Panel with id "${config.id}" is already registered.`
52
- );
53
- return;
54
- }
55
- panels.push(config);
56
- }
57
- function getEditViewSidePanels(model) {
58
- return panels.filter((p) => {
59
- if (!p.model) return true;
60
- if (Array.isArray(p.model)) return p.model.includes(model);
61
- return p.model === model;
62
- });
63
- }
64
- function captureApp(app) {
65
- window.__betterAuthDashApp = app;
66
- }
67
- function getMediaLibraryComponent() {
68
- return window.__betterAuthDashApp?.library?.components?.["media-library"] ?? null;
69
- }
70
- const index = {
71
- register(app) {
72
- captureApp(app);
73
- app.registerPlugin({
74
- id: PLUGIN_ID,
75
- name: "Auth Dashboard",
76
- apis: { addEditViewSidePanel }
77
- });
78
- app.addMenuLink({
79
- to: `/plugins/${PLUGIN_ID}`,
80
- icon: PluginIcon,
81
- intlLabel: {
82
- id: `${PLUGIN_ID}.plugin.name`,
83
- defaultMessage: "Auth Dashboard"
84
- },
85
- Component: async () => import("./Root-BvxYnCtW.mjs")
86
- });
87
- },
88
- bootstrap() {
89
- }
90
- };
91
- export {
92
- PluginIcon as P,
93
- getEditViewSidePanels as a,
94
- getMediaLibraryComponent as g,
95
- index as i
96
- };
@@ -1,95 +0,0 @@
1
- "use strict";
2
- const jsxRuntime = require("react/jsx-runtime");
3
- const PluginIcon = ({
4
- size = 16,
5
- background = "transparent",
6
- opacity = 1,
7
- rotation = 0,
8
- shadow = 0,
9
- flipHorizontal = false,
10
- flipVertical = false,
11
- padding = 0
12
- }) => {
13
- const transforms = [];
14
- if (rotation !== 0) transforms.push(`rotate(${rotation}deg)`);
15
- if (flipHorizontal) transforms.push("scaleX(-1)");
16
- if (flipVertical) transforms.push("scaleY(-1)");
17
- const viewBoxSize = 24 + padding * 2;
18
- const viewBoxOffset = -padding;
19
- const viewBox = `${viewBoxOffset} ${viewBoxOffset} ${viewBoxSize} ${viewBoxSize}`;
20
- return /* @__PURE__ */ jsxRuntime.jsxs(
21
- "svg",
22
- {
23
- xmlns: "http://www.w3.org/2000/svg",
24
- viewBox,
25
- width: size,
26
- height: size,
27
- fill: "none",
28
- style: {
29
- opacity,
30
- transform: transforms.join(" ") || void 0,
31
- filter: shadow > 0 ? `drop-shadow(0 ${shadow}px ${shadow * 2}px rgba(0,0,0,0.3))` : void 0,
32
- backgroundColor: background !== "transparent" ? background : void 0
33
- },
34
- children: [
35
- /* @__PURE__ */ jsxRuntime.jsx("title", { children: "Better Auth Logo" }),
36
- /* @__PURE__ */ jsxRuntime.jsx(
37
- "path",
38
- {
39
- fill: "currentColor",
40
- d: "M0 3.39v17.22h5.783v-5.55h6.434V8.939H5.783V3.39Zm12.217 5.55h5.638v6.122h-5.638v5.548H24V3.391H12.217Z"
41
- }
42
- )
43
- ]
44
- }
45
- );
46
- };
47
- const PLUGIN_ID = "better-auth-dashboard";
48
- const panels = [];
49
- function addEditViewSidePanel(config) {
50
- if (panels.some((p) => p.id === config.id)) {
51
- console.warn(
52
- `[better-auth-dashboard] Panel with id "${config.id}" is already registered.`
53
- );
54
- return;
55
- }
56
- panels.push(config);
57
- }
58
- function getEditViewSidePanels(model) {
59
- return panels.filter((p) => {
60
- if (!p.model) return true;
61
- if (Array.isArray(p.model)) return p.model.includes(model);
62
- return p.model === model;
63
- });
64
- }
65
- function captureApp(app) {
66
- window.__betterAuthDashApp = app;
67
- }
68
- function getMediaLibraryComponent() {
69
- return window.__betterAuthDashApp?.library?.components?.["media-library"] ?? null;
70
- }
71
- const index = {
72
- register(app) {
73
- captureApp(app);
74
- app.registerPlugin({
75
- id: PLUGIN_ID,
76
- name: "Auth Dashboard",
77
- apis: { addEditViewSidePanel }
78
- });
79
- app.addMenuLink({
80
- to: `/plugins/${PLUGIN_ID}`,
81
- icon: PluginIcon,
82
- intlLabel: {
83
- id: `${PLUGIN_ID}.plugin.name`,
84
- defaultMessage: "Auth Dashboard"
85
- },
86
- Component: async () => Promise.resolve().then(() => require("./Root-M8utGvhO.js"))
87
- });
88
- },
89
- bootstrap() {
90
- }
91
- };
92
- exports.PluginIcon = PluginIcon;
93
- exports.getEditViewSidePanels = getEditViewSidePanels;
94
- exports.getMediaLibraryComponent = getMediaLibraryComponent;
95
- exports.index = index;