@forgedevstack/ink 1.1.1 → 1.1.2
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/CHANGELOG.md +19 -6
- package/README.md +77 -19
- package/dist/components/InkEditor/InkEditor.cjs +1 -1
- package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.js +421 -351
- package/dist/components/InkEditor/components/FindReplace/FindReplace.cjs +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.cjs +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.d.ts +11 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.js +13 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.d.ts +4 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.d.ts.map +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.js +49 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.types.d.ts +12 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/FindReplace/index.d.ts +3 -0
- package/dist/components/InkEditor/components/FindReplace/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.cjs +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.cjs +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.d.ts +17 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.js +20 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.d.ts +4 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.js +76 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.types.d.ts +10 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.cjs +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.d.ts +6 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.js +19 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.test.d.ts +2 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.test.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/index.d.ts +3 -0
- package/dist/components/InkEditor/components/SignPad/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/index.d.ts +2 -0
- package/dist/components/InkEditor/components/index.d.ts.map +1 -1
- package/dist/constants/defaults.const.cjs +1 -1
- package/dist/constants/defaults.const.d.ts.map +1 -1
- package/dist/constants/defaults.const.js +46 -39
- package/dist/constants/generals.const.cjs +1 -0
- package/dist/constants/generals.const.d.ts +6 -0
- package/dist/constants/generals.const.d.ts.map +1 -0
- package/dist/constants/generals.const.js +5 -0
- package/dist/constants/index.d.ts +3 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/numbers.cjs +1 -0
- package/dist/constants/numbers.d.ts +119 -0
- package/dist/constants/numbers.d.ts.map +1 -0
- package/dist/constants/numbers.js +20 -0
- package/dist/constants/premium.const.cjs +1 -1
- package/dist/constants/premium.const.d.ts.map +1 -1
- package/dist/constants/premium.const.js +3 -0
- package/dist/constants/toolbar.const.cjs +1 -0
- package/dist/constants/toolbar.const.d.ts +4 -0
- package/dist/constants/toolbar.const.d.ts.map +1 -0
- package/dist/constants/toolbar.const.js +6 -0
- package/dist/plugins/ai/demoProvider.cjs +1 -1
- package/dist/plugins/ai/demoProvider.js +1 -1
- package/dist/styles.css +51 -0
- package/dist/types/features.types.d.ts +1 -1
- package/dist/types/features.types.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +3 -1
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/types/premium.types.d.ts +1 -1
- package/dist/types/premium.types.d.ts.map +1 -1
- package/dist/utils/comments.utils.cjs +1 -1
- package/dist/utils/comments.utils.js +1 -1
- package/dist/utils/findReplace.utils.cjs +1 -0
- package/dist/utils/findReplace.utils.d.ts +3 -0
- package/dist/utils/findReplace.utils.d.ts.map +1 -0
- package/dist/utils/findReplace.utils.js +26 -0
- package/dist/utils/history.utils.cjs +1 -1
- package/dist/utils/history.utils.js +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/ink.features.test.d.ts +2 -0
- package/dist/utils/ink.features.test.d.ts.map +1 -0
- package/dist/utils/memory.utils.cjs +1 -0
- package/dist/utils/memory.utils.d.ts +5 -0
- package/dist/utils/memory.utils.d.ts.map +1 -0
- package/dist/utils/memory.utils.js +10 -0
- package/dist/utils/slash.utils.cjs +1 -1
- package/dist/utils/slash.utils.js +1 -1
- package/dist/utils/storage.utils.cjs +1 -0
- package/dist/utils/storage.utils.d.ts +2 -0
- package/dist/utils/storage.utils.d.ts.map +1 -0
- package/dist/utils/storage.utils.js +4 -0
- package/dist/utils/table.utils.cjs +1 -1
- package/dist/utils/table.utils.js +1 -1
- package/package.json +3 -2
- package/dist/constants/numbers.const.cjs +0 -1
- package/dist/constants/numbers.const.d.ts +0 -18
- package/dist/constants/numbers.const.d.ts.map +0 -1
- package/dist/constants/numbers.const.js +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),_=require("../../../../constants/generals.const.cjs"),t=require("./FindReplace.const.cjs"),D=i=>{const{open:E,onClose:o,onReplace:u,findLabel:L=t.FIND_REPLACE_DEFAULT_FIND,replaceLabel:d=t.FIND_REPLACE_DEFAULT_REPLACE,replaceOneLabel:A=t.FIND_REPLACE_DEFAULT_ONE,replaceAllLabel:F=t.FIND_REPLACE_DEFAULT_ALL,closeLabel:b=t.FIND_REPLACE_DEFAULT_CLOSE,title:l=t.FIND_REPLACE_DEFAULT_TITLE}=i,[s,C]=r.useState(_.EMPTY_STRING),[a,N]=r.useState(_.EMPTY_STRING);if(!E)return null;const c=(n,I)=>{n.preventDefault(),s&&u(s,a,I)};return e.jsxs("form",{className:t.FIND_REPLACE_CLASS,"aria-label":l,onSubmit:n=>c(n,!1),children:[e.jsx("p",{className:t.FIND_REPLACE_TITLE_CLASS,children:l}),e.jsxs("label",{className:t.FIND_REPLACE_FIELD_CLASS,children:[e.jsx("span",{children:L}),e.jsx("input",{value:s,onChange:n=>C(n.target.value),autoFocus:!0})]}),e.jsxs("label",{className:t.FIND_REPLACE_FIELD_CLASS,children:[e.jsx("span",{children:d}),e.jsx("input",{value:a,onChange:n=>N(n.target.value)})]}),e.jsxs("div",{className:t.FIND_REPLACE_ACTIONS_CLASS,children:[e.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:o,children:b}),e.jsx("button",{type:"submit",className:"Ink-Editor__button",disabled:!s,children:A}),e.jsx("button",{type:"button",className:"Ink-Editor__button Ink-Editor__button--active",disabled:!s,onClick:n=>c(n,!0),children:F})]})]})};exports.FindReplace=D;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="Ink-FindReplace flex flex-col gap-2 p-3 border-b",_="Ink-FindReplace__field flex flex-col gap-1 text-sm",L="Ink-FindReplace__actions flex flex-wrap gap-1",A="Ink-FindReplace__title m-0 text-sm font-semibold",F="Find and replace",e="Find",D="Replace with",C="Replace",I="Replace all",R="Close";exports.FIND_REPLACE_ACTIONS_CLASS=L;exports.FIND_REPLACE_CLASS=E;exports.FIND_REPLACE_DEFAULT_ALL=I;exports.FIND_REPLACE_DEFAULT_CLOSE=R;exports.FIND_REPLACE_DEFAULT_FIND=e;exports.FIND_REPLACE_DEFAULT_ONE=C;exports.FIND_REPLACE_DEFAULT_REPLACE=D;exports.FIND_REPLACE_DEFAULT_TITLE=F;exports.FIND_REPLACE_FIELD_CLASS=_;exports.FIND_REPLACE_TITLE_CLASS=A;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const FIND_REPLACE_CLASS = "Ink-FindReplace flex flex-col gap-2 p-3 border-b";
|
|
2
|
+
export declare const FIND_REPLACE_FIELD_CLASS = "Ink-FindReplace__field flex flex-col gap-1 text-sm";
|
|
3
|
+
export declare const FIND_REPLACE_ACTIONS_CLASS = "Ink-FindReplace__actions flex flex-wrap gap-1";
|
|
4
|
+
export declare const FIND_REPLACE_TITLE_CLASS = "Ink-FindReplace__title m-0 text-sm font-semibold";
|
|
5
|
+
export declare const FIND_REPLACE_DEFAULT_TITLE = "Find and replace";
|
|
6
|
+
export declare const FIND_REPLACE_DEFAULT_FIND = "Find";
|
|
7
|
+
export declare const FIND_REPLACE_DEFAULT_REPLACE = "Replace with";
|
|
8
|
+
export declare const FIND_REPLACE_DEFAULT_ONE = "Replace";
|
|
9
|
+
export declare const FIND_REPLACE_DEFAULT_ALL = "Replace all";
|
|
10
|
+
export declare const FIND_REPLACE_DEFAULT_CLOSE = "Close";
|
|
11
|
+
//# sourceMappingURL=FindReplace.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FindReplace.const.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/FindReplace/FindReplace.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,qDAAqD,CAAC;AACrF,eAAO,MAAM,wBAAwB,uDAAuD,CAAC;AAC7F,eAAO,MAAM,0BAA0B,kDAAkD,CAAC;AAC1F,eAAO,MAAM,wBAAwB,qDAAqD,CAAC;AAC3F,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAC7D,eAAO,MAAM,yBAAyB,SAAS,CAAC;AAChD,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAClD,eAAO,MAAM,wBAAwB,gBAAgB,CAAC;AACtD,eAAO,MAAM,0BAA0B,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const _ = "Ink-FindReplace flex flex-col gap-2 p-3 border-b", E = "Ink-FindReplace__field flex flex-col gap-1 text-sm", e = "Ink-FindReplace__actions flex flex-wrap gap-1", L = "Ink-FindReplace__title m-0 text-sm font-semibold", F = "Find and replace", n = "Find", A = "Replace with", l = "Replace", c = "Replace all", t = "Close";
|
|
2
|
+
export {
|
|
3
|
+
e as FIND_REPLACE_ACTIONS_CLASS,
|
|
4
|
+
_ as FIND_REPLACE_CLASS,
|
|
5
|
+
c as FIND_REPLACE_DEFAULT_ALL,
|
|
6
|
+
t as FIND_REPLACE_DEFAULT_CLOSE,
|
|
7
|
+
n as FIND_REPLACE_DEFAULT_FIND,
|
|
8
|
+
l as FIND_REPLACE_DEFAULT_ONE,
|
|
9
|
+
A as FIND_REPLACE_DEFAULT_REPLACE,
|
|
10
|
+
F as FIND_REPLACE_DEFAULT_TITLE,
|
|
11
|
+
E as FIND_REPLACE_FIELD_CLASS,
|
|
12
|
+
L as FIND_REPLACE_TITLE_CLASS
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FindReplace.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/FindReplace/FindReplace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAc1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAoD5C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as E } from "react";
|
|
3
|
+
import { EMPTY_STRING as _ } from "../../../../constants/generals.const.js";
|
|
4
|
+
import { FIND_REPLACE_DEFAULT_TITLE as I, FIND_REPLACE_DEFAULT_FIND as D, FIND_REPLACE_DEFAULT_REPLACE as R, FIND_REPLACE_DEFAULT_ONE as S, FIND_REPLACE_DEFAULT_ALL as T, FIND_REPLACE_DEFAULT_CLOSE as h, FIND_REPLACE_CLASS as P, FIND_REPLACE_TITLE_CLASS as f, FIND_REPLACE_FIELD_CLASS as i, FIND_REPLACE_ACTIONS_CLASS as v } from "./FindReplace.const.js";
|
|
5
|
+
const x = (s) => {
|
|
6
|
+
const {
|
|
7
|
+
open: c,
|
|
8
|
+
onClose: L,
|
|
9
|
+
onReplace: u,
|
|
10
|
+
findLabel: A = D,
|
|
11
|
+
replaceLabel: d = R,
|
|
12
|
+
replaceOneLabel: b = S,
|
|
13
|
+
replaceAllLabel: p = T,
|
|
14
|
+
closeLabel: C = h,
|
|
15
|
+
title: a = I
|
|
16
|
+
} = s, [l, N] = E(_), [o, F] = E(_);
|
|
17
|
+
if (!c) return null;
|
|
18
|
+
const r = (e, m) => {
|
|
19
|
+
e.preventDefault(), l && u(l, o, m);
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ n("form", { className: P, "aria-label": a, onSubmit: (e) => r(e, !1), children: [
|
|
22
|
+
/* @__PURE__ */ t("p", { className: f, children: a }),
|
|
23
|
+
/* @__PURE__ */ n("label", { className: i, children: [
|
|
24
|
+
/* @__PURE__ */ t("span", { children: A }),
|
|
25
|
+
/* @__PURE__ */ t("input", { value: l, onChange: (e) => N(e.target.value), autoFocus: !0 })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ n("label", { className: i, children: [
|
|
28
|
+
/* @__PURE__ */ t("span", { children: d }),
|
|
29
|
+
/* @__PURE__ */ t("input", { value: o, onChange: (e) => F(e.target.value) })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ n("div", { className: v, children: [
|
|
32
|
+
/* @__PURE__ */ t("button", { type: "button", className: "Ink-Editor__button", onClick: L, children: C }),
|
|
33
|
+
/* @__PURE__ */ t("button", { type: "submit", className: "Ink-Editor__button", disabled: !l, children: b }),
|
|
34
|
+
/* @__PURE__ */ t(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
type: "button",
|
|
38
|
+
className: "Ink-Editor__button Ink-Editor__button--active",
|
|
39
|
+
disabled: !l,
|
|
40
|
+
onClick: (e) => r(e, !0),
|
|
41
|
+
children: p
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
x as FindReplace
|
|
49
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FindReplaceProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
onReplace: (find: string, replace: string, replaceAll: boolean) => void;
|
|
5
|
+
findLabel?: string;
|
|
6
|
+
replaceLabel?: string;
|
|
7
|
+
replaceOneLabel?: string;
|
|
8
|
+
replaceAllLabel?: string;
|
|
9
|
+
closeLabel?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=FindReplace.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FindReplace.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/FindReplace/FindReplace.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/FindReplace/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),a=require("../../../../constants/numbers.cjs"),n=require("./SignPad.const.cjs"),S=require("./SignPad.utils.cjs"),R=f=>{const{open:l,onClose:d,onConfirm:P,clearLabel:C=n.SIGN_PAD_DEFAULT_CLEAR,confirmLabel:E=n.SIGN_PAD_DEFAULT_CONFIRM,cancelLabel:D=n.SIGN_PAD_DEFAULT_CANCEL,title:I=n.SIGN_PAD_DEFAULT_TITLE}=f,r=c.useRef(null),_=c.useRef(!1),[N,u]=c.useState(!1);if(c.useEffect(()=>{if(!l)return;const e=r.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.fillStyle=n.SIGN_PAD_FILL_STYLE,t.fillRect(a.NUMBER_ZERO,a.NUMBER_ZERO,e.width,e.height),t.strokeStyle=n.SIGN_PAD_STROKE_STYLE,t.lineWidth=n.SIGN_PAD_LINE_WIDTH,t.lineCap="round",t.lineJoin="round",u(!1))},[l]),!l)return null;const L=e=>{const t=r.current,o=t==null?void 0:t.getContext("2d");if(!t||!o)return;_.current=!0,t.setPointerCapture(e.pointerId);const s=S.getCanvasPoint(t,e.clientX,e.clientY);o.beginPath(),o.moveTo(s.x,s.y)},b=e=>{if(!_.current)return;const t=r.current,o=t==null?void 0:t.getContext("2d");if(!t||!o)return;const s=S.getCanvasPoint(t,e.clientX,e.clientY);o.lineTo(s.x,s.y),o.stroke(),u(!0)},A=e=>{var t;_.current=!1,(t=r.current)==null||t.releasePointerCapture(e.pointerId)},h=()=>{const e=r.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.fillStyle=n.SIGN_PAD_FILL_STYLE,t.fillRect(a.NUMBER_ZERO,a.NUMBER_ZERO,e.width,e.height),u(!1))},g=()=>{const e=r.current;!e||!(N||S.canvasHasInk(e))||(P(e.toDataURL(n.SIGN_PAD_MIME)),d())};return i.jsxs("div",{className:n.SIGN_PAD_CLASS,role:"dialog","aria-modal":"true","aria-label":I,children:[i.jsx("p",{className:n.SIGN_PAD_TITLE_CLASS,children:I}),i.jsx("canvas",{ref:r,className:n.SIGN_PAD_CANVAS_CLASS,width:n.SIGN_PAD_CANVAS_WIDTH,height:n.SIGN_PAD_CANVAS_HEIGHT,onPointerDown:L,onPointerMove:b,onPointerUp:A,onPointerLeave:A}),i.jsxs("div",{className:n.SIGN_PAD_ACTIONS_CLASS,children:[i.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:h,children:C}),i.jsx("button",{type:"button",className:"Ink-Editor__button",onClick:d,children:D}),i.jsx("button",{type:"button",className:"Ink-Editor__button Ink-Editor__button--active",disabled:!N,onClick:g,children:E})]})]})};exports.SignPad=R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../../constants/numbers.cjs"),S="Ink-SignPad flex flex-col gap-2 p-3 border-b",A="Ink-SignPad__canvas w-full max-w-xl h-44 border border-dashed rounded-lg bg-white cursor-crosshair",I="Ink-SignPad__actions flex flex-wrap gap-1",N="Ink-SignPad__title m-0 text-sm font-semibold",D="Sign here",P="Clear",L="Insert",E="Cancel",T=480,n=180,G=_.NUMBER_TWO,o="#111827",t="#ffffff",e="image/png",s=_.NUMBER_FOUR,C=_.NUMBER_SIX;exports.SIGN_PAD_ACTIONS_CLASS=I;exports.SIGN_PAD_CANVAS_CLASS=A;exports.SIGN_PAD_CANVAS_HEIGHT=n;exports.SIGN_PAD_CANVAS_WIDTH=T;exports.SIGN_PAD_CLASS=S;exports.SIGN_PAD_DEFAULT_CANCEL=E;exports.SIGN_PAD_DEFAULT_CLEAR=P;exports.SIGN_PAD_DEFAULT_CONFIRM=L;exports.SIGN_PAD_DEFAULT_TITLE=D;exports.SIGN_PAD_EMPTY_ALPHA_THRESHOLD=s;exports.SIGN_PAD_FILL_STYLE=t;exports.SIGN_PAD_LINE_WIDTH=G;exports.SIGN_PAD_MIME=e;exports.SIGN_PAD_SAMPLE_STEP=C;exports.SIGN_PAD_STROKE_STYLE=o;exports.SIGN_PAD_TITLE_CLASS=N;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const SIGN_PAD_CLASS = "Ink-SignPad flex flex-col gap-2 p-3 border-b";
|
|
2
|
+
export declare const SIGN_PAD_CANVAS_CLASS = "Ink-SignPad__canvas w-full max-w-xl h-44 border border-dashed rounded-lg bg-white cursor-crosshair";
|
|
3
|
+
export declare const SIGN_PAD_ACTIONS_CLASS = "Ink-SignPad__actions flex flex-wrap gap-1";
|
|
4
|
+
export declare const SIGN_PAD_TITLE_CLASS = "Ink-SignPad__title m-0 text-sm font-semibold";
|
|
5
|
+
export declare const SIGN_PAD_DEFAULT_TITLE = "Sign here";
|
|
6
|
+
export declare const SIGN_PAD_DEFAULT_CLEAR = "Clear";
|
|
7
|
+
export declare const SIGN_PAD_DEFAULT_CONFIRM = "Insert";
|
|
8
|
+
export declare const SIGN_PAD_DEFAULT_CANCEL = "Cancel";
|
|
9
|
+
export declare const SIGN_PAD_CANVAS_WIDTH = 480;
|
|
10
|
+
export declare const SIGN_PAD_CANVAS_HEIGHT = 180;
|
|
11
|
+
export declare const SIGN_PAD_LINE_WIDTH = 2;
|
|
12
|
+
export declare const SIGN_PAD_STROKE_STYLE = "#111827";
|
|
13
|
+
export declare const SIGN_PAD_FILL_STYLE = "#ffffff";
|
|
14
|
+
export declare const SIGN_PAD_MIME = "image/png";
|
|
15
|
+
export declare const SIGN_PAD_EMPTY_ALPHA_THRESHOLD = 4;
|
|
16
|
+
export declare const SIGN_PAD_SAMPLE_STEP = 6;
|
|
17
|
+
//# sourceMappingURL=SignPad.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignPad.const.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SignPad/SignPad.const.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,iDAAiD,CAAC;AAC7E,eAAO,MAAM,qBAAqB,uGAAuG,CAAC;AAC1I,eAAO,MAAM,sBAAsB,8CAA8C,CAAC;AAClF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC;AACnF,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAClD,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAC9C,eAAO,MAAM,wBAAwB,WAAW,CAAC;AACjD,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAChD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,mBAAmB,IAAa,CAAC;AAC9C,eAAO,MAAM,qBAAqB,YAAY,CAAC;AAC/C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,8BAA8B,IAAc,CAAC;AAC1D,eAAO,MAAM,oBAAoB,IAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NUMBER_TWO as _, NUMBER_SIX as S, NUMBER_FOUR as A } from "../../../../constants/numbers.js";
|
|
2
|
+
const I = "Ink-SignPad flex flex-col gap-2 p-3 border-b", o = "Ink-SignPad__canvas w-full max-w-xl h-44 border border-dashed rounded-lg bg-white cursor-crosshair", t = "Ink-SignPad__actions flex flex-wrap gap-1", N = "Ink-SignPad__title m-0 text-sm font-semibold", s = "Sign here", P = "Clear", D = "Insert", c = "Cancel", E = 480, e = 180, L = _, T = "#111827", r = "#ffffff", G = "image/png", a = A, C = S;
|
|
3
|
+
export {
|
|
4
|
+
t as SIGN_PAD_ACTIONS_CLASS,
|
|
5
|
+
o as SIGN_PAD_CANVAS_CLASS,
|
|
6
|
+
e as SIGN_PAD_CANVAS_HEIGHT,
|
|
7
|
+
E as SIGN_PAD_CANVAS_WIDTH,
|
|
8
|
+
I as SIGN_PAD_CLASS,
|
|
9
|
+
c as SIGN_PAD_DEFAULT_CANCEL,
|
|
10
|
+
P as SIGN_PAD_DEFAULT_CLEAR,
|
|
11
|
+
D as SIGN_PAD_DEFAULT_CONFIRM,
|
|
12
|
+
s as SIGN_PAD_DEFAULT_TITLE,
|
|
13
|
+
a as SIGN_PAD_EMPTY_ALPHA_THRESHOLD,
|
|
14
|
+
r as SIGN_PAD_FILL_STYLE,
|
|
15
|
+
L as SIGN_PAD_LINE_WIDTH,
|
|
16
|
+
G as SIGN_PAD_MIME,
|
|
17
|
+
C as SIGN_PAD_SAMPLE_STEP,
|
|
18
|
+
T as SIGN_PAD_STROKE_STYLE,
|
|
19
|
+
N as SIGN_PAD_TITLE_CLASS
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignPad.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SignPad/SignPad.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAqB,MAAM,OAAO,CAAC;AAkBhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA0GpC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as A, useState as p, useEffect as b } from "react";
|
|
3
|
+
import { NUMBER_ZERO as l } from "../../../../constants/numbers.js";
|
|
4
|
+
import { SIGN_PAD_DEFAULT_TITLE as T, SIGN_PAD_DEFAULT_CLEAR as G, SIGN_PAD_DEFAULT_CONFIRM as g, SIGN_PAD_DEFAULT_CANCEL as x, SIGN_PAD_FILL_STYLE as I, SIGN_PAD_STROKE_STYLE as k, SIGN_PAD_LINE_WIDTH as R, SIGN_PAD_CLASS as y, SIGN_PAD_TITLE_CLASS as w, SIGN_PAD_CANVAS_HEIGHT as U, SIGN_PAD_CANVAS_WIDTH as F, SIGN_PAD_CANVAS_CLASS as H, SIGN_PAD_ACTIONS_CLASS as v, SIGN_PAD_MIME as M } from "./SignPad.const.js";
|
|
5
|
+
import { getCanvasPoint as C, canvasHasInk as O } from "./SignPad.utils.js";
|
|
6
|
+
const K = (N) => {
|
|
7
|
+
const {
|
|
8
|
+
open: c,
|
|
9
|
+
onClose: _,
|
|
10
|
+
onConfirm: D,
|
|
11
|
+
clearLabel: m = G,
|
|
12
|
+
confirmLabel: P = g,
|
|
13
|
+
cancelLabel: h = x,
|
|
14
|
+
title: u = T
|
|
15
|
+
} = N, n = A(null), a = A(!1), [d, s] = p(!1);
|
|
16
|
+
if (b(() => {
|
|
17
|
+
if (!c) return;
|
|
18
|
+
const e = n.current, t = e == null ? void 0 : e.getContext("2d");
|
|
19
|
+
!e || !t || (t.fillStyle = I, t.fillRect(l, l, e.width, e.height), t.strokeStyle = k, t.lineWidth = R, t.lineCap = "round", t.lineJoin = "round", s(!1));
|
|
20
|
+
}, [c]), !c) return null;
|
|
21
|
+
const L = (e) => {
|
|
22
|
+
const t = n.current, o = t == null ? void 0 : t.getContext("2d");
|
|
23
|
+
if (!t || !o) return;
|
|
24
|
+
a.current = !0, t.setPointerCapture(e.pointerId);
|
|
25
|
+
const r = C(t, e.clientX, e.clientY);
|
|
26
|
+
o.beginPath(), o.moveTo(r.x, r.y);
|
|
27
|
+
}, E = (e) => {
|
|
28
|
+
if (!a.current) return;
|
|
29
|
+
const t = n.current, o = t == null ? void 0 : t.getContext("2d");
|
|
30
|
+
if (!t || !o) return;
|
|
31
|
+
const r = C(t, e.clientX, e.clientY);
|
|
32
|
+
o.lineTo(r.x, r.y), o.stroke(), s(!0);
|
|
33
|
+
}, S = (e) => {
|
|
34
|
+
var t;
|
|
35
|
+
a.current = !1, (t = n.current) == null || t.releasePointerCapture(e.pointerId);
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ f("div", { className: y, role: "dialog", "aria-modal": "true", "aria-label": u, children: [
|
|
38
|
+
/* @__PURE__ */ i("p", { className: w, children: u }),
|
|
39
|
+
/* @__PURE__ */ i(
|
|
40
|
+
"canvas",
|
|
41
|
+
{
|
|
42
|
+
ref: n,
|
|
43
|
+
className: H,
|
|
44
|
+
width: F,
|
|
45
|
+
height: U,
|
|
46
|
+
onPointerDown: L,
|
|
47
|
+
onPointerMove: E,
|
|
48
|
+
onPointerUp: S,
|
|
49
|
+
onPointerLeave: S
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ f("div", { className: v, children: [
|
|
53
|
+
/* @__PURE__ */ i("button", { type: "button", className: "Ink-Editor__button", onClick: () => {
|
|
54
|
+
const e = n.current, t = e == null ? void 0 : e.getContext("2d");
|
|
55
|
+
!e || !t || (t.fillStyle = I, t.fillRect(l, l, e.width, e.height), s(!1));
|
|
56
|
+
}, children: m }),
|
|
57
|
+
/* @__PURE__ */ i("button", { type: "button", className: "Ink-Editor__button", onClick: _, children: h }),
|
|
58
|
+
/* @__PURE__ */ i(
|
|
59
|
+
"button",
|
|
60
|
+
{
|
|
61
|
+
type: "button",
|
|
62
|
+
className: "Ink-Editor__button Ink-Editor__button--active",
|
|
63
|
+
disabled: !d,
|
|
64
|
+
onClick: () => {
|
|
65
|
+
const e = n.current;
|
|
66
|
+
!e || !(d || O(e)) || (D(e.toDataURL(M)), _());
|
|
67
|
+
},
|
|
68
|
+
children: P
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] })
|
|
72
|
+
] });
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
K as SignPad
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignPad.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SignPad/SignPad.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./SignPad.const.cjs"),r=t=>{const n=t.getContext("2d");if(!n)return!1;const{width:s,height:e}=t,{data:o}=n.getImageData(0,0,s,e),a=3;for(let i=a;i<o.length;i+=c.SIGN_PAD_SAMPLE_STEP*4)if(o[i]>c.SIGN_PAD_EMPTY_ALPHA_THRESHOLD)return!0;return!1},g=(t,n,s)=>{const e=t.getBoundingClientRect(),o=t.width/e.width,a=t.height/e.height;return{x:(n-e.left)*o,y:(s-e.top)*a}};exports.canvasHasInk=r;exports.getCanvasPoint=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignPad.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SignPad/SignPad.utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,GAAI,QAAQ,iBAAiB,KAAG,OAUxD,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,iBAAiB,EACzB,SAAS,MAAM,EACf,SAAS,MAAM,KACd;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAQxB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SIGN_PAD_SAMPLE_STEP as c, SIGN_PAD_EMPTY_ALPHA_THRESHOLD as h } from "./SignPad.const.js";
|
|
2
|
+
const g = (t) => {
|
|
3
|
+
const n = t.getContext("2d");
|
|
4
|
+
if (!n) return !1;
|
|
5
|
+
const { width: r, height: e } = t, { data: o } = n.getImageData(0, 0, r, e), s = 3;
|
|
6
|
+
for (let i = s; i < o.length; i += c * 4)
|
|
7
|
+
if (o[i] > h) return !0;
|
|
8
|
+
return !1;
|
|
9
|
+
}, f = (t, n, r) => {
|
|
10
|
+
const e = t.getBoundingClientRect(), o = t.width / e.width, s = t.height / e.height;
|
|
11
|
+
return {
|
|
12
|
+
x: (n - e.left) * o,
|
|
13
|
+
y: (r - e.top) * s
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
g as canvasHasInk,
|
|
18
|
+
f as getCanvasPoint
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignPad.utils.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SignPad/SignPad.utils.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/InkEditor/components/SignPad/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -6,4 +6,6 @@ export { AiPanel } from './AiPanel';
|
|
|
6
6
|
export { BlockHandles } from './BlockHandles';
|
|
7
7
|
export { SlashMenu } from './SlashMenu';
|
|
8
8
|
export { TrackChangesBar } from './TrackChangesBar';
|
|
9
|
+
export { SignPad } from './SignPad';
|
|
10
|
+
export { FindReplace } from './FindReplace';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/InkEditor/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/InkEditor/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./numbers.cjs"),e=require("./toolbar.const.cjs"),i=["headingDropdown","divider","bold","italic","underline","strikethrough","divider","textColor","highlightColor","divider","bulletList","orderedList","divider","link","image","table",e.TOOLBAR_OPTION_SIGNATURE,e.TOOLBAR_OPTION_FIND_REPLACE,e.TOOLBAR_OPTION_HORIZONTAL_RULE,"divider","undo","redo","divider","trackChanges","comments","ai","divider","clearFormat"],a=["bold","italic","underline","divider","bulletList","orderedList"],l=["headingDropdown","divider","bold","italic","underline","divider","bulletList","orderedList","table","divider","trackChanges","comments","ai","divider","undo","redo"],n=[{value:"p",label:"Paragraph"},{value:"h1",label:"Heading 1"},{value:"h2",label:"Heading 2"},{value:"h3",label:"Heading 3"},{value:"h4",label:"Heading 4"},{value:"h5",label:"Heading 5"},{value:"h6",label:"Heading 6"}],o={bold:{title:"Bold (Ctrl+B)",command:"bold"},italic:{title:"Italic (Ctrl+I)",command:"italic"},underline:{title:"Underline (Ctrl+U)",command:"underline"},strikethrough:{title:"Strikethrough",command:"strikeThrough"},heading1:{title:"Heading 1",command:"formatBlock",value:"h1"},heading2:{title:"Heading 2",command:"formatBlock",value:"h2"},heading3:{title:"Heading 3",command:"formatBlock",value:"h3"},heading4:{title:"Heading 4",command:"formatBlock",value:"h4"},heading5:{title:"Heading 5",command:"formatBlock",value:"h5"},heading6:{title:"Heading 6",command:"formatBlock",value:"h6"},paragraph:{title:"Paragraph",command:"formatBlock",value:"p"},bulletList:{title:"Bullet list",command:"insertUnorderedList"},orderedList:{title:"Numbered list",command:"insertOrderedList"},blockquote:{title:"Quote",command:"formatBlock",value:"blockquote"},code:{title:"Code block",command:"formatBlock",value:"pre"},alignLeft:{title:"Align left",command:"justifyLeft"},alignCenter:{title:"Align center",command:"justifyCenter"},alignRight:{title:"Align right",command:"justifyRight"},alignJustify:{title:"Justify",command:"justifyFull"},indent:{title:"Indent",command:"indent"},outdent:{title:"Outdent",command:"outdent"},clearFormat:{title:"Clear formatting",command:"removeFormat"},undo:{title:"Undo",command:"undo"},redo:{title:"Redo",command:"redo"}},d=["#111827","#dc2626","#ea580c","#ca8a04","#16a34a","#2563eb","#0f766e","#db2777"],r="Start typing...",_="Ink-Editor",s="Ink-Editor__toolbar",c="Ink-Editor__content",A="Ink-Editor__divider",I="Ink-Editor__button",L="Ink-Editor__button--active",N="Ink-Editor__footer",T="Ink-Editor__shell",S="Ink-Editor__body",u="Ink-tc-insert",m="Ink-tc-delete",O="Ink-comment-mark",E="You",C="classic",K={table:!0,trackChanges:!0,comments:!0,ai:!0,blocks:!0,slash:!0,history:!0,typoAutoFix:!0,signature:!0,findReplace:!0,horizontalRule:!0},g=t.INK_DEFAULT_TABLE_ROWS,b=t.INK_DEFAULT_TABLE_COLS,h=[{id:"heading1",label:"Heading 1",keywords:["h1","title","heading"],insert:"heading1"},{id:"heading2",label:"Heading 2",keywords:["h2","subtitle","heading"],insert:"heading2"},{id:"bullet",label:"Bullet list",keywords:["ul","list","bullet"],insert:"bulletList"},{id:"ordered",label:"Numbered list",keywords:["ol","list","numbered"],insert:"orderedList"},{id:"table",label:"Table",keywords:["table","grid"],insert:"table"},{id:"ai",label:"Ask AI",keywords:["ai","assistant","chat"],insert:"ai"}],R=["English","Spanish","French","German","Chinese (Simplified)","Japanese","Russian","Portuguese","Korean","Italian"],k=[{id:"rewrite",label:"Rewrite",capability:"rewrite"},{id:"summarize",label:"Summarize",capability:"summarize"},{id:"expand",label:"Expand",capability:"expand"},{id:"tone",label:"Adjust tone",capability:"tone"}];exports.INK_BUTTON_CONFIG=o;exports.INK_CLASS_BODY=S;exports.INK_CLASS_BUTTON=I;exports.INK_CLASS_BUTTON_ACTIVE=L;exports.INK_CLASS_COMMENT_MARK=O;exports.INK_CLASS_CONTENT=c;exports.INK_CLASS_DIVIDER=A;exports.INK_CLASS_FOOTER=N;exports.INK_CLASS_ROOT=_;exports.INK_CLASS_SHELL=T;exports.INK_CLASS_TC_DELETE=m;exports.INK_CLASS_TC_INSERT=u;exports.INK_CLASS_TOOLBAR=s;exports.INK_COLLAB_TOOLBAR=l;exports.INK_COLOR_SWATCHES=d;exports.INK_DEFAULT_AUTHOR=E;exports.INK_DEFAULT_FEATURES=K;exports.INK_DEFAULT_TOOLBAR=i;exports.INK_DEFAULT_VARIANT=C;exports.INK_HEADING_OPTIONS=n;exports.INK_PLACEHOLDER_DEFAULT=r;exports.INK_QUICK_ACTIONS=k;exports.INK_SIMPLE_TOOLBAR=a;exports.INK_SLASH_COMMANDS=h;exports.INK_TABLE_DEFAULT_COLS=b;exports.INK_TABLE_DEFAULT_ROWS=g;exports.INK_TRANSLATE_LANGUAGES=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.const.d.ts","sourceRoot":"","sources":["../../src/constants/defaults.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"defaults.const.d.ts","sourceRoot":"","sources":["../../src/constants/defaults.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAWlD,eAAO,MAAM,mBAAmB,EAAE,aAAa,EA6B9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAO7C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAiB7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,cAAc,EAQ/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,MAAM,EACN;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CA0BnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAS9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AACzD,eAAO,MAAM,cAAc,eAAe,CAAC;AAC3C,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,uBAAuB,+BAA+B,CAAC;AACpE,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAC1D,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AACtD,eAAO,MAAM,oBAAoB,EAAE,iBAYlC,CAAC;AACF,eAAO,MAAM,sBAAsB,IAAyB,CAAC;AAC7D,eAAO,MAAM,sBAAsB,IAAyB,CAAC;AAE7D,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAqChD,CAAC;AAEF,eAAO,MAAM,uBAAuB,uIAW1B,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;IAK7B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { INK_DEFAULT_TABLE_ROWS as e, INK_DEFAULT_TABLE_COLS as t } from "./numbers.
|
|
2
|
-
|
|
1
|
+
import { INK_DEFAULT_TABLE_ROWS as e, INK_DEFAULT_TABLE_COLS as t } from "./numbers.js";
|
|
2
|
+
import { TOOLBAR_OPTION_SIGNATURE as i, TOOLBAR_OPTION_FIND_REPLACE as a, TOOLBAR_OPTION_HORIZONTAL_RULE as l } from "./toolbar.const.js";
|
|
3
|
+
const o = [
|
|
3
4
|
"headingDropdown",
|
|
4
5
|
"divider",
|
|
5
6
|
"bold",
|
|
@@ -16,6 +17,9 @@ const a = [
|
|
|
16
17
|
"link",
|
|
17
18
|
"image",
|
|
18
19
|
"table",
|
|
20
|
+
i,
|
|
21
|
+
a,
|
|
22
|
+
l,
|
|
19
23
|
"divider",
|
|
20
24
|
"undo",
|
|
21
25
|
"redo",
|
|
@@ -25,14 +29,14 @@ const a = [
|
|
|
25
29
|
"ai",
|
|
26
30
|
"divider",
|
|
27
31
|
"clearFormat"
|
|
28
|
-
],
|
|
32
|
+
], r = [
|
|
29
33
|
"bold",
|
|
30
34
|
"italic",
|
|
31
35
|
"underline",
|
|
32
36
|
"divider",
|
|
33
37
|
"bulletList",
|
|
34
38
|
"orderedList"
|
|
35
|
-
],
|
|
39
|
+
], s = [
|
|
36
40
|
"headingDropdown",
|
|
37
41
|
"divider",
|
|
38
42
|
"bold",
|
|
@@ -49,7 +53,7 @@ const a = [
|
|
|
49
53
|
"divider",
|
|
50
54
|
"undo",
|
|
51
55
|
"redo"
|
|
52
|
-
],
|
|
56
|
+
], c = [
|
|
53
57
|
{ value: "p", label: "Paragraph" },
|
|
54
58
|
{ value: "h1", label: "Heading 1" },
|
|
55
59
|
{ value: "h2", label: "Heading 2" },
|
|
@@ -57,7 +61,7 @@ const a = [
|
|
|
57
61
|
{ value: "h4", label: "Heading 4" },
|
|
58
62
|
{ value: "h5", label: "Heading 5" },
|
|
59
63
|
{ value: "h6", label: "Heading 6" }
|
|
60
|
-
],
|
|
64
|
+
], _ = {
|
|
61
65
|
bold: { title: "Bold (Ctrl+B)", command: "bold" },
|
|
62
66
|
italic: { title: "Italic (Ctrl+I)", command: "italic" },
|
|
63
67
|
underline: { title: "Underline (Ctrl+U)", command: "underline" },
|
|
@@ -82,7 +86,7 @@ const a = [
|
|
|
82
86
|
clearFormat: { title: "Clear formatting", command: "removeFormat" },
|
|
83
87
|
undo: { title: "Undo", command: "undo" },
|
|
84
88
|
redo: { title: "Redo", command: "redo" }
|
|
85
|
-
},
|
|
89
|
+
}, m = [
|
|
86
90
|
"#111827",
|
|
87
91
|
"#dc2626",
|
|
88
92
|
"#ea580c",
|
|
@@ -91,7 +95,7 @@ const a = [
|
|
|
91
95
|
"#2563eb",
|
|
92
96
|
"#0f766e",
|
|
93
97
|
"#db2777"
|
|
94
|
-
],
|
|
98
|
+
], u = "Start typing...", I = "Ink-Editor", L = "Ink-Editor__toolbar", A = "Ink-Editor__content", g = "Ink-Editor__divider", h = "Ink-Editor__button", b = "Ink-Editor__button--active", N = "Ink-Editor__footer", T = "Ink-Editor__shell", O = "Ink-Editor__body", E = "Ink-tc-insert", S = "Ink-tc-delete", k = "Ink-comment-mark", C = "You", K = "classic", v = {
|
|
95
99
|
table: !0,
|
|
96
100
|
trackChanges: !0,
|
|
97
101
|
comments: !0,
|
|
@@ -99,8 +103,11 @@ const a = [
|
|
|
99
103
|
blocks: !0,
|
|
100
104
|
slash: !0,
|
|
101
105
|
history: !0,
|
|
102
|
-
typoAutoFix: !0
|
|
103
|
-
|
|
106
|
+
typoAutoFix: !0,
|
|
107
|
+
signature: !0,
|
|
108
|
+
findReplace: !0,
|
|
109
|
+
horizontalRule: !0
|
|
110
|
+
}, R = e, B = t, f = [
|
|
104
111
|
{
|
|
105
112
|
id: "heading1",
|
|
106
113
|
label: "Heading 1",
|
|
@@ -137,7 +144,7 @@ const a = [
|
|
|
137
144
|
keywords: ["ai", "assistant", "chat"],
|
|
138
145
|
insert: "ai"
|
|
139
146
|
}
|
|
140
|
-
],
|
|
147
|
+
], p = [
|
|
141
148
|
"English",
|
|
142
149
|
"Spanish",
|
|
143
150
|
"French",
|
|
@@ -148,38 +155,38 @@ const a = [
|
|
|
148
155
|
"Portuguese",
|
|
149
156
|
"Korean",
|
|
150
157
|
"Italian"
|
|
151
|
-
],
|
|
158
|
+
], U = [
|
|
152
159
|
{ id: "rewrite", label: "Rewrite", capability: "rewrite" },
|
|
153
160
|
{ id: "summarize", label: "Summarize", capability: "summarize" },
|
|
154
161
|
{ id: "expand", label: "Expand", capability: "expand" },
|
|
155
162
|
{ id: "tone", label: "Adjust tone", capability: "tone" }
|
|
156
163
|
];
|
|
157
164
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
165
|
+
_ as INK_BUTTON_CONFIG,
|
|
166
|
+
O as INK_CLASS_BODY,
|
|
167
|
+
h as INK_CLASS_BUTTON,
|
|
168
|
+
b as INK_CLASS_BUTTON_ACTIVE,
|
|
169
|
+
k as INK_CLASS_COMMENT_MARK,
|
|
170
|
+
A as INK_CLASS_CONTENT,
|
|
171
|
+
g as INK_CLASS_DIVIDER,
|
|
172
|
+
N as INK_CLASS_FOOTER,
|
|
173
|
+
I as INK_CLASS_ROOT,
|
|
174
|
+
T as INK_CLASS_SHELL,
|
|
175
|
+
S as INK_CLASS_TC_DELETE,
|
|
176
|
+
E as INK_CLASS_TC_INSERT,
|
|
177
|
+
L as INK_CLASS_TOOLBAR,
|
|
178
|
+
s as INK_COLLAB_TOOLBAR,
|
|
179
|
+
m as INK_COLOR_SWATCHES,
|
|
180
|
+
C as INK_DEFAULT_AUTHOR,
|
|
181
|
+
v as INK_DEFAULT_FEATURES,
|
|
182
|
+
o as INK_DEFAULT_TOOLBAR,
|
|
183
|
+
K as INK_DEFAULT_VARIANT,
|
|
184
|
+
c as INK_HEADING_OPTIONS,
|
|
185
|
+
u as INK_PLACEHOLDER_DEFAULT,
|
|
186
|
+
U as INK_QUICK_ACTIONS,
|
|
187
|
+
r as INK_SIMPLE_TOOLBAR,
|
|
188
|
+
f as INK_SLASH_COMMANDS,
|
|
189
|
+
B as INK_TABLE_DEFAULT_COLS,
|
|
190
|
+
R as INK_TABLE_DEFAULT_ROWS,
|
|
191
|
+
p as INK_TRANSLATE_LANGUAGES
|
|
185
192
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="",t="ink-memory:";exports.EMPTY_STRING=e;exports.LOCAL_STORAGE_PREFIX=t;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const EMPTY_STRING = "";
|
|
2
|
+
export declare const SPACE_STRING = " ";
|
|
3
|
+
export declare const NEWLINE_STRING = "\n";
|
|
4
|
+
export declare const LOCAL_STORAGE_PREFIX = "ink-memory:";
|
|
5
|
+
export declare const DATA_IMAGE_PNG_PREFIX = "data:image/png;base64,";
|
|
6
|
+
//# sourceMappingURL=generals.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generals.const.d.ts","sourceRoot":"","sources":["../../src/constants/generals.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAClD,eAAO,MAAM,qBAAqB,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=150,I="#111827",E="#fef08a",N=3,L=3,T=1,O=1,M=12,A=12,K=50,R="#fde047",S=8,t=180,o=0,B=2,H=4,U=6;exports.INK_COMMENT_HIGHLIGHT_COLOR=R;exports.INK_DEFAULT_HIGHLIGHT_COLOR=E;exports.INK_DEFAULT_TABLE_COLS=L;exports.INK_DEFAULT_TABLE_ROWS=N;exports.INK_DEFAULT_TEXT_COLOR=I;exports.INK_DEMO_AI_DELAY_MS=t;exports.INK_HISTORY_MAX=K;exports.INK_MIN_HEIGHT=_;exports.INK_SLASH_MENU_MAX_ITEMS=S;exports.INK_TABLE_MAX_COLS=A;exports.INK_TABLE_MAX_ROWS=M;exports.INK_TABLE_MIN_COLS=O;exports.INK_TABLE_MIN_ROWS=T;exports.NUMBER_FOUR=H;exports.NUMBER_SIX=U;exports.NUMBER_TWO=B;exports.NUMBER_ZERO=o;
|