stilo-editor 0.0.0-stage → 0.1.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/LICENSE +21 -0
  2. package/README.md +172 -2
  3. package/dist/characters--8h5uTeF.js +854 -0
  4. package/dist/content.css +161 -0
  5. package/dist/core/drop.d.ts +6 -0
  6. package/dist/core/editor.d.ts +108 -0
  7. package/dist/core/errors.d.ts +6 -0
  8. package/dist/core/events.d.ts +19 -0
  9. package/dist/core/extension-manager.d.ts +57 -0
  10. package/dist/core/extension.d.ts +43 -0
  11. package/dist/core/helpers/active.d.ts +33 -0
  12. package/dist/core/helpers/input-rules.d.ts +21 -0
  13. package/dist/core/helpers/lists.d.ts +12 -0
  14. package/dist/core/helpers/marks.d.ts +38 -0
  15. package/dist/core/helpers/nodes.d.ts +14 -0
  16. package/dist/core/helpers/parse-rules.d.ts +8 -0
  17. package/dist/core/html/css.d.ts +91 -0
  18. package/dist/core/html/parse.d.ts +7 -0
  19. package/dist/core/html/sanitize.d.ts +49 -0
  20. package/dist/core/html/serialize.d.ts +31 -0
  21. package/dist/core/types.d.ts +107 -0
  22. package/dist/extensions/blockquote/index.d.ts +15 -0
  23. package/dist/extensions/bold/index.d.ts +17 -0
  24. package/dist/extensions/bullet-list/index.d.ts +9 -0
  25. package/dist/extensions/clear-formatting/index.d.ts +12 -0
  26. package/dist/extensions/code/index.d.ts +15 -0
  27. package/dist/extensions/default-extensions/index.d.ts +46 -0
  28. package/dist/extensions/document/index.d.ts +17 -0
  29. package/dist/extensions/drop-cursor/index.d.ts +15 -0
  30. package/dist/extensions/gap-cursor/index.d.ts +6 -0
  31. package/dist/extensions/hard-break/index.d.ts +11 -0
  32. package/dist/extensions/heading/index.d.ts +24 -0
  33. package/dist/extensions/highlight/index.d.ts +24 -0
  34. package/dist/extensions/history/index.d.ts +21 -0
  35. package/dist/extensions/horizontal-rule/index.d.ts +11 -0
  36. package/dist/extensions/index.d.ts +27 -0
  37. package/dist/extensions/italic/index.d.ts +16 -0
  38. package/dist/extensions/link/index.d.ts +23 -0
  39. package/dist/extensions/list-item/index.d.ts +16 -0
  40. package/dist/extensions/move-block/index.d.ts +17 -0
  41. package/dist/extensions/ordered-list/index.d.ts +12 -0
  42. package/dist/extensions/paragraph/index.d.ts +14 -0
  43. package/dist/extensions/placeholder/index.d.ts +13 -0
  44. package/dist/extensions/strike/index.d.ts +16 -0
  45. package/dist/extensions/subscript/index.d.ts +16 -0
  46. package/dist/extensions/superscript/index.d.ts +17 -0
  47. package/dist/extensions/text/index.d.ts +12 -0
  48. package/dist/extensions/text-style/index.d.ts +14 -0
  49. package/dist/extensions/underline/index.d.ts +15 -0
  50. package/dist/index.d.ts +13 -0
  51. package/dist/index.js +1 -0
  52. package/dist/src-3tAxKI0c.js +1316 -0
  53. package/dist/style.css +797 -0
  54. package/dist/ui/components/character-picker.d.ts +22 -0
  55. package/dist/ui/components/characters.d.ts +10 -0
  56. package/dist/ui/components/color-button.d.ts +23 -0
  57. package/dist/ui/components/dropdown.d.ts +25 -0
  58. package/dist/ui/components/icon.d.ts +3 -0
  59. package/dist/ui/components/link-bubble.d.ts +19 -0
  60. package/dist/ui/components/link-popover.d.ts +20 -0
  61. package/dist/ui/components/popover.d.ts +27 -0
  62. package/dist/ui/components/shortcut.d.ts +11 -0
  63. package/dist/ui/i18n/en.d.ts +3 -0
  64. package/dist/ui/i18n/it.d.ts +3 -0
  65. package/dist/ui/i18n/types.d.ts +4 -0
  66. package/dist/ui/index.d.ts +19 -0
  67. package/dist/ui/toolbar/items.d.ts +12 -0
  68. package/dist/ui/toolbar/palette.d.ts +6 -0
  69. package/dist/ui/toolbar/toolbar.d.ts +28 -0
  70. package/dist/ui/toolbar/types.d.ts +87 -0
  71. package/dist/ui.css +635 -0
  72. package/dist/ui.js +1292 -0
  73. package/package.json +86 -4
