rme 0.3.7 → 0.4.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.
package/README.md ADDED
File without changes
package/dist/index.d.ts CHANGED
@@ -4,14 +4,13 @@ export { CreateThemeOptions, createTheme } from '@drl990114/codemirror-themes';
4
4
  import { LanguageSupport, LanguageDescription } from '@codemirror/language';
5
5
  import { SearchQuery } from '@codemirror/search';
6
6
  import { Compartment, Extension } from '@codemirror/state';
7
- import { EditorView, EditorViewConfig } from '@codemirror/view';
7
+ import { EditorViewConfig, EditorView } from '@codemirror/view';
8
8
  import { ProsemirrorNode, EditorView as EditorView$1 } from '@rme-sdk/pm';
9
9
  import * as react from 'react';
10
- import react__default, { ErrorInfo, CSSProperties, ComponentType, ReactNode, MouseEvent, JSX, FC } from 'react';
10
+ import react__default, { ErrorInfo, CSSProperties, ComponentType, FC, ReactNode, MouseEvent, JSX } from 'react';
11
11
  import { RemirrorEventListenerProps, Extension as Extension$1, RemirrorManager as RemirrorManager$1, AnyExtension as AnyExtension$1 } from '@rme-sdk/main';
12
- import * as _rme_sdk_core from '@rme-sdk/core';
13
12
  import { AnyExtension, RemirrorManager, DelayedPromiseCreator, ProsemirrorAttributes, NodeExtension, EditorView as EditorView$2, ApplySchemaAttributes, NodeSpecOverride, NodeExtensionSpec, PrimitiveSelection, CommandFunction, ExtensionCommandReturn, InputRule as InputRule$1, KeyBindings, ProsemirrorPlugin, ProsemirrorNode as ProsemirrorNode$1, CommandDecoratorMessageProps, CoreIcon } from '@rme-sdk/core';
14
- import { Node, Schema, NodeType, Mark, NodeRange } from '@rme-sdk/pm/model';
13
+ import { Node, NodeType, Schema, Mark } from '@rme-sdk/pm/model';
15
14
  import { ReactFrameworkOutput } from '@rme-sdk/react-core';
16
15
  import { InputRule } from '@rme-sdk/pm/inputrules';
17
16
  import { PasteRule } from '@rme-sdk/pm/paste-rules';
@@ -21,7 +20,6 @@ import { NodeViewComponentProps } from '@rme-sdk/react';
21
20
  export { useCommands, useHelpers, useKeymap, useRemirrorContext } from '@rme-sdk/react';
22
21
  import * as styled_components from 'styled-components';
23
22
  import * as styled_components_dist_types from 'styled-components/dist/types';
24
- import { IndentListOptions, DedentListOptions, UnwrapListOptions, ToggleCollapsedOptions } from '@rme-sdk/prosemirror-flat-list';
25
23
 
26
24
  type LoadLanguage = (lang: string) => Promise<LanguageSupport> | LanguageSupport | void;
27
25
 
