Yuki Takei 2 лет назад
Родитель
Сommit
a03bc60960

+ 1 - 1
apps/app/src/stores/attachment.tsx

@@ -5,7 +5,7 @@ import type {
 } from '@growi/core';
 import {
   type SWRResponseWithUtils, withUtils,
-} from '@growi/core/dist/utils';
+} from '@growi/core/dist/swr';
 import { Util } from 'reactstrap';
 import useSWR, { useSWRConfig } from 'swr';
 

+ 1 - 1
apps/app/src/stores/editor.tsx

@@ -1,7 +1,7 @@
 import { useCallback } from 'react';
 
 import type { Nullable } from '@growi/core';
-import { withUtils, type SWRResponseWithUtils } from '@growi/core/dist/utils';
+import { withUtils, type SWRResponseWithUtils } from '@growi/core/dist/swr';
 import useSWR, { type SWRResponse } from 'swr';
 import useSWRImmutable from 'swr/immutable';
 

+ 1 - 1
apps/app/src/stores/global-notification.ts

@@ -1,4 +1,4 @@
-import { type SWRResponseWithUtils, withUtils } from '@growi/core/dist/utils';
+import { type SWRResponseWithUtils, withUtils } from '@growi/core/dist/swr';
 import useSWRImmutable from 'swr/immutable';
 
 import { IGlobalNotification } from '~/client/interfaces/global-notification';

+ 1 - 1
apps/app/src/stores/maintenanceMode.tsx

@@ -1,4 +1,4 @@
-import { withUtils, type SWRResponseWithUtils } from '@growi/core/dist/utils';
+import { withUtils, type SWRResponseWithUtils } from '@growi/core/dist/swr';
 
 import { apiv3Post } from '~/client/util/apiv3-client';
 

+ 2 - 3
apps/app/src/stores/ui.tsx

@@ -1,9 +1,8 @@
 import { type RefObject, useCallback, useEffect } from 'react';
 
 import { PageGrant, type Nullable } from '@growi/core';
-import {
-  type SWRResponseWithUtils, withUtils, pagePathUtils, isClient, isServer,
-} from '@growi/core/dist/utils';
+import { type SWRResponseWithUtils, withUtils } from '@growi/core/dist/swr';
+import { pagePathUtils, isClient, isServer } from '@growi/core/dist/utils';
 import { Breakpoint } from '@growi/ui/dist/interfaces';
 import { addBreakpointListener, cleanupBreakpointListener } from '@growi/ui/dist/utils';
 import type { HtmlElementNode } from 'rehype-toc';

+ 7 - 3
packages/core/package.json

@@ -30,9 +30,13 @@
       "import": "./dist/models/index.js",
       "require": "./dist/models/index.cjs"
     },
