@sonolus/core 7.5.1 → 7.6.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 (27) hide show
  1. package/dist/common/core/icon.d.ts +32 -0
  2. package/dist/common/core/icon.js +32 -0
  3. package/dist/common/core/server/community/comment-list.d.ts +5 -0
  4. package/dist/common/core/server/community/comment.d.ts +7 -0
  5. package/dist/common/core/server/community/comment.js +2 -0
  6. package/dist/common/core/server/community/community.d.ts +6 -0
  7. package/dist/common/core/server/community/community.js +2 -0
  8. package/dist/common/core/server/community/index.d.ts +4 -0
  9. package/dist/common/core/server/community/index.js +2 -0
  10. package/dist/common/core/server/community/submit.d.ts +7 -0
  11. package/dist/common/core/server/community/submit.js +2 -0
  12. package/dist/common/core/server/create-room.d.ts +2 -2
  13. package/dist/common/core/server/{options-section.d.ts → form.d.ts} +1 -1
  14. package/dist/common/core/server/form.js +2 -0
  15. package/dist/common/core/server/index.d.ts +3 -2
  16. package/dist/common/core/server/index.js +1 -0
  17. package/dist/common/core/server/item-details.d.ts +1 -0
  18. package/dist/common/core/server/item-info.d.ts +2 -2
  19. package/dist/common/core/server/item-list.d.ts +2 -2
  20. package/dist/common/core/server/multiplayer/events/update-event.d.ts +3 -3
  21. package/dist/common/core/server/multiplayer/events/update-options-event.d.ts +2 -2
  22. package/dist/common/core/server/option.d.ts +9 -1
  23. package/dist/common/core/text.d.ts +68 -0
  24. package/dist/common/core/text.js +68 -0
  25. package/dist/common/version.js +2 -2
  26. package/package.json +1 -1
  27. /package/dist/common/core/server/{options-section.js → community/comment-list.js} +0 -0
@@ -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
  };
@@ -0,0 +1,5 @@
1
+ import { ItemCommunityComment } from './comment';
2
+ export type ItemCommunityCommentList = {
3
+ pageCount: number;
4
+ comments: ItemCommunityComment[];
5
+ };
@@ -0,0 +1,7 @@
1
+ import { ServerForm } from '../form';
2
+ export type ItemCommunityComment = {
3
+ author: string;
4
+ time: number;
5
+ content: string;
6
+ actions: ServerForm[];
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
+ import { ItemCommunityComment } from './comment';
3
+ export type ItemCommunity = {
4
+ actions: ServerForm[];
5
+ topComments: ItemCommunityComment[];
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export { ItemCommunityComment } from './comment';
2
+ export { ItemCommunityCommentList } from './comment-list';
3
+ export { ItemCommunity } from './community';
4
+ export { SubmitItemCommunityActionRequest, SubmitItemCommunityActionResponse } from './submit';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
- import { ServerOptionsSection } from './options-section';
1
+ import { ServerForm } from './form';
2
2
  export type CreateRoomRequest = {};
3
3
  export type CreateRoomResponse = {
4
4
  name: string;
5
5
  key: string;
6
- creates: ServerOptionsSection[];
6
+ creates: ServerForm[];
7
7
  };
@@ -1,7 +1,7 @@
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
7
  icon?: Icon;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,12 @@
1
1
  export { AuthenticateServerRequest, AuthenticateServerResponse } from './authenticate';
2
+ export * from './community';
2
3
  export { CreateRoomRequest, CreateRoomResponse } from './create-room';
4
+ export { ServerForm } from './form';
3
5
  export { ItemDetails } from './item-details';
4
6
  export { ItemInfo } from './item-info';
5
7
  export { ItemList } from './item-list';
6
8
  export { ItemSection } from './item-section';
7
9
  export { JoinRoomRequest, JoinRoomResponse } from './join-room';
8
10
  export * from './multiplayer';
9
- export { ServerMultiOption, ServerOption, ServerSelectOption, ServerSliderOption, ServerTextOption, ServerToggleOption, } from './option';
10
- export { ServerOptionsSection } from './options-section';
11
+ export { ServerMultiOption, ServerOption, ServerSelectOption, ServerSliderOption, ServerTextAreaOption, ServerTextOption, ServerToggleOption, } from './option';
11
12
  export { ServerInfo } from './server-info';
@@ -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("./community"), exports);
17
18
  __exportStar(require("./multiplayer"), exports);
@@ -2,5 +2,6 @@ import { ItemSection } from './item-section';
2
2
  export type ItemDetails<T> = {
3
3
  item: T;
4
4
  description: string;
5
+ hasCommunity: boolean;
5
6
  sections: ItemSection<T>[];
6
7
  };
@@ -1,8 +1,8 @@
1
1
  import { SRL } from '../resource/srl';
2
+ import { ServerForm } from './form';
2
3
  import { ItemSection } from './item-section';
3
- import { ServerOptionsSection } from './options-section';
4
4
  export type ItemInfo<T> = {
5
- searches?: ServerOptionsSection[];
5
+ searches?: ServerForm[];
6
6
  sections: ItemSection<T>[];
7
7
  banner?: SRL;
8
8
  };
@@ -1,6 +1,6 @@
1
- import { ServerOptionsSection } from './options-section';
1
+ import { ServerForm } from './form';
2
2
  export type ItemList<T> = {
3
3
  pageCount: number;
4
4
  items: T[];
5
- searches?: ServerOptionsSection[];
5
+ searches?: ServerForm[];
6
6
  };
@@ -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
  };
@@ -1,10 +1,18 @@
1
1
  import { Text } from '../text';
2
- export type ServerOption = ServerTextOption | ServerSliderOption | ServerToggleOption | ServerSelectOption | ServerMultiOption;
2
+ export type ServerOption = ServerTextOption | ServerTextAreaOption | ServerSliderOption | ServerToggleOption | ServerSelectOption | ServerMultiOption;
3
3
  export type ServerTextOption = {
4
4
  query: string;
5
5
  name: Text | (string & {});
6
6
  type: 'text';
7
7
  placeholder: Text | (string & {});
8
+ limit?: number;
9
+ };
10
+ export type ServerTextAreaOption = {
11
+ query: string;
12
+ name: Text | (string & {});
13
+ type: 'textArea';
14
+ placeholder: Text | (string & {});
15
+ limit?: number;
8
16
  };
9
17
  export type ServerSliderOption = {
10
18
  query: string;
@@ -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,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.1',
6
- sonolus: '0.8.0',
5
+ package: '7.6.0',
6
+ sonolus: '0.8.2',
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonolus/core",
3
- "version": "7.5.1",
3
+ "version": "7.6.0",
4
4
  "description": "Core library for Sonolus",
5
5
  "author": "NonSpicyBurrito",
6
6
  "repository": "github:Sonolus/sonolus-core",