@growi/core 1.0.0-next.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 (207) hide show
  1. package/dist/consts/accepted-upload-file-type.cjs +2 -0
  2. package/dist/consts/accepted-upload-file-type.cjs.map +1 -0
  3. package/dist/consts/accepted-upload-file-type.d.ts +6 -0
  4. package/dist/consts/accepted-upload-file-type.js +9 -0
  5. package/dist/consts/accepted-upload-file-type.js.map +1 -0
  6. package/dist/consts/growi-plugin.cjs +2 -0
  7. package/dist/consts/growi-plugin.cjs.map +1 -0
  8. package/dist/consts/growi-plugin.d.ts +7 -0
  9. package/dist/consts/growi-plugin.js +10 -0
  10. package/dist/consts/growi-plugin.js.map +1 -0
  11. package/dist/consts/index.cjs +2 -0
  12. package/dist/consts/index.cjs.map +1 -0
  13. package/dist/consts/index.d.ts +2 -0
  14. package/dist/consts/index.js +7 -0
  15. package/dist/consts/index.js.map +1 -0
  16. package/dist/index.cjs +2 -0
  17. package/dist/index.cjs.map +1 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +36 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/interfaces/attachment.cjs +2 -0
  22. package/dist/interfaces/attachment.cjs.map +1 -0
  23. package/dist/interfaces/attachment.d.ts +19 -0
  24. package/dist/interfaces/attachment.js +2 -0
  25. package/dist/interfaces/attachment.js.map +1 -0
  26. package/dist/interfaces/color-scheme.cjs +2 -0
  27. package/dist/interfaces/color-scheme.cjs.map +1 -0
  28. package/dist/interfaces/color-scheme.d.ts +5 -0
  29. package/dist/interfaces/color-scheme.js +8 -0
  30. package/dist/interfaces/color-scheme.js.map +1 -0
  31. package/dist/interfaces/common.cjs +2 -0
  32. package/dist/interfaces/common.cjs.map +1 -0
  33. package/dist/interfaces/common.d.ts +6 -0
  34. package/dist/interfaces/common.js +6 -0
  35. package/dist/interfaces/common.js.map +1 -0
  36. package/dist/interfaces/external-account.cjs +2 -0
  37. package/dist/interfaces/external-account.cjs.map +1 -0
  38. package/dist/interfaces/external-account.d.ts +19 -0
  39. package/dist/interfaces/external-account.js +12 -0
  40. package/dist/interfaces/external-account.js.map +1 -0
  41. package/dist/interfaces/growi-facade.cjs +2 -0
  42. package/dist/interfaces/growi-facade.cjs.map +1 -0
  43. package/dist/interfaces/growi-facade.d.ts +11 -0
  44. package/dist/interfaces/growi-facade.js +2 -0
  45. package/dist/interfaces/growi-facade.js.map +1 -0
  46. package/dist/interfaces/growi-theme-metadata.cjs +2 -0
  47. package/dist/interfaces/growi-theme-metadata.cjs.map +1 -0
  48. package/dist/interfaces/growi-theme-metadata.d.ts +19 -0
  49. package/dist/interfaces/growi-theme-metadata.js +9 -0
  50. package/dist/interfaces/growi-theme-metadata.js.map +1 -0
  51. package/dist/interfaces/has-object-id.cjs +2 -0
  52. package/dist/interfaces/has-object-id.cjs.map +1 -0
  53. package/dist/interfaces/has-object-id.d.ts +3 -0
  54. package/dist/interfaces/has-object-id.js +2 -0
  55. package/dist/interfaces/has-object-id.js.map +1 -0
  56. package/dist/interfaces/index.cjs +2 -0
  57. package/dist/interfaces/index.cjs.map +1 -0
  58. package/dist/interfaces/index.d.ts +16 -0
  59. package/dist/interfaces/index.js +32 -0
  60. package/dist/interfaces/index.js.map +1 -0
  61. package/dist/interfaces/lang.cjs +2 -0
  62. package/dist/interfaces/lang.cjs.map +1 -0
  63. package/dist/interfaces/lang.d.ts +8 -0
  64. package/dist/interfaces/lang.js +11 -0
  65. package/dist/interfaces/lang.js.map +1 -0
  66. package/dist/interfaces/page.cjs +2 -0
  67. package/dist/interfaces/page.cjs.map +1 -0
  68. package/dist/interfaces/page.d.ts +113 -0
  69. package/dist/interfaces/page.js +20 -0
  70. package/dist/interfaces/page.js.map +1 -0
  71. package/dist/interfaces/revision.cjs +2 -0
  72. package/dist/interfaces/revision.cjs.map +1 -0
  73. package/dist/interfaces/revision.d.ts +36 -0
  74. package/dist/interfaces/revision.js +9 -0
  75. package/dist/interfaces/revision.js.map +1 -0
  76. package/dist/interfaces/subscription.cjs +2 -0
  77. package/dist/interfaces/subscription.cjs.map +1 -0
  78. package/dist/interfaces/subscription.d.ts +19 -0
  79. package/dist/interfaces/subscription.js +9 -0
  80. package/dist/interfaces/subscription.js.map +1 -0
  81. package/dist/interfaces/tag.cjs +2 -0
  82. package/dist/interfaces/tag.cjs.map +1 -0
  83. package/dist/interfaces/tag.d.ts +4 -0
  84. package/dist/interfaces/tag.js +2 -0
  85. package/dist/interfaces/tag.js.map +1 -0
  86. package/dist/interfaces/user.cjs +2 -0
  87. package/dist/interfaces/user.cjs.map +1 -0
  88. package/dist/interfaces/user.d.ts +57 -0
  89. package/dist/interfaces/user.js +11 -0
  90. package/dist/interfaces/user.js.map +1 -0
  91. package/dist/interfaces/vite.cjs +2 -0
  92. package/dist/interfaces/vite.cjs.map +1 -0
  93. package/dist/interfaces/vite.d.ts +9 -0
  94. package/dist/interfaces/vite.js +2 -0
  95. package/dist/interfaces/vite.js.map +1 -0
  96. package/dist/interfaces/websocket.cjs +2 -0
  97. package/dist/interfaces/websocket.cjs.map +1 -0
  98. package/dist/interfaces/websocket.d.ts +5 -0
  99. package/dist/interfaces/websocket.js +9 -0
  100. package/dist/interfaces/websocket.js.map +1 -0
  101. package/dist/models/devided-page-path.cjs +2 -0
  102. package/dist/models/devided-page-path.cjs.map +1 -0
  103. package/dist/models/devided-page-path.d.ts +7 -0
  104. package/dist/models/devided-page-path.js +29 -0
  105. package/dist/models/devided-page-path.js.map +1 -0
  106. package/dist/models/index.cjs +2 -0
  107. package/dist/models/index.cjs.map +1 -0
  108. package/dist/models/index.d.ts +2 -0
  109. package/dist/models/index.js +7 -0
  110. package/dist/models/index.js.map +1 -0
  111. package/dist/models/vo/error-apiv3.cjs +2 -0
  112. package/dist/models/vo/error-apiv3.cjs.map +1 -0
  113. package/dist/models/vo/error-apiv3.d.ts +5 -0
  114. package/dist/models/vo/error-apiv3.js +9 -0
  115. package/dist/models/vo/error-apiv3.js.map +1 -0
  116. package/dist/remark-plugins/index.cjs +2 -0
  117. package/dist/remark-plugins/index.cjs.map +1 -0
  118. package/dist/remark-plugins/index.d.ts +2 -0
  119. package/dist/remark-plugins/index.js +5 -0
  120. package/dist/remark-plugins/index.js.map +1 -0
  121. package/dist/remark-plugins/interfaces/option-parser.cjs +2 -0
  122. package/dist/remark-plugins/interfaces/option-parser.cjs.map +1 -0
  123. package/dist/remark-plugins/interfaces/option-parser.d.ts +4 -0
  124. package/dist/remark-plugins/interfaces/option-parser.js +2 -0
  125. package/dist/remark-plugins/interfaces/option-parser.js.map +1 -0
  126. package/dist/remark-plugins/util/option-parser.cjs +2 -0
  127. package/dist/remark-plugins/util/option-parser.cjs.map +1 -0
  128. package/dist/remark-plugins/util/option-parser.d.ts +26 -0
  129. package/dist/remark-plugins/util/option-parser.js +39 -0
  130. package/dist/remark-plugins/util/option-parser.js.map +1 -0
  131. package/dist/remark-plugins/util/option-parser.spec.d.ts +1 -0
  132. package/dist/swr/index.cjs +2 -0
  133. package/dist/swr/index.cjs.map +1 -0
  134. package/dist/swr/index.d.ts +3 -0
  135. package/dist/swr/index.js +11 -0
  136. package/dist/swr/index.js.map +1 -0
  137. package/dist/swr/use-global-socket.cjs +2 -0
  138. package/dist/swr/use-global-socket.cjs.map +1 -0
  139. package/dist/swr/use-global-socket.d.ts +6 -0
  140. package/dist/swr/use-global-socket.js +8 -0
  141. package/dist/swr/use-global-socket.js.map +1 -0
  142. package/dist/swr/use-swr-static.cjs +2 -0
  143. package/dist/swr/use-swr-static.cjs.map +1 -0
  144. package/dist/swr/use-swr-static.d.ts +5 -0
  145. package/dist/swr/use-swr-static.js +17 -0
  146. package/dist/swr/use-swr-static.js.map +1 -0
  147. package/dist/swr/with-utils.cjs +2 -0
  148. package/dist/swr/with-utils.cjs.map +1 -0
  149. package/dist/swr/with-utils.d.ts +4 -0
  150. package/dist/swr/with-utils.js +5 -0
  151. package/dist/swr/with-utils.js.map +1 -0
  152. package/dist/utils/browser-utils.cjs +2 -0
  153. package/dist/utils/browser-utils.cjs.map +1 -0
  154. package/dist/utils/browser-utils.d.ts +2 -0
  155. package/dist/utils/browser-utils.js +6 -0
  156. package/dist/utils/browser-utils.js.map +1 -0
  157. package/dist/utils/env-utils.cjs +2 -0
  158. package/dist/utils/env-utils.cjs.map +1 -0
  159. package/dist/utils/env-utils.d.ts +5 -0
  160. package/dist/utils/env-utils.js +7 -0
  161. package/dist/utils/env-utils.js.map +1 -0
  162. package/dist/utils/env-utils.spec.d.ts +1 -0
  163. package/dist/utils/growi-theme-metadata.cjs +2 -0
  164. package/dist/utils/growi-theme-metadata.cjs.map +1 -0
  165. package/dist/utils/growi-theme-metadata.d.ts +4 -0
  166. package/dist/utils/growi-theme-metadata.js +6 -0
  167. package/dist/utils/growi-theme-metadata.js.map +1 -0
  168. package/dist/utils/index.cjs +2 -0
  169. package/dist/utils/index.cjs.map +1 -0
  170. package/dist/utils/index.d.ts +9 -0
  171. package/dist/utils/index.js +21 -0
  172. package/dist/utils/index.js.map +1 -0
  173. package/dist/utils/objectid-utils.cjs +2 -0
  174. package/dist/utils/objectid-utils.cjs.map +1 -0
  175. package/dist/utils/objectid-utils.d.ts +3 -0
  176. package/dist/utils/objectid-utils.js +8 -0
  177. package/dist/utils/objectid-utils.js.map +1 -0
  178. package/dist/utils/objectid-utils.spec.d.ts +1 -0
  179. package/dist/utils/page-path-utils/index.cjs +2 -0
  180. package/dist/utils/page-path-utils/index.cjs.map +1 -0
  181. package/dist/utils/page-path-utils/index.d.ts +125 -0
  182. package/dist/utils/page-path-utils/index.js +91 -0
  183. package/dist/utils/page-path-utils/index.js.map +1 -0
  184. package/dist/utils/page-path-utils/index.spec.d.ts +1 -0
  185. package/dist/utils/page-path-utils/is-top-page.cjs +2 -0
  186. package/dist/utils/page-path-utils/is-top-page.cjs.map +1 -0
  187. package/dist/utils/page-path-utils/is-top-page.d.ts +5 -0
  188. package/dist/utils/page-path-utils/is-top-page.js +5 -0
  189. package/dist/utils/page-path-utils/is-top-page.js.map +1 -0
  190. package/dist/utils/page-path-utils/is-top-page.spec.d.ts +1 -0
  191. package/dist/utils/page-utils.cjs +2 -0
  192. package/dist/utils/page-utils.cjs.map +1 -0
  193. package/dist/utils/page-utils.d.ts +18 -0
  194. package/dist/utils/page-utils.js +13 -0
  195. package/dist/utils/page-utils.js.map +1 -0
  196. package/dist/utils/path-utils.cjs +2 -0
  197. package/dist/utils/path-utils.cjs.map +1 -0
  198. package/dist/utils/path-utils.d.ts +66 -0
  199. package/dist/utils/path-utils.js +45 -0
  200. package/dist/utils/path-utils.js.map +1 -0
  201. package/dist/utils/path-utils.spec.d.ts +1 -0
  202. package/dist/utils/template-checker.cjs +2 -0
  203. package/dist/utils/template-checker.cjs.map +1 -0
  204. package/dist/utils/template-checker.d.ts +4 -0
  205. package/dist/utils/template-checker.js +7 -0
  206. package/dist/utils/template-checker.js.map +1 -0
  207. package/package.json +75 -0
