@textbus/xnote 0.0.1-alpha.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 (92) hide show
  1. package/.idea/codeStyles/Project.xml +49 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/dictionaries/tanbo.xml +3 -0
  4. package/.idea/inspectionProfiles/Project_Default.xml +16 -0
  5. package/.idea/modules.xml +8 -0
  6. package/.idea/vcs.xml +6 -0
  7. package/.idea/watcherTasks.xml +4 -0
  8. package/.idea/xnote.iml +12 -0
  9. package/README.md +3 -0
  10. package/bundles/components/_api.d.ts +11 -0
  11. package/bundles/components/button/button.d.ts +8 -0
  12. package/bundles/components/component-toolbar/component-toolbar.d.ts +8 -0
  13. package/bundles/components/divider/divider.d.ts +1 -0
  14. package/bundles/components/drag-resize/drag-resize.d.ts +8 -0
  15. package/bundles/components/dropdown/dropdown-context.service.d.ts +17 -0
  16. package/bundles/components/dropdown/dropdown-menu.d.ts +10 -0
  17. package/bundles/components/dropdown/dropdown.d.ts +21 -0
  18. package/bundles/components/dropdown/dropdown.service.d.ts +7 -0
  19. package/bundles/components/menu-item/menu-item.d.ts +10 -0
  20. package/bundles/components/popup/popup.d.ts +9 -0
  21. package/bundles/components/toolbar-item/toolbar-item.d.ts +2 -0
  22. package/bundles/editor.d.ts +9 -0
  23. package/bundles/index.esm.js +5257 -0
  24. package/bundles/index.js +5365 -0
  25. package/bundles/plugins/_api.d.ts +8 -0
  26. package/bundles/plugins/_common/_api.d.ts +11 -0
  27. package/bundles/plugins/_common/attr.tool.d.ts +11 -0
  28. package/bundles/plugins/_common/block.tool.d.ts +1 -0
  29. package/bundles/plugins/_common/bold.tool.d.ts +1 -0
  30. package/bundles/plugins/_common/code.tool.d.ts +1 -0
  31. package/bundles/plugins/_common/color.tool.d.ts +11 -0
  32. package/bundles/plugins/_common/font-family.tool.d.ts +2 -0
  33. package/bundles/plugins/_common/font-size.tool.d.ts +1 -0
  34. package/bundles/plugins/_common/italic.tool.d.ts +1 -0
  35. package/bundles/plugins/_common/link.tool.d.ts +4 -0
  36. package/bundles/plugins/_common/strike-through.tool.d.ts +1 -0
  37. package/bundles/plugins/_common/underline.tool.d.ts +1 -0
  38. package/bundles/plugins/hooks/active-block.d.ts +17 -0
  39. package/bundles/plugins/hooks/block-transform.d.ts +1 -0
  40. package/bundles/plugins/left-toolbar/insert-tool.d.ts +4 -0
  41. package/bundles/plugins/left-toolbar/left-toolbar.d.ts +1 -0
  42. package/bundles/plugins/left-toolbar/left-toolbar.plugin.d.ts +7 -0
  43. package/bundles/plugins/toolbar/toolbar.d.ts +1 -0
  44. package/bundles/plugins/toolbar/toolbar.plugin.d.ts +7 -0
  45. package/bundles/public-api.d.ts +5 -0
  46. package/bundles/services/_api.d.ts +2 -0
  47. package/bundles/services/editor.service.d.ts +3 -0
  48. package/bundles/services/refresh.service.d.ts +4 -0
  49. package/bundles/textbus/_api.d.ts +6 -0
  50. package/bundles/textbus/_utils/matcher.d.ts +56 -0
  51. package/bundles/textbus/attributes/_api.d.ts +3 -0
  52. package/bundles/textbus/attributes/heading.attr.d.ts +5 -0
  53. package/bundles/textbus/attributes/text-align.attr.d.ts +5 -0
  54. package/bundles/textbus/attributes/text-indent.attr.d.ts +5 -0
  55. package/bundles/textbus/components/_api.d.ts +11 -0
  56. package/bundles/textbus/components/blockqoute/blockquote.component.d.ts +17 -0
  57. package/bundles/textbus/components/highlight-box/highlight-box.component.d.ts +18 -0
  58. package/bundles/textbus/components/image/image.component.d.ts +16 -0
  59. package/bundles/textbus/components/list/list.component.d.ts +18 -0
  60. package/bundles/textbus/components/paragraph/paragraph.component.d.ts +17 -0
  61. package/bundles/textbus/components/root/root.component.d.ts +18 -0
  62. package/bundles/textbus/components/source-code/source-code.component.d.ts +35 -0
  63. package/bundles/textbus/components/table/_utils.d.ts +1 -0
  64. package/bundles/textbus/components/table/components/left-bar.d.ts +8 -0
  65. package/bundles/textbus/components/table/components/resize-column.d.ts +8 -0
  66. package/bundles/textbus/components/table/components/resize-row.d.ts +7 -0
  67. package/bundles/textbus/components/table/components/scroll.d.ts +6 -0
  68. package/bundles/textbus/components/table/components/selection-mask.d.ts +13 -0
  69. package/bundles/textbus/components/table/components/top-bar.d.ts +8 -0
  70. package/bundles/textbus/components/table/table-component.view.d.ts +7 -0
  71. package/bundles/textbus/components/table/table.component.d.ts +30 -0
  72. package/bundles/textbus/components/table/table.service.d.ts +14 -0
  73. package/bundles/textbus/components/todolist/todolist.component.d.ts +17 -0
  74. package/bundles/textbus/components/video/video.component.d.ts +17 -0
  75. package/bundles/textbus/formatters/_api.d.ts +10 -0
  76. package/bundles/textbus/formatters/_config.d.ts +2 -0
  77. package/bundles/textbus/formatters/background-color.d.ts +4 -0
  78. package/bundles/textbus/formatters/bold.d.ts +6 -0
  79. package/bundles/textbus/formatters/code.d.ts +6 -0
  80. package/bundles/textbus/formatters/color.d.ts +4 -0
  81. package/bundles/textbus/formatters/font-family.d.ts +4 -0
  82. package/bundles/textbus/formatters/font-size.d.ts +4 -0
  83. package/bundles/textbus/formatters/italic.d.ts +6 -0
  84. package/bundles/textbus/formatters/link.d.ts +8 -0
  85. package/bundles/textbus/formatters/strike-through.d.ts +6 -0
  86. package/bundles/textbus/formatters/underline.d.ts +6 -0
  87. package/bundles/textbus/hooks/_api.d.ts +3 -0
  88. package/bundles/textbus/hooks/use-block-content.d.ts +2 -0
  89. package/bundles/textbus/hooks/use-output.d.ts +1 -0
  90. package/bundles/textbus/hooks/use-readonly.d.ts +1 -0
  91. package/bundles/textbus/injection-tokens.d.ts +2 -0
  92. package/package.json +68 -0
