@coorax/react 0.0.0-canary.2 → 0.0.0-canary.4
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/dist/components/commons/button.d.ts +8 -0
- package/dist/components/corax-context-provider.d.ts +6 -0
- package/dist/components/corax-flow.d.ts +4 -0
- package/dist/components/fallbacks/image.fallback.d.ts +3 -0
- package/dist/components/slots/buttons/block-actions-button.d.ts +3 -0
- package/dist/components/slots/buttons/toolbar-button.d.ts +3 -0
- package/dist/components/slots/maps/block-actions.d.ts +1 -0
- package/dist/components/slots/maps/overlays.d.ts +1 -0
- package/dist/components/slots/maps/text-inspector.d.ts +2 -0
- package/dist/components/slots/maps/toolbar.d.ts +1 -0
- package/dist/components/slots/overlays/focus-overlay.d.ts +3 -0
- package/dist/components/slots/overlays/hover-overlay.d.ts +3 -0
- package/dist/components/slots/overlays/selection-overlay.d.ts +3 -0
- package/dist/components/slots/slot-button.d.ts +6 -0
- package/dist/components/slots/slot-component.d.ts +5 -0
- package/dist/components/slots/slots.d.ts +4 -0
- package/dist/constants/field.constants.d.ts +2 -0
- package/dist/hooks/custom/use-custom-ref.d.ts +1 -0
- package/dist/hooks/custom/use-isomorphic-layout-effect.d.ts +2 -0
- package/{src/hooks/index.ts → dist/hooks/index.d.ts} +1 -0
- package/dist/hooks/use-block-entry.d.ts +2 -0
- package/dist/hooks/use-block.d.ts +2 -0
- package/dist/hooks/use-flow.d.ts +17 -0
- package/dist/hooks/use-keyboard.d.ts +10 -0
- package/dist/hooks/use-registry.d.ts +3 -0
- package/dist/hooks/use-renderer.d.ts +2 -0
- package/dist/hooks/use-slice.d.ts +2 -0
- package/dist/hooks/use-slots.d.ts +2 -0
- package/dist/hooks/use-tasks.d.ts +7 -0
- package/dist/hooks/use-text-input.d.ts +2 -0
- package/dist/hooks/use-ui-context.d.ts +2 -0
- package/dist/hooks/useSelection.d.ts +2 -0
- package/{src/index.ts → dist/index.d.ts} +7 -4
- package/dist/index.js +2774 -0
- package/dist/lib/comp.utils.d.ts +4 -0
- package/dist/lib/func.utils.d.ts +3 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/selection.utils.d.ts +5 -0
- package/dist/lib/slots.utils.d.ts +4 -0
- package/dist/lifecycle/fields/focus.events/onbeforeinput.d.ts +3 -0
- package/dist/lifecycle/fields/focus.events/onblur.d.ts +3 -0
- package/dist/lifecycle/fields/focus.events/onfocus.d.ts +3 -0
- package/dist/lifecycle/fields/keyboard.events/onkeydown.d.ts +3 -0
- package/dist/lifecycle/fields/lifecycle.fields.d.ts +12 -0
- package/dist/lifecycle/fields/lifecycle.fields.types.d.ts +15 -0
- package/dist/lifecycle/fields/lifecycle.utils.d.ts +2 -0
- package/dist/lifecycle/fields/mouse.events/onclick.d.ts +3 -0
- package/dist/lifecycle/fields/mouse.events/ondoubleclick.d.ts +4 -0
- package/dist/lifecycle/fields/mouse.events/onmouseenter.d.ts +3 -0
- package/dist/lifecycle/fields/mouse.events/onmouseleave.d.ts +3 -0
- package/dist/lifecycle/fields/synthetic.events/onload.d.ts +3 -0
- package/dist/lifecycle/fields/synthetic.events/onselect.d.ts +3 -0
- package/dist/lifecycle/index.d.ts +3 -0
- package/dist/modules/autosave.module.d.ts +31 -0
- package/dist/modules/fallbacks.module.d.ts +7 -0
- package/dist/modules/slots.module.d.ts +7 -0
- package/dist/modules/ui-primitives.module.d.ts +7 -0
- package/dist/primitives/fields/field.primitives.d.ts +2 -0
- package/dist/primitives/index.d.ts +3 -0
- package/{src/registry/fallbacks.registry.tsx → dist/registry/fallbacks.registry.d.ts} +3 -4
- package/dist/registry/primitives.registry.d.ts +22 -0
- package/dist/registry/registry.d.ts +15 -0
- package/dist/registry/slots.registry.d.ts +4 -0
- package/{src/registry/ui.primitives.registry.tsx → dist/registry/ui.primitives.registry.d.ts} +3 -4
- package/dist/renderer/renderer.d.ts +23 -0
- package/dist/renderer/renderer.test.d.ts +1 -0
- package/{src/renderer/renderer.types.ts → dist/renderer/renderer.types.d.ts} +0 -1
- package/dist/renderer/renderer.utils.d.ts +14 -0
- package/dist/renderer/utils/divider.renderer.utils.d.ts +6 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/localdb/db/db.d.ts +74 -0
- package/dist/services/localdb/db/db.test.d.ts +1 -0
- package/dist/services/localdb/lexer/lexer.d.ts +14 -0
- package/dist/services/localdb/lexer/lexer.test.d.ts +1 -0
- package/dist/services/localdb/lexer/lexer.types.d.ts +5 -0
- package/dist/services/localdb/operator/operator.d.ts +10 -0
- package/dist/services/localdb/parser/parser.constants.d.ts +3 -0
- package/dist/services/localdb/parser/parser.d.ts +14 -0
- package/dist/services/localdb/parser/parser.test.d.ts +1 -0
- package/dist/services/localdb/parser/parser.types.d.ts +43 -0
- package/dist/services/localdb/sheet/sheet.constants.d.ts +3 -0
- package/dist/services/localdb/sheet/sheet.d.ts +14 -0
- package/dist/services/localdb/sheet/sheet.types.d.ts +13 -0
- package/dist/styles.css +1094 -0
- package/package.json +29 -12
- package/.oxlintrc.json +0 -8
- package/src/components/commons/button.tsx +0 -59
- package/src/components/corax-context-provider.tsx +0 -47
- package/src/components/corax-flow.tsx +0 -44
- package/src/components/fallbacks/image.fallback.tsx +0 -23
- package/src/components/slots/buttons/block-actions-button.tsx +0 -85
- package/src/components/slots/buttons/toolbar-button.tsx +0 -40
- package/src/components/slots/maps/block-actions.tsx +0 -84
- package/src/components/slots/maps/overlays.tsx +0 -9
- package/src/components/slots/maps/text-inspector.tsx +0 -5
- package/src/components/slots/maps/toolbar.tsx +0 -79
- package/src/components/slots/overlays/focus-overlay.tsx +0 -30
- package/src/components/slots/overlays/hover-overlay.tsx +0 -18
- package/src/components/slots/overlays/selection-overlay.tsx +0 -20
- package/src/components/slots/slot-button.tsx +0 -20
- package/src/components/slots/slot-component.tsx +0 -17
- package/src/components/slots/slots.tsx +0 -29
- package/src/constants/field.constants.ts +0 -3
- package/src/hooks/custom/use-custom-ref.ts +0 -11
- package/src/hooks/use-block-entry.ts +0 -44
- package/src/hooks/use-block.ts +0 -11
- package/src/hooks/use-flow.ts +0 -83
- package/src/hooks/use-keyboard.ts +0 -66
- package/src/hooks/use-registry.ts +0 -18
- package/src/hooks/use-renderer.ts +0 -8
- package/src/hooks/use-slice.ts +0 -13
- package/src/hooks/use-slots.ts +0 -13
- package/src/hooks/use-tasks.ts +0 -33
- package/src/hooks/use-text-input.ts +0 -83
- package/src/hooks/use-ui-context.ts +0 -16
- package/src/hooks/useSelection.ts +0 -27
- package/src/lib/comp.utils.tsx +0 -44
- package/src/lib/func.utils.ts +0 -15
- package/src/lib/selection.utils.ts +0 -33
- package/src/lib/slots.utils.tsx +0 -23
- package/src/lifecycle/fields/focus.events/onbeforeinput.ts +0 -21
- package/src/lifecycle/fields/focus.events/onblur.ts +0 -19
- package/src/lifecycle/fields/focus.events/onfocus.ts +0 -16
- package/src/lifecycle/fields/keyboard.events/onkeydown.ts +0 -128
- package/src/lifecycle/fields/lifecycle.fields.ts +0 -116
- package/src/lifecycle/fields/lifecycle.fields.types.ts +0 -33
- package/src/lifecycle/fields/lifecycle.utils.ts +0 -26
- package/src/lifecycle/fields/mouse.events/onclick.ts +0 -79
- package/src/lifecycle/fields/mouse.events/ondoubleclick.ts +0 -27
- package/src/lifecycle/fields/mouse.events/onmouseenter.ts +0 -27
- package/src/lifecycle/fields/mouse.events/onmouseleave.ts +0 -21
- package/src/lifecycle/fields/synthetic.events/onload.ts +0 -16
- package/src/lifecycle/fields/synthetic.events/onselect.ts +0 -57
- package/src/lifecycle/index.ts +0 -1
- package/src/modules/autosave.module.ts +0 -238
- package/src/modules/fallbacks.module.tsx +0 -19
- package/src/modules/slots.module.tsx +0 -28
- package/src/modules/ui-primitives.module.tsx +0 -20
- package/src/primitives/fields/field.primitives.tsx +0 -86
- package/src/primitives/index.ts +0 -8
- package/src/registry/primitives.registry.tsx +0 -57
- package/src/registry/registry.ts +0 -44
- package/src/registry/slots.registry.tsx +0 -6
- package/src/renderer/renderer.test.ts +0 -34
- package/src/renderer/renderer.tsx +0 -164
- package/src/renderer/renderer.utils.tsx +0 -139
- package/src/renderer/utils/divider.renderer.utils.tsx +0 -53
- package/src/services/localdb/db/db.test.ts +0 -351
- package/src/services/localdb/db/db.ts +0 -628
- package/src/services/localdb/lexer/lexer.test.ts +0 -123
- package/src/services/localdb/lexer/lexer.ts +0 -173
- package/src/services/localdb/lexer/lexer.types.ts +0 -34
- package/src/services/localdb/operator/operator.ts +0 -16
- package/src/services/localdb/parser/parser.constants.ts +0 -23
- package/src/services/localdb/parser/parser.test.ts +0 -172
- package/src/services/localdb/parser/parser.ts +0 -427
- package/src/services/localdb/parser/parser.types.ts +0 -56
- package/src/services/localdb/sheet/sheet.constants.ts +0 -32
- package/src/services/localdb/sheet/sheet.ts +0 -47
- package/src/services/localdb/sheet/sheet.types.ts +0 -38
- package/tsconfig.app.json +0 -26
- package/tsconfig.json +0 -9
- package/tsconfig.node.json +0 -9
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -9
- /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
- /package/{src/components/slots/index.ts → dist/components/slots/index.d.ts} +0 -0
- /package/{src/components/slots/maps/index.ts → dist/components/slots/maps/index.d.ts} +0 -0
- /package/{src/modules/index.ts → dist/modules/index.d.ts} +0 -0
- /package/{src/registry/index.ts → dist/registry/index.d.ts} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants>): React.JSX.Element;
|
|
8
|
+
export { Button };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SlotBaseProps } from "@coorax/core";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const BlockActionButton: React.MemoExoticComponent<({ c, ui, ...rest }: SlotBaseProps<"block-actions", "blocks.insert" | "actions.toggle", "button">) => React.JSX.Element | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BlockActions({ className, children, ...rest }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Overlays(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Toolbar({ className, children, ...rest }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCustomRef<T>(factory: T | (() => T)): import("react").RefObject<T | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function editorRectFromDomElement(domElement: HTMLElement): {
|
|
2
|
+
scrollTop: number;
|
|
3
|
+
scrollLeft: number;
|
|
4
|
+
clientLeft: number;
|
|
5
|
+
clientTop: number;
|
|
6
|
+
top: number;
|
|
7
|
+
left: number;
|
|
8
|
+
bottom: number;
|
|
9
|
+
right: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
offsetTop: number;
|
|
13
|
+
offsetLeft: number;
|
|
14
|
+
offsetWidth: number;
|
|
15
|
+
offsetHeight: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function useFlow(): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SlotKey } from "@coorax/core";
|
|
2
|
+
export declare function useRegistryComponent(name: SlotKey): import("react").JSXElementConstructor<any> | undefined;
|
|
3
|
+
export declare function useUIPrimitivesRegistry(name: SlotKey): import("..").UIPrimitivesComponent | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TaskFunction, TaskID, TaskName, TaskState } from "@coorax/core";
|
|
2
|
+
export interface UseTasksReturn extends TaskState {
|
|
3
|
+
flush: () => Promise<void>;
|
|
4
|
+
cancel: () => boolean;
|
|
5
|
+
schedule: (delay: number, fn: TaskFunction, taskId?: TaskID) => () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useTasks<T extends TaskName = TaskName>(name: T): UseTasksReturn;
|
|
@@ -2,10 +2,13 @@ import type { FieldLifeCycleEvProps } from "./lifecycle/fields/lifecycle.fields.
|
|
|
2
2
|
export * from "./modules";
|
|
3
3
|
export * from "./components";
|
|
4
4
|
export * from "./hooks";
|
|
5
|
+
export * from "./registry";
|
|
6
|
+
export * from "./lifecycle";
|
|
7
|
+
export * from "./services";
|
|
8
|
+
export * from "./lib";
|
|
5
9
|
export * from "@coorax/core";
|
|
6
|
-
|
|
7
10
|
declare module "@coorax/core" {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
interface TEventMap {
|
|
12
|
+
"field:lifecycle": FieldLifeCycleEvProps;
|
|
13
|
+
}
|
|
11
14
|
}
|