@@ -0,0 +1,20 @@
1
+ const s = { userGroup: "UserGroup", externalUserGroup: "ExternalUserGroup" }, n = {
2
+ GRANT_PUBLIC: 1,
3
+ GRANT_RESTRICTED: 2,
4
+ GRANT_SPECIFIED: 3,
5
+ // DEPRECATED
6
+ GRANT_OWNER: 4,
7
+ GRANT_USER_GROUP: 5
8
+ }, e = {
9
+ STATUS_PUBLISHED: "published",
10
+ STATUS_DELETED: "deleted"
11
+ }, t = (r) => r != null, i = (r) => r != null && t(r) && ("isBookmarked" in r || "isLiked" in r || "subscriptionStatus" in r), o = (r) => r != null && t(r) && "revisionShortBody" in r;
12
+ export {
13
+ s as GroupType,
14
+ n as PageGrant,
15
+ e as PageStatus,
16
+ t as isIPageInfoForEntity,
17
+ o as isIPageInfoForListing,
18
+ i as isIPageInfoForOperation
19
+ };
20
+ //# sourceMappingURL=page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.js","sources":["../../src/interfaces/page.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IRevision, HasRevisionShortbody, IRevisionHasId } from './revision';\nimport type { SubscriptionStatusType } from './subscription';\nimport type { ITag } from './tag';\nimport type {\n IUser, IUserGroup, IUserGroupHasId, IUserHasId,\n} from './user';\n\nexport const GroupType = { userGroup: 'UserGroup', externalUserGroup: 'ExternalUserGroup' } as const;\nexport type GroupType = typeof GroupType[keyof typeof GroupType];\n\nexport type IGrantedGroup = {\n type: GroupType,\n item: Ref<IUserGroup>,\n}\n\nexport type IPage = {\n path: string,\n status: string,\n revision?: Ref<IRevision>,\n tags: Ref<ITag>[],\n creator?: Ref<IUser>,\n createdAt: Date,\n updatedAt: Date,\n seenUsers: Ref<IUser>[],\n parent: Ref<IPage> | null,\n descendantCount: number,\n isEmpty: boolean,\n grant: PageGrant,\n grantedUsers: Ref<IUser>[],\n grantedGroups: IGrantedGroup[],\n lastUpdateUser?: Ref<IUser>,\n liker: Ref<IUser>[],\n commentCount: number\n slackChannels: string,\n deleteUser: Ref<IUser>,\n deletedAt: Date,\n latestRevision?: Ref<IRevision>,\n latestRevisionBodyLength?: number,\n expandContentWidth?: boolean,\n wip?: boolean,\n ttlTimestamp?: Date\n}\n\nexport type IPagePopulatedToShowRevision = Omit<IPageHasId, 'lastUpdateUser'|'creator'|'deleteUser'|'grantedGroups'|'revision'|'author'> & {\n lastUpdateUser?: IUserHasId,\n creator?: IUserHasId,\n deleteUser: IUserHasId,\n grantedGroups: { type: GroupType, item: IUserGroupHasId }[],\n revision?: IRevisionHasId,\n author: IUserHasId,\n}\n\nexport const PageGrant = {\n GRANT_PUBLIC: 1,\n GRANT_RESTRICTED: 2,\n GRANT_SPECIFIED: 3, // DEPRECATED\n GRANT_OWNER: 4,\n GRANT_USER_GROUP: 5,\n} as const;\ntype UnionPageGrantKeys = keyof typeof PageGrant;\nexport type PageGrant = typeof PageGrant[UnionPageGrantKeys];\n\nexport const PageStatus = {\n STATUS_PUBLISHED: 'published',\n STATUS_DELETED: 'deleted',\n} as const;\nexport type PageStatus = typeof PageStatus[keyof typeof PageStatus];\n\nexport type IPageHasId = IPage & HasObjectId;\n\nexport type IPageInfo = {\n isV5Compatible: boolean,\n isEmpty: boolean,\n isMovable: boolean,\n isDeletable: boolean,\n isAbleToDeleteCompletely: boolean,\n isRevertible: boolean,\n}\n\nexport type IPageInfoForEntity = IPageInfo & {\n bookmarkCount: number,\n sumOfLikers: number,\n likerIds: string[],\n sumOfSeenUsers: number,\n seenUserIds: string[],\n contentAge: number,\n descendantCount: number,\n commentCount: number,\n}\n\nexport type IPageInfoForOperation = IPageInfoForEntity & {\n isBookmarked?: boolean,\n isLiked?: boolean,\n subscriptionStatus?: SubscriptionStatusType,\n}\n\nexport type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody;\n\nexport type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForEntity = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {\n return pageInfo != null;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForOperation = (pageInfo: any | undefined): pageInfo is IPageInfoForOperation => {\n return pageInfo != null\n && isIPageInfoForEntity(pageInfo)\n && ('isBookmarked' in pageInfo || 'isLiked' in pageInfo || 'subscriptionStatus' in pageInfo);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForListing = (pageInfo: any | undefined): pageInfo is IPageInfoForListing => {\n return pageInfo != null\n && isIPageInfoForEntity(pageInfo)\n && 'revisionShortBody' in pageInfo;\n};\n\n// export type IPageInfoTypeResolver<T extends IPageInfo> =\n// T extends HasRevisionShortbody ? IPageInfoForListing :\n// T extends { isBookmarked?: boolean } | { isLiked?: boolean } | { subscriptionStatus?: SubscriptionStatusType } ? IPageInfoForOperation :\n// T extends { bookmarkCount: number } ? IPageInfoForEntity :\n// T extends { isEmpty: number } ? IPageInfo :\n// T;\n\n/**\n * Union Distribution\n * @param pageInfo\n * @returns\n */\n// export const resolvePageInfo = <T extends IPageInfo>(pageInfo: T | undefined): IPageInfoTypeResolver<T> => {\n// return <IPageInfoTypeResolver<T>>pageInfo;\n// };\n\nexport type IDataWithMeta<D = unknown, M = unknown> = {\n data: D,\n meta?: M,\n}\n\nexport type IPageWithMeta<M = IPageInfoAll> = IDataWithMeta<IPageHasId, M>;\n\nexport type IPageToDeleteWithMeta<T = IPageInfoForEntity | unknown> = IDataWithMeta<HasObjectId & (IPage | { path: string, revision: string | null}), T>;\nexport type IPageToRenameWithMeta<T = IPageInfoForEntity | unknown> = IPageToDeleteWithMeta<T>;\n"],"names":["GroupType","PageGrant","PageStatus","isIPageInfoForEntity","pageInfo","isIPageInfoForOperation","isIPageInfoForListing"],"mappings":"AASO,MAAMA,IAAY,EAAE,WAAW,aAAa,mBAAmB,oBAAoB,GA6C7EC,IAAY;AAAA,EACvB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,iBAAiB;AAAA;AAAA,EACjB,aAAa;AAAA,EACb,kBAAkB;AACpB,GAIaC,IAAa;AAAA,EACxB,kBAAkB;AAAA,EAClB,gBAAgB;AAClB,GAoCaC,IAAuB,CAACC,MAC5BA,KAAY,MAIRC,IAA0B,CAACD,MAC/BA,KAAY,QACdD,EAAqBC,CAAQ,MAC5B,kBAAkBA,KAAY,aAAaA,KAAY,wBAAwBA,IAI1EE,IAAwB,CAACF,MAC7BA,KAAY,QACdD,EAAqBC,CAAQ,KAC7B,uBAAuBA;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i={View:"view",Editor:"editor"},e=Object.values(i);exports.Origin=i;exports.allOrigin=e;
2
+ //# sourceMappingURL=revision.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision.cjs","sources":["../../src/interfaces/revision.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IUser } from './user';\n\nexport const Origin = {\n View: 'view',\n Editor: 'editor',\n} as const;\n\nexport type Origin = typeof Origin[keyof typeof Origin];\n\nexport const allOrigin = Object.values(Origin);\n\nexport type IRevision = {\n body: string,\n author: Ref<IUser>,\n hasDiffToPrev: boolean;\n createdAt: Date,\n updatedAt: Date,\n origin?: Origin,\n}\n\nexport type IRevisionHasId = IRevision & HasObjectId;\n\ntype HasPageId = {\n pageId: string,\n};\n\nexport type IRevisionHasPageId = IRevisionHasId & HasPageId;\n\nexport type IRevisionsForPagination = {\n revisions: IRevisionHasPageId[], // revisions in one pagination\n totalCounts: number // total counts\n}\nexport type HasRevisionShortbody = {\n revisionShortBody?: string,\n}\n\nexport type SWRInfinitePageRevisionsResponse = {\n revisions: IRevisionHasPageId[],\n totalCount: number,\n offset: number,\n}\n"],"names":["Origin","allOrigin"],"mappings":"gFAIO,MAAMA,EAAS,CACpB,KAAM,OACN,OAAQ,QACV,EAIaC,EAAY,OAAO,OAAOD,CAAM"}
@@ -0,0 +1,36 @@
1
+ import { IUser } from './user';
2
+ import { HasObjectId } from './has-object-id';
3
+ import { Ref } from './common';
4
+
5
+ export declare const Origin: {
6
+ readonly View: "view";
7
+ readonly Editor: "editor";
8
+ };
9
+ export type Origin = typeof Origin[keyof typeof Origin];
10
+ export declare const allOrigin: ("view" | "editor")[];
11
+ export type IRevision = {
12
+ body: string;
13
+ author: Ref<IUser>;
14
+ hasDiffToPrev: boolean;
15
+ createdAt: Date;
16
+ updatedAt: Date;
17
+ origin?: Origin;
18
+ };
19
+ export type IRevisionHasId = IRevision & HasObjectId;
20
+ type HasPageId = {
21
+ pageId: string;
22
+ };
23
+ export type IRevisionHasPageId = IRevisionHasId & HasPageId;
24
+ export type IRevisionsForPagination = {
25
+ revisions: IRevisionHasPageId[];
26
+ totalCounts: number;
27
+ };
28
+ export type HasRevisionShortbody = {
29
+ revisionShortBody?: string;
30
+ };
31
+ export type SWRInfinitePageRevisionsResponse = {
32
+ revisions: IRevisionHasPageId[];
33
+ totalCount: number;
34
+ offset: number;
35
+ };
36
+ export {};
@@ -0,0 +1,9 @@
1
+ const i = {
2
+ View: "view",
3
+ Editor: "editor"
4
+ }, e = Object.values(i);
5
+ export {
6
+ i as Origin,
7
+ e as allOrigin
8
+ };
9
+ //# sourceMappingURL=revision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision.js","sources":["../../src/interfaces/revision.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IUser } from './user';\n\nexport const Origin = {\n View: 'view',\n Editor: 'editor',\n} as const;\n\nexport type Origin = typeof Origin[keyof typeof Origin];\n\nexport const allOrigin = Object.values(Origin);\n\nexport type IRevision = {\n body: string,\n author: Ref<IUser>,\n hasDiffToPrev: boolean;\n createdAt: Date,\n updatedAt: Date,\n origin?: Origin,\n}\n\nexport type IRevisionHasId = IRevision & HasObjectId;\n\ntype HasPageId = {\n pageId: string,\n};\n\nexport type IRevisionHasPageId = IRevisionHasId & HasPageId;\n\nexport type IRevisionsForPagination = {\n revisions: IRevisionHasPageId[], // revisions in one pagination\n totalCounts: number // total counts\n}\nexport type HasRevisionShortbody = {\n revisionShortBody?: string,\n}\n\nexport type SWRInfinitePageRevisionsResponse = {\n revisions: IRevisionHasPageId[],\n totalCount: number,\n offset: number,\n}\n"],"names":["Origin","allOrigin"],"mappings":"AAIO,MAAMA,IAAS;AAAA,EACpB,MAAM;AAAA,EACN,QAAQ;AACV,GAIaC,IAAY,OAAO,OAAOD,CAAM;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={SUBSCRIBE:"SUBSCRIBE",UNSUBSCRIBE:"UNSUBSCRIBE"},S=Object.values(t);exports.AllSubscriptionStatusType=S;exports.SubscriptionStatusType=t;
2
+ //# sourceMappingURL=subscription.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.cjs","sources":["../../src/interfaces/subscription.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { IPage } from './page';\nimport type { IUser } from './user';\n\nexport const SubscriptionStatusType = {\n SUBSCRIBE: 'SUBSCRIBE',\n UNSUBSCRIBE: 'UNSUBSCRIBE',\n} as const;\nexport const AllSubscriptionStatusType = Object.values(SubscriptionStatusType);\nexport type SubscriptionStatusType = typeof SubscriptionStatusType[keyof typeof SubscriptionStatusType];\n\nexport interface ISubscription {\n user: Ref<IUser>\n targetModel: string\n target: Ref<IPage>\n status: string\n createdAt: Date\n\n isSubscribing(): boolean\n isUnsubscribing(): boolean\n}\n"],"names":["SubscriptionStatusType","AllSubscriptionStatusType"],"mappings":"gFAIO,MAAMA,EAAyB,CACpC,UAAW,YACX,YAAa,aACf,EACaC,EAA4B,OAAO,OAAOD,CAAsB"}
@@ -0,0 +1,19 @@
1
+ import { IUser } from './user';
2
+ import { IPage } from './page';
3
+ import { Ref } from './common';
4
+
5
+ export declare const SubscriptionStatusType: {
6
+ readonly SUBSCRIBE: "SUBSCRIBE";
7
+ readonly UNSUBSCRIBE: "UNSUBSCRIBE";
8
+ };
9
+ export declare const AllSubscriptionStatusType: ("SUBSCRIBE" | "UNSUBSCRIBE")[];
10
+ export type SubscriptionStatusType = typeof SubscriptionStatusType[keyof typeof SubscriptionStatusType];
11
+ export interface ISubscription {
12
+ user: Ref<IUser>;
13
+ targetModel: string;
14
+ target: Ref<IPage>;
15
+ status: string;
16
+ createdAt: Date;
17
+ isSubscribing(): boolean;
18
+ isUnsubscribing(): boolean;
19
+ }
@@ -0,0 +1,9 @@
1
+ const S = {
2
+ SUBSCRIBE: "SUBSCRIBE",
3
+ UNSUBSCRIBE: "UNSUBSCRIBE"
4
+ }, t = Object.values(S);
5
+ export {
6
+ t as AllSubscriptionStatusType,
7
+ S as SubscriptionStatusType
8
+ };
9
+ //# sourceMappingURL=subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.js","sources":["../../src/interfaces/subscription.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { IPage } from './page';\nimport type { IUser } from './user';\n\nexport const SubscriptionStatusType = {\n SUBSCRIBE: 'SUBSCRIBE',\n UNSUBSCRIBE: 'UNSUBSCRIBE',\n} as const;\nexport const AllSubscriptionStatusType = Object.values(SubscriptionStatusType);\nexport type SubscriptionStatusType = typeof SubscriptionStatusType[keyof typeof SubscriptionStatusType];\n\nexport interface ISubscription {\n user: Ref<IUser>\n targetModel: string\n target: Ref<IPage>\n status: string\n createdAt: Date\n\n isSubscribing(): boolean\n isUnsubscribing(): boolean\n}\n"],"names":["SubscriptionStatusType","AllSubscriptionStatusType"],"mappings":"AAIO,MAAMA,IAAyB;AAAA,EACpC,WAAW;AAAA,EACX,aAAa;AACf,GACaC,IAA4B,OAAO,OAAOD,CAAsB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=tag.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type ITag<ID = string> = {
2
+ _id: ID;
3
+ name: string;
4
+ };
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E={REGISTERED:1,ACTIVE:2,SUSPENDED:3,DELETED:4,INVITED:5};exports.USER_STATUS=E;
2
+ //# sourceMappingURL=user.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.cjs","sources":["../../src/interfaces/user.ts"],"sourcesContent":["import type { IAttachment } from './attachment';\nimport type { Ref } from './common';\nimport type { IExternalAuthProviderType } from './external-account';\nimport type { HasObjectId } from './has-object-id';\nimport type { Lang } from './lang';\n\nexport type IUser = {\n name: string,\n username: string,\n email: string,\n password: string,\n image?: string, // for backward conpatibility\n imageAttachment?: Ref<IAttachment>,\n imageUrlCached: string,\n isGravatarEnabled: boolean,\n admin: boolean,\n readOnly: boolean,\n apiToken?: string,\n isEmailPublished: boolean,\n isInvitationEmailSended: boolean,\n lang: Lang,\n slackMemberId?: string,\n createdAt: Date,\n lastLoginAt?: Date,\n introduction: string,\n status: IUserStatus,\n isQuestionnaireEnabled: boolean,\n}\n\nexport type IUserGroupRelation = {\n relatedGroup: Ref<IUserGroup>,\n relatedUser: Ref<IUser>,\n createdAt: Date,\n}\n\nexport type IUserGroup = {\n name: string;\n createdAt: Date;\n description: string;\n parent: Ref<IUserGroupHasId> | null;\n}\n\nexport const USER_STATUS = {\n REGISTERED: 1,\n ACTIVE: 2,\n SUSPENDED: 3,\n DELETED: 4,\n INVITED: 5,\n} as const;\nexport type IUserStatus = typeof USER_STATUS[keyof typeof USER_STATUS]\n\nexport type IUserHasId = IUser & HasObjectId;\nexport type IUserGroupHasId = IUserGroup & HasObjectId;\nexport type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;\n\nexport type IAdminExternalAccount = {\n _id: string,\n providerType: IExternalAuthProviderType,\n accountId: string,\n user: IUser,\n createdAt: Date,\n}\n"],"names":["USER_STATUS"],"mappings":"gFA0CO,MAAMA,EAAc,CACzB,WAAY,EACZ,OAAQ,EACR,UAAW,EACX,QAAS,EACT,QAAS,CACX"}
@@ -0,0 +1,57 @@
1
+ import { Lang } from './lang';
2
+ import { HasObjectId } from './has-object-id';
3
+ import { IExternalAuthProviderType } from './external-account';
4
+ import { Ref } from './common';
5
+ import { IAttachment } from './attachment';
6
+
7
+ export type IUser = {
8
+ name: string;
9
+ username: string;
10
+ email: string;
11
+ password: string;
12
+ image?: string;
13
+ imageAttachment?: Ref<IAttachment>;
14
+ imageUrlCached: string;
15
+ isGravatarEnabled: boolean;
16
+ admin: boolean;
17
+ readOnly: boolean;
18
+ apiToken?: string;
19
+ isEmailPublished: boolean;
20
+ isInvitationEmailSended: boolean;
21
+ lang: Lang;
22
+ slackMemberId?: string;
23
+ createdAt: Date;
24
+ lastLoginAt?: Date;
25
+ introduction: string;
26
+ status: IUserStatus;
27
+ isQuestionnaireEnabled: boolean;
28
+ };
29
+ export type IUserGroupRelation = {
30
+ relatedGroup: Ref<IUserGroup>;
31
+ relatedUser: Ref<IUser>;
32
+ createdAt: Date;
33
+ };
34
+ export type IUserGroup = {
35
+ name: string;
36
+ createdAt: Date;
37
+ description: string;
38
+ parent: Ref<IUserGroupHasId> | null;
39
+ };
40
+ export declare const USER_STATUS: {
41
+ readonly REGISTERED: 1;
42
+ readonly ACTIVE: 2;
43
+ readonly SUSPENDED: 3;
44
+ readonly DELETED: 4;
45
+ readonly INVITED: 5;
46
+ };
47
+ export type IUserStatus = typeof USER_STATUS[keyof typeof USER_STATUS];
48
+ export type IUserHasId = IUser & HasObjectId;
49
+ export type IUserGroupHasId = IUserGroup & HasObjectId;
50
+ export type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;
51
+ export type IAdminExternalAccount = {
52
+ _id: string;
53
+ providerType: IExternalAuthProviderType;
54
+ accountId: string;
55
+ user: IUser;
56
+ createdAt: Date;
57
+ };
@@ -0,0 +1,11 @@
1
+ const E = {
2
+ REGISTERED: 1,
3
+ ACTIVE: 2,
4
+ SUSPENDED: 3,
5
+ DELETED: 4,
6
+ INVITED: 5
7
+ };
8
+ export {
9
+ E as USER_STATUS
10
+ };
11
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sources":["../../src/interfaces/user.ts"],"sourcesContent":["import type { IAttachment } from './attachment';\nimport type { Ref } from './common';\nimport type { IExternalAuthProviderType } from './external-account';\nimport type { HasObjectId } from './has-object-id';\nimport type { Lang } from './lang';\n\nexport type IUser = {\n name: string,\n username: string,\n email: string,\n password: string,\n image?: string, // for backward conpatibility\n imageAttachment?: Ref<IAttachment>,\n imageUrlCached: string,\n isGravatarEnabled: boolean,\n admin: boolean,\n readOnly: boolean,\n apiToken?: string,\n isEmailPublished: boolean,\n isInvitationEmailSended: boolean,\n lang: Lang,\n slackMemberId?: string,\n createdAt: Date,\n lastLoginAt?: Date,\n introduction: string,\n status: IUserStatus,\n isQuestionnaireEnabled: boolean,\n}\n\nexport type IUserGroupRelation = {\n relatedGroup: Ref<IUserGroup>,\n relatedUser: Ref<IUser>,\n createdAt: Date,\n}\n\nexport type IUserGroup = {\n name: string;\n createdAt: Date;\n description: string;\n parent: Ref<IUserGroupHasId> | null;\n}\n\nexport const USER_STATUS = {\n REGISTERED: 1,\n ACTIVE: 2,\n SUSPENDED: 3,\n DELETED: 4,\n INVITED: 5,\n} as const;\nexport type IUserStatus = typeof USER_STATUS[keyof typeof USER_STATUS]\n\nexport type IUserHasId = IUser & HasObjectId;\nexport type IUserGroupHasId = IUserGroup & HasObjectId;\nexport type IUserGroupRelationHasId = IUserGroupRelation & HasObjectId;\n\nexport type IAdminExternalAccount = {\n _id: string,\n providerType: IExternalAuthProviderType,\n accountId: string,\n user: IUser,\n createdAt: Date,\n}\n"],"names":["USER_STATUS"],"mappings":"AA0CO,MAAMA,IAAc;AAAA,EACzB,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACX;"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=vite.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export type ViteManifestValue = {
2
+ file: string;
3
+ src: string;
4
+ isEntry?: boolean;
5
+ css?: string[];
6
+ };
7
+ export type ViteManifest = {
8
+ [key: string]: ViteManifestValue;
9
+ };
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=vite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={YDocSync:"ydoc:sync",YDocSyncError:"ydoc:sync:error"};exports.GlobalSocketEventName=o;
2
+ //# sourceMappingURL=websocket.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket.cjs","sources":["../../src/interfaces/websocket.ts"],"sourcesContent":["export const GlobalSocketEventName = {\n // YDoc\n YDocSync: 'ydoc:sync',\n YDocSyncError: 'ydoc:sync:error',\n} as const;\nexport type GlobalSocketEventName = typeof GlobalSocketEventName[keyof typeof GlobalSocketEventName];\n"],"names":["GlobalSocketEventName"],"mappings":"gFAAO,MAAMA,EAAwB,CAEnC,SAAU,YACV,cAAe,iBACjB"}
@@ -0,0 +1,5 @@
1
+ export declare const GlobalSocketEventName: {
2
+ readonly YDocSync: "ydoc:sync";
3
+ readonly YDocSyncError: "ydoc:sync:error";
4
+ };
5
+ export type GlobalSocketEventName = typeof GlobalSocketEventName[keyof typeof GlobalSocketEventName];
@@ -0,0 +1,9 @@
1
+ const c = {
2
+ // YDoc
3
+ YDocSync: "ydoc:sync",
4
+ YDocSyncError: "ydoc:sync:error"
5
+ };
6
+ export {
7
+ c as GlobalSocketEventName
8
+ };
9
+ //# sourceMappingURL=websocket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket.js","sources":["../../src/interfaces/websocket.ts"],"sourcesContent":["export const GlobalSocketEventName = {\n // YDoc\n YDocSync: 'ydoc:sync',\n YDocSyncError: 'ydoc:sync:error',\n} as const;\nexport type GlobalSocketEventName = typeof GlobalSocketEventName[keyof typeof GlobalSocketEventName];\n"],"names":["GlobalSocketEventName"],"mappings":"AAAO,MAAMA,IAAwB;AAAA;AAAA,EAEnC,UAAU;AAAA,EACV,eAAe;AACjB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../utils/path-utils.cjs"),h=/^(.+\/[^/]+)\/(\d{4}|\d{4}\/\d{2}|\d{4}\/\d{2}\/\d{2})$/;class c{constructor(t,o=!1,a=!1){if(this.isRoot=!1,this.isFormerRoot=!1,this.former="",t==null||t===""||t==="/"){this.isRoot=!0,this.latter="/";return}const s=o?t:l.normalizePath(t);if(this.latter=s,a){const r=s.match(h);if(r!=null){this.former=r[1],this.latter=r[2];return}}let i=/^((.*)\/(?!em>))?(.+)$/;try{i=new RegExp("^((.*)(?<!<)\\/)?(.+)$")}catch{}const e=s.match(i);e!=null&&(this.isFormerRoot=e[1]==="/",this.former=e[2],this.latter=e[3])}}exports.DevidedPagePath=c;
2
+ //# sourceMappingURL=devided-page-path.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devided-page-path.cjs","sources":["../../src/models/devided-page-path.ts"],"sourcesContent":["import * as pathUtils from '../utils/path-utils';\n\n// https://regex101.com/r/BahpKX/2\nconst PATTERN_INCLUDE_DATE = /^(.+\\/[^/]+)\\/(\\d{4}|\\d{4}\\/\\d{2}|\\d{4}\\/\\d{2}\\/\\d{2})$/;\n\nexport class DevidedPagePath {\n\n isRoot: boolean;\n\n isFormerRoot: boolean;\n\n former: string;\n\n latter: string;\n\n constructor(path: string, skipNormalize = false, evalDatePath = false) {\n\n this.isRoot = false;\n this.isFormerRoot = false;\n this.former = '';\n\n // root\n if (path == null || path === '' || path === '/') {\n this.isRoot = true;\n this.latter = '/';\n return;\n }\n\n const pagePath = skipNormalize ? path : pathUtils.normalizePath(path);\n this.latter = pagePath;\n\n // evaluate date path\n if (evalDatePath) {\n const matchDate = pagePath.match(PATTERN_INCLUDE_DATE);\n if (matchDate != null) {\n this.former = matchDate[1];\n this.latter = matchDate[2];\n return;\n }\n }\n\n let PATTERN_DEFAULT = /^((.*)\\/(?!em>))?(.+)$/; // this will ignore em's end tags\n try { // for non-chrome browsers\n // eslint-disable-next-line regex/invalid\n PATTERN_DEFAULT = new RegExp('^((.*)(?<!<)\\\\/)?(.+)$'); // https://regex101.com/r/HJNvMW/1\n }\n catch (err) {\n // lookbehind regex is not supported on non-chrome browsers\n }\n\n const matchDefault = pagePath.match(PATTERN_DEFAULT);\n if (matchDefault != null) {\n this.isFormerRoot = matchDefault[1] === '/';\n this.former = matchDefault[2];\n this.latter = matchDefault[3];\n }\n }\n\n}\n"],"names":["PATTERN_INCLUDE_DATE","DevidedPagePath","path","skipNormalize","evalDatePath","pagePath","pathUtils.normalizePath","matchDate","PATTERN_DEFAULT","matchDefault"],"mappings":"2HAGMA,EAAuB,0DAEtB,MAAMC,CAAgB,CAU3B,YAAYC,EAAcC,EAAgB,GAAOC,EAAe,GAAO,CAOrE,GALA,KAAK,OAAS,GACd,KAAK,aAAe,GACpB,KAAK,OAAS,GAGVF,GAAQ,MAAQA,IAAS,IAAMA,IAAS,IAAK,CAC/C,KAAK,OAAS,GACd,KAAK,OAAS,IACd,MACF,CAEA,MAAMG,EAAWF,EAAgBD,EAAOI,gBAAwBJ,CAAI,EAIpE,GAHA,KAAK,OAASG,EAGVD,EAAc,CACV,MAAAG,EAAYF,EAAS,MAAML,CAAoB,EACrD,GAAIO,GAAa,KAAM,CAChB,KAAA,OAASA,EAAU,CAAC,EACpB,KAAA,OAASA,EAAU,CAAC,EACzB,MACF,CACF,CAEA,IAAIC,EAAkB,yBAClB,GAAA,CAEgBA,EAAA,IAAI,OAAO,wBAAwB,OAE3C,CAEZ,CAEM,MAAAC,EAAeJ,EAAS,MAAMG,CAAe,EAC/CC,GAAgB,OACb,KAAA,aAAeA,EAAa,CAAC,IAAM,IACnC,KAAA,OAASA,EAAa,CAAC,EACvB,KAAA,OAASA,EAAa,CAAC,EAEhC,CAEF"}
@@ -0,0 +1,7 @@
1
+ export declare class DevidedPagePath {
2
+ isRoot: boolean;
3
+ isFormerRoot: boolean;
4
+ former: string;
5
+ latter: string;
6
+ constructor(path: string, skipNormalize?: boolean, evalDatePath?: boolean);
7
+ }
@@ -0,0 +1,29 @@
1
+ import { normalizePath as l } from "../utils/path-utils.js";
2
+ const h = /^(.+\/[^/]+)\/(\d{4}|\d{4}\/\d{2}|\d{4}\/\d{2}\/\d{2})$/;
3
+ class m {
4
+ constructor(t, i = !1, a = !1) {
5
+ if (this.isRoot = !1, this.isFormerRoot = !1, this.former = "", t == null || t === "" || t === "/") {
6
+ this.isRoot = !0, this.latter = "/";
7
+ return;
8
+ }
9
+ const s = i ? t : l(t);
10
+ if (this.latter = s, a) {
11
+ const r = s.match(h);
12
+ if (r != null) {
13
+ this.former = r[1], this.latter = r[2];
14
+ return;
15
+ }
16
+ }
17
+ let o = /^((.*)\/(?!em>))?(.+)$/;
18
+ try {
19
+ o = new RegExp("^((.*)(?<!<)\\/)?(.+)$");
20
+ } catch {
21
+ }
22
+ const e = s.match(o);
23
+ e != null && (this.isFormerRoot = e[1] === "/", this.former = e[2], this.latter = e[3]);
24
+ }
25
+ }
26
+ export {
27
+ m as DevidedPagePath
28
+ };
29
+ //# sourceMappingURL=devided-page-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devided-page-path.js","sources":["../../src/models/devided-page-path.ts"],"sourcesContent":["import * as pathUtils from '../utils/path-utils';\n\n// https://regex101.com/r/BahpKX/2\nconst PATTERN_INCLUDE_DATE = /^(.+\\/[^/]+)\\/(\\d{4}|\\d{4}\\/\\d{2}|\\d{4}\\/\\d{2}\\/\\d{2})$/;\n\nexport class DevidedPagePath {\n\n isRoot: boolean;\n\n isFormerRoot: boolean;\n\n former: string;\n\n latter: string;\n\n constructor(path: string, skipNormalize = false, evalDatePath = false) {\n\n this.isRoot = false;\n this.isFormerRoot = false;\n this.former = '';\n\n // root\n if (path == null || path === '' || path === '/') {\n this.isRoot = true;\n this.latter = '/';\n return;\n }\n\n const pagePath = skipNormalize ? path : pathUtils.normalizePath(path);\n this.latter = pagePath;\n\n // evaluate date path\n if (evalDatePath) {\n const matchDate = pagePath.match(PATTERN_INCLUDE_DATE);\n if (matchDate != null) {\n this.former = matchDate[1];\n this.latter = matchDate[2];\n return;\n }\n }\n\n let PATTERN_DEFAULT = /^((.*)\\/(?!em>))?(.+)$/; // this will ignore em's end tags\n try { // for non-chrome browsers\n // eslint-disable-next-line regex/invalid\n PATTERN_DEFAULT = new RegExp('^((.*)(?<!<)\\\\/)?(.+)$'); // https://regex101.com/r/HJNvMW/1\n }\n catch (err) {\n // lookbehind regex is not supported on non-chrome browsers\n }\n\n const matchDefault = pagePath.match(PATTERN_DEFAULT);\n if (matchDefault != null) {\n this.isFormerRoot = matchDefault[1] === '/';\n this.former = matchDefault[2];\n this.latter = matchDefault[3];\n }\n }\n\n}\n"],"names":["PATTERN_INCLUDE_DATE","DevidedPagePath","path","skipNormalize","evalDatePath","pagePath","pathUtils.normalizePath","matchDate","PATTERN_DEFAULT","matchDefault"],"mappings":";AAGA,MAAMA,IAAuB;AAEtB,MAAMC,EAAgB;AAAA,EAU3B,YAAYC,GAAcC,IAAgB,IAAOC,IAAe,IAAO;AAOrE,QALA,KAAK,SAAS,IACd,KAAK,eAAe,IACpB,KAAK,SAAS,IAGVF,KAAQ,QAAQA,MAAS,MAAMA,MAAS,KAAK;AAC/C,WAAK,SAAS,IACd,KAAK,SAAS;AACd;AAAA,IACF;AAEA,UAAMG,IAAWF,IAAgBD,IAAOI,EAAwBJ,CAAI;AAIpE,QAHA,KAAK,SAASG,GAGVD,GAAc;AACV,YAAAG,IAAYF,EAAS,MAAML,CAAoB;AACrD,UAAIO,KAAa,MAAM;AAChB,aAAA,SAASA,EAAU,CAAC,GACpB,KAAA,SAASA,EAAU,CAAC;AACzB;AAAA,MACF;AAAA,IACF;AAEA,QAAIC,IAAkB;AAClB,QAAA;AAEgB,MAAAA,IAAA,IAAI,OAAO,wBAAwB;AAAA,YAE3C;AAAA,IAEZ;AAEM,UAAAC,IAAeJ,EAAS,MAAMG,CAAe;AACnD,IAAIC,KAAgB,SACb,KAAA,eAAeA,EAAa,CAAC,MAAM,KACnC,KAAA,SAASA,EAAa,CAAC,GACvB,KAAA,SAASA,EAAa,CAAC;AAAA,EAEhC;AAEF;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./devided-page-path.cjs"),r=require("./vo/error-apiv3.cjs");exports.DevidedPagePath=e.DevidedPagePath;exports.ErrorV3=r.ErrorV3;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './devided-page-path';
2
+ export * from './vo/error-apiv3';
@@ -0,0 +1,7 @@
1
+ import { DevidedPagePath as o } from "./devided-page-path.js";
2
+ import { ErrorV3 as a } from "./vo/error-apiv3.js";
3
+ export {
4
+ o as DevidedPagePath,
5
+ a as ErrorV3
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class o extends Error{constructor(r="",s="",t=void 0,e=void 0){super(),this.message=r,this.code=s,this.stack=t,this.args=e}}exports.ErrorV3=o;
2
+ //# sourceMappingURL=error-apiv3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-apiv3.cjs","sources":["../../../src/models/vo/error-apiv3.ts"],"sourcesContent":["export class ErrorV3 extends Error {\n\n code: string;\n\n args?: any;\n\n constructor(message = '', code = '', stack = undefined, args: any = undefined) {\n super(); // do not provide message to the super constructor\n this.message = message;\n this.code = code;\n this.stack = stack;\n this.args = args;\n }\n\n}\n"],"names":["ErrorV3","message","code","stack","args"],"mappings":"gFAAO,MAAMA,UAAgB,KAAM,CAMjC,YAAYC,EAAU,GAAIC,EAAO,GAAIC,EAAQ,OAAWC,EAAY,OAAW,CACvE,QACN,KAAK,QAAUH,EACf,KAAK,KAAOC,EACZ,KAAK,MAAQC,EACb,KAAK,KAAOC,CACd,CAEF"}
@@ -0,0 +1,5 @@
1
+ export declare class ErrorV3 extends Error {
2
+ code: string;
3
+ args?: any;
4
+ constructor(message?: string, code?: string, stack?: undefined, args?: any);
5
+ }
@@ -0,0 +1,9 @@
1
+ class i extends Error {
2
+ constructor(s = "", r = "", t = void 0, o = void 0) {
3
+ super(), this.message = s, this.code = r, this.stack = t, this.args = o;
4
+ }
5
+ }
6
+ export {
7
+ i as ErrorV3
8
+ };
9
+ //# sourceMappingURL=error-apiv3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-apiv3.js","sources":["../../../src/models/vo/error-apiv3.ts"],"sourcesContent":["export class ErrorV3 extends Error {\n\n code: string;\n\n args?: any;\n\n constructor(message = '', code = '', stack = undefined, args: any = undefined) {\n super(); // do not provide message to the super constructor\n this.message = message;\n this.code = code;\n this.stack = stack;\n this.args = args;\n }\n\n}\n"],"names":["ErrorV3","message","code","stack","args"],"mappings":"AAAO,MAAMA,UAAgB,MAAM;AAAA,EAMjC,YAAYC,IAAU,IAAIC,IAAO,IAAIC,IAAQ,QAAWC,IAAY,QAAW;AACvE,aACN,KAAK,UAAUH,GACf,KAAK,OAAOC,GACZ,KAAK,QAAQC,GACb,KAAK,OAAOC;AAAA,EACd;AAEF;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./util/option-parser.cjs");exports.OptionParser=e.OptionParser;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/option-parser';
2
+ export * from './util/option-parser';
@@ -0,0 +1,5 @@
1
+ import { OptionParser as e } from "./util/option-parser.js";
2
+ export {
3
+ e as OptionParser
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=option-parser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option-parser.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type ParseRangeResult = {
2
+ start: number;
3
+ end: number;
4
+ };
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=option-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option-parser.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class a{static parseRange(l){if(l==null)return null;const e=l.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);if(!e)return null;let r,t=-1;if(e[3]!=null){r=+e[1];const n=e[3];n===":"?t=+e[4]||-1:n==="+"&&(t=+e[4]||0,t+=r)}else r=1,t=+e[1];return{start:r,end:t}}}exports.OptionParser=a;
2
+ //# sourceMappingURL=option-parser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option-parser.cjs","sources":["../../../src/remark-plugins/util/option-parser.ts"],"sourcesContent":["import type { ParseRangeResult } from '../interfaces/option-parser';\n\n/**\n * Options parser for custom tag\n */\nexport class OptionParser {\n\n /**\n * Parse range expression\n *\n * <ul>\n * <li>ex:</li>\n * <ul>\n * <li>1:2 -> { start: 1, end: 2 }</li>\n * <li>1: -> { start: 1, end: -1 }</li>\n * <li>2+3 -> { start: 1, end: 5 }</li>\n * </ul>\n * </ul>\n *\n * @see https://regex101.com/r/w4KCwC/4\n *\n * @static\n * @param {string} str\n * @returns {ParseRangeResult}\n */\n static parseRange(str: string): ParseRangeResult | null {\n if (str == null) {\n return null;\n }\n\n // see: https://regex101.com/r/w4KCwC/4\n const match = str.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);\n if (!match) {\n return null;\n }\n\n // determine start\n let start;\n let end = -1;\n\n // has operator\n if (match[3] != null) {\n start = +match[1];\n const operator = match[3];\n\n // determine end\n if (operator === ':') {\n end = +match[4] || -1; // set last(-1) if undefined\n }\n else if (operator === '+') {\n end = +match[4] || 0; // plus zero if undefined\n end += start;\n }\n }\n // don't have operator\n else {\n start = 1;\n end = +match[1];\n }\n\n return { start, end };\n }\n\n}\n"],"names":["OptionParser","str","match","start","end","operator"],"mappings":"gFAKO,MAAMA,CAAa,CAoBxB,OAAO,WAAWC,EAAsC,CACtD,GAAIA,GAAO,KACF,OAAA,KAIH,MAAAC,EAAQD,EAAI,MAAM,qCAAqC,EAC7D,GAAI,CAACC,EACI,OAAA,KAIL,IAAAC,EACAC,EAAM,GAGN,GAAAF,EAAM,CAAC,GAAK,KAAM,CACZC,EAAA,CAACD,EAAM,CAAC,EACV,MAAAG,EAAWH,EAAM,CAAC,EAGpBG,IAAa,IACTD,EAAA,CAACF,EAAM,CAAC,GAAK,GAEZG,IAAa,MACdD,EAAA,CAACF,EAAM,CAAC,GAAK,EACZE,GAAAD,EACT,MAIQA,EAAA,EACFC,EAAA,CAACF,EAAM,CAAC,EAGT,MAAA,CAAE,MAAAC,EAAO,IAAAC,EAClB,CAEF"}
@@ -0,0 +1,26 @@
1
+ import { ParseRangeResult } from '../interfaces/option-parser';
2
+
3
+ /**
4
+ * Options parser for custom tag
5
+ */
6
+ export declare class OptionParser {
7
+ /**
8
+ * Parse range expression
9
+ *
10
+ * <ul>
11
+ * <li>ex:</li>
12
+ * <ul>
13
+ * <li>1:2 -> { start: 1, end: 2 }</li>
14
+ * <li>1: -> { start: 1, end: -1 }</li>
15
+ * <li>2+3 -> { start: 1, end: 5 }</li>
16
+ * </ul>
17
+ * </ul>
18
+ *
19
+ * @see https://regex101.com/r/w4KCwC/4
20
+ *
21
+ * @static
22
+ * @param {string} str
23
+ * @returns {ParseRangeResult}
24
+ */
25
+ static parseRange(str: string): ParseRangeResult | null;
26
+ }
@@ -0,0 +1,39 @@
1
+ class s {
2
+ /**
3
+ * Parse range expression
4
+ *
5
+ * <ul>
6
+ * <li>ex:</li>
7
+ * <ul>
8
+ * <li>1:2 -> { start: 1, end: 2 }</li>
9
+ * <li>1: -> { start: 1, end: -1 }</li>
10
+ * <li>2+3 -> { start: 1, end: 5 }</li>
11
+ * </ul>
12
+ * </ul>
13
+ *
14
+ * @see https://regex101.com/r/w4KCwC/4
15
+ *
16
+ * @static
17
+ * @param {string} str
18
+ * @returns {ParseRangeResult}
19
+ */
20
+ static parseRange(n) {
21
+ if (n == null)
22
+ return null;
23
+ const e = n.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);
24
+ if (!e)
25
+ return null;
26
+ let l, t = -1;
27
+ if (e[3] != null) {
28
+ l = +e[1];
29
+ const r = e[3];
30
+ r === ":" ? t = +e[4] || -1 : r === "+" && (t = +e[4] || 0, t += l);
31
+ } else
32
+ l = 1, t = +e[1];
33
+ return { start: l, end: t };
34
+ }
35
+ }
36
+ export {
37
+ s as OptionParser
38
+ };
39
+ //# sourceMappingURL=option-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option-parser.js","sources":["../../../src/remark-plugins/util/option-parser.ts"],"sourcesContent":["import type { ParseRangeResult } from '../interfaces/option-parser';\n\n/**\n * Options parser for custom tag\n */\nexport class OptionParser {\n\n /**\n * Parse range expression\n *\n * <ul>\n * <li>ex:</li>\n * <ul>\n * <li>1:2 -> { start: 1, end: 2 }</li>\n * <li>1: -> { start: 1, end: -1 }</li>\n * <li>2+3 -> { start: 1, end: 5 }</li>\n * </ul>\n * </ul>\n *\n * @see https://regex101.com/r/w4KCwC/4\n *\n * @static\n * @param {string} str\n * @returns {ParseRangeResult}\n */\n static parseRange(str: string): ParseRangeResult | null {\n if (str == null) {\n return null;\n }\n\n // see: https://regex101.com/r/w4KCwC/4\n const match = str.match(/^(-?[0-9]+)(([:+]{1})(-?[0-9]+)?)?$/);\n if (!match) {\n return null;\n }\n\n // determine start\n let start;\n let end = -1;\n\n // has operator\n if (match[3] != null) {\n start = +match[1];\n const operator = match[3];\n\n // determine end\n if (operator === ':') {\n end = +match[4] || -1; // set last(-1) if undefined\n }\n else if (operator === '+') {\n end = +match[4] || 0; // plus zero if undefined\n end += start;\n }\n }\n // don't have operator\n else {\n start = 1;\n end = +match[1];\n }\n\n return { start, end };\n }\n\n}\n"],"names":["OptionParser","str","match","start","end","operator"],"mappings":"AAKO,MAAMA,EAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBxB,OAAO,WAAWC,GAAsC;AACtD,QAAIA,KAAO;AACF,aAAA;AAIH,UAAAC,IAAQD,EAAI,MAAM,qCAAqC;AAC7D,QAAI,CAACC;AACI,aAAA;AAIL,QAAAC,GACAC,IAAM;AAGN,QAAAF,EAAM,CAAC,KAAK,MAAM;AACZ,MAAAC,IAAA,CAACD,EAAM,CAAC;AACV,YAAAG,IAAWH,EAAM,CAAC;AAGxB,MAAIG,MAAa,MACTD,IAAA,CAACF,EAAM,CAAC,KAAK,KAEZG,MAAa,QACdD,IAAA,CAACF,EAAM,CAAC,KAAK,GACZE,KAAAD;AAAA,IACT;AAIQ,MAAAA,IAAA,GACFC,IAAA,CAACF,EAAM,CAAC;AAGT,WAAA,EAAE,OAAAC,GAAO,KAAAC;EAClB;AAEF;"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-swr-static.cjs"),S=require("./with-utils.cjs"),t=require("./use-global-socket.cjs");exports.useSWRStatic=e.useSWRStatic;exports.withUtils=S.withUtils;exports.GLOBAL_SOCKET_KEY=t.GLOBAL_SOCKET_KEY;exports.GLOBAL_SOCKET_NS=t.GLOBAL_SOCKET_NS;exports.useGlobalSocket=t.useGlobalSocket;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './use-swr-static';
2
+ export * from './with-utils';
3
+ export * from './use-global-socket';
@@ -0,0 +1,11 @@
1
+ import { useSWRStatic as e } from "./use-swr-static.js";
2
+ import { withUtils as S } from "./with-utils.js";
3
+ import { GLOBAL_SOCKET_KEY as O, GLOBAL_SOCKET_NS as _, useGlobalSocket as f } from "./use-global-socket.js";
4
+ export {
5
+ O as GLOBAL_SOCKET_KEY,
6
+ _ as GLOBAL_SOCKET_NS,
7
+ f as useGlobalSocket,
8
+ e as useSWRStatic,
9
+ S as withUtils
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-swr-static.cjs"),S="/",t="globalSocket",o=()=>e.useSWRStatic(t);exports.GLOBAL_SOCKET_KEY=t;exports.GLOBAL_SOCKET_NS=S;exports.useGlobalSocket=o;
2
+ //# sourceMappingURL=use-global-socket.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-global-socket.cjs","sources":["../../src/swr/use-global-socket.ts"],"sourcesContent":["import type { Socket } from 'socket.io-client';\nimport type { SWRResponse } from 'swr';\n\nimport { useSWRStatic } from './use-swr-static';\n\nexport const GLOBAL_SOCKET_NS = '/';\nexport const GLOBAL_SOCKET_KEY = 'globalSocket';\n\nexport const useGlobalSocket = (): SWRResponse<Socket, Error> => {\n return useSWRStatic(GLOBAL_SOCKET_KEY);\n};\n"],"names":["GLOBAL_SOCKET_NS","GLOBAL_SOCKET_KEY","useGlobalSocket","useSWRStatic"],"mappings":"wHAKaA,EAAmB,IACnBC,EAAoB,eAEpBC,EAAkB,IACtBC,EAAAA,aAAaF,CAAiB"}
@@ -0,0 +1,6 @@
1
+ import { SWRResponse } from 'swr';
2
+ import { Socket } from 'socket.io-client';
3
+
4
+ export declare const GLOBAL_SOCKET_NS = "/";
5
+ export declare const GLOBAL_SOCKET_KEY = "globalSocket";
6
+ export declare const useGlobalSocket: () => SWRResponse<Socket, Error>;