-    "./dist/plugin": {
-      "import": "./dist/plugin/index.js",
-      "require": "./dist/plugin/index.cjs"
+    "./dist/remark-plugins": {
+      "import": "./dist/remark-plugins/index.js",
+      "require": "./dist/remark-plugins/index.cjs"
+    },
+    "./dist/swr": {
+      "import": "./dist/swr/index.js",
+      "require": "./dist/swr/index.cjs"
     },
     "./dist/utils": {
       "import": "./dist/utils/index.js",

+ 0 - 0
packages/core/src/plugin/index.ts → packages/core/src/remark-plugins/index.ts


+ 0 - 0
packages/core/src/plugin/interfaces/option-parser.ts → packages/core/src/remark-plugins/interfaces/option-parser.ts


+ 0 - 0
packages/core/src/plugin/util/option-parser.spec.ts → packages/core/src/remark-plugins/util/option-parser.spec.ts


+ 0 - 0
packages/core/src/plugin/util/option-parser.ts → packages/core/src/remark-plugins/util/option-parser.ts


+ 1 - 0
packages/core/src/swr/index.ts

@@ -0,0 +1 @@
+export * from './with-utils';

+ 0 - 0
packages/core/src/utils/with-utils.ts → packages/core/src/swr/with-utils.ts


+ 0 - 1
packages/core/src/utils/index.ts

@@ -13,4 +13,3 @@ export * as pageUtils from './page-utils';
 export * from './basic-interceptor';
 export * from './browser-utils';
 export * from './growi-theme-metadata';
-export * from './with-utils';

+ 1 - 1
packages/remark-attachment-refs/src/server/routes/refs.ts

@@ -1,4 +1,4 @@
-import { OptionParser } from '@growi/core/dist/plugin';
+import { OptionParser } from '@growi/core/dist/remark-plugins';
 
 import loggerFactory from '../../utils/logger';
 

+ 1 - 1
packages/remark-lsx/src/client/components/lsx-context.ts

@@ -1,4 +1,4 @@
-import { OptionParser, type ParseRangeResult } from '@growi/core/dist/plugin';
+import { OptionParser, type ParseRangeResult } from '@growi/core/dist/remark-plugins';
 
 
 export class LsxContext {

+ 1 - 1
packages/remark-lsx/src/client/stores/lsx/parse-num-option.spec.ts

@@ -1,4 +1,4 @@
-import { OptionParser } from '@growi/core/dist/plugin';
+import { OptionParser } from '@growi/core/dist/remark-plugins';
 
 import { parseNumOption } from './parse-num-option';
 

+ 1 - 1
packages/remark-lsx/src/client/stores/lsx/parse-num-option.ts

@@ -1,4 +1,4 @@
-import { OptionParser } from '@growi/core/dist/plugin';
+import { OptionParser } from '@growi/core/dist/remark-plugins';
 
 export type ParseNumOptionResult = { offset: number, limit?: number } | { offset?: number, limit: number };
 

+ 1 - 1
packages/remark-lsx/src/client/utils/page-node.spec.ts

@@ -1,5 +1,5 @@
 import type { IPageHasId } from '@growi/core';
-import { OptionParser } from '@growi/core/dist/plugin';
+import { OptionParser } from '@growi/core/dist/remark-plugins';
 import { mock } from 'vitest-mock-extended';
 
 import { PageNode } from '../../interfaces/page-node';

+ 1 - 1
packages/remark-lsx/src/client/utils/page-node.ts

@@ -1,7 +1,7 @@
 import * as url from 'url';
 
 import type { IPageHasId } from '@growi/core';
-import type { ParseRangeResult } from '@growi/core/dist/plugin';
+import type { ParseRangeResult } from '@growi/core/dist/remark-plugins';
 import { removeTrailingSlash } from '@growi/core/dist/utils/path-utils';
 
 import type { PageNode } from '../../interfaces/page-node';

+ 1 - 1
packages/remark-lsx/src/server/routes/list-pages/add-depth-condition.spec.ts

@@ -1,4 +1,4 @@
-import type { ParseRangeResult } from '@growi/core/dist/plugin';
+import type { ParseRangeResult } from '@growi/core/dist/remark-plugins';
 import { mock } from 'vitest-mock-extended';
 
 import { addDepthCondition } from './add-depth-condition';

+ 1 - 1
packages/remark-lsx/src/server/routes/list-pages/add-depth-condition.ts

@@ -1,4 +1,4 @@
-import type { ParseRangeResult } from '@growi/core/dist/plugin';
+import type { ParseRangeResult } from '@growi/core/dist/remark-plugins';
 import createError from 'http-errors';
 
 import { getDepthOfPath } from '../../../utils/depth-utils';

+ 1 - 1
packages/remark-lsx/src/server/routes/list-pages/index.ts

@@ -1,6 +1,6 @@
 
 import type { IUser } from '@growi/core';
-import { OptionParser } from '@growi/core/dist/plugin';
+import { OptionParser } from '@growi/core/dist/remark-plugins';
 import { pathUtils } from '@growi/core/dist/utils';
 import escapeStringRegexp from 'escape-string-regexp';
 import type { Request, Response } from 'express';