@jchat/addon-sdk 1.0.0-alpha.4 → 1.0.0-alpha.6
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/CHANGELOG.md +13 -0
- package/dist/contracts.d.mts +5 -21
- package/dist/diagnostics.d.mts +1 -1
- package/dist/diagnostics.mjs +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +6 -2
- package/dist/ui.d.mts +11977 -0
- package/dist/ui.mjs +2 -0
- package/dist/ui2.d.mts +2 -0
- package/dist/vite.d.mts +2 -0
- package/dist/vite.mjs +7 -7
- package/package.json +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @jchat/addon-sdk
|
|
2
2
|
|
|
3
|
+
## 1.0.0-alpha.6
|
|
4
|
+
|
|
5
|
+
## 1.0.0-alpha.5
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- 9755c28: Export curated UI components, types, and Tailwind styles from `@jchat/addon-sdk/ui` (`@jchat/addon-sdk/ui/tailwind.css`) for sandbox and third-party addon developers.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ad4b00c: Add `OWNER_SETTINGS` (`"owner-settings"`) and `ADDON_SETTINGS` (`"addon-settings"`) to `MOUNT_POINTS` constant and strictly type `MountPoint` union to official mount points. Remove legacy `ConfigSchemaField` and `configSchema` from `AddonManifest` in favor of mount-point-driven settings.
|
|
14
|
+
- ada430f: Formatted type declarations in the Addon SDK to align with project style guidelines.
|
|
15
|
+
|
|
3
16
|
## 1.0.0-alpha.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/contracts.d.mts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
//#region src/contracts.d.ts
|
|
2
2
|
type AddonPermission = string;
|
|
3
|
-
/**
|
|
4
|
-
* Defines a single configuration field for an addon's settings panel. These are shown to site
|
|
5
|
-
* admins in the Jchat dashboard.
|
|
6
|
-
*/
|
|
7
|
-
interface ConfigSchemaField {
|
|
8
|
-
/** Unique key used to store and retrieve the value in `getConfig` */
|
|
9
|
-
key: string;
|
|
10
|
-
/** Data type for validation and UI rendering */
|
|
11
|
-
type: "string" | "number" | "boolean";
|
|
12
|
-
/** Human-readable label shown in the settings UI */
|
|
13
|
-
label: string;
|
|
14
|
-
/** If true, the admin must provide a value before saving */
|
|
15
|
-
required?: boolean;
|
|
16
|
-
/** Whether the value is sensitive (encrypted at rest and masked in the UI) */
|
|
17
|
-
secret?: boolean;
|
|
18
|
-
/** Default value pre-filled in the settings form for new installations */
|
|
19
|
-
default?: string | number | boolean;
|
|
20
|
-
}
|
|
21
3
|
/** Definition of a custom permission introduced by an addon. */
|
|
22
4
|
interface AddonPermissionDefinition {
|
|
23
5
|
/** Permission identifier (recommended: `addon.<id>.<action>`) */
|
|
@@ -55,6 +37,10 @@ declare const MOUNT_POINTS: {
|
|
|
55
37
|
readonly EMOJI_PICKER_GIF_TAB: "emoji-picker-gif-tab";
|
|
56
38
|
/** Full-screen or modal dialog specifically for TubeScan */
|
|
57
39
|
readonly TUBESCAN_DIALOG: "tubescan-dialog";
|
|
40
|
+
/** Dedicated settings panel rendered in the Owner Dashboard */
|
|
41
|
+
readonly OWNER_SETTINGS: "owner-settings";
|
|
42
|
+
/** Dedicated settings panel rendered in the Site Admin Dashboard */
|
|
43
|
+
readonly ADDON_SETTINGS: "addon-settings";
|
|
58
44
|
};
|
|
59
45
|
/** Union type of all valid addon mount points. */
|
|
60
46
|
type MountPoint = (typeof MOUNT_POINTS)[keyof typeof MOUNT_POINTS];
|
|
@@ -123,8 +109,6 @@ interface AddonManifest {
|
|
|
123
109
|
permissions?: AddonPermission[];
|
|
124
110
|
/** Custom permissions that should be registered with the host application on installation */
|
|
125
111
|
permissionDefinitions?: AddonPermissionDefinition[];
|
|
126
|
-
/** Settings form structure shown to site admins. Values are stored encrypted per site */
|
|
127
|
-
configSchema?: ConfigSchemaField[];
|
|
128
112
|
}
|
|
129
113
|
//#endregion
|
|
130
|
-
export {
|
|
114
|
+
export { MountPoint as a, MOUNT_POINTS as i, AddonPermission as n, AddonPermissionDefinition as r, AddonManifest as t };
|
package/dist/diagnostics.d.mts
CHANGED
package/dist/diagnostics.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as MountPoint, i as MOUNT_POINTS, n as AddonPermission, r as AddonPermissionDefinition, t as AddonManifest } from "./contracts.mjs";
|
|
2
2
|
import { ComponentType, SVGProps } from "react";
|
|
3
3
|
import { Elysia } from "elysia";
|
|
4
4
|
import { Kysely } from "kysely";
|
|
5
|
-
//#region ../icon/
|
|
5
|
+
//#region ../icon/dist/index.d.mts
|
|
6
|
+
//#region src/types.d.ts
|
|
6
7
|
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>;
|
|
7
8
|
declare const ICON_NAMES: readonly ["ProfileMen", "ProfileWomen", "Stories", "Search", "AdminPanel", "Investigation", "Logout", "Users", "Settings", "RoomList", "AdminShip", "Announcement", "NewsFeed", "Ranks", "TopPoints", "Like", "DisLike", "Love", "Funny", "Comment", "Chat", "Brush", "Image", "Mic", "More", "Palette", "Smiley", "Send", "Private", "Action", "View", "Female", "Male", "LuSend", "Heart", "Trash", "HorizontalOption", "Menu", "UserGroup", "Globe", "Plus", "Loader", "X", "UserRoundPlus", "Footprints", "Calendar", "Volume", "Youtube", "Upload", "Play", "Pause", "Stop", "Ok", "ImageFill", "MicFill", "YoutubeFill", "PlusFill", "Music", "Gift", "Camera", "Envelope", "Key", "Signature", "UserPen", "Edit", "AddressCard", "Star", "StatusOnline", "StatusAway", "StatusBusy", "StatusEating", "StatusGaming", "StatusSinging", "StatusListening", "StatusStay"];
|
|
8
9
|
type IconName = (typeof ICON_NAMES)[number];
|
|
@@ -268,4 +269,4 @@ declare function useIcons(): {
|
|
|
268
269
|
*/
|
|
269
270
|
declare function getAddonSdkVersion(): string;
|
|
270
271
|
//#endregion
|
|
271
|
-
export { AddonApi, AddonDatabase, AddonEventListener, AddonFont, AddonJsonBody, type AddonManifest, type AddonPermission, type AddonPermissionDefinition, AddonProps, AddonRequestUser, AddonSDK, AddonSeedDocument, AddonServerContext, AddonServerFactory, AddonUser,
|
|
272
|
+
export { AddonApi, AddonDatabase, AddonEventListener, AddonFont, AddonJsonBody, type AddonManifest, type AddonPermission, type AddonPermissionDefinition, AddonProps, AddonRequestUser, AddonSDK, AddonSeedDocument, AddonServerContext, AddonServerFactory, AddonUser, MOUNT_POINTS, type MountPoint, defineAddonManifest, defineAddonServer, getAddonSdkVersion, useAddonSDK, useIcons };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region package.json
|
|
2
|
-
var version = "1.0.0-alpha.
|
|
2
|
+
var version = "1.0.0-alpha.6";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/contracts.ts
|
|
5
5
|
/** Valid locations where an addon can be rendered within the Jchat layout. */
|
|
@@ -29,7 +29,11 @@ const MOUNT_POINTS = {
|
|
|
29
29
|
/** Custom tab in the emoji/gif selection panel */
|
|
30
30
|
EMOJI_PICKER_GIF_TAB: "emoji-picker-gif-tab",
|
|
31
31
|
/** Full-screen or modal dialog specifically for TubeScan */
|
|
32
|
-
TUBESCAN_DIALOG: "tubescan-dialog"
|
|
32
|
+
TUBESCAN_DIALOG: "tubescan-dialog",
|
|
33
|
+
/** Dedicated settings panel rendered in the Owner Dashboard */
|
|
34
|
+
OWNER_SETTINGS: "owner-settings",
|
|
35
|
+
/** Dedicated settings panel rendered in the Site Admin Dashboard */
|
|
36
|
+
ADDON_SETTINGS: "addon-settings"
|
|
33
37
|
};
|
|
34
38
|
//#endregion
|
|
35
39
|
//#region src/index.ts
|