@@ -0,0 +1,49 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <code_scheme name="Project" version="173">
3
+ <JSCodeStyleSettings version="0">
4
+ <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
5
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
6
+ <option name="USE_DOUBLE_QUOTES" value="false" />
7
+ <option name="FORCE_QUOTE_STYlE" value="true" />
8
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
9
+ </JSCodeStyleSettings>
10
+ <TypeScriptCodeStyleSettings version="0">
11
+ <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
12
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
13
+ <option name="USE_DOUBLE_QUOTES" value="false" />
14
+ <option name="FORCE_QUOTE_STYlE" value="true" />
15
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
16
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
17
+ </TypeScriptCodeStyleSettings>
18
+ <codeStyleSettings language="HTML">
19
+ <indentOptions>
20
+ <option name="INDENT_SIZE" value="2" />
21
+ </indentOptions>
22
+ </codeStyleSettings>
23
+ <codeStyleSettings language="JavaScript">
24
+ <option name="RIGHT_MARGIN" value="140" />
25
+ <indentOptions>
26
+ <option name="INDENT_SIZE" value="2" />
27
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
28
+ </indentOptions>
29
+ </codeStyleSettings>
30
+ <codeStyleSettings language="SCSS">
31
+ <indentOptions>
32
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
33
+ <option name="TAB_SIZE" value="2" />
34
+ </indentOptions>
35
+ </codeStyleSettings>
36
+ <codeStyleSettings language="TypeScript">
37
+ <option name="RIGHT_MARGIN" value="140" />
38
+ <indentOptions>
39
+ <option name="INDENT_SIZE" value="2" />
40
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
41
+ </indentOptions>
42
+ </codeStyleSettings>
43
+ <codeStyleSettings language="Vue">
44
+ <indentOptions>
45
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
46
+ </indentOptions>
47
+ </codeStyleSettings>
48
+ </code_scheme>
49
+ </component>
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -0,0 +1,3 @@
1
+ <component name="ProjectDictionaryState">
2
+ <dictionary name="tanbo" />
3
+ </component>
@@ -0,0 +1,16 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="CssUnknownProperty" enabled="true" level="WARNING" enabled_by_default="true">
5
+ <option name="myCustomPropertiesEnabled" value="true" />
6
+ <option name="myIgnoreVendorSpecificProperties" value="false" />
7
+ <option name="myCustomPropertiesList">
8
+ <value>
9
+ <list size="1">
10
+ <item index="0" class="java.lang.String" itemvalue="transition-style" />
11
+ </list>
12
+ </value>
13
+ </option>
14
+ </inspection_tool>
15
+ </profile>
16
+ </component>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/xnote.iml" filepath="$PROJECT_DIR$/.idea/xnote.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectTasksOptions" suppressed-tasks="SCSS" />
4
+ </project>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+ </content>
9
+ <orderEntry type="inheritedJdk" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ </component>
12
+ </module>
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ XNote
2
+ ====================
3
+ Textbus 仿飞书编辑器
@@ -0,0 +1,11 @@
1
+ export * from './button/button';
2
+ export * from './component-toolbar/component-toolbar';
3
+ export * from './divider/divider';
4
+ export * from './drag-resize/drag-resize';
5
+ export * from './dropdown/dropdown';
6
+ export * from './dropdown/dropdown-menu';
7
+ export * from './dropdown/dropdown.service';
8
+ export * from './dropdown/dropdown-context.service';
9
+ export * from './menu-item/menu-item';
10
+ export * from './popup/popup';
11
+ export * from './toolbar-item/toolbar-item';
@@ -0,0 +1,8 @@
1
+ import { ButtonHTMLAttributes } from '@viewfly/platform-browser';
2
+ import { Props } from '@viewfly/core';
3
+ export interface ButtonProps extends Props, ButtonHTMLAttributes<HTMLButtonElement> {
4
+ highlight?: boolean;
5
+ arrow?: boolean;
6
+ ordinary?: boolean;
7
+ }
8
+ export declare function Button(props: ButtonProps): () => any;
@@ -0,0 +1,8 @@
1
+ import { StyleValue } from '@viewfly/platform-browser';
2
+ import { Props } from '@viewfly/core';
3
+ export interface ComponentToolbarProps extends Props {
4
+ visible?: boolean;
5
+ style?: StyleValue;
6
+ innerStyle?: StyleValue;
7
+ }
8
+ export declare function ComponentToolbar(props: ComponentToolbarProps): () => any;
@@ -0,0 +1 @@
1
+ export declare function Divider(): () => any;
@@ -0,0 +1,8 @@
1
+ import { Props, StaticRef } from '@viewfly/core';
2
+ import { ImageComponent } from '../../textbus/components/image/image.component';
3
+ import { VideoComponent } from '../../textbus/components/video/video.component';
4
+ export interface DragResizeProps extends Props {
5
+ component: ImageComponent | VideoComponent;
6
+ source: StaticRef<HTMLImageElement | HTMLVideoElement>;
7
+ }
8
+ export declare function DragResize(props: DragResizeProps): () => any;
@@ -0,0 +1,17 @@
1
+ import { Injector } from '@viewfly/core';
2
+ import { Observable } from '@textbus/core';
3
+ import { DropdownService } from './dropdown.service';
4
+ export declare class DropdownContextService {
5
+ private dropdownService;
6
+ private injector;
7
+ id: number;
8
+ isOpen: boolean;
9
+ onOpenStateChange: Observable<boolean>;
10
+ canHide: boolean;
11
+ private openStateChangeEvent;
12
+ private timer;
13
+ private parentDropdownContextService;
14
+ constructor(dropdownService: DropdownService, injector: Injector);
15
+ open(): void;
16
+ hide(delay?: boolean): void;
17
+ }
@@ -0,0 +1,10 @@
1
+ import { Props, StaticRef } from '@viewfly/core';
2
+ export interface DropdownMenuProps extends Props {
3
+ abreast?: boolean;
4
+ triggerRef: StaticRef<HTMLElement>;
5
+ width?: string;
6
+ }
7
+ export declare const DropdownMenuPortal: (props: DropdownMenuProps) => {
8
+ $portalHost: HTMLElement;
9
+ $render: () => import("@viewfly/core").JSXNode<string | JSXInternal.ComponentSetup<any>>;
10
+ };
@@ -0,0 +1,21 @@
1
+ import { JSXNode, Props } from '@viewfly/core';
2
+ import { HTMLAttributes } from '@viewfly/platform-browser';
3
+ export type DropdownTriggerTypes = 'hover' | 'click';
4
+ export interface DropdownMenu {
5
+ disabled?: boolean;
6
+ label: JSXNode;
7
+ value: any;
8
+ }
9
+ export interface DropdownProps extends Props {
10
+ trigger?: DropdownTriggerTypes;
11
+ menu: DropdownMenu[] | JSXNode;
12
+ width?: string;
13
+ class?: HTMLAttributes<HTMLElement>['class'];
14
+ style?: HTMLAttributes<HTMLElement>['style'];
15
+ abreast?: boolean;
16
+ onCheck?(value: any): void;
17
+ }
18
+ export declare const Dropdown: (props: DropdownProps) => {
19
+ isShow(b: boolean): void;
20
+ $render: () => any;
21
+ };
@@ -0,0 +1,7 @@
1
+ import { Observable } from '@textbus/core';
2
+ export declare class DropdownService {
3
+ onSiblingOpen: Observable<number>;
4
+ private siblingOpenEvent;
5
+ constructor();
6
+ notify(id: number): void;
7
+ }
@@ -0,0 +1,10 @@
1
+ import { JSXNode, Props } from '@viewfly/core';
2
+ export interface MenuItemProps extends Props {
3
+ disabled?: boolean;
4
+ checked?: boolean;
5
+ icon?: JSXNode;
6
+ value?: any;
7
+ arrow?: boolean;
8
+ onClick?(value: any): void;
9
+ }
10
+ export declare function MenuItem(props: MenuItemProps): () => any;
@@ -0,0 +1,9 @@
1
+ import { Props } from '@viewfly/core';
2
+ export interface PopupProps extends Props {
3
+ left: number;
4
+ top: number;
5
+ }
6
+ export declare function Popup(props: PopupProps): {
7
+ $portalHost: HTMLElement;
8
+ $render: () => import("@viewfly/core").JSXNode<string | JSXInternal.ComponentSetup<any>>;
9
+ };
@@ -0,0 +1,2 @@
1
+ import { Props } from '@viewfly/core';
2
+ export declare function ToolbarItem(props: Props): () => any;
@@ -0,0 +1,9 @@
1
+ import { CollaborateConfig } from '@textbus/collaborate';
2
+ import { Textbus } from '@textbus/core';
3
+ import './textbus/doc.scss';
4
+ export interface XNoteConfig {
5
+ content?: string;
6
+ collaborateConfig?: CollaborateConfig;
7
+ readonly?: boolean;
8
+ }
9
+ export declare function createXNote(host: HTMLElement, config?: XNoteConfig): Promise<Textbus>;