@@ -0,0 +1,17 @@
1
+ import type { Command } from 'prosemirror-state';
2
+ declare module '../../core/types' {
3
+ interface Commands {
4
+ /** Makes the selection superscript (replacing subscript). */
5
+ setSuperscript: () => Command;
6
+ /** Removes superscript from the selection. */
7
+ unsetSuperscript: () => Command;
8
+ /** Removes superscript if the whole selection is superscript, otherwise adds it. */
9
+ toggleSuperscript: () => Command;
10
+ }
11
+ }
12
+ /**
13
+ * The `superscript` mark (`<sup>`), docs/SPEC.md F-207. Also parsed from
14
+ * `vertical-align: super`. Subscript and superscript exclude each other through the mark group
15
+ * `script`.
16
+ */
17
+ export declare const Superscript: (options?: Partial<Record<string, never>> | undefined) => import("../..").Extension<Record<string, never>>;
@@ -0,0 +1,12 @@
1
+ import type { Command } from 'prosemirror-state';
2
+ declare module '../../core/types' {
3
+ interface Commands {
4
+ /**
5
+ * Replaces the selection with `text`, with the marks active at the cursor. Returns `false`
6
+ * for an empty string.
7
+ */
8
+ insertText: (text: string) => Command;
9
+ }
10
+ }
11
+ /** The `text` node, and the `insertText` command. */
12
+ export declare const Text: (options?: Partial<Record<string, never>> | undefined) => import("../..").Extension<Record<string, never>>;
@@ -0,0 +1,14 @@
1
+ import type { Command } from 'prosemirror-state';
2
+ declare module '../../core/types' {
3
+ interface Commands {
4
+ /** Colors the selection. Returns `false` when `color` is not a valid CSS color. */
5
+ setColor: (color: string) => Command;
6
+ /** Removes the text color from the selection. */
7
+ unsetColor: () => Command;
8
+ }
9
+ }
10
+ /**
11
+ * The `textStyle` mark (`<span style="color: x">`), docs/SPEC.md F-208. Also parsed from
12
+ * `<font color>`. Font family and size (F-210, F-211) will be further attributes of this mark.
13
+ */
14
+ export declare const TextStyle: (options?: Partial<Record<string, never>> | undefined) => import("../..").Extension<Record<string, never>>;
@@ -0,0 +1,15 @@
1
+ import type { Command } from 'prosemirror-state';
2
+ declare module '../../core/types' {
3
+ interface Commands {
4
+ /** Adds underline to the selection. */
5
+ setUnderline: () => Command;
6
+ /** Removes underline from the selection. */
7
+ unsetUnderline: () => Command;
8
+ /** Removes underline if the whole selection is underlined, otherwise adds it. */
9
+ toggleUnderline: () => Command;
10
+ }
11
+ }
12
+ /**
13
+ * The `underline` mark (`<u>`), docs/SPEC.md F-203. Also parsed from `text-decoration: underline`.
14
+ */
15
+ export declare const Underline: (options?: Partial<Record<string, never>> | undefined) => import("../..").Extension<Record<string, never>>;
@@ -0,0 +1,13 @@
1
+ export { Editor } from './core/editor';
2
+ export { StiloError } from './core/errors';
3
+ export type { EventHandler } from './core/events';
4
+ export type { Extension, ExtensionContext, ExtensionSpec } from './core/extension';
5
+ export { DEFAULT_PRIORITY, defineExtension } from './core/extension';
6
+ export { attrsMatch, isMarkActive, isNodeActive } from './core/helpers/active';
7
+ export { markInputRule } from './core/helpers/input-rules';
8
+ export { toggleList } from './core/helpers/lists';
9
+ export { setMark, toggleMark, unsetMark } from './core/helpers/marks';
10
+ export { insertBlock, insertBlockNode } from './core/helpers/nodes';
11
+ export { textDecorationRules } from './core/helpers/parse-rules';
12
+ export type { CommandFactories, CommandFactory, CommandName, CommandRunner, CommandRunners, Commands, EditorEvents, EditorOptions, JSONContent, SetContentOptions, } from './core/types';
13
+ export * from './extensions';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { D as Blockquote, E as Bold, T as BulletList, w as ClearFormatting, C as Code, I as DEFAULT_PRIORITY, S as Document, x as DropCursor, R as Editor, b as GapCursor, y as HardBreak, v as Heading, _ as Highlight, g as History, h as HorizontalRule, m as Italic, p as Link, f as ListItem, d as MoveBlock, u as OrderedList, l as Paragraph, c as Placeholder, H as StiloError, s as Strike, o as Subscript, a as Superscript, i as Text, r as TextStyle, n as Underline, z as attrsMatch, t as defaultExtensions, L as defineExtension, k as insertBlock, A as insertBlockNode, B as isMarkActive, V as isNodeActive, F as markInputRule, j as setMark, O as textDecorationRules, P as toggleList, M as toggleMark, N as unsetMark } from "./src-3tAxKI0c.js";