@notur/sdk 1.4.6 → 1.4.7
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/README.md +44 -0
- package/bin/notur-create.js +19 -13
- package/bin/notur-doctor.js +123 -0
- package/bin/notur-pack.js +13 -7
- package/bin/notur-sync.js +199 -0
- package/bin/notur-validate.js +200 -0
- package/bin/notur.js +7 -1
- package/dist/events.d.ts +10 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +7 -0
- package/dist/events.js.map +1 -1
- package/dist/hooks/useExtensionConfig.d.ts +23 -4
- package/dist/hooks/useExtensionConfig.d.ts.map +1 -1
- package/dist/hooks/useExtensionConfig.js +8 -1
- package/dist/hooks/useExtensionConfig.js.map +1 -1
- package/dist/hooks/useNavigate.d.ts +27 -6
- package/dist/hooks/useNavigate.d.ts.map +1 -1
- package/dist/hooks/useNavigate.js +11 -2
- package/dist/hooks/useNavigate.js.map +1 -1
- package/dist/hooks/useNoturEvent.d.ts +12 -0
- package/dist/hooks/useNoturEvent.d.ts.map +1 -1
- package/dist/hooks/useNoturEvent.js +12 -0
- package/dist/hooks/useNoturEvent.js.map +1 -1
- package/dist/hooks/usePermission.d.ts +10 -1
- package/dist/hooks/usePermission.d.ts.map +1 -1
- package/dist/hooks/usePermission.js +10 -1
- package/dist/hooks/usePermission.js.map +1 -1
- package/dist/hooks/useServerContext.d.ts +18 -3
- package/dist/hooks/useServerContext.d.ts.map +1 -1
- package/dist/hooks/useServerContext.js +8 -1
- package/dist/hooks/useServerContext.js.map +1 -1
- package/dist/hooks/useUserContext.d.ts +10 -2
- package/dist/hooks/useUserContext.d.ts.map +1 -1
- package/dist/hooks/useUserContext.js +2 -0
- package/dist/hooks/useUserContext.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +179 -20
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +6 -1
- package/dist/types.js.map +1 -1
- package/examples/red-button/extension.yaml +0 -10
- package/examples/red-button/package.json +5 -2
- package/package.json +5 -2
- package/examples/red-button/src/RedButtonExtension.php +0 -11
package/dist/types.d.ts
CHANGED
|
@@ -1,127 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Known frontend slot IDs provided by the Notur bridge.
|
|
3
|
+
*
|
|
4
|
+
* Slot IDs are stable mount points patched into the Pterodactyl UI. Use these
|
|
5
|
+
* strings in `SlotConfig.slot` to render React components in a specific panel
|
|
6
|
+
* location.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* createExtension({
|
|
11
|
+
* id: 'acme/red-button',
|
|
12
|
+
* slots: [{ slot: 'server.header', component: RedButton }],
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export type SlotId = 'navbar' | 'navbar.left' | 'navbar.before' | 'navbar.after' | 'server.subnav' | 'server.subnav.before' | 'server.subnav.after' | 'server.header' | 'server.page' | 'server.footer' | 'server.terminal.buttons' | 'server.console.header' | 'server.console.info.before' | 'server.console.info.after' | 'server.console.sidebar' | 'server.console.command' | 'server.console.footer' | 'server.files.actions' | 'server.files.header' | 'server.files.footer' | 'server.files.dropdown' | 'server.files.edit.before' | 'server.files.edit.after' | 'server.databases.before' | 'server.databases.after' | 'server.schedules.before' | 'server.schedules.after' | 'server.schedules.edit.before' | 'server.schedules.edit.after' | 'server.users.before' | 'server.users.after' | 'server.backups.before' | 'server.backups.after' | 'server.backups.dropdown' | 'server.network.before' | 'server.network.after' | 'server.startup.before' | 'server.startup.after' | 'server.settings.before' | 'server.settings.after' | 'dashboard.header' | 'dashboard.widgets' | 'dashboard.serverlist.before' | 'dashboard.serverlist.after' | 'dashboard.serverrow.name.before' | 'dashboard.serverrow.name.after' | 'dashboard.serverrow.description.before' | 'dashboard.serverrow.description.after' | 'dashboard.serverrow.limits' | 'dashboard.footer' | 'dashboard.page' | 'account.header' | 'account.page' | 'account.footer' | 'account.subnav' | 'account.subnav.before' | 'account.subnav.after' | 'account.overview.before' | 'account.overview.after' | 'account.api.before' | 'account.api.after' | 'account.ssh.before' | 'account.ssh.after' | 'auth.container.before' | 'auth.container.after';
|
|
17
|
+
/**
|
|
18
|
+
* Panel route area for extension pages.
|
|
19
|
+
*
|
|
20
|
+
* Routes are scoped by area so pages are mounted in the correct Pterodactyl
|
|
21
|
+
* router surface and navigation context.
|
|
22
|
+
*/
|
|
23
|
+
export type RouteArea = 'server' | 'dashboard' | 'account';
|
|
1
24
|
/**
|
|
2
25
|
* Extension identity configuration.
|
|
3
26
|
*
|
|
4
|
-
* Only `id` is required. `name` and `version` are
|
|
5
|
-
*
|
|
27
|
+
* Only `id` is required for most extensions. `name` and `version` are normally
|
|
28
|
+
* resolved from `extension.yaml`, which is injected into the bridge runtime by
|
|
29
|
+
* the Notur PHP package.
|
|
6
30
|
*/
|
|
7
31
|
export interface ExtensionConfig {
|
|
8
|
-
/** Unique extension identifier in vendor/name format
|
|
32
|
+
/** Unique extension identifier in vendor/name format, for example `acme/analytics`. */
|
|
9
33
|
id: string;
|
|
10
|
-
/** Human-readable name.
|
|
34
|
+
/** Human-readable display name. Omit this when it is present in `extension.yaml`. */
|
|
11
35
|
name?: string;
|
|
12
|
-
/** Semantic version string.
|
|
36
|
+
/** Semantic version string. Omit this when it is present in `extension.yaml`. */
|
|
13
37
|
version?: string;
|
|
14
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* CSS isolation options for components rendered by this extension.
|
|
41
|
+
*
|
|
42
|
+
* Root-class isolation wraps rendered slot/route components in a stable class so
|
|
43
|
+
* extension CSS can be scoped without Shadow DOM.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* createExtension({
|
|
48
|
+
* id: 'acme/theme-tools',
|
|
49
|
+
* cssIsolation: { mode: 'root-class', className: 'notur-ext--theme-tools' },
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
15
53
|
export interface CssIsolationConfig {
|
|
54
|
+
/** Isolation strategy. Currently only root class wrapping is supported. */
|
|
16
55
|
mode: 'root-class';
|
|
56
|
+
/** Optional class name. If omitted, the bridge derives one from the extension id. */
|
|
17
57
|
className?: string;
|
|
18
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Runtime context passed to `when` predicate functions for conditional slot rendering.
|
|
61
|
+
*/
|
|
19
62
|
export interface SlotRenderContext {
|
|
63
|
+
/** Current `window.location.pathname`, for example `/server/abc123`. */
|
|
20
64
|
path: string;
|
|
65
|
+
/** High-level panel area inferred from the current path. */
|
|
21
66
|
area: 'server' | 'dashboard' | 'account' | 'admin' | 'auth' | 'other';
|
|
67
|
+
/** True when the current URL is a server-scoped page. */
|
|
22
68
|
isServer: boolean;
|
|
69
|
+
/** True when the current URL is the dashboard area. */
|
|
23
70
|
isDashboard: boolean;
|
|
71
|
+
/** True when the current URL is an account page. */
|
|
24
72
|
isAccount: boolean;
|
|
73
|
+
/** True when the current URL is an admin page. */
|
|
25
74
|
isAdmin: boolean;
|
|
75
|
+
/** True when the current URL is an auth/login page. */
|
|
26
76
|
isAuth: boolean;
|
|
77
|
+
/** Current server permission list when available, otherwise `null`. */
|
|
27
78
|
permissions: string[] | null;
|
|
28
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Declarative conditions that decide whether a slot registration should render.
|
|
82
|
+
*
|
|
83
|
+
* All provided conditions must match. Use this to keep a component limited to
|
|
84
|
+
* specific panel areas, paths, or permissions.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* { slot: 'server.header', component: Button, when: { server: true } }
|
|
89
|
+
* { slot: 'server.files.actions', component: Tool, when: { pathIncludes: '/files' } }
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
29
92
|
export interface SlotRenderWhen {
|
|
93
|
+
/** Render only in one panel area. */
|
|
30
94
|
area?: SlotRenderContext['area'];
|
|
95
|
+
/** Render only in one of several panel areas. */
|
|
31
96
|
areas?: Array<SlotRenderContext['area']>;
|
|
97
|
+
/** Alias for `pathStartsWith`; render when the current path starts with this value. */
|
|
32
98
|
path?: string | string[];
|
|
99
|
+
/** Render when the current path starts with one of these prefixes. */
|
|
33
100
|
pathStartsWith?: string | string[];
|
|
101
|
+
/** Render when the current path contains one of these fragments. */
|
|
34
102
|
pathIncludes?: string | string[];
|
|
103
|
+
/** Render when the current path matches this regular expression. */
|
|
35
104
|
pathMatches?: string | RegExp;
|
|
105
|
+
/** Require one of these server permissions. `*` grants access. */
|
|
36
106
|
permission?: string | string[];
|
|
107
|
+
/** Render only when `context.isServer` equals this value. */
|
|
37
108
|
server?: boolean;
|
|
109
|
+
/** Render only when `context.isDashboard` equals this value. */
|
|
38
110
|
dashboard?: boolean;
|
|
111
|
+
/** Render only when `context.isAccount` equals this value. */
|
|
39
112
|
account?: boolean;
|
|
113
|
+
/** Render only when `context.isAdmin` equals this value. */
|
|
40
114
|
admin?: boolean;
|
|
115
|
+
/** Render only when `context.isAuth` equals this value. */
|
|
41
116
|
auth?: boolean;
|
|
42
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Conditional render rule for a slot registration.
|
|
120
|
+
*
|
|
121
|
+
* - `false` disables rendering.
|
|
122
|
+
* - an object uses declarative path/area/permission checks.
|
|
123
|
+
* - a function receives `SlotRenderContext` for custom logic.
|
|
124
|
+
*/
|
|
43
125
|
export type SlotRenderCondition = boolean | SlotRenderWhen | ((context: SlotRenderContext) => boolean);
|
|
126
|
+
/**
|
|
127
|
+
* Register a React component into a Notur frontend slot.
|
|
128
|
+
*/
|
|
44
129
|
export interface SlotConfig {
|
|
45
|
-
|
|
130
|
+
/** Slot mount point. Known values autocomplete through `SlotId`; custom strings are accepted for forward compatibility. */
|
|
131
|
+
slot: SlotId | (string & {});
|
|
132
|
+
/** React component rendered into the slot. Receives at least `{ extensionId }` plus any `props`. */
|
|
46
133
|
component: React.ComponentType<any>;
|
|
134
|
+
/** Sort order within the same priority. Lower values render first. Defaults to `0`. */
|
|
47
135
|
order?: number;
|
|
136
|
+
/** Priority across registrations. Higher values render before lower values. Defaults to `0`. */
|
|
48
137
|
priority?: number;
|
|
138
|
+
/** Optional label used by navigation-style slots such as `server.subnav`. */
|
|
49
139
|
label?: string;
|
|
140
|
+
/** Optional icon name used by navigation-style slots when the bridge supports icons. */
|
|
50
141
|
icon?: string;
|
|
142
|
+
/** Server permission required to render this slot. Checked against current server permissions when available. */
|
|
51
143
|
permission?: string;
|
|
144
|
+
/** Static props merged into the component props every time it renders. */
|
|
52
145
|
props?: Record<string, any>;
|
|
146
|
+
/** Optional condition controlling whether the component renders for the current page/context. */
|
|
53
147
|
when?: SlotRenderCondition;
|
|
54
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Register a full React page inside a Notur route area.
|
|
151
|
+
*
|
|
152
|
+
* Route paths are extension-local. A server route with `path: '/analytics'` is
|
|
153
|
+
* mounted under the extension namespace rather than replacing Pterodactyl's
|
|
154
|
+
* built-in routes.
|
|
155
|
+
*/
|
|
55
156
|
export interface RouteConfig {
|
|
56
|
-
area
|
|
157
|
+
/** Panel area where the route belongs. */
|
|
158
|
+
area: RouteArea;
|
|
159
|
+
/** Extension-local path. Must start with `/`, for example `/analytics`. */
|
|
57
160
|
path: string;
|
|
161
|
+
/** Display name used by navigation/debug tooling. */
|
|
58
162
|
name: string;
|
|
163
|
+
/** React page component rendered for this route. */
|
|
59
164
|
component: React.ComponentType<any>;
|
|
165
|
+
/** Optional icon name for navigation entries. */
|
|
60
166
|
icon?: string;
|
|
167
|
+
/** Optional permission required before showing or using the route. */
|
|
61
168
|
permission?: string;
|
|
62
169
|
}
|
|
63
170
|
/**
|
|
64
171
|
* Full extension definition passed to `createExtension()`.
|
|
65
172
|
*
|
|
173
|
+
* Most new extensions should use the simpler top-level `id` form instead.
|
|
174
|
+
*
|
|
66
175
|
* @example
|
|
67
176
|
* ```ts
|
|
68
177
|
* createExtension({
|
|
69
|
-
*
|
|
70
|
-
*
|
|
178
|
+
* config: { id: 'acme/analytics' },
|
|
179
|
+
* slots: [{ slot: 'dashboard.widgets', component: Widget }],
|
|
71
180
|
* });
|
|
72
181
|
* ```
|
|
73
182
|
*/
|
|
74
183
|
export interface ExtensionDefinition {
|
|
184
|
+
/** Extension identity. `id` must match `extension.yaml`. */
|
|
75
185
|
config: ExtensionConfig;
|
|
186
|
+
/** Components to render into existing Pterodactyl UI slots. */
|
|
76
187
|
slots?: SlotConfig[];
|
|
188
|
+
/** Full extension pages to register in supported panel areas. */
|
|
77
189
|
routes?: RouteConfig[];
|
|
190
|
+
/** Enable or configure root-class CSS isolation for this extension. */
|
|
78
191
|
cssIsolation?: CssIsolationConfig | boolean;
|
|
192
|
+
/** Called after registration succeeds. Keep this lightweight. */
|
|
79
193
|
onInit?: () => void;
|
|
194
|
+
/** Called when the bridge unregisters this extension. Use it for cleanup. */
|
|
80
195
|
onDestroy?: () => void;
|
|
81
196
|
}
|
|
82
197
|
/**
|
|
83
198
|
* Simplified extension definition with `id` at the top level.
|
|
84
199
|
*
|
|
85
|
-
* Name and version are auto-resolved from
|
|
86
|
-
*
|
|
200
|
+
* Name and version are auto-resolved from `extension.yaml`. This is the
|
|
201
|
+
* recommended format for most extensions.
|
|
87
202
|
*
|
|
88
203
|
* @example
|
|
89
204
|
* ```ts
|
|
90
205
|
* createExtension({
|
|
91
|
-
*
|
|
92
|
-
*
|
|
206
|
+
* id: 'acme/analytics',
|
|
207
|
+
* slots: [{ slot: 'dashboard.widgets', component: Widget }],
|
|
93
208
|
* });
|
|
94
209
|
* ```
|
|
95
210
|
*/
|
|
96
211
|
export type SimpleExtensionDefinition = Omit<ExtensionDefinition, 'config'> & {
|
|
97
|
-
/** Unique extension identifier in vendor/name format
|
|
212
|
+
/** Unique extension identifier in vendor/name format, for example `acme/analytics`. */
|
|
98
213
|
id: string;
|
|
99
214
|
};
|
|
215
|
+
/** Internal registration shape stored by the bridge registry after a slot is registered. */
|
|
100
216
|
export interface SlotRegistration {
|
|
217
|
+
/** Extension that owns this registration. */
|
|
101
218
|
extensionId: string;
|
|
102
|
-
|
|
219
|
+
/** Slot mount point. */
|
|
220
|
+
slot: SlotId | (string & {});
|
|
221
|
+
/** Component rendered by the bridge. */
|
|
103
222
|
component: React.ComponentType<any>;
|
|
223
|
+
/** Sort order within priority. */
|
|
104
224
|
order?: number;
|
|
225
|
+
/** Higher priority renders earlier. */
|
|
105
226
|
priority?: number;
|
|
227
|
+
/** Navigation label for nav slots. */
|
|
106
228
|
label?: string;
|
|
229
|
+
/** Navigation icon for nav slots. */
|
|
107
230
|
icon?: string;
|
|
231
|
+
/** Required permission, if any. */
|
|
108
232
|
permission?: string;
|
|
233
|
+
/** CSS isolation wrapper class resolved by the bridge. */
|
|
109
234
|
scopeClass?: string;
|
|
235
|
+
/** Static props passed into the component. */
|
|
110
236
|
props?: Record<string, any>;
|
|
237
|
+
/** Conditional render rule. */
|
|
111
238
|
when?: SlotRenderCondition;
|
|
112
239
|
}
|
|
240
|
+
/** Internal registration shape stored by the bridge registry after a route is registered. */
|
|
113
241
|
export interface RouteRegistration {
|
|
242
|
+
/** Extension that owns this route. */
|
|
114
243
|
extensionId: string;
|
|
115
|
-
area
|
|
244
|
+
/** Panel area where the route belongs. */
|
|
245
|
+
area: RouteArea;
|
|
246
|
+
/** Extension-local route path. */
|
|
116
247
|
path: string;
|
|
248
|
+
/** Display name. */
|
|
117
249
|
name: string;
|
|
250
|
+
/** Route page component. */
|
|
118
251
|
component: React.ComponentType<any>;
|
|
252
|
+
/** Optional navigation icon. */
|
|
119
253
|
icon?: string;
|
|
254
|
+
/** Optional permission requirement. */
|
|
120
255
|
permission?: string;
|
|
256
|
+
/** CSS isolation wrapper class resolved by the bridge. */
|
|
121
257
|
scopeClass?: string;
|
|
122
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Low-level Notur bridge API exposed on `window.__NOTUR__`.
|
|
261
|
+
*
|
|
262
|
+
* Most extensions should use `createExtension()` and hooks instead of calling
|
|
263
|
+
* this directly. It is exported as an escape hatch for advanced integrations and
|
|
264
|
+
* debugging tools.
|
|
265
|
+
*/
|
|
123
266
|
export interface NoturApi {
|
|
267
|
+
/** Notur bridge/runtime version. */
|
|
124
268
|
version: string;
|
|
269
|
+
/** Runtime registry for slots, routes, themes, lifecycle callbacks, and events. */
|
|
125
270
|
registry: {
|
|
126
271
|
registerSlot: (registration: Omit<SlotRegistration, 'extensionId'> & {
|
|
127
272
|
extensionId?: string;
|
|
@@ -149,6 +294,7 @@ export interface NoturApi {
|
|
|
149
294
|
emitEvent: (event: string, data?: unknown) => void;
|
|
150
295
|
onEvent: (event: string, callback: (data?: unknown) => void) => () => void;
|
|
151
296
|
};
|
|
297
|
+
/** Bridge-provided hooks for advanced consumers. Prefer direct SDK hook exports. */
|
|
152
298
|
hooks: {
|
|
153
299
|
useSlot: (slotId: string) => SlotRegistration[];
|
|
154
300
|
useExtensionApi: (options: {
|
|
@@ -168,8 +314,11 @@ export interface NoturApi {
|
|
|
168
314
|
useExtensionState: <T extends Record<string, any>>(extensionId: string, initialState: T) => [T, (partial: Partial<T>) => void, () => void];
|
|
169
315
|
useNoturTheme: () => Record<string, string>;
|
|
170
316
|
};
|
|
317
|
+
/** Bridge slot constants. */
|
|
171
318
|
SLOT_IDS: Record<string, string>;
|
|
319
|
+
/** Unregister an extension by id. Mostly useful for development tooling. */
|
|
172
320
|
unregisterExtension: (id: string) => void;
|
|
321
|
+
/** Enabled extension metadata injected by the PHP runtime. */
|
|
173
322
|
extensions?: Array<{
|
|
174
323
|
id: string;
|
|
175
324
|
name?: string;
|
|
@@ -181,19 +330,29 @@ export interface NoturApi {
|
|
|
181
330
|
}
|
|
182
331
|
/**
|
|
183
332
|
* Base props received by components registered in Notur slots.
|
|
184
|
-
*
|
|
333
|
+
*
|
|
334
|
+
* Extend this interface for your own static props:
|
|
185
335
|
*
|
|
186
336
|
* ```tsx
|
|
187
|
-
* import { SlotComponentProps } from '@notur/sdk';
|
|
188
|
-
*
|
|
337
|
+
* import type { SlotComponentProps } from '@notur/sdk';
|
|
338
|
+
*
|
|
339
|
+
* type Props = SlotComponentProps & { label: string };
|
|
340
|
+
* const MyWidget: React.FC<Props> = ({ extensionId, label }) => <button>{label}</button>;
|
|
189
341
|
* ```
|
|
190
342
|
*/
|
|
191
343
|
export interface SlotComponentProps {
|
|
344
|
+
/** Owning extension id, for example `acme/red-button`. */
|
|
192
345
|
extensionId: string;
|
|
346
|
+
/** Additional props supplied by `SlotConfig.props` or the bridge. */
|
|
193
347
|
[key: string]: any;
|
|
194
348
|
}
|
|
195
349
|
/**
|
|
196
|
-
* Get the Notur API from the
|
|
350
|
+
* Get the Notur API from the browser global.
|
|
351
|
+
*
|
|
352
|
+
* This is an advanced escape hatch. Use `createExtension()` and exported hooks
|
|
353
|
+
* for normal extension development.
|
|
354
|
+
*
|
|
355
|
+
* @throws If the Notur bridge runtime has not loaded yet.
|
|
197
356
|
*/
|
|
198
357
|
export declare function getNoturApi(): NoturApi;
|
|
199
358
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,MAAM,GACZ,QAAQ,GACR,aAAa,GACb,eAAe,GACf,cAAc,GACd,eAAe,GACf,sBAAsB,GACtB,qBAAqB,GACrB,eAAe,GACf,aAAa,GACb,eAAe,GACf,yBAAyB,GACzB,uBAAuB,GACvB,4BAA4B,GAC5B,2BAA2B,GAC3B,wBAAwB,GACxB,wBAAwB,GACxB,uBAAuB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,qBAAqB,GACrB,uBAAu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the
|
|
2
|
+
* Get the Notur API from the browser global.
|
|
3
|
+
*
|
|
4
|
+
* This is an advanced escape hatch. Use `createExtension()` and exported hooks
|
|
5
|
+
* for normal extension development.
|
|
6
|
+
*
|
|
7
|
+
* @throws If the Notur bridge runtime has not loaded yet.
|
|
3
8
|
*/
|
|
4
9
|
export function getNoturApi() {
|
|
5
10
|
const api = window.__NOTUR__;
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAyZA;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW;IACvB,MAAM,GAAG,GAAI,MAAc,CAAC,SAAS,CAAC;IACtC,IAAI,CAAC,GAAG,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -5,15 +5,5 @@ version: "1.0.0"
|
|
|
5
5
|
description: "Adds a red button to the server header"
|
|
6
6
|
license: "MIT"
|
|
7
7
|
|
|
8
|
-
requires:
|
|
9
|
-
notur: "^1.0"
|
|
10
|
-
pterodactyl: "^1.12"
|
|
11
|
-
php: "^8.2"
|
|
12
|
-
|
|
13
|
-
entrypoint: "Acme\\RedButton\\RedButtonExtension"
|
|
14
|
-
autoload:
|
|
15
|
-
psr-4:
|
|
16
|
-
"Acme\\RedButton\\": "src/"
|
|
17
|
-
|
|
18
8
|
frontend:
|
|
19
9
|
bundle: "resources/frontend/dist/extension.js"
|
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
"build": "webpack-cli --mode production --config webpack.config.js",
|
|
7
7
|
"dev": "webpack-cli --mode development --watch --config webpack.config.js",
|
|
8
8
|
"pack": "notur-pack",
|
|
9
|
-
"push": "notur-push"
|
|
9
|
+
"push": "notur-push",
|
|
10
|
+
"sync": "notur-sync",
|
|
11
|
+
"validate": "notur-validate",
|
|
12
|
+
"doctor": "notur-doctor"
|
|
10
13
|
},
|
|
11
14
|
"peerDependencies": {
|
|
12
15
|
"react": "^16.14.0",
|
|
13
16
|
"react-dom": "^16.14.0"
|
|
14
17
|
},
|
|
15
18
|
"devDependencies": {
|
|
16
|
-
"@notur/sdk": "^1.4.
|
|
19
|
+
"@notur/sdk": "^1.4.7",
|
|
17
20
|
"@types/react": "^16.14.0",
|
|
18
21
|
"@types/react-dom": "^16.9.0",
|
|
19
22
|
"react": "^16.14.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notur/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "Notur Extension Developer SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
"notur-create": "./bin/notur-create.js",
|
|
21
21
|
"notur-pack": "./bin/notur-pack.js",
|
|
22
22
|
"notur-keygen": "./bin/notur-keygen.js",
|
|
23
|
-
"notur-push": "./bin/notur-push.js"
|
|
23
|
+
"notur-push": "./bin/notur-push.js",
|
|
24
|
+
"notur-sync": "./bin/notur-sync.js",
|
|
25
|
+
"notur-validate": "./bin/notur-validate.js",
|
|
26
|
+
"notur-doctor": "./bin/notur-doctor.js"
|
|
24
27
|
},
|
|
25
28
|
"keywords": [
|
|
26
29
|
"notur",
|