@@ -693,16 +691,6 @@ interface ImageExtensionAttributes {
693
691
  */
694
692
  declare function isImageFileType(file: File): boolean;
695
693
 
696
- /**
697
- * @public @group Schema
698
- */
699
- interface ListAttributes {
700
- kind?: string;
701
- order?: number | null;
702
- checked?: boolean;
703
- collapsed?: boolean;
704
- }
705
-
706
694
  declare abstract class MarkdownNodeExtension {
707
695
  abstract fromMarkdown: () => readonly ParserRule[];
708
696
  abstract toMarkdown: NodeSerializerSpec;
@@ -721,17 +709,7 @@ declare class LineListExtension extends NodeExtension {
721
709
  createNodeSpec(): NodeExtensionSpec;
722
710
  createKeymap(): KeyBindings;
723
711
  createExternalPlugins(): ProsemirrorPlugin[];
724
- createCommands(): {
725
- readonly indentList: (props?: IndentListOptions) => _rme_sdk_core.CommandFunction<object>;
726
- readonly dedentList: (props?: DedentListOptions) => _rme_sdk_core.CommandFunction<object>;
727
- readonly unwrapList: (options?: UnwrapListOptions) => _rme_sdk_core.CommandFunction<object>;
728
- readonly wrapInList: (getAttrs: ListAttributes | ((range: NodeRange) => ListAttributes | null)) => _rme_sdk_core.CommandFunction<object>;
729
- readonly moveList: (direction: 'up' | 'down') => _rme_sdk_core.CommandFunction<object>;
730
- readonly splitList: () => _rme_sdk_core.CommandFunction<object>;
731
- readonly protectCollapsed: () => _rme_sdk_core.CommandFunction<object>;
732
- readonly toggleCollapsed: (props?: ToggleCollapsedOptions) => _rme_sdk_core.CommandFunction<object>;
733
- readonly toggleList: (attrs: ListAttributes) => _rme_sdk_core.CommandFunction<object>;
734
- };
712
+ createCommands(): ExtensionCommandReturn;
735
713
  fromMarkdown(): readonly [{
736
714
  readonly type: ParserRuleType.free;
737
715
  readonly token: "list_item_open";
package/package.json CHANGED
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "name": "rme",
3
- "version": "0.3.7",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
- "license": "MIT",
5
+ "scripts": {
6
+ "build": "yarn clear && yarn build-esbuild && yarn types",
7
+ "dev": "node ./esbuild.config.dev.mjs",
8
+ "build-esbuild": "node esbuild.config.prod.mjs",
9
+ "types": "node ./node_modules/rollup/dist/bin/rollup -c rollup.config.types.js",
10
+ "prettier": "prettier --config ./.prettierrc.json --write \"src/**/*{.js,.jsx,.ts,.tsx,.css}\"",
11
+ "clear": "rimraf dist",
12
+ "test": "vitest run",
13
+ "test:dev": "vitest dev",
14
+ "test:coverage": "vitest run --coverage",
15
+ "prepublishOnly": "yarn build"
16
+ },
17
+ "license": "AGPL-3.0",
6
18
  "keywords": [
7
19
  "react",
8
20
  "react-component"
@@ -16,6 +28,7 @@
16
28
  "devDependencies": {
17
29
  "@anatine/esbuild-decorators": "^0.2.19",
18
30
  "@hyrious/esbuild-plugin-commonjs": "^0.2.6",
31
+ "@rme-sdk/core-types": "^1.5.0",
19
32
  "@rollup/plugin-alias": "^5.1.1",
20
33
  "@rollup/plugin-commonjs": "28.0.1",
21
34
  "@rollup/plugin-json": "^6.1.0",
@@ -62,6 +75,7 @@
62
75
  "eslint-plugin-prettier": "^5.5.4",
63
76
  "eslint-plugin-react": "7.37.2",
64
77
  "eslint-plugin-react-hooks": "^5.2.0",
78
+ "jest-remirror": "^3.0.3",
65
79
  "jsdom": "^25.0.1",
66
80
  "lint-staged": "15.2.10",
67
81
  "postcss": "^8.5.6",
@@ -82,9 +96,7 @@
82
96
  "url": "^0.11.4",
83
97
  "vite": "^5.4.21",
84
98
  "vitest": "^3.2.4",
85
- "webdriverio": "^9.20.0",
86
- "@rme-sdk/core-types": "1.5.0",
87
- "jest-remirror": "3.0.3"
99
+ "webdriverio": "^9.20.0"
88
100
  },
89
101
  "browserslist": {
90
102
  "production": [
@@ -119,6 +131,24 @@
119
131
  "@lezer/highlight": "^1.2.3",
120
132
  "@lezer/javascript": "^1.5.4",
121
133
  "@ocavue/utils": "^0.7.1",
134
+ "@rme-sdk/core": "^1.5.0",
135
+ "@rme-sdk/core-utils": "^1.5.0",
136
+ "@rme-sdk/dev": "^1.5.1",
137
+ "@rme-sdk/extension-codemirror6": "^1.5.0",
138
+ "@rme-sdk/extension-count": "^1.5.0",
139
+ "@rme-sdk/extension-hard-break": "^1.5.0",
140
+ "@rme-sdk/extension-heading": "^1.5.0",
141
+ "@rme-sdk/extension-positioner": "^1.5.0",
142
+ "@rme-sdk/extension-tables": "^1.5.0",
143
+ "@rme-sdk/icons": "^1.5.0",
144
+ "@rme-sdk/main": "^1.5.0",
145
+ "@rme-sdk/pm": "^1.5.0",
146
+ "@rme-sdk/preset-core": "^1.5.0",
147
+ "@rme-sdk/prosemirror-flat-list": "^1.5.0",
148
+ "@rme-sdk/react": "^1.5.1",
149
+ "@rme-sdk/react-components": "^1.5.1",
150
+ "@rme-sdk/react-core": "^1.5.1",
151
+ "@rme-sdk/types": "^1.5.0",
122
152
  "@uiw/react-codemirror": "^4.25.2",
123
153
  "antd": "^6.1.3",
124
154
  "codemirror-lang-latex": "^0.2.0",
@@ -158,35 +188,6 @@
158
188
  "svgmoji": "^3.2.0",
159
189
  "void-elements": "^3.1.0",
160
190
  "yjs": "^13.6.27",
161
- "zens": "^0.2.1",
162
- "@rme-sdk/core": "1.5.0",
163
- "@rme-sdk/core-utils": "1.5.0",
164
- "@rme-sdk/dev": "1.5.1",
165
- "@rme-sdk/extension-count": "1.5.0",
166
- "@rme-sdk/extension-hard-break": "1.5.0",
167
- "@rme-sdk/extension-heading": "1.5.0",
168
- "@rme-sdk/icons": "1.5.0",
169
- "@rme-sdk/extension-tables": "1.5.0",
170
- "@rme-sdk/main": "1.5.0",
171
- "@rme-sdk/preset-core": "1.5.0",
172
- "@rme-sdk/extension-positioner": "1.5.0",
173
- "@rme-sdk/pm": "1.5.0",
174
- "@rme-sdk/prosemirror-flat-list": "1.5.0",
175
- "@rme-sdk/react": "1.5.1",
176
- "@rme-sdk/react-core": "1.5.1",
177
- "@rme-sdk/types": "1.5.0",
178
- "@rme-sdk/react-components": "1.5.1",
179
- "@rme-sdk/extension-codemirror6": "1.5.0"
180
- },
181
- "scripts": {
182
- "build": "pnpm clear && pnpm build-esbuild && pnpm types",
183
- "dev": "node ./esbuild.config.dev.mjs",
184
- "build-esbuild": "node esbuild.config.prod.mjs",
185
- "types": "node ./node_modules/rollup/dist/bin/rollup -c rollup.config.types.js",
186
- "prettier": "prettier --config ./.prettierrc.json --write \"src/**/*{.js,.jsx,.ts,.tsx,.css}\"",
187
- "clear": "rimraf dist",
188
- "test": "vitest run",
189
- "test:dev": "vitest dev",
190
- "test:coverage": "vitest run --coverage"
191
+ "zens": "^0.2.1"
191
192
  }
192
- }
193
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2024 drl990114
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.