@sonolus/core 7.5.2 → 7.7.0

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 (73) hide show
  1. package/dist/common/core/engine/configuration/ui.d.ts +1 -1
  2. package/dist/common/core/icon.d.ts +32 -0
  3. package/dist/common/core/icon.js +32 -0
  4. package/dist/common/core/index.d.ts +1 -0
  5. package/dist/common/core/item-type.d.ts +1 -0
  6. package/dist/common/core/server/{options-section.d.ts → form.d.ts} +2 -2
  7. package/dist/common/core/server/index.d.ts +4 -9
  8. package/dist/common/core/server/index.js +1 -0
  9. package/dist/common/core/server/info.d.ts +10 -0
  10. package/dist/common/core/server/items/community/comment/comment.d.ts +8 -0
  11. package/dist/common/core/server/items/community/comment/index.d.ts +2 -0
  12. package/dist/common/core/server/items/community/comment/list.d.ts +5 -0
  13. package/dist/common/core/server/items/community/index.d.ts +3 -0
  14. package/dist/common/core/server/items/community/index.js +17 -0
  15. package/dist/common/core/server/items/community/info.d.ts +6 -0
  16. package/dist/common/core/server/items/community/submit.d.ts +7 -0
  17. package/dist/common/core/server/items/create.d.ts +8 -0
  18. package/dist/common/core/server/items/create.js +2 -0
  19. package/dist/common/core/server/items/details.d.ts +9 -0
  20. package/dist/common/core/server/items/details.js +2 -0
  21. package/dist/common/core/server/items/index.d.ts +8 -0
  22. package/dist/common/core/server/items/index.js +18 -0
  23. package/dist/common/core/server/items/info.d.ts +9 -0
  24. package/dist/common/core/server/items/info.js +2 -0
  25. package/dist/common/core/server/items/leaderboard/details.d.ts +4 -0
  26. package/dist/common/core/server/items/leaderboard/details.js +2 -0
  27. package/dist/common/core/server/items/leaderboard/index.d.ts +3 -0
  28. package/dist/common/core/server/items/leaderboard/index.js +17 -0
  29. package/dist/common/core/server/items/leaderboard/leaderboard.d.ts +5 -0
  30. package/dist/common/core/server/items/leaderboard/leaderboard.js +2 -0
  31. package/dist/common/core/server/items/leaderboard/record/details.d.ts +4 -0
  32. package/dist/common/core/server/items/leaderboard/record/details.js +2 -0
  33. package/dist/common/core/server/items/leaderboard/record/index.d.ts +3 -0
  34. package/dist/common/core/server/items/leaderboard/record/index.js +2 -0
  35. package/dist/common/core/server/items/leaderboard/record/list.d.ts +5 -0
  36. package/dist/common/core/server/items/leaderboard/record/list.js +2 -0
  37. package/dist/common/core/server/items/leaderboard/record/record.d.ts +7 -0
  38. package/dist/common/core/server/items/leaderboard/record/record.js +2 -0
  39. package/dist/common/core/server/items/list.d.ts +6 -0
  40. package/dist/common/core/server/items/list.js +2 -0
  41. package/dist/common/core/server/items/section.d.ts +7 -0
  42. package/dist/common/core/server/items/section.js +2 -0
  43. package/dist/common/core/server/items/upload.d.ts +1 -0
  44. package/dist/common/core/server/items/upload.js +2 -0
  45. package/dist/common/core/server/{create-room.d.ts → multiplayer/create-room.d.ts} +0 -2
  46. package/dist/common/core/server/multiplayer/create-room.js +2 -0
  47. package/dist/common/core/server/multiplayer/events/update-event.d.ts +3 -3
  48. package/dist/common/core/server/multiplayer/events/update-options-event.d.ts +2 -2
  49. package/dist/common/core/server/multiplayer/events/update-scoreboard-section-icon-event.d.ts +1 -1
  50. package/dist/common/core/server/multiplayer/index.d.ts +2 -0
  51. package/dist/common/core/server/{join-room.d.ts → multiplayer/join-room.d.ts} +1 -1
  52. package/dist/common/core/server/multiplayer/join-room.js +2 -0
  53. package/dist/common/core/server/multiplayer/scoreboard-section.d.ts +1 -1
  54. package/dist/common/core/server/option.d.ts +45 -1
  55. package/dist/common/core/tag.d.ts +1 -1
  56. package/dist/common/core/text.d.ts +68 -0
  57. package/dist/common/core/text.js +68 -0
  58. package/dist/common/database/tag.d.ts +1 -1
  59. package/dist/common/version.js +2 -2
  60. package/package.json +5 -5
  61. package/dist/common/core/server/item-details.d.ts +0 -6
  62. package/dist/common/core/server/item-info.d.ts +0 -8
  63. package/dist/common/core/server/item-list.d.ts +0 -6
  64. package/dist/common/core/server/item-section.d.ts +0 -7
  65. package/dist/common/core/server/server-info.d.ts +0 -8
  66. /package/dist/common/core/{server/create-room.js → item-type.js} +0 -0
  67. /package/dist/common/core/server/{item-details.js → form.js} +0 -0
  68. /package/dist/common/core/server/{item-info.js → info.js} +0 -0
  69. /package/dist/common/core/server/{item-list.js → items/community/comment/comment.js} +0 -0
  70. /package/dist/common/core/server/{item-section.js → items/community/comment/index.js} +0 -0
  71. /package/dist/common/core/server/{join-room.js → items/community/comment/list.js} +0 -0
  72. /package/dist/common/core/server/{options-section.js → items/community/info.js} +0 -0
  73. /package/dist/common/core/server/{server-info.js → items/community/submit.js} +0 -0
