@machinerd/js-module 0.9.0 → 0.10.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 +0 -6
- package/dist/{api-client-C0sbSOQf.mjs → api-client-B-kwZogn.mjs} +1 -1
- package/dist/hooks/common/index.cjs +1 -1
- package/dist/hooks/common/index.d.cts +6 -7
- package/dist/hooks/common/index.d.mts +6 -7
- package/dist/hooks/common/index.mjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/providers/api-client/index.cjs +1 -1
- package/dist/providers/api-client/index.d.cts +3 -3
- package/dist/providers/api-client/index.d.mts +3 -3
- package/dist/providers/api-client/index.mjs +1 -1
- package/dist/providers/noti-stack/index.d.cts +2 -2
- package/dist/{skeleton-Y22bmaaB.mjs → skeleton-azZrk5-3.mjs} +1 -1
- package/dist/styles/index.css +0 -251
- package/dist/ui/carousel/index.cjs +1 -1
- package/dist/ui/carousel/index.d.cts +9 -9
- package/dist/ui/carousel/index.d.mts +9 -9
- package/dist/ui/carousel/index.mjs +1 -1
- package/dist/ui/dialog/index.cjs +1 -1
- package/dist/ui/dialog/index.d.cts +2 -2
- package/dist/ui/dialog/index.d.mts +4 -4
- package/dist/ui/dialog/index.mjs +1 -1
- package/dist/ui/dnd/index.d.cts +2 -2
- package/dist/ui/image/index.cjs +1 -1
- package/dist/ui/image/index.d.cts +8 -8
- package/dist/ui/image/index.d.mts +8 -8
- package/dist/ui/image/index.mjs +1 -1
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.d.cts +55 -12
- package/dist/ui/index.d.mts +58 -15
- package/dist/ui/index.mjs +1 -1
- package/dist/ui/motion-dialog/index.cjs +1 -1
- package/dist/ui/motion-dialog/index.mjs +1 -1
- package/dist/ui/sheet/index.cjs +1 -1
- package/dist/ui/sheet/index.d.cts +2 -2
- package/dist/ui/sheet/index.d.mts +2 -2
- package/dist/ui/sheet/index.mjs +1 -1
- package/dist/ui/switch/index.cjs +1 -1
- package/dist/ui/switch/index.mjs +1 -1
- package/dist/ui/tooltip/index.cjs +1 -1
- package/dist/ui/tooltip/index.d.cts +2 -2
- package/dist/ui/tooltip/index.mjs +1 -1
- package/dist/{use-subset-image-o_gmC1HL.cjs → use-subset-image-CTy5mCLo.cjs} +1 -1
- package/dist/{use-subset-image-Df2fCrtH.mjs → use-subset-image-LQWsE5P4.mjs} +1 -1
- package/dist/util/common.mjs +1 -1
- package/dist/util/file.mjs +1 -1
- package/dist/util/format.cjs +1 -1
- package/dist/util/format.d.cts +1 -29
- package/dist/util/format.d.mts +1 -29
- package/dist/util/format.mjs +1 -1
- package/package.json +4 -42
- package/dist/button-CQZuaIU7.mjs +0 -1
- package/dist/button-ChX3XGbR.cjs +0 -1
- package/dist/button-DHvx-GAg.d.cts +0 -50
- package/dist/button-DRIyBtEB.d.mts +0 -50
- package/dist/editor/index.cjs +0 -1
- package/dist/editor/index.d.cts +0 -80
- package/dist/editor/index.d.mts +0 -80
- package/dist/editor/index.mjs +0 -1
- package/dist/format-1_RTNUQv.mjs +0 -1
- package/dist/format-DEuImTYJ.cjs +0 -1
- package/dist/styles/editor.css +0 -255
- package/dist/ui/dropdown/index.cjs +0 -1
- package/dist/ui/dropdown/index.d.cts +0 -72
- package/dist/ui/dropdown/index.d.mts +0 -72
- package/dist/ui/dropdown/index.mjs +0 -1
- package/dist/ui/preserve-focus-button/index.cjs +0 -1
- package/dist/ui/preserve-focus-button/index.d.cts +0 -12
- package/dist/ui/preserve-focus-button/index.d.mts +0 -12
- package/dist/ui/preserve-focus-button/index.mjs +0 -1
- package/dist/ui-Bs9PP9eC.cjs +0 -1
- package/dist/ui-D2DoC_0E.mjs +0 -1
- package/dist/use-drag-resize-BdeLdulk.mjs +0 -1
- package/dist/use-drag-resize-DEgcua2U.d.cts +0 -48
- package/dist/use-drag-resize-DRHPv5RK.d.mts +0 -48
- package/dist/use-drag-resize-DeDqPC4h.cjs +0 -1
- package/dist/util/editor.cjs +0 -1
- package/dist/util/editor.d.cts +0 -21
- package/dist/util/editor.d.mts +0 -21
- package/dist/util/editor.mjs +0 -1
- /package/dist/{api-client-C3o2pO0q.cjs → api-client-BH5tW3p8.cjs} +0 -0
- /package/dist/{common-B8HXyhZa.cjs → common-BQEGjmFn.cjs} +0 -0
- /package/dist/{common-ZUMpASnc.mjs → common-CCtD91nO.mjs} +0 -0
- /package/dist/{common-CWHkXe0F.mjs → common-L3y7_eAy.mjs} +0 -0
- /package/dist/{file-B-UJkabO.mjs → file-CjW1pMb_.mjs} +0 -0
- /package/dist/{index-B1YNV_Vm.d.cts → index-CFOJBfVt.d.mts} +0 -0
- /package/dist/{index-C8chDULk.d.mts → index-ChiDX5zW.d.cts} +0 -0
- /package/dist/{skeleton-B5ZccRFX.cjs → skeleton-BCdxpynL.cjs} +0 -0
- /package/dist/{src-CIMlbgv1.mjs → src-Ce2i3Lkj.mjs} +0 -0
- /package/dist/{use-dialog-stack-YiLs-sNf.cjs → use-dialog-stack-DmBRPhe2.cjs} +0 -0
- /package/dist/{use-dialog-stack-Crj8YWJl.mjs → use-dialog-stack-STwnhvBB.mjs} +0 -0
- /package/dist/{use-subset-image-Dygkyw-W.d.mts → use-subset-image-Ck1Gk5Qk.d.mts} +0 -0
- /package/dist/{use-subset-image-bDB5TSd4.d.cts → use-subset-image-oZAiC9VK.d.cts} +0 -0
package/dist/button-CQZuaIU7.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./common-ZUMpASnc.mjs";import{forwardRef as t}from"react";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import{Slot as i}from"@radix-ui/react-slot";const a=r(e(`komc:flex komc:justify-center komc:items-center komc:gap-x-2 komc:w-full`,`komc:transition-colors komc:duration-200 komc:relative`,`komc:[&_svg]:transition-colors komc:[&_svg]:duration-200`,`komc:cursor-pointer komc:disabled:cursor-default`),{variants:{size:{xxs:`komc:h-7.5`,xs:`komc:h-8`,sm:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`,"4xl":`komc:h-15`},shadow:{none:``,sm:`komc:drop-shadow-sm`,md:`komc:drop-shadow-md`,lg:`komc:drop-shadow-lg`,xl:`komc:drop-shadow-xl`,"2xl":`komc:drop-shadow-2xl`,"3xl":`komc:drop-shadow-3xl`},outline:{line:`komc:border`,solid:`komc:border komc:border-transparent`,clear:`komc:border-none`},variant:{blue:``,duo:``,white:``,gray:``,neutral:``,night:``,black:``,sky:``,"sky-blue":``,indigo:``},px:{none:`komc:px-0`,xs:`komc:px-0.5`,sm:`komc:px-1`,md:`komc:px-1.5`,lg:`komc:px-2`,xl:`komc:px-3`,"2xl":`komc:px-4`,"3xl":`komc:px-5`,"4xl":`komc:px-6`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},compoundVariants:[{outline:`line`,variant:`blue`,className:e(`komc:border-blue-500 komc:bg-white komc:text-blue-500`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`duo`,className:e(`komc:border-blue-500 komc:bg-white komc:text-brand-blck`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`white`,className:e(`komc:border-gray-600 komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200 komc:hover:text-brand-blck`,`komc:active:bg-gray-200 komc:active:text-brand-blck`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`gray`,className:e(`komc:border-white komc:bg-transparent komc:text-white`,`komc:hover:bg-[rgb(199,199,199)] komc:hover:text-white`,`komc:active:bg-[rgb(199,199,199)] komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`neutral`,className:e(`komc:border-gray-800 komc:bg-transparent komc:text-black`,`komc:hover:bg-gray-200 komc:hover:text-black`,`komc:active:bg-gray-200 komc:active:text-black`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky`,className:e(`komc:border-sky-750 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-750 komc:hover:text-white`,`komc:active:bg-sky-750 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky-blue`,className:e(`komc:border-sky-450 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-450 komc:hover:text-white`,`komc:active:bg-sky-450 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`solid`,variant:`white`,className:e(`komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200`,`komc:active:bg-gray-200`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`gray`,className:e(`komc:bg-gray-100 komc:text-blue-500`,`komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`blue`,className:e(`komc:bg-blue-500 komc:text-white`,`komc:hover:bg-night-700 komc:hover:text-white`,`komc:active:bg-night-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`night`,className:e(`komc:bg-night-700 komc:text-white`,`komc:hover:bg-night-800 komc:hover:text-white`,`komc:active:bg-night-800 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`black`,className:e(`komc:bg-[rgb(95,95,96)] komc:text-white`,`komc:hover:bg-[rgb(76,76,77)] komc:hover:text-white`,`komc:active:bg-[rgb(76,76,77)] komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`sky`,className:e(`komc:bg-sky-750 komc:text-white`,`komc:hover:bg-sky-950 komc:hover:text-white`,`komc:active:bg-sky-950 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`sky-blue`,className:e(`komc:bg-sky-450 komc:text-white`,`komc:hover:bg-sky-650 komc:hover:text-white`,`komc:active:bg-sky-650 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`indigo`,className:e(`komc:bg-indigo-600 komc:text-white`,`komc:hover:bg-indigo-700 komc:hover:text-white`,`komc:active:bg-indigo-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`clear`,variant:`sky`,className:e(`komc:bg-transparent komc:text-[#1890FF]`,`komc:hover:bg-transparent komc:hover:text-[#1890FF] komc:hover:underline`,`komc:active:bg-transparent komc:active:text-[#1890FF] komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`clear`,variant:`gray`,className:e(`komc:bg-transparent komc:text-gray-800`,`komc:hover:bg-transparent komc:hover:text-gray-800 komc:hover:underline`,`komc:active:bg-transparent komc:active:text-gray-800 komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)}],defaultVariants:{size:`md`,shadow:`none`,outline:`line`,variant:`blue`,px:`2xl`,rounded:`sm`}});var o=t(({type:e=`button`,className:t,id:r,size:o,shadow:s,outline:c,variant:l,px:u,rounded:d,asChild:f,...p},m)=>n(f?i:`button`,{ref:m,...p,"data-komc":!0,type:e,id:r,className:a({size:o,shadow:s,outline:c,variant:l,px:u,rounded:d,className:t})}));export{o as t};
|
package/dist/button-ChX3XGbR.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./common-D4sUwkFd.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`class-variance-authority`),a=require(`@radix-ui/react-slot`);const o=(0,i.cva)(t.n(`komc:flex komc:justify-center komc:items-center komc:gap-x-2 komc:w-full`,`komc:transition-colors komc:duration-200 komc:relative`,`komc:[&_svg]:transition-colors komc:[&_svg]:duration-200`,`komc:cursor-pointer komc:disabled:cursor-default`),{variants:{size:{xxs:`komc:h-7.5`,xs:`komc:h-8`,sm:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`,"4xl":`komc:h-15`},shadow:{none:``,sm:`komc:drop-shadow-sm`,md:`komc:drop-shadow-md`,lg:`komc:drop-shadow-lg`,xl:`komc:drop-shadow-xl`,"2xl":`komc:drop-shadow-2xl`,"3xl":`komc:drop-shadow-3xl`},outline:{line:`komc:border`,solid:`komc:border komc:border-transparent`,clear:`komc:border-none`},variant:{blue:``,duo:``,white:``,gray:``,neutral:``,night:``,black:``,sky:``,"sky-blue":``,indigo:``},px:{none:`komc:px-0`,xs:`komc:px-0.5`,sm:`komc:px-1`,md:`komc:px-1.5`,lg:`komc:px-2`,xl:`komc:px-3`,"2xl":`komc:px-4`,"3xl":`komc:px-5`,"4xl":`komc:px-6`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},compoundVariants:[{outline:`line`,variant:`blue`,className:t.n(`komc:border-blue-500 komc:bg-white komc:text-blue-500`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`duo`,className:t.n(`komc:border-blue-500 komc:bg-white komc:text-brand-blck`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`white`,className:t.n(`komc:border-gray-600 komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200 komc:hover:text-brand-blck`,`komc:active:bg-gray-200 komc:active:text-brand-blck`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`gray`,className:t.n(`komc:border-white komc:bg-transparent komc:text-white`,`komc:hover:bg-[rgb(199,199,199)] komc:hover:text-white`,`komc:active:bg-[rgb(199,199,199)] komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`neutral`,className:t.n(`komc:border-gray-800 komc:bg-transparent komc:text-black`,`komc:hover:bg-gray-200 komc:hover:text-black`,`komc:active:bg-gray-200 komc:active:text-black`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky`,className:t.n(`komc:border-sky-750 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-750 komc:hover:text-white`,`komc:active:bg-sky-750 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky-blue`,className:t.n(`komc:border-sky-450 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-450 komc:hover:text-white`,`komc:active:bg-sky-450 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`solid`,variant:`white`,className:t.n(`komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200`,`komc:active:bg-gray-200`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`gray`,className:t.n(`komc:bg-gray-100 komc:text-blue-500`,`komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`blue`,className:t.n(`komc:bg-blue-500 komc:text-white`,`komc:hover:bg-night-700 komc:hover:text-white`,`komc:active:bg-night-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`night`,className:t.n(`komc:bg-night-700 komc:text-white`,`komc:hover:bg-night-800 komc:hover:text-white`,`komc:active:bg-night-800 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`black`,className:t.n(`komc:bg-[rgb(95,95,96)] komc:text-white`,`komc:hover:bg-[rgb(76,76,77)] komc:hover:text-white`,`komc:active:bg-[rgb(76,76,77)] komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`sky`,className:t.n(`komc:bg-sky-750 komc:text-white`,`komc:hover:bg-sky-950 komc:hover:text-white`,`komc:active:bg-sky-950 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`sky-blue`,className:t.n(`komc:bg-sky-450 komc:text-white`,`komc:hover:bg-sky-650 komc:hover:text-white`,`komc:active:bg-sky-650 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`indigo`,className:t.n(`komc:bg-indigo-600 komc:text-white`,`komc:hover:bg-indigo-700 komc:hover:text-white`,`komc:active:bg-indigo-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`clear`,variant:`sky`,className:t.n(`komc:bg-transparent komc:text-[#1890FF]`,`komc:hover:bg-transparent komc:hover:text-[#1890FF] komc:hover:underline`,`komc:active:bg-transparent komc:active:text-[#1890FF] komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`clear`,variant:`gray`,className:t.n(`komc:bg-transparent komc:text-gray-800`,`komc:hover:bg-transparent komc:hover:text-gray-800 komc:hover:underline`,`komc:active:bg-transparent komc:active:text-gray-800 komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)}],defaultVariants:{size:`md`,shadow:`none`,outline:`line`,variant:`blue`,px:`2xl`,rounded:`sm`}}),s=(0,n.forwardRef)(({type:e=`button`,className:t,id:n,size:i,shadow:s,outline:c,variant:l,px:u,rounded:d,asChild:f,...p},m)=>(0,r.jsx)(f?a.Slot:`button`,{ref:m,...p,"data-komc":!0,type:e,id:n,className:o({size:i,shadow:s,outline:c,variant:l,px:u,rounded:d,className:t})}));var c=s;Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as react12 from "react";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import * as class_variance_authority_types1 from "class-variance-authority/types";
|
|
4
|
-
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
|
|
6
|
-
//#region src/ui/button/button.d.ts
|
|
7
|
-
declare const classes: (props?: ({
|
|
8
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xxs" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
9
|
-
shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
10
|
-
outline?: "line" | "solid" | "clear" | null | undefined;
|
|
11
|
-
variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
|
|
12
|
-
px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
13
|
-
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
14
|
-
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
15
|
-
interface VariantMap {
|
|
16
|
-
line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
|
|
17
|
-
solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
|
|
18
|
-
clear: 'sky' | 'gray';
|
|
19
|
-
}
|
|
20
|
-
type BaseProps = Omit<VariantProps<typeof classes>, 'outline' | 'variant'>;
|
|
21
|
-
type ButtonProps = ComponentProps<'button'> & BaseProps & ({
|
|
22
|
-
outline?: 'line';
|
|
23
|
-
variant?: VariantMap['line'];
|
|
24
|
-
} | {
|
|
25
|
-
outline: 'solid';
|
|
26
|
-
variant?: VariantMap['solid'];
|
|
27
|
-
} | {
|
|
28
|
-
outline: 'clear';
|
|
29
|
-
variant?: VariantMap['clear'];
|
|
30
|
-
}) & {
|
|
31
|
-
asChild?: boolean;
|
|
32
|
-
};
|
|
33
|
-
declare const Button: react12.ForwardRefExoticComponent<(Omit<react12.ClassAttributes<HTMLButtonElement> & react12.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
34
|
-
outline?: "line";
|
|
35
|
-
variant?: VariantMap["line"];
|
|
36
|
-
} & {
|
|
37
|
-
asChild?: boolean;
|
|
38
|
-
}, "ref"> | Omit<react12.ClassAttributes<HTMLButtonElement> & react12.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
39
|
-
outline: "solid";
|
|
40
|
-
variant?: VariantMap["solid"];
|
|
41
|
-
} & {
|
|
42
|
-
asChild?: boolean;
|
|
43
|
-
}, "ref"> | Omit<react12.ClassAttributes<HTMLButtonElement> & react12.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
44
|
-
outline: "clear";
|
|
45
|
-
variant?: VariantMap["clear"];
|
|
46
|
-
} & {
|
|
47
|
-
asChild?: boolean;
|
|
48
|
-
}, "ref">) & react12.RefAttributes<HTMLButtonElement>>;
|
|
49
|
-
//#endregion
|
|
50
|
-
export { ButtonProps as n, Button as t };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as react12 from "react";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as class_variance_authority_types1 from "class-variance-authority/types";
|
|
5
|
-
|
|
6
|
-
//#region src/ui/button/button.d.ts
|
|
7
|
-
declare const classes: (props?: ({
|
|
8
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xxs" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
9
|
-
shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
10
|
-
outline?: "line" | "solid" | "clear" | null | undefined;
|
|
11
|
-
variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
|
|
12
|
-
px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
13
|
-
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
14
|
-
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
15
|
-
interface VariantMap {
|
|
16
|
-
line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
|
|
17
|
-
solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
|
|
18
|
-
clear: 'sky' | 'gray';
|
|
19
|
-
}
|
|
20
|
-
type BaseProps = Omit<VariantProps<typeof classes>, 'outline' | 'variant'>;
|
|
21
|
-
type ButtonProps = ComponentProps<'button'> & BaseProps & ({
|
|
22
|
-
outline?: 'line';
|
|
23
|
-
variant?: VariantMap['line'];
|
|
24
|
-
} | {
|
|
25
|
-
outline: 'solid';
|
|
26
|
-
variant?: VariantMap['solid'];
|
|
27
|
-
} | {
|
|
28
|
-
outline: 'clear';
|
|
29
|
-
variant?: VariantMap['clear'];
|
|
30
|
-
}) & {
|
|
31
|
-
asChild?: boolean;
|
|
32
|
-
};
|
|
33
|
-
declare const Button: react12.ForwardRefExoticComponent<(Omit<react12.ClassAttributes<HTMLButtonElement> & react12.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
34
|
-
outline?: "line";
|
|
35
|
-
variant?: VariantMap["line"];
|
|
36
|
-
} & {
|
|
37
|
-
asChild?: boolean;
|
|
38
|
-
}, "ref"> | Omit<react12.ClassAttributes<HTMLButtonElement> & react12.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
39
|
-
outline: "solid";
|
|
40
|
-
variant?: VariantMap["solid"];
|
|
41
|
-
} & {
|
|
42
|
-
asChild?: boolean;
|
|
43
|
-
}, "ref"> | Omit<react12.ClassAttributes<HTMLButtonElement> & react12.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
44
|
-
outline: "clear";
|
|
45
|
-
variant?: VariantMap["clear"];
|
|
46
|
-
} & {
|
|
47
|
-
asChild?: boolean;
|
|
48
|
-
}, "ref">) & react12.RefAttributes<HTMLButtonElement>>;
|
|
49
|
-
//#endregion
|
|
50
|
-
export { ButtonProps as n, Button as t };
|
package/dist/editor/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../common-D4sUwkFd.cjs`),n=require(`../format-DEuImTYJ.cjs`);require(`../ui-Bs9PP9eC.cjs`),require(`../button-ChX3XGbR.cjs`);const r=require(`../skeleton-B5ZccRFX.cjs`),i=require(`../use-drag-resize-DeDqPC4h.cjs`);let a=require(`react`);a=e.t(a);let o=require(`@tiptap/react`),s=require(`react/jsx-runtime`),c=require(`clsx`);c=e.t(c);let l=require(`class-variance-authority`);const u=(0,a.createContext)(null);function d({editor:e,children:t}){let n=(0,a.useMemo)(()=>({editor:e}),[e]);return(0,s.jsx)(u.Provider,{value:n,children:t})}function f(){let e=(0,a.useContext)(u);if(!e)throw Error(`useEditorContext must be used within EditorProvider`);return e}function p(){let{editor:e}=f();if(!e)throw Error(`Editor is not available`);return e}function m(){return f().editor}const h=(0,a.forwardRef)(({plugins:e,editorRef:t,editorClassName:n=``,value:i,className:l,onChange:u,immediatelyRender:f=!0,content:p,editorProps:m,onCreate:h,onUpdate:g,..._},v)=>{let y=m?.attributes&&typeof m.attributes==`object`?m.attributes:void 0,b=(0,o.useEditor)({immediatelyRender:f,..._,content:p??i??``,editorProps:{...m,attributes:{...y,class:(0,c.default)(n,y&&`class`in y&&y.class)}},onCreate:e=>{t&&(t.current=e.editor),h?.(e)},onUpdate:e=>{u?.(e.editor.getHTML(),e.editor),g?.(e)}});return(0,a.useEffect)(()=>{if(t)return t.current=b??null,()=>{t.current===b&&(t.current=null)}},[b,t]),(0,a.useEffect)(()=>{!b||typeof i!=`string`||b.isDestroyed||b.isFocused||b.getHTML()!==i&&b.commands.setContent(i,{emitUpdate:!1})},[b,i]),(0,s.jsx)(d,{editor:b,children:(0,s.jsxs)(`div`,{"data-komc":!0,className:`komc:relative`,children:[b&&e,(0,s.jsx)(`div`,{ref:v,"data-komc":!0,className:(0,c.default)(`komc:@container/komc-editor editor-wrapper`,`komc:w-full komc:h-auto komc:relative`,`komc:border-[0.6px] komc:border-neutral-300`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:focus-within:border-blue-500 komc:focus-within:ring-4`,l),children:b?(0,s.jsx)(o.EditorContent,{editor:b}):(0,s.jsx)(r.t,{className:`komc:w-full komc:min-h-25`})})]})})}),g=(0,l.cva)(t.n(`komc:group komc:relative komc:after:pointer-events-none`,`komc:after:transition-opacity komc:after:duration-200 komc:after:ease-in-out`,`komc:after:content-[""] komc:after:rounded-(--node-radius)`,`komc:after:absolute komc:after:-inset-1.5 komc:after:z-1`),{variants:{selected:{true:`komc:after:bg-[#2383E2]/14 komc:after:opacity-100`,false:`komc:after:opacity-0`},hoverable:{true:t.n(`komc:*:data-komc-node-clip:transition-opacity`,`komc:*:data-komc-node-clip:duration-200`,`komc:*:data-komc-node-clip:ease-in-out`,`komc:*:data-komc-node-clip:outline-gray-700`,`komc:*:data-komc-node-clip:-outline-offset-1`,`komc:*:data-komc-node-clip:outline-0`,`komc:hover:*:data-komc-node-clip:opacity-70`,`komc:*:data-komc-node-clip:opacity-100`,`komc:hover:z-1`),false:``},draggable:{true:`komc:cursor-grab komc:active:cursor-grabbing komc:touch-none`,false:`komc:select-none`}},defaultVariants:{selected:!1,hoverable:!1,draggable:!1},compoundVariants:[{selected:!0,hoverable:!0,class:`komc:*:data-komc-node-clip:outline-none`},{selected:!1,hoverable:!0,class:`komc:hover:*:data-komc-node-clip:outline-3`}]}),_=(0,a.forwardRef)(({selected:e,hoverable:n,draggable:r,radius:i=0,overlay:a,className:o,style:c,children:l,...u},d)=>(0,s.jsxs)(`div`,{ref:d,style:{"--node-radius":`${i}%`,...c},className:t.n(g({selected:e,hoverable:n,draggable:r}),o),...u,"data-drag-handle":r?``:void 0,children:[(0,s.jsx)(`div`,{"data-komc-node-clip":``,className:`komc:w-full komc:h-full komc:relative komc:overflow-hidden`,style:{borderRadius:`${i}%`},children:l}),a!=null&&(0,s.jsx)(`div`,{className:`komc:absolute komc:inset-0 komc:z-2 komc:pointer-events-none komc:**:pointer-events-auto`,onPointerDown:e=>e.stopPropagation(),children:a})]}));_.displayName=`NodeFrame`;const v={width:i.t.DEFAULT_WIDTH,height:i.t.DEFAULT_HEIGHT};function y(e,t,r,i,a){return n.t({min:v,max:{width:a,height:1/0},width:e,height:t,type:r,currentRatio:i})}function b({width:e=0,height:n=0,maxWidth:r,edit:i,onEditChange:o,onChange:c}){let l=i!==void 0,[u,d]=(0,a.useState)(!1),f=l?i:u,[p,m]=(0,a.useState)(e),[h,g]=(0,a.useState)(n),[_,b]=(0,a.useState)(null),w=(0,a.useRef)(e&&n?e/n:1),T=e=>{l||d(e),o?.(e)},E=()=>{f||(T(!0),e&&n&&(w.current=e/n))},D=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let{width:t,height:n,result:i}=y(Number(e.target.value),h,`width`,w.current,r);m(t),g(n),b(i)},O=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let{width:t,height:n,result:i}=y(p,Number(e.target.value),`height`,w.current,r);m(t),g(n),b(i)},k=()=>{_||p<v.width||p>r||h<v.height||(T(!1),c?.({width:p,height:h}))};return(0,a.useEffect)(()=>{m(e),g(n),e&&n&&(w.current=e/n);let{result:t}=y(e,n,`width`,w.current,r),{result:i}=y(e,n,`height`,w.current,r);b(t||i||null)},[e,n,f,r]),(0,s.jsxs)(`div`,{className:t.n(`komc:flex komc:flex-col komc:justify-center komc:items-center`,`komc:text-base komc:text-center komc:text-black komc:absolute`,f?`komc:opacity-100 komc:-inset-1.5 komc:bg-white/60 komc:z-20`:t.n(`komc:z-10 komc:opacity-0 komc:group-hover:opacity-100`,`komc:top-1/2 komc:-translate-y-1/2 komc:left-1/2 komc:-translate-x-1/2`)),children:[!f&&(0,s.jsx)(`button`,{type:`button`,className:`komc:absolute komc:inset-0 komc:cursor-pointer`,onClick:E,"aria-label":`노드 크기 수정`}),(0,s.jsxs)(`div`,{className:t.n(`komc:flex komc:flex-row komc:justify-center komc:items-center komc:gap-x-1 komc:relative`,!f&&`komc:cursor-pointer`),children:[(0,s.jsx)(`div`,{className:`komc:inline komc:relative`,children:(0,s.jsx)(x,{shouldFocus:f,value:p,onChange:D,disabled:!f})}),(0,s.jsx)(`span`,{children:`x`}),(0,s.jsx)(`div`,{className:`komc:inline komc:relative`,children:(0,s.jsx)(x,{value:h,onChange:O,disabled:!f})}),f&&_&&(0,s.jsx)(`span`,{className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-5 komc:h-5 komc:ml-1 komc:text-red-600`,"aria-label":`입력값이 허용 범위를 벗어났습니다`,children:(0,s.jsx)(C,{})}),f&&!_&&(0,s.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),k()},className:t.n(`komc:flex komc:shrink-0 komc:justify-center komc:items-center`,`komc:w-5 komc:h-5 komc:ml-1 komc:rounded`,`komc:bg-blue-500 komc:text-white komc:hover:bg-blue-600 komc:cursor-pointer`),children:(0,s.jsx)(S,{})})]})]})}function x({shouldFocus:e,value:t,onChange:n,disabled:r}){let[i,o]=(0,a.useState)(30),c=(0,a.useRef)(null),l=(0,a.useRef)(null);return(0,a.useEffect)(()=>{c.current&&o(c.current.offsetWidth||30)},[t]),(0,a.useEffect)(()=>{!r&&e&&l.current&&l.current.focus()},[r,e]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{ref:c,"aria-hidden":`true`,className:`komc:absolute komc:invisible komc:whitespace-pre komc:text-base komc:pointer-events-none`,children:t||` `}),(0,s.jsx)(`input`,{ref:l,type:`text`,inputMode:`numeric`,maxLength:5,value:t,onChange:n,disabled:r,className:`komc:text-center komc:text-base komc:outline-none komc:bg-transparent komc:disabled:pointer-events-none`,style:{width:`${i+8}px`}})]})}function S(){return(0,s.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`none`,"aria-hidden":`true`,children:(0,s.jsx)(`path`,{d:`M3.5 8.5 6.5 11.5 12.5 4.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function C(){return(0,s.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,s.jsx)(`path`,{d:`M8 4.5v5`,stroke:`white`,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,s.jsx)(`circle`,{cx:`8`,cy:`11.5`,r:`0.9`,fill:`white`})]})}const w=(0,l.cva)(t.n(`komc:flex komc:justify-center komc:items-center komc:absolute komc:z-50`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:opacity-0 komc:group-hover:opacity-100`),{variants:{direction:{left:`komc:-left-1 komc:cursor-ew-resize komc:top-1/2 komc:-translate-y-1/2`,right:`komc:-right-1 komc:cursor-ew-resize komc:top-1/2 komc:-translate-y-1/2`,top:`komc:-top-1 komc:cursor-ns-resize komc:left-1/2 komc:-translate-x-1/2`,bottom:`komc:-bottom-1 komc:cursor-ns-resize komc:left-1/2 komc:-translate-x-1/2`,"top-left":`komc:-top-1 komc:left-1 komc:cursor-nw-resize`,"top-right":`komc:-top-1 komc:right-1 komc:cursor-ne-resize`,"bottom-left":`komc:-bottom-1 komc:left-1 komc:cursor-sw-resize`,"bottom-right":`komc:-bottom-1 komc:right-1 komc:cursor-se-resize`}},defaultVariants:{direction:`left`}}),T=(0,l.cva)(`komc:flex komc:justify-center komc:items-center komc:group/resize`,{variants:{direction:{left:`komc:w-6 komc:h-14 komc:*:w-1.5 komc:*:h-full`,right:`komc:w-6 komc:h-14 komc:*:w-1.5 komc:*:h-full`,top:`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,bottom:`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"top-left":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"top-right":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"bottom-left":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"bottom-right":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`}},defaultVariants:{direction:`left`}});function E({directions:e,limitSize:t={width:!0,height:!1},...n}){let{getHandleProps:r,isResizing:a}=i.n({...n,limitSize:t});return(0,s.jsx)(s.Fragment,{children:e.map(e=>(0,s.jsx)(D,{direction:e,isResizing:a,...r(e)},e))})}const D=(0,a.memo)(function({direction:e,isResizing:n,style:r,...i}){return(0,s.jsx)(`div`,{className:t.n(w({direction:e}),n&&`komc:opacity-100`),children:(0,s.jsx)(`div`,{className:T({direction:e}),draggable:!1,onDragStart:e=>e.preventDefault(),style:r,...i,children:(0,s.jsx)(`div`,{className:`komc:border komc:border-white komc:bg-black/40 komc:rounded-full komc:group-hover/resize:bg-blue-500/50`})})})});exports.Editor=h,exports.EditorProvider=d,exports.NodeFrame=_,exports.NodeResizer=E,exports.NodeSize=b,exports.useEditorContext=f,exports.useOptionalEditor=m,exports.useRequiredEditor=p;
|
package/dist/editor/index.d.cts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { o as UseDragResizeProps, r as ResizeDirection } from "../use-drag-resize-DEgcua2U.cjs";
|
|
2
|
-
import * as react0 from "react";
|
|
3
|
-
import React, { ComponentProps, ReactNode } from "react";
|
|
4
|
-
import { Editor as Editor$1, UseEditorOptions } from "@tiptap/react";
|
|
5
|
-
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
-
import { VariantProps } from "class-variance-authority";
|
|
7
|
-
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
8
|
-
import { Editor as Editor$2 } from "@tiptap/core";
|
|
9
|
-
|
|
10
|
-
//#region src/editor/editor.d.ts
|
|
11
|
-
interface Props extends UseEditorOptions {
|
|
12
|
-
plugins?: React.ReactNode;
|
|
13
|
-
editorRef?: React.MutableRefObject<Editor$1 | null>;
|
|
14
|
-
editorClassName?: string;
|
|
15
|
-
value?: string | null;
|
|
16
|
-
className?: string;
|
|
17
|
-
onChange?: (value: string, context: Editor$1) => void;
|
|
18
|
-
}
|
|
19
|
-
declare const Editor: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/editor/node-frame.d.ts
|
|
22
|
-
declare const classes: (props?: ({
|
|
23
|
-
selected?: boolean | null | undefined;
|
|
24
|
-
hoverable?: boolean | null | undefined;
|
|
25
|
-
draggable?: boolean | null | undefined;
|
|
26
|
-
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
27
|
-
type NodeFrameProps = ComponentProps<'div'> & VariantProps<typeof classes> & {
|
|
28
|
-
radius?: number;
|
|
29
|
-
overlay?: ReactNode;
|
|
30
|
-
};
|
|
31
|
-
declare const NodeFrame: react0.ForwardRefExoticComponent<Omit<NodeFrameProps, "ref"> & react0.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/editor/node-size.d.ts
|
|
34
|
-
interface NodeSizeProps {
|
|
35
|
-
width?: number;
|
|
36
|
-
height?: number;
|
|
37
|
-
maxWidth: number;
|
|
38
|
-
edit?: boolean;
|
|
39
|
-
onEditChange?: (edit: boolean) => void;
|
|
40
|
-
onChange?: (size: {
|
|
41
|
-
width: number;
|
|
42
|
-
height: number;
|
|
43
|
-
}) => void;
|
|
44
|
-
}
|
|
45
|
-
declare function NodeSize({
|
|
46
|
-
width,
|
|
47
|
-
height,
|
|
48
|
-
maxWidth,
|
|
49
|
-
edit,
|
|
50
|
-
onEditChange,
|
|
51
|
-
onChange
|
|
52
|
-
}: NodeSizeProps): react_jsx_runtime12.JSX.Element;
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/editor/node-resizer.d.ts
|
|
55
|
-
interface NodeResizerProps extends UseDragResizeProps {
|
|
56
|
-
directions: ResizeDirection[];
|
|
57
|
-
}
|
|
58
|
-
declare function NodeResizer({
|
|
59
|
-
directions,
|
|
60
|
-
limitSize,
|
|
61
|
-
...props
|
|
62
|
-
}: NodeResizerProps): react_jsx_runtime12.JSX.Element;
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/editor/provider.d.ts
|
|
65
|
-
interface EditorContextValue {
|
|
66
|
-
editor: Editor$2 | null;
|
|
67
|
-
}
|
|
68
|
-
interface EditorProviderProps {
|
|
69
|
-
editor: Editor$2 | null;
|
|
70
|
-
children: ReactNode;
|
|
71
|
-
}
|
|
72
|
-
declare function EditorProvider({
|
|
73
|
-
editor,
|
|
74
|
-
children
|
|
75
|
-
}: EditorProviderProps): react_jsx_runtime12.JSX.Element;
|
|
76
|
-
declare function useEditorContext(): EditorContextValue;
|
|
77
|
-
declare function useRequiredEditor(): Editor$2;
|
|
78
|
-
declare function useOptionalEditor(): Editor$2 | null;
|
|
79
|
-
//#endregion
|
|
80
|
-
export { Editor, EditorProvider, NodeFrame, NodeFrameProps, NodeResizer, NodeResizerProps, NodeSize, NodeSizeProps, useEditorContext, useOptionalEditor, useRequiredEditor };
|
package/dist/editor/index.d.mts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { o as UseDragResizeProps, r as ResizeDirection } from "../use-drag-resize-DRHPv5RK.mjs";
|
|
2
|
-
import { Editor as Editor$1 } from "@tiptap/core";
|
|
3
|
-
import * as react10 from "react";
|
|
4
|
-
import React, { ComponentProps, ReactNode } from "react";
|
|
5
|
-
import { Editor as Editor$2, UseEditorOptions } from "@tiptap/react";
|
|
6
|
-
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
7
|
-
import { VariantProps } from "class-variance-authority";
|
|
8
|
-
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
9
|
-
|
|
10
|
-
//#region src/editor/editor.d.ts
|
|
11
|
-
interface Props extends UseEditorOptions {
|
|
12
|
-
plugins?: React.ReactNode;
|
|
13
|
-
editorRef?: React.MutableRefObject<Editor$2 | null>;
|
|
14
|
-
editorClassName?: string;
|
|
15
|
-
value?: string | null;
|
|
16
|
-
className?: string;
|
|
17
|
-
onChange?: (value: string, context: Editor$2) => void;
|
|
18
|
-
}
|
|
19
|
-
declare const Editor: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/editor/node-frame.d.ts
|
|
22
|
-
declare const classes: (props?: ({
|
|
23
|
-
selected?: boolean | null | undefined;
|
|
24
|
-
hoverable?: boolean | null | undefined;
|
|
25
|
-
draggable?: boolean | null | undefined;
|
|
26
|
-
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
27
|
-
type NodeFrameProps = ComponentProps<'div'> & VariantProps<typeof classes> & {
|
|
28
|
-
radius?: number;
|
|
29
|
-
overlay?: ReactNode;
|
|
30
|
-
};
|
|
31
|
-
declare const NodeFrame: react10.ForwardRefExoticComponent<Omit<NodeFrameProps, "ref"> & react10.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/editor/node-size.d.ts
|
|
34
|
-
interface NodeSizeProps {
|
|
35
|
-
width?: number;
|
|
36
|
-
height?: number;
|
|
37
|
-
maxWidth: number;
|
|
38
|
-
edit?: boolean;
|
|
39
|
-
onEditChange?: (edit: boolean) => void;
|
|
40
|
-
onChange?: (size: {
|
|
41
|
-
width: number;
|
|
42
|
-
height: number;
|
|
43
|
-
}) => void;
|
|
44
|
-
}
|
|
45
|
-
declare function NodeSize({
|
|
46
|
-
width,
|
|
47
|
-
height,
|
|
48
|
-
maxWidth,
|
|
49
|
-
edit,
|
|
50
|
-
onEditChange,
|
|
51
|
-
onChange
|
|
52
|
-
}: NodeSizeProps): react_jsx_runtime18.JSX.Element;
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/editor/node-resizer.d.ts
|
|
55
|
-
interface NodeResizerProps extends UseDragResizeProps {
|
|
56
|
-
directions: ResizeDirection[];
|
|
57
|
-
}
|
|
58
|
-
declare function NodeResizer({
|
|
59
|
-
directions,
|
|
60
|
-
limitSize,
|
|
61
|
-
...props
|
|
62
|
-
}: NodeResizerProps): react_jsx_runtime18.JSX.Element;
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/editor/provider.d.ts
|
|
65
|
-
interface EditorContextValue {
|
|
66
|
-
editor: Editor$1 | null;
|
|
67
|
-
}
|
|
68
|
-
interface EditorProviderProps {
|
|
69
|
-
editor: Editor$1 | null;
|
|
70
|
-
children: ReactNode;
|
|
71
|
-
}
|
|
72
|
-
declare function EditorProvider({
|
|
73
|
-
editor,
|
|
74
|
-
children
|
|
75
|
-
}: EditorProviderProps): react_jsx_runtime18.JSX.Element;
|
|
76
|
-
declare function useEditorContext(): EditorContextValue;
|
|
77
|
-
declare function useRequiredEditor(): Editor$1;
|
|
78
|
-
declare function useOptionalEditor(): Editor$1 | null;
|
|
79
|
-
//#endregion
|
|
80
|
-
export { Editor, EditorProvider, NodeFrame, NodeFrameProps, NodeResizer, NodeResizerProps, NodeSize, NodeSizeProps, useEditorContext, useOptionalEditor, useRequiredEditor };
|
package/dist/editor/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{n as e}from"../common-ZUMpASnc.mjs";import{t}from"../format-1_RTNUQv.mjs";import"../ui-D2DoC_0E.mjs";import"../button-CQZuaIU7.mjs";import{t as n}from"../skeleton-Y22bmaaB.mjs";import{n as r,t as i}from"../use-drag-resize-BdeLdulk.mjs";import a,{createContext as o,forwardRef as s,memo as c,useContext as l,useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{EditorContent as m,useEditor as h}from"@tiptap/react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import y from"clsx";import{cva as b}from"class-variance-authority";const x=o(null);function S({editor:e,children:t}){let n=d(()=>({editor:e}),[e]);return _(x.Provider,{value:n,children:t})}function C(){let e=l(x);if(!e)throw Error(`useEditorContext must be used within EditorProvider`);return e}function w(){let{editor:e}=C();if(!e)throw Error(`Editor is not available`);return e}function T(){return C().editor}const E=s(({plugins:e,editorRef:t,editorClassName:r=``,value:i,className:a,onChange:o,immediatelyRender:s=!0,content:c,editorProps:l,onCreate:d,onUpdate:f,...p},g)=>{let b=l?.attributes&&typeof l.attributes==`object`?l.attributes:void 0,x=h({immediatelyRender:s,...p,content:c??i??``,editorProps:{...l,attributes:{...b,class:y(r,b&&`class`in b&&b.class)}},onCreate:e=>{t&&(t.current=e.editor),d?.(e)},onUpdate:e=>{o?.(e.editor.getHTML(),e.editor),f?.(e)}});return u(()=>{if(t)return t.current=x??null,()=>{t.current===x&&(t.current=null)}},[x,t]),u(()=>{!x||typeof i!=`string`||x.isDestroyed||x.isFocused||x.getHTML()!==i&&x.commands.setContent(i,{emitUpdate:!1})},[x,i]),_(S,{editor:x,children:v(`div`,{"data-komc":!0,className:`komc:relative`,children:[x&&e,_(`div`,{ref:g,"data-komc":!0,className:y(`komc:@container/komc-editor editor-wrapper`,`komc:w-full komc:h-auto komc:relative`,`komc:border-[0.6px] komc:border-neutral-300`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:focus-within:border-blue-500 komc:focus-within:ring-4`,a),children:x?_(m,{editor:x}):_(n,{className:`komc:w-full komc:min-h-25`})})]})})}),D=b(e(`komc:group komc:relative komc:after:pointer-events-none`,`komc:after:transition-opacity komc:after:duration-200 komc:after:ease-in-out`,`komc:after:content-[""] komc:after:rounded-(--node-radius)`,`komc:after:absolute komc:after:-inset-1.5 komc:after:z-1`),{variants:{selected:{true:`komc:after:bg-[#2383E2]/14 komc:after:opacity-100`,false:`komc:after:opacity-0`},hoverable:{true:e(`komc:*:data-komc-node-clip:transition-opacity`,`komc:*:data-komc-node-clip:duration-200`,`komc:*:data-komc-node-clip:ease-in-out`,`komc:*:data-komc-node-clip:outline-gray-700`,`komc:*:data-komc-node-clip:-outline-offset-1`,`komc:*:data-komc-node-clip:outline-0`,`komc:hover:*:data-komc-node-clip:opacity-70`,`komc:*:data-komc-node-clip:opacity-100`,`komc:hover:z-1`),false:``},draggable:{true:`komc:cursor-grab komc:active:cursor-grabbing komc:touch-none`,false:`komc:select-none`}},defaultVariants:{selected:!1,hoverable:!1,draggable:!1},compoundVariants:[{selected:!0,hoverable:!0,class:`komc:*:data-komc-node-clip:outline-none`},{selected:!1,hoverable:!0,class:`komc:hover:*:data-komc-node-clip:outline-3`}]}),O=s(({selected:t,hoverable:n,draggable:r,radius:i=0,overlay:a,className:o,style:s,children:c,...l},u)=>v(`div`,{ref:u,style:{"--node-radius":`${i}%`,...s},className:e(D({selected:t,hoverable:n,draggable:r}),o),...l,"data-drag-handle":r?``:void 0,children:[_(`div`,{"data-komc-node-clip":``,className:`komc:w-full komc:h-full komc:relative komc:overflow-hidden`,style:{borderRadius:`${i}%`},children:c}),a!=null&&_(`div`,{className:`komc:absolute komc:inset-0 komc:z-2 komc:pointer-events-none komc:**:pointer-events-auto`,onPointerDown:e=>e.stopPropagation(),children:a})]}));O.displayName=`NodeFrame`;const k={width:i.DEFAULT_WIDTH,height:i.DEFAULT_HEIGHT};function A(e,n,r,i,a){return t({min:k,max:{width:a,height:1/0},width:e,height:n,type:r,currentRatio:i})}function j({width:t=0,height:n=0,maxWidth:r,edit:i,onEditChange:a,onChange:o}){let s=i!==void 0,[c,l]=p(!1),d=s?i:c,[m,h]=p(t),[g,y]=p(n),[b,x]=p(null),S=f(t&&n?t/n:1),C=e=>{s||l(e),a?.(e)},w=()=>{d||(C(!0),t&&n&&(S.current=t/n))},T=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let{width:t,height:n,result:i}=A(Number(e.target.value),g,`width`,S.current,r);h(t),y(n),x(i)},E=e=>{if(!/^[0-9]*$/.test(e.target.value))return;let{width:t,height:n,result:i}=A(m,Number(e.target.value),`height`,S.current,r);h(t),y(n),x(i)},D=()=>{b||m<k.width||m>r||g<k.height||(C(!1),o?.({width:m,height:g}))};return u(()=>{h(t),y(n),t&&n&&(S.current=t/n);let{result:e}=A(t,n,`width`,S.current,r),{result:i}=A(t,n,`height`,S.current,r);x(e||i||null)},[t,n,d,r]),v(`div`,{className:e(`komc:flex komc:flex-col komc:justify-center komc:items-center`,`komc:text-base komc:text-center komc:text-black komc:absolute`,d?`komc:opacity-100 komc:-inset-1.5 komc:bg-white/60 komc:z-20`:e(`komc:z-10 komc:opacity-0 komc:group-hover:opacity-100`,`komc:top-1/2 komc:-translate-y-1/2 komc:left-1/2 komc:-translate-x-1/2`)),children:[!d&&_(`button`,{type:`button`,className:`komc:absolute komc:inset-0 komc:cursor-pointer`,onClick:w,"aria-label":`노드 크기 수정`}),v(`div`,{className:e(`komc:flex komc:flex-row komc:justify-center komc:items-center komc:gap-x-1 komc:relative`,!d&&`komc:cursor-pointer`),children:[_(`div`,{className:`komc:inline komc:relative`,children:_(M,{shouldFocus:d,value:m,onChange:T,disabled:!d})}),_(`span`,{children:`x`}),_(`div`,{className:`komc:inline komc:relative`,children:_(M,{value:g,onChange:E,disabled:!d})}),d&&b&&_(`span`,{className:`komc:flex komc:shrink-0 komc:justify-center komc:items-center komc:w-5 komc:h-5 komc:ml-1 komc:text-red-600`,"aria-label":`입력값이 허용 범위를 벗어났습니다`,children:_(P,{})}),d&&!b&&_(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),D()},className:e(`komc:flex komc:shrink-0 komc:justify-center komc:items-center`,`komc:w-5 komc:h-5 komc:ml-1 komc:rounded`,`komc:bg-blue-500 komc:text-white komc:hover:bg-blue-600 komc:cursor-pointer`),children:_(N,{})})]})]})}function M({shouldFocus:e,value:t,onChange:n,disabled:r}){let[i,a]=p(30),o=f(null),s=f(null);return u(()=>{o.current&&a(o.current.offsetWidth||30)},[t]),u(()=>{!r&&e&&s.current&&s.current.focus()},[r,e]),v(g,{children:[_(`span`,{ref:o,"aria-hidden":`true`,className:`komc:absolute komc:invisible komc:whitespace-pre komc:text-base komc:pointer-events-none`,children:t||` `}),_(`input`,{ref:s,type:`text`,inputMode:`numeric`,maxLength:5,value:t,onChange:n,disabled:r,className:`komc:text-center komc:text-base komc:outline-none komc:bg-transparent komc:disabled:pointer-events-none`,style:{width:`${i+8}px`}})]})}function N(){return _(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`none`,"aria-hidden":`true`,children:_(`path`,{d:`M3.5 8.5 6.5 11.5 12.5 4.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function P(){return v(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,"aria-hidden":`true`,children:[_(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),_(`path`,{d:`M8 4.5v5`,stroke:`white`,strokeWidth:`1.6`,strokeLinecap:`round`}),_(`circle`,{cx:`8`,cy:`11.5`,r:`0.9`,fill:`white`})]})}const F=b(e(`komc:flex komc:justify-center komc:items-center komc:absolute komc:z-50`,`komc:transition-all komc:duration-200 komc:ease-in-out`,`komc:opacity-0 komc:group-hover:opacity-100`),{variants:{direction:{left:`komc:-left-1 komc:cursor-ew-resize komc:top-1/2 komc:-translate-y-1/2`,right:`komc:-right-1 komc:cursor-ew-resize komc:top-1/2 komc:-translate-y-1/2`,top:`komc:-top-1 komc:cursor-ns-resize komc:left-1/2 komc:-translate-x-1/2`,bottom:`komc:-bottom-1 komc:cursor-ns-resize komc:left-1/2 komc:-translate-x-1/2`,"top-left":`komc:-top-1 komc:left-1 komc:cursor-nw-resize`,"top-right":`komc:-top-1 komc:right-1 komc:cursor-ne-resize`,"bottom-left":`komc:-bottom-1 komc:left-1 komc:cursor-sw-resize`,"bottom-right":`komc:-bottom-1 komc:right-1 komc:cursor-se-resize`}},defaultVariants:{direction:`left`}}),I=b(`komc:flex komc:justify-center komc:items-center komc:group/resize`,{variants:{direction:{left:`komc:w-6 komc:h-14 komc:*:w-1.5 komc:*:h-full`,right:`komc:w-6 komc:h-14 komc:*:w-1.5 komc:*:h-full`,top:`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,bottom:`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"top-left":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"top-right":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"bottom-left":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`,"bottom-right":`komc:w-14 komc:h-6 komc:*:w-full komc:*:h-1.5`}},defaultVariants:{direction:`left`}});function L({directions:e,limitSize:t={width:!0,height:!1},...n}){let{getHandleProps:i,isResizing:a}=r({...n,limitSize:t});return _(g,{children:e.map(e=>_(R,{direction:e,isResizing:a,...i(e)},e))})}const R=c(function({direction:t,isResizing:n,style:r,...i}){return _(`div`,{className:e(F({direction:t}),n&&`komc:opacity-100`),children:_(`div`,{className:I({direction:t}),draggable:!1,onDragStart:e=>e.preventDefault(),style:r,...i,children:_(`div`,{className:`komc:border komc:border-white komc:bg-black/40 komc:rounded-full komc:group-hover/resize:bg-blue-500/50`})})})});export{E as Editor,S as EditorProvider,O as NodeFrame,L as NodeResizer,j as NodeSize,C as useEditorContext,T as useOptionalEditor,w as useRequiredEditor};
|
package/dist/format-1_RTNUQv.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=(e,t=`en-US`,n)=>new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:1,...n}).format(e),t=(e,t,n=`+`)=>e>t?`${t}${n}`:String(e),n=e=>e?.toLocaleString(`ko-KR`)||`0`,r=({min:e,max:t,width:n,height:r,type:i,currentRatio:a})=>{let o=n,s=r,c=null,l=1;return typeof a==`number`&&a>0?l=a:r>0&&(l=n/r),i===`width`&&(s=Math.round(n/l),n<e.width&&(c=`width-under-min`),n>t.width&&(c=`width-over-max`),s<e.height&&(c=`height-under-min`)),i===`height`&&(o=Math.round(r*l),r<e.height&&(c=`height-under-min`),o<e.width&&(c=`width-under-min`),o>t.width&&(c=`width-over-max`)),{width:o,height:s,result:c}};export{n as i,e as n,t as r,r as t};
|
package/dist/format-DEuImTYJ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=(e,t=`en-US`,n)=>new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:1,...n}).format(e),t=(e,t,n=`+`)=>e>t?`${t}${n}`:String(e),n=e=>e?.toLocaleString(`ko-KR`)||`0`,r=({min:e,max:t,width:n,height:r,type:i,currentRatio:a})=>{let o=n,s=r,c=null,l=1;return typeof a==`number`&&a>0?l=a:r>0&&(l=n/r),i===`width`&&(s=Math.round(n/l),n<e.width&&(c=`width-under-min`),n>t.width&&(c=`width-over-max`),s<e.height&&(c=`height-under-min`)),i===`height`&&(o=Math.round(r*l),r<e.height&&(c=`height-under-min`),o<e.width&&(c=`width-under-min`),o>t.width&&(c=`width-over-max`)),{width:o,height:s,result:c}};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
package/dist/styles/editor.css
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
[data-komc] {
|
|
2
|
-
&.tiptap,
|
|
3
|
-
.tiptap {
|
|
4
|
-
max-width: none;
|
|
5
|
-
outline: none;
|
|
6
|
-
position: relative;
|
|
7
|
-
|
|
8
|
-
& :first-child {
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
& :last-child {
|
|
13
|
-
margin-bottom: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&.resize-cursor {
|
|
17
|
-
cursor: col-resize;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
& :where(strong) {
|
|
21
|
-
color: inherit;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
& [data-align='left'] {
|
|
25
|
-
text-align: left;
|
|
26
|
-
}
|
|
27
|
-
& [data-align='center'] {
|
|
28
|
-
text-align: center;
|
|
29
|
-
}
|
|
30
|
-
& [data-align='right'] {
|
|
31
|
-
text-align: right;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&.resize-cursor:has(table .selectedCell) {
|
|
35
|
-
cursor: inherit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
& table:has(.selectedCell) .column-resize-handle {
|
|
39
|
-
display: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
& table {
|
|
43
|
-
max-width: 100%;
|
|
44
|
-
position: relative;
|
|
45
|
-
|
|
46
|
-
& td,
|
|
47
|
-
& th {
|
|
48
|
-
border: 1px solid #dddddd;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
min-width: 1em;
|
|
51
|
-
padding: 6px 8px;
|
|
52
|
-
position: relative;
|
|
53
|
-
vertical-align: top;
|
|
54
|
-
|
|
55
|
-
& > * {
|
|
56
|
-
margin-top: 0;
|
|
57
|
-
margin-bottom: 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
& th {
|
|
62
|
-
background-color: #f8f8f9;
|
|
63
|
-
font-weight: 700;
|
|
64
|
-
text-align: left;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
& th.active-cell,
|
|
68
|
-
& td.active-cell {
|
|
69
|
-
outline: 1.5px solid #08f;
|
|
70
|
-
outline-offset: -1px;
|
|
71
|
-
border-radius: 3px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
& th.selectedCell.active-cell,
|
|
75
|
-
& td.selectedCell.active-cell {
|
|
76
|
-
outline: none;
|
|
77
|
-
border-radius: 0;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
& .table-col-control {
|
|
82
|
-
display: flex;
|
|
83
|
-
justify-content: center;
|
|
84
|
-
align-items: center;
|
|
85
|
-
width: 20px;
|
|
86
|
-
height: 20px;
|
|
87
|
-
padding: 0;
|
|
88
|
-
border: 1px solid #cccccc;
|
|
89
|
-
border-radius: 4px;
|
|
90
|
-
background: white;
|
|
91
|
-
top: -24px;
|
|
92
|
-
left: 50%;
|
|
93
|
-
transform: translateX(-50%);
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
position: absolute;
|
|
96
|
-
z-index: 10;
|
|
97
|
-
|
|
98
|
-
&:hover {
|
|
99
|
-
background-color: #f8f8f9;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
& .table-row-control {
|
|
104
|
-
display: flex;
|
|
105
|
-
justify-content: center;
|
|
106
|
-
align-items: center;
|
|
107
|
-
width: 20px;
|
|
108
|
-
height: 20px;
|
|
109
|
-
padding: 0;
|
|
110
|
-
border: 1px solid #cccccc;
|
|
111
|
-
border-radius: 4px;
|
|
112
|
-
background: white;
|
|
113
|
-
top: 50%;
|
|
114
|
-
left: -24px;
|
|
115
|
-
transform: translateY(-50%);
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
position: absolute;
|
|
118
|
-
font-weight: 500;
|
|
119
|
-
z-index: 10;
|
|
120
|
-
|
|
121
|
-
&:hover {
|
|
122
|
-
background-color: #f8f8f9;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
& .column-resize-handle {
|
|
127
|
-
position: absolute;
|
|
128
|
-
top: 0;
|
|
129
|
-
right: -1px;
|
|
130
|
-
bottom: -2px;
|
|
131
|
-
width: 4px;
|
|
132
|
-
background-color: #08f;
|
|
133
|
-
pointer-events: none;
|
|
134
|
-
animation: komc-column-resize-handle-fade-in 200ms ease-out;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
& .column-resize-handle.resize-handle-stable {
|
|
138
|
-
animation: none;
|
|
139
|
-
opacity: 1;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
& .details {
|
|
143
|
-
display: flex;
|
|
144
|
-
gap: 0.25em;
|
|
145
|
-
margin: 1.25em 0;
|
|
146
|
-
|
|
147
|
-
&:first-child {
|
|
148
|
-
margin-top: 0;
|
|
149
|
-
}
|
|
150
|
-
&:last-child {
|
|
151
|
-
margin-bottom: 0;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
& summary {
|
|
155
|
-
list-style: none;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
& > button {
|
|
159
|
-
display: flex;
|
|
160
|
-
cursor: pointer;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
align-items: center;
|
|
163
|
-
background: transparent;
|
|
164
|
-
width: 2.25em;
|
|
165
|
-
height: 2.25em;
|
|
166
|
-
font-size: 0.625em;
|
|
167
|
-
margin-top: 0.25em;
|
|
168
|
-
border-radius: 4px;
|
|
169
|
-
|
|
170
|
-
&:hover {
|
|
171
|
-
background-color: #fafafa;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
&::before {
|
|
175
|
-
content: '\25B6';
|
|
176
|
-
transition: transform 0.15s ease;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&.is-open > button::before {
|
|
181
|
-
transform: rotate(90deg);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
& > div {
|
|
185
|
-
display: flex;
|
|
186
|
-
flex-direction: column;
|
|
187
|
-
gap: 1em;
|
|
188
|
-
width: 100%;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
& .node-imageUploader {
|
|
193
|
-
margin-block: 1rem;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&.editor-wrapper,
|
|
198
|
-
.editor-wrapper {
|
|
199
|
-
& .editor-title {
|
|
200
|
-
font-weight: 500;
|
|
201
|
-
margin-bottom: 24px;
|
|
202
|
-
border-bottom: 2px solid #e6ebfe;
|
|
203
|
-
|
|
204
|
-
& + p {
|
|
205
|
-
margin-top: 0;
|
|
206
|
-
margin-bottom: 0;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
& + * + img {
|
|
210
|
-
margin-top: 0 !important;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
& * + .editor-title {
|
|
215
|
-
margin-top: 36px;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
&:focus-within .tiptap .selectedCell::after {
|
|
219
|
-
content: '';
|
|
220
|
-
position: absolute;
|
|
221
|
-
inset: 0;
|
|
222
|
-
background: #eeeeee;
|
|
223
|
-
opacity: 0.9;
|
|
224
|
-
pointer-events: none;
|
|
225
|
-
z-index: 2;
|
|
226
|
-
box-shadow: 0 0 0 1px #4770ff;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
&.column-resize-handle-ghost,
|
|
231
|
-
.column-resize-handle-ghost {
|
|
232
|
-
position: absolute;
|
|
233
|
-
background-color: #08f;
|
|
234
|
-
pointer-events: none;
|
|
235
|
-
animation: komc-column-resize-handle-fade-out 200ms ease-out forwards;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
@keyframes komc-column-resize-handle-fade-in {
|
|
240
|
-
from {
|
|
241
|
-
opacity: 0;
|
|
242
|
-
}
|
|
243
|
-
to {
|
|
244
|
-
opacity: 1;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
@keyframes komc-column-resize-handle-fade-out {
|
|
249
|
-
from {
|
|
250
|
-
opacity: 1;
|
|
251
|
-
}
|
|
252
|
-
to {
|
|
253
|
-
opacity: 0;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../common-D4sUwkFd.cjs`),n=require(`../../use-dialog-stack-YiLs-sNf.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`@radix-ui/react-slot`),o=require(`@floating-ui/react`);const s=(0,r.createContext)(null);function c(){let e=(0,r.useContext)(s);if(!e)throw Error(`useDropdown must be used within Dropdown`);return e}function l(){return(0,r.useContext)(s)}function u({className:e,children:n,onMouseDown:r,onClick:a,...s}){let{open:l,refs:u,floatingStyles:d,getFloatingProps:f,preserveFocus:p}=c();return l?(0,i.jsx)(o.FloatingPortal,{children:(0,i.jsx)(`div`,{"data-komc":!0,...f({...s,ref:u.setFloating,style:{...d,...s.style},className:t.n(`komc:z-50 komc:mt-0.5 komc:drop-shadow-md`,e),onMouseDown:e=>{p&&e.preventDefault(),r?.(e)},onClick:e=>{e.stopPropagation(),a?.(e)}}),children:n})}):null}function d({asChild:e=!0,className:n,type:r=`button`,...o}){let{open:s,refs:l,getReferenceProps:u}=c();return(0,i.jsx)(e?a.Slot:`button`,{"data-komc":!0,"data-state":s?`open`:`closed`,type:e?void 0:r,className:t.n(!e&&`komc:inline-flex komc:items-center komc:outline-none`,n),...u({...o,ref:l.setReference})})}function f({trigger:e,reference:t,children:a,placement:c=`bottom-start`,boundary:l,offset:f=8,maxWidth:p,maxHeight:m=300,className:h,open:g,onOpenChange:_,preserveFocus:v=!1,role:y=`menu`}){let b=g!==void 0,[x,S]=(0,r.useState)(!1),C=b?g:x,w=(0,r.useCallback)(e=>{b||S(e),_?.(e)},[b,_]),T=(0,r.useCallback)(()=>w(!1),[w]);n.t(C,T,!1);let{refs:E,floatingStyles:D,context:O}=(0,o.useFloating)({open:C,onOpenChange:w,placement:c,whileElementsMounted:o.autoUpdate,middleware:(0,r.useMemo)(()=>[(0,o.offset)(f),(0,o.flip)({boundary:l??void 0,padding:8}),(0,o.shift)({boundary:l??void 0,padding:8}),(0,o.size)({boundary:l??void 0,padding:8,apply({availableHeight:e,availableWidth:t,elements:n}){let r={maxHeight:`${Math.min(e,m)}px`,overflowY:`auto`};p!=null&&(r.maxWidth=`${Math.min(t,p)}px`),Object.assign(n.floating.style,r)}})],[l,m,p,f])}),{getReferenceProps:k,getFloatingProps:A}=(0,o.useInteractions)([(0,o.useClick)(O),(0,o.useDismiss)(O,{escapeKey:!1}),(0,o.useRole)(O,{role:y})]);(0,r.useEffect)(()=>{t&&E.setPositionReference(t)},[t,E]);let j=(0,r.useMemo)(()=>({open:C,setOpen:w,close:T,refs:E,floatingStyles:D,getReferenceProps:k,getFloatingProps:A,preserveFocus:v}),[T,D,A,k,C,v,E,w]);return(0,i.jsxs)(s.Provider,{value:j,children:[e?(0,i.jsx)(d,{asChild:!0,children:e}):null,e?(0,i.jsx)(u,{className:h,children:a}):a]})}exports.Dropdown=f,exports.DropdownContent=u,exports.DropdownTrigger=d,exports.useDropdown=c,exports.useOptionalDropdown=l;
|