@@ -16,7 +16,7 @@ export type EngineConfigurationUI = {
16
16
  judgmentErrorPlacement: EngineConfigurationJudgmentErrorPlacement;
17
17
  judgmentErrorMin: number;
18
18
  };
19
- export type EngineConfigurationMetric = 'arcade' | 'accuracy' | 'life' | 'perfectRate' | 'errorHeatmap';
19
+ export type EngineConfigurationMetric = 'arcade' | 'arcadePercentage' | 'accuracy' | 'accuracyPercentage' | 'life' | 'perfect' | 'perfectPercentage' | 'greatGoodMiss' | 'greatGoodMissPercentage' | 'miss' | 'missPercentage' | 'errorHeatmap';
20
20
  export type EngineConfigurationVisibility = {
21
21
  scale: number;
22
22
  alpha: number;
@@ -1,16 +1,48 @@
1
1
  export declare const Icon: {
2
2
  readonly Advanced: "advanced";
3
+ readonly AngleDown: "angleDown";
4
+ readonly AngleLeft: "angleLeft";
5
+ readonly AngleRight: "angleRight";
6
+ readonly AnglesDown: "anglesDown";
7
+ readonly AnglesLeft: "anglesLeft";
8
+ readonly AnglesRight: "anglesRight";
9
+ readonly AnglesUp: "anglesUp";
10
+ readonly AngleUp: "angleUp";
11
+ readonly ArrowDown: "arrowDown";
12
+ readonly ArrowLeft: "arrowLeft";
13
+ readonly ArrowRight: "arrowRight";
14
+ readonly ArrowUp: "arrowUp";
3
15
  readonly Award: "award";
4
16
  readonly Bookmark: "bookmark";
17
+ readonly BookmarkHollow: "bookmarkHollow";
18
+ readonly Check: "check";
19
+ readonly Comment: "comment";
5
20
  readonly Crown: "crown";
21
+ readonly Delete: "delete";
22
+ readonly Edit: "edit";
6
23
  readonly Heart: "heart";
24
+ readonly HeartHollow: "heartHollow";
25
+ readonly Hide: "hide";
26
+ readonly Lock: "lock";
7
27
  readonly Medal: "medal";
28
+ readonly Minus: "minus";
29
+ readonly Options: "options";
30
+ readonly Plus: "plus";
8
31
  readonly Ranking: "ranking";
32
+ readonly Reply: "reply";
9
33
  readonly Search: "search";
34
+ readonly Settings: "settings";
35
+ readonly Show: "show";
10
36
  readonly Shuffle: "shuffle";
11
37
  readonly Star: "star";
38
+ readonly StarHalf: "starHalf";
39
+ readonly StarHollow: "starHollow";
12
40
  readonly ThumbsDown: "thumbsDown";
41
+ readonly ThumbsDownHollow: "thumbsDownHollow";
13
42
  readonly ThumbsUp: "thumbsUp";
43
+ readonly ThumbsUpHollow: "thumbsUpHollow";
14
44
  readonly Trophy: "trophy";
45
+ readonly Unlock: "unlock";
46
+ readonly XMark: "xMark";
15
47
  };
16
48
  export type Icon = (typeof Icon)[keyof typeof Icon];
@@ -3,16 +3,48 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Icon = void 0;
4
4
  exports.Icon = {
5
5
  Advanced: 'advanced',
6
+ AngleDown: 'angleDown',
7
+ AngleLeft: 'angleLeft',
8
+ AngleRight: 'angleRight',
9
+ AnglesDown: 'anglesDown',
10
+ AnglesLeft: 'anglesLeft',
11
+ AnglesRight: 'anglesRight',
12
+ AnglesUp: 'anglesUp',
13
+ AngleUp: 'angleUp',
14
+ ArrowDown: 'arrowDown',
15
+ ArrowLeft: 'arrowLeft',
16
+ ArrowRight: 'arrowRight',
17
+ ArrowUp: 'arrowUp',
6
18
  Award: 'award',
7
19
  Bookmark: 'bookmark',
20
+ BookmarkHollow: 'bookmarkHollow',
21
+ Check: 'check',
22
+ Comment: 'comment',
8
23
  Crown: 'crown',
24
+ Delete: 'delete',
25
+ Edit: 'edit',
9
26
  Heart: 'heart',
27
+ HeartHollow: 'heartHollow',
28
+ Hide: 'hide',
29
+ Lock: 'lock',
10
30
  Medal: 'medal',
31
+ Minus: 'minus',
32
+ Options: 'options',
33
+ Plus: 'plus',
11
34
  Ranking: 'ranking',
35
+ Reply: 'reply',
12
36
  Search: 'search',
37
+ Settings: 'settings',
38
+ Show: 'show',
13
39
  Shuffle: 'shuffle',
14
40
  Star: 'star',
41
+ StarHalf: 'starHalf',
42
+ StarHollow: 'starHollow',
15
43
  ThumbsDown: 'thumbsDown',
44
+ ThumbsDownHollow: 'thumbsDownHollow',
16
45
  ThumbsUp: 'thumbsUp',
46
+ ThumbsUpHollow: 'thumbsUpHollow',
17
47
  Trophy: 'trophy',
48
+ Unlock: 'unlock',
49
+ XMark: 'xMark',
18
50
  };
@@ -5,6 +5,7 @@ export * from './engine';
5
5
  export { GameplayResult } from './gameplay-result';
6
6
  export { Icon } from './icon';
7
7
  export * from './instruction';
8
+ export { ItemType } from './item-type';
8
9
  export * from './level';
9
10
  export * from './package';
10
11
  export * from './particle';
@@ -0,0 +1 @@
1
+ export type ItemType = 'post' | 'playlist' | 'level' | 'skin' | 'background' | 'effect' | 'particle' | 'engine' | 'replay' | 'room';
@@ -1,9 +1,9 @@
1
1
  import { Icon } from '../icon';
2
2
  import { Text } from '../text';
3
3
  import { ServerOption } from './option';
4
- export type ServerOptionsSection = {
4
+ export type ServerForm = {
5
5
  type: string;
6
6
  title: Text | (string & {});
7
- icon?: Icon;
7
+ icon?: Icon | (string & {});
8
8
  options: ServerOption[];
9
9
  };
@@ -1,11 +1,6 @@
1
1
  export { AuthenticateServerRequest, AuthenticateServerResponse } from './authenticate';
2
- export { CreateRoomRequest, CreateRoomResponse } from './create-room';
3
- export { ItemDetails } from './item-details';
4
- export { ItemInfo } from './item-info';
5
- export { ItemList } from './item-list';
6
- export { ItemSection } from './item-section';
7
- export { JoinRoomRequest, JoinRoomResponse } from './join-room';
2
+ export { ServerForm } from './form';
3
+ export { ServerInfo, ServerInfoButton } from './info';
4
+ export * from './items';
8
5
  export * from './multiplayer';
9
- export { ServerMultiOption, ServerOption, ServerSelectOption, ServerSliderOption, ServerTextOption, ServerToggleOption, } from './option';
10
- export { ServerOptionsSection } from './options-section';
11
- export { ServerInfo } from './server-info';
6
+ export { ServerCollectionItemOption, ServerFileOption, ServerMultiOption, ServerOption, ServerSelectOption, ServerServerItemOption, ServerSliderOption, ServerTextAreaOption, ServerTextOption, ServerToggleOption, } from './option';
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./items"), exports);
17
18
  __exportStar(require("./multiplayer"), exports);
@@ -0,0 +1,10 @@
1
+ import { SRL } from '../resource/srl';
2
+ export type ServerInfo = {
3
+ title: string;
4
+ description?: string;
5
+ buttons: ServerInfoButton[];
6
+ banner?: SRL;
7
+ };
8
+ export type ServerInfoButton = {
9
+ type: 'authentication' | 'multiplayer' | 'post' | 'playlist' | 'level' | 'replay' | 'skin' | 'background' | 'effect' | 'particle' | 'engine';
10
+ };
@@ -0,0 +1,8 @@
1
+ import { ServerForm } from '../../../form';
2
+ export type ItemCommunityComment = {
3
+ name: string;
4
+ author: string;
5
+ time: number;
6
+ content: string;
7
+ actions: ServerForm[];
8
+ };
@@ -0,0 +1,2 @@
1
+ export { ItemCommunityComment } from './comment';
2
+ export { ItemCommunityCommentList } from './list';
@@ -0,0 +1,5 @@
1
+ import { ItemCommunityComment } from './comment';
2
+ export type ItemCommunityCommentList = {
3
+ pageCount: number;
4
+ comments: ItemCommunityComment[];
5
+ };
@@ -0,0 +1,3 @@
1
+ export * from './comment';
2
+ export { ItemCommunityInfo } from './info';
3
+ export { SubmitItemCommunityActionRequest, SubmitItemCommunityActionResponse } from './submit';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./comment"), exports);
@@ -0,0 +1,6 @@
1
+ import { ServerForm } from '../../form';
2
+ import { ItemCommunityComment } from './comment/comment';
3
+ export type ItemCommunityInfo = {
4
+ actions: ServerForm[];
5
+ topComments: ItemCommunityComment[];
6
+ };
@@ -0,0 +1,7 @@
1
+ export type SubmitItemCommunityActionRequest = {
2
+ values: string;
3
+ };
4
+ export type SubmitItemCommunityActionResponse = {
5
+ shouldUpdateCommunity?: boolean;
6
+ shouldNavigateCommentsToPage?: number;
7
+ };
@@ -0,0 +1,8 @@
1
+ export type CreateItemRequest = {
2
+ values: string;
3
+ };
4
+ export type CreateItemResponse = {
5
+ name: string;
6
+ key: string;
7
+ hashes: string[];
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { ItemLeaderboard } from './leaderboard/leaderboard';
2
+ import { ItemSection } from './section';
3
+ export type ItemDetails<T> = {
4
+ item: T;
5
+ description: string;
6
+ hasCommunity: boolean;
7
+ leaderboards: ItemLeaderboard[];
8
+ sections: ItemSection<T>[];
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export * from './community';
2
+ export { CreateItemRequest, CreateItemResponse } from './create';
3
+ export { ItemDetails } from './details';
4
+ export { ItemInfo } from './info';
5
+ export * from './leaderboard';
6
+ export { ItemList } from './list';
7
+ export { ItemSection } from './section';
8
+ export { UploadItemResponse } from './upload';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./community"), exports);
18
+ __exportStar(require("./leaderboard"), exports);
@@ -0,0 +1,9 @@
1
+ import { SRL } from '../../resource/srl';
2
+ import { ServerForm } from '../form';
3
+ import { ItemSection } from './section';
4
+ export type ItemInfo<T> = {
5
+ creates?: ServerForm[];
6
+ searches?: ServerForm[];
7
+ sections: ItemSection<T>[];
8
+ banner?: SRL;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { ItemLeaderboardRecord } from './record';
2
+ export type ItemLeaderboardDetails = {
3
+ topRecords: ItemLeaderboardRecord[];
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export { ItemLeaderboardDetails } from './details';
2
+ export { ItemLeaderboard } from './leaderboard';
3
+ export * from './record';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./record"), exports);
@@ -0,0 +1,5 @@
1
+ import { Text } from '../../../text';
2
+ export type ItemLeaderboard = {
3
+ name: string;
4
+ title: Text | (string & {});
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { ReplayItem } from '../../../../replay';
2
+ export type ItemLeaderboardRecordDetails = {
3
+ replays: ReplayItem[];
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export { ItemLeaderboardRecordDetails } from './details';
2
+ export { ItemLeaderboardRecordList } from './list';
3
+ export { ItemLeaderboardRecord } from './record';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { ItemLeaderboardRecord } from './record';
2
+ export type ItemLeaderboardRecordList = {
3
+ pageCount: number;
4
+ records: ItemLeaderboardRecord[];
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { Text } from '../../../../text';
2
+ export type ItemLeaderboardRecord = {
3
+ name: string;
4
+ rank: Text | (string & {});
5
+ player: string;
6
+ value: Text | (string & {});
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { ServerForm } from '../form';
2
+ export type ItemList<T> = {
3
+ pageCount: number;
4
+ items: T[];
5
+ searches?: ServerForm[];
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { Icon } from '../../icon';
2
+ import { Text } from '../../text';
3
+ export type ItemSection<T> = {
4
+ title: Text | (string & {});
5
+ icon?: Icon | (string & {});
6
+ items: T[];
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type UploadItemResponse = {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,5 @@
1
- import { ServerOptionsSection } from './options-section';
2
1
  export type CreateRoomRequest = {};
3
2
  export type CreateRoomResponse = {
4
3
  name: string;
5
4
  key: string;
6
- creates: ServerOptionsSection[];
7
5
  };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  import { AutoExit } from '../../../auto-exit';
2
- import { ServerOptionsSection } from '../../options-section';
2
+ import { ServerForm } from '../../form';
3
3
  import { LevelLocator } from '../level-locator';
4
4
  import { LevelOptionEntry } from '../level-option-entry';
5
5
  import { ResultEntry } from '../result-entry';
@@ -11,12 +11,12 @@ import { UserStatusEntry } from '../user-status-entry';
11
11
  export type UpdateEvent = {
12
12
  type: 'update';
13
13
  allowOtherServers: boolean;
14
- reportUserOptions: ServerOptionsSection[];
14
+ reportUserOptions: ServerForm[];
15
15
  title: string;
16
16
  status: RoomStatus;
17
17
  master: 'room' | (string & {});
18
18
  lead: 'room' | (string & {});
19
- options: ServerOptionsSection[];
19
+ options: ServerForm[];
20
20
  optionValues: string;
21
21
  level?: LevelLocator;
22
22
  levelOptions: LevelOptionEntry[];
@@ -1,6 +1,6 @@
1
- import { ServerOptionsSection } from '../../options-section';
1
+ import { ServerForm } from '../../form';
2
2
  export type UpdateOptionsEvent = {
3
3
  type: 'updateOptions';
4
- options: ServerOptionsSection[];
4
+ options: ServerForm[];
5
5
  optionValues: string;
6
6
  };
@@ -2,5 +2,5 @@ import { Icon } from '../../../icon';
2
2
  export type UpdateScoreboardSectionIconEvent = {
3
3
  type: 'updateScoreboardSectionIcon';
4
4
  index: number;
5
- icon?: Icon;
5
+ icon?: Icon | (string & {});
6
6
  };
@@ -1,6 +1,8 @@
1
1
  export { ChatMessage, QuickChatMessage, TextChatMessage } from './chat-message';
2
2
  export * from './commands';
3
+ export { CreateRoomRequest, CreateRoomResponse } from './create-room';
3
4
  export * from './events';
5
+ export { JoinRoomRequest, JoinRoomResponse } from './join-room';
4
6
  export { LevelLocator } from './level-locator';
5
7
  export { LevelOptionEntry } from './level-option-entry';
6
8
  export { ResultEntry } from './result-entry';
@@ -1,4 +1,4 @@
1
- import { UserProfile } from '../service/user-profile';
1
+ import { UserProfile } from '../../service/user-profile';
2
2
  export type JoinRoomRequest = {
3
3
  type: 'authenticateMultiplayer';
4
4
  address: string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,6 @@ import { Text } from '../../text';
3
3
  import { ScoreEntry } from './score-entry';
4
4
  export type ScoreboardSection = {
5
5
  title: Text | (string & {});
6
- icon?: Icon;
6
+ icon?: Icon | (string & {});
7
7
  scores: ScoreEntry[];
8
8
  };
@@ -1,14 +1,29 @@
1
+ import { ItemType } from '../item-type';
1
2
  import { Text } from '../text';
2
- export type ServerOption = ServerTextOption | ServerSliderOption | ServerToggleOption | ServerSelectOption | ServerMultiOption;
3
+ export type ServerOption = ServerTextOption | ServerTextAreaOption | ServerSliderOption | ServerToggleOption | ServerSelectOption | ServerMultiOption | ServerServerItemOption | ServerCollectionItemOption | ServerFileOption;
3
4
  export type ServerTextOption = {
4
5
  query: string;
5
6
  name: Text | (string & {});
7
+ description?: string;
8
+ required?: boolean;
6
9
  type: 'text';
7
10
  placeholder: Text | (string & {});
11
+ limit?: number;
12
+ };
13
+ export type ServerTextAreaOption = {
14
+ query: string;
15
+ name: Text | (string & {});
16
+ description?: string;
17
+ required?: boolean;
18
+ type: 'textArea';
19
+ placeholder: Text | (string & {});
20
+ limit?: number;
8
21
  };
9
22
  export type ServerSliderOption = {
10
23
  query: string;
11
24
  name: Text | (string & {});
25
+ description?: string;
26
+ required?: boolean;
12
27
  type: 'slider';
13
28
  def: number;
14
29
  min: number;
@@ -19,12 +34,16 @@ export type ServerSliderOption = {
19
34
  export type ServerToggleOption = {
20
35
  query: string;
21
36
  name: Text | (string & {});
37
+ description?: string;
38
+ required?: boolean;
22
39
  type: 'toggle';
23
40
  def: 0 | 1;
24
41
  };
25
42
  export type ServerSelectOption = {
26
43
  query: string;
27
44
  name: Text | (string & {});
45
+ description?: string;
46
+ required?: boolean;
28
47
  type: 'select';
29
48
  def: number;
30
49
  values: (Text | (string & {}))[];
@@ -32,7 +51,32 @@ export type ServerSelectOption = {
32
51
  export type ServerMultiOption = {
33
52
  query: string;
34
53
  name: Text | (string & {});
54
+ description?: string;
55
+ required?: boolean;
35
56
  type: 'multi';
36
57
  defs: boolean[];
37
58
  values: (Text | (string & {}))[];
38
59
  };
60
+ export type ServerServerItemOption = {
61
+ query: string;
62
+ name: Text | (string & {});
63
+ description?: string;
64
+ required?: boolean;
65
+ type: 'serverItem';
66
+ itemType: ItemType;
67
+ };
68
+ export type ServerCollectionItemOption = {
69
+ query: string;
70
+ name: Text | (string & {});
71
+ description?: string;
72
+ required?: boolean;
73
+ type: 'collectionItem';
74
+ itemType: ItemType;
75
+ };
76
+ export type ServerFileOption = {
77
+ query: string;
78
+ name: Text | (string & {});
79
+ description?: string;
80
+ required?: boolean;
81
+ type: 'file';
82
+ };
@@ -2,5 +2,5 @@ import { Icon } from './icon';
2
2
  import { Text } from './text';
3
3
  export type Tag = {
4
4
  title: Text | (string & {});
5
- icon?: Icon;
5
+ icon?: Icon | (string & {});
6
6
  };
@@ -53,6 +53,14 @@ export declare const Text: {
53
53
  readonly LengthMaximum: "#LENGTH_MAXIMUM";
54
54
  /** en: Additional Information */
55
55
  readonly AdditionalInformation: "#ADDITIONAL_INFORMATION";
56
+ /** en: Content */
57
+ readonly Content: "#CONTENT";
58
+ /** en: Comment */
59
+ readonly Comment: "#COMMENT";
60
+ /** en: Review */
61
+ readonly Review: "#REVIEW";
62
+ /** en: Reply */
63
+ readonly Reply: "#REPLY";
56
64
  /** en: Level Speed */
57
65
  readonly Speed: "#SPEED";
58
66
  /** en: Mirror Level */
@@ -373,6 +381,14 @@ export declare const Text: {
373
381
  readonly LengthMaximumPlaceholder: "#LENGTH_MAXIMUM_PLACEHOLDER";
374
382
  /** en: Enter additional information... */
375
383
  readonly AdditionalInformationPlaceholder: "#ADDITIONAL_INFORMATION_PLACEHOLDER";
384
+ /** en: Enter content... */
385
+ readonly ContentPlaceholder: "#CONTENT_PLACEHOLDER";
386
+ /** en: Enter comment... */
387
+ readonly CommentPlaceholder: "#COMMENT_PLACEHOLDER";
388
+ /** en: Enter review... */
389
+ readonly ReviewPlaceholder: "#REVIEW_PLACEHOLDER";
390
+ /** en: Enter reply... */
391
+ readonly ReplyPlaceholder: "#REPLY_PLACEHOLDER";
376
392
  /** en: {0}% */
377
393
  readonly PercentageUnit: "#PERCENTAGE_UNIT";
378
394
  /** en: {0} s */
@@ -621,5 +637,57 @@ export declare const Text: {
621
637
  readonly TeamWhite: "#TEAM_WHITE";
622
638
  /** en: Team Black */
623
639
  readonly TeamBlack: "#TEAM_BLACK";
640
+ /** en: Like */
641
+ readonly Like: "#LIKE";
642
+ /** en: Liked */
643
+ readonly Liked: "#LIKED";
644
+ /** en: Dislike */
645
+ readonly Dislike: "#DISLIKE";
646
+ /** en: Disliked */
647
+ readonly Disliked: "#DISLIKED";
648
+ /** en: Bookmark */
649
+ readonly Bookmark: "#BOOKMARK";
650
+ /** en: Bookmarked */
651
+ readonly Bookmarked: "#BOOKMARKED";
652
+ /** en: Delete */
653
+ readonly Delete: "#DELETE";
654
+ /** en: Edit */
655
+ readonly Edit: "#EDIT";
656
+ /** en: Confirm */
657
+ readonly Confirm: "#CONFIRM";
658
+ /** en: Cancel */
659
+ readonly Cancel: "#CANCEL";
660
+ /** en: Increase */
661
+ readonly Increase: "#INCREASE";
662
+ /** en: Decrease */
663
+ readonly Decrease: "#DECREASE";
664
+ /** en: Upvote */
665
+ readonly Upvote: "#UPVOTE";
666
+ /** en: Upvoted */
667
+ readonly Upvoted: "#UPVOTED";
668
+ /** en: Downvote */
669
+ readonly Downvote: "#DOWNVOTE";
670
+ /** en: Downvoted */
671
+ readonly Downvoted: "#DOWNVOTED";
672
+ /** en: Agree */
673
+ readonly Agree: "#AGREE";
674
+ /** en: Agreed */
675
+ readonly Agreed: "#AGREED";
676
+ /** en: Disagree */
677
+ readonly Disagree: "#DISAGREE";
678
+ /** en: Disagreed */
679
+ readonly Disagreed: "#DISAGREED";
680
+ /** en: Lock */
681
+ readonly Lock: "#LOCK";
682
+ /** en: Unlock */
683
+ readonly Unlock: "#UNLOCK";
684
+ /** en: Show */
685
+ readonly Show: "#SHOW";
686
+ /** en: Hide */
687
+ readonly Hide: "#HIDE";
688
+ /** en: Star */
689
+ readonly Star: "#STAR";
690
+ /** en: Starred */
691
+ readonly Starred: "#STARRED";
624
692
  };
625
693
  export type Text = (typeof Text)[keyof typeof Text];
@@ -56,6 +56,14 @@ exports.Text = {
56
56
  LengthMaximum: '#LENGTH_MAXIMUM',
57
57
  /** en: Additional Information */
58
58
  AdditionalInformation: '#ADDITIONAL_INFORMATION',
59
+ /** en: Content */
60
+ Content: '#CONTENT',
61
+ /** en: Comment */
62
+ Comment: '#COMMENT',
63
+ /** en: Review */
64
+ Review: '#REVIEW',
65
+ /** en: Reply */
66
+ Reply: '#REPLY',
59
67
  /** en: Level Speed */
60
68
  Speed: '#SPEED',
61
69
  /** en: Mirror Level */
@@ -376,6 +384,14 @@ exports.Text = {
376
384
  LengthMaximumPlaceholder: '#LENGTH_MAXIMUM_PLACEHOLDER',
377
385
  /** en: Enter additional information... */
378
386
  AdditionalInformationPlaceholder: '#ADDITIONAL_INFORMATION_PLACEHOLDER',
387
+ /** en: Enter content... */
388
+ ContentPlaceholder: '#CONTENT_PLACEHOLDER',
389
+ /** en: Enter comment... */
390
+ CommentPlaceholder: '#COMMENT_PLACEHOLDER',
391
+ /** en: Enter review... */
392
+ ReviewPlaceholder: '#REVIEW_PLACEHOLDER',
393
+ /** en: Enter reply... */
394
+ ReplyPlaceholder: '#REPLY_PLACEHOLDER',
379
395
  /** en: {0}% */
380
396
  PercentageUnit: '#PERCENTAGE_UNIT',
381
397
  /** en: {0} s */
@@ -624,4 +640,56 @@ exports.Text = {
624
640
  TeamWhite: '#TEAM_WHITE',
625
641
  /** en: Team Black */
626
642
  TeamBlack: '#TEAM_BLACK',
643
+ /** en: Like */
644
+ Like: '#LIKE',
645
+ /** en: Liked */
646
+ Liked: '#LIKED',
647
+ /** en: Dislike */
648
+ Dislike: '#DISLIKE',
649
+ /** en: Disliked */
650
+ Disliked: '#DISLIKED',
651
+ /** en: Bookmark */
652
+ Bookmark: '#BOOKMARK',
653
+ /** en: Bookmarked */
654
+ Bookmarked: '#BOOKMARKED',
655
+ /** en: Delete */
656
+ Delete: '#DELETE',
657
+ /** en: Edit */
658
+ Edit: '#EDIT',
659
+ /** en: Confirm */
660
+ Confirm: '#CONFIRM',
661
+ /** en: Cancel */
662
+ Cancel: '#CANCEL',
663
+ /** en: Increase */
664
+ Increase: '#INCREASE',
665
+ /** en: Decrease */
666
+ Decrease: '#DECREASE',
667
+ /** en: Upvote */
668
+ Upvote: '#UPVOTE',
669
+ /** en: Upvoted */
670
+ Upvoted: '#UPVOTED',
671
+ /** en: Downvote */
672
+ Downvote: '#DOWNVOTE',
673
+ /** en: Downvoted */
674
+ Downvoted: '#DOWNVOTED',
675
+ /** en: Agree */
676
+ Agree: '#AGREE',
677
+ /** en: Agreed */
678
+ Agreed: '#AGREED',
679
+ /** en: Disagree */
680
+ Disagree: '#DISAGREE',
681
+ /** en: Disagreed */
682
+ Disagreed: '#DISAGREED',
683
+ /** en: Lock */
684
+ Lock: '#LOCK',
685
+ /** en: Unlock */
686
+ Unlock: '#UNLOCK',
687
+ /** en: Show */
688
+ Show: '#SHOW',
689
+ /** en: Hide */
690
+ Hide: '#HIDE',
691
+ /** en: Star */
692
+ Star: '#STAR',
693
+ /** en: Starred */
694
+ Starred: '#STARRED',
627
695
  };
@@ -2,5 +2,5 @@ import { Icon } from '../core/icon';
2
2
  import { LocalizationText } from './localization';
3
3
  export type DatabaseTag = {
4
4
  title: LocalizationText;
5
- icon?: Icon;
5
+ icon?: Icon | (string & {});
6
6
  };
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  exports.version = {
5
- package: '7.5.2',
6
- sonolus: '0.8.1',
5
+ package: '7.7.0',
6
+ sonolus: '0.8.3',
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonolus/core",
3
- "version": "7.5.2",
3
+ "version": "7.7.0",
4
4
  "description": "Core library for Sonolus",
5
5
  "author": "NonSpicyBurrito",
6
6
  "repository": "github:Sonolus/sonolus-core",
@@ -19,12 +19,12 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@eslint/js": "^8.57.0",
22
- "@types/node": "~20.12.7",
22
+ "@types/node": "~20.14.2",
23
23
  "eslint": "^8.57.0",
24
24
  "eslint-config-prettier": "^9.1.0",
25
- "prettier": "^3.2.5",
25
+ "prettier": "^3.3.2",
26
26
  "prettier-plugin-organize-imports": "^3.2.4",
27
- "typescript": "~5.4.4",
28
- "typescript-eslint": "^7.6.0"
27
+ "typescript": "~5.4.5",
28
+ "typescript-eslint": "^7.13.0"
29
29
  }
30
30
  }
@@ -1,6 +0,0 @@
1
- import { ItemSection } from './item-section';
2
- export type ItemDetails<T> = {
3
- item: T;
4
- description: string;
5
- sections: ItemSection<T>[];
6
- };
@@ -1,8 +0,0 @@
1
- import { SRL } from '../resource/srl';
2
- import { ItemSection } from './item-section';
3
- import { ServerOptionsSection } from './options-section';
4
- export type ItemInfo<T> = {
5
- searches?: ServerOptionsSection[];
6
- sections: ItemSection<T>[];
7
- banner?: SRL;
8
- };
@@ -1,6 +0,0 @@
1
- import { ServerOptionsSection } from './options-section';
2
- export type ItemList<T> = {
3
- pageCount: number;
4
- items: T[];
5
- searches?: ServerOptionsSection[];
6
- };
@@ -1,7 +0,0 @@
1
- import { Icon } from '../icon';
2
- import { Text } from '../text';
3
- export type ItemSection<T> = {
4
- title: Text | (string & {});
5
- icon?: Icon;
6
- items: T[];
7
- };
@@ -1,8 +0,0 @@
1
- import { SRL } from '../resource/srl';
2
- export type ServerInfo = {
3
- title: string;
4
- description?: string;
5
- hasAuthentication: boolean;
6
- hasMultiplayer: boolean;
7
- banner?: SRL;
8
- };