@forgedevstack/ink 1.1.5 → 1.1.7
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 +21 -0
- package/dist/common-components/icons/BulletListIcon.cjs +1 -0
- package/dist/common-components/icons/BulletListIcon.d.ts +3 -0
- package/dist/common-components/icons/BulletListIcon.d.ts.map +1 -0
- package/dist/common-components/icons/BulletListIcon.js +11 -0
- package/dist/common-components/icons/ChecklistIcon.cjs +1 -0
- package/dist/common-components/icons/ChecklistIcon.d.ts +3 -0
- package/dist/common-components/icons/ChecklistIcon.d.ts.map +1 -0
- package/dist/common-components/icons/ChecklistIcon.js +10 -0
- package/dist/common-components/icons/ImageToolIcon.cjs +1 -0
- package/dist/common-components/icons/ImageToolIcon.d.ts +3 -0
- package/dist/common-components/icons/ImageToolIcon.d.ts.map +1 -0
- package/dist/common-components/icons/ImageToolIcon.js +10 -0
- package/dist/common-components/icons/LinkToolIcon.cjs +1 -0
- package/dist/common-components/icons/LinkToolIcon.d.ts +3 -0
- package/dist/common-components/icons/LinkToolIcon.d.ts.map +1 -0
- package/dist/common-components/icons/LinkToolIcon.js +9 -0
- package/dist/common-components/icons/OrderedListIcon.cjs +1 -0
- package/dist/common-components/icons/OrderedListIcon.d.ts +3 -0
- package/dist/common-components/icons/OrderedListIcon.d.ts.map +1 -0
- package/dist/common-components/icons/OrderedListIcon.js +9 -0
- package/dist/common-components/icons/QuoteIcon.cjs +1 -0
- package/dist/common-components/icons/QuoteIcon.d.ts +3 -0
- package/dist/common-components/icons/QuoteIcon.d.ts.map +1 -0
- package/dist/common-components/icons/QuoteIcon.js +6 -0
- package/dist/common-components/icons/TableToolIcon.cjs +1 -0
- package/dist/common-components/icons/TableToolIcon.d.ts +3 -0
- package/dist/common-components/icons/TableToolIcon.d.ts.map +1 -0
- package/dist/common-components/icons/TableToolIcon.js +9 -0
- package/dist/common-components/icons/index.d.ts +7 -0
- package/dist/common-components/icons/index.d.ts.map +1 -1
- package/dist/common-components/index.d.ts +1 -1
- package/dist/common-components/index.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.cjs +1 -1
- package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.js +790 -682
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.cjs +1 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.d.ts +4 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.d.ts.map +1 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.js +31 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts +7 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/OutlineRail/index.d.ts +3 -0
- package/dist/components/InkEditor/components/OutlineRail/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.cjs +1 -1
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.d.ts +1 -0
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.d.ts.map +1 -1
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.js +62 -17
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.js +10 -9
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.js +91 -18
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.types.d.ts +6 -0
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.cjs +1 -0
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts +3 -0
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.js +15 -0
- package/dist/components/InkEditor/components/ToolbarDropdown/index.d.ts +2 -0
- package/dist/components/InkEditor/components/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/components/InkEditor/components/index.d.ts +2 -0
- package/dist/components/InkEditor/components/index.d.ts.map +1 -1
- package/dist/constants/defaultIcons.cjs +1 -1
- package/dist/constants/defaultIcons.d.ts.map +1 -1
- package/dist/constants/defaultIcons.js +27 -17
- package/dist/constants/defaults.const.cjs +1 -1
- package/dist/constants/defaults.const.d.ts +47 -1
- package/dist/constants/defaults.const.d.ts.map +1 -1
- package/dist/constants/defaults.const.js +224 -57
- package/dist/constants/generals.const.cjs +1 -1
- package/dist/constants/generals.const.d.ts +42 -0
- package/dist/constants/generals.const.d.ts.map +1 -1
- package/dist/constants/generals.const.js +32 -4
- package/dist/constants/keyboard.const.cjs +1 -1
- package/dist/constants/keyboard.const.d.ts +1 -0
- package/dist/constants/keyboard.const.d.ts.map +1 -1
- package/dist/constants/keyboard.const.js +2 -1
- package/dist/constants/lists.const.cjs +1 -1
- package/dist/constants/lists.const.d.ts +1 -0
- package/dist/constants/lists.const.d.ts.map +1 -1
- package/dist/constants/lists.const.js +10 -9
- package/dist/constants/numbers.cjs +1 -1
- package/dist/constants/numbers.d.ts +5 -1
- package/dist/constants/numbers.d.ts.map +1 -1
- package/dist/constants/numbers.js +24 -19
- package/dist/constants/premium.const.cjs +1 -1
- package/dist/constants/premium.const.d.ts.map +1 -1
- package/dist/constants/premium.const.js +10 -9
- package/dist/constants/toolbar.const.cjs +1 -1
- package/dist/constants/toolbar.const.d.ts +1 -0
- package/dist/constants/toolbar.const.d.ts.map +1 -1
- package/dist/constants/toolbar.const.js +12 -11
- package/dist/constants/toolbarMenu.const.cjs +1 -1
- package/dist/constants/toolbarMenu.const.d.ts.map +1 -1
- package/dist/constants/toolbarMenu.const.js +12 -11
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +100 -98
- package/dist/styles.css +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +11 -2
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/types/outline.types.d.ts +6 -0
- package/dist/types/outline.types.d.ts.map +1 -0
- package/dist/types/premium.types.d.ts +2 -2
- package/dist/types/premium.types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/outline.utils.cjs +1 -0
- package/dist/utils/outline.utils.d.ts +8 -0
- package/dist/utils/outline.utils.d.ts.map +1 -0
- package/dist/utils/outline.utils.js +49 -0
- package/dist/utils/slash.utils.cjs +1 -1
- package/dist/utils/slash.utils.d.ts +5 -0
- package/dist/utils/slash.utils.d.ts.map +1 -1
- package/dist/utils/slash.utils.js +24 -7
- package/dist/utils/words.utils.cjs +1 -0
- package/dist/utils/words.utils.d.ts +2 -0
- package/dist/utils/words.utils.d.ts.map +1 -0
- package/dist/utils/words.utils.js +14 -0
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--ink-color-border: #e5e7eb;--ink-color-bg: #ffffff;--ink-color-toolbar: #f8fafc;--ink-color-text: #0f172a;--ink-color-muted: #64748b;--ink-color-accent: #0d9488;--ink-color-accent-soft: #ccfbf1}.Ink-Button{border:0;background:rgba(0,0,0,0);color:inherit;border-radius:.45rem;cursor:pointer;min-width:2rem;height:2rem;padding:0 .4rem;font-weight:650;font-size:.85rem}.Ink-Button:hover{background:rgba(15,23,42,.05)}.Ink-Button--active{background:var(--ink-accent-soft);color:var(--ink-accent)}.Ink-Button:disabled{opacity:.45;cursor:not-allowed}.Ink-Box{display:block;box-sizing:border-box}.Ink-Field{display:flex;flex-direction:column;flex-wrap:nowrap;gap:.25rem;font-size:.875rem;color:var(--ink-muted)}.Ink-Field input{border:1px solid var(--ink-border);border-radius:.4rem;padding:.4rem .55rem;background:var(--ink-bg);color:var(--ink-text);font:inherit}.Ink-Field__label{display:block;box-sizing:border-box;font-size:.8rem;color:var(--ink-muted)}.Ink-Canvas{display:block;max-width:100%;touch-action:none;cursor:crosshair;border:1px dashed var(--ink-border);border-radius:.5rem;background:var(--ink-bg)}.Ink-ContextMenu{position:fixed;z-index:50;min-width:11rem;padding:.3rem;border:1px solid #e5e7eb;border-radius:.65rem;background:#fff;color:#0f172a;box-shadow:0 10px 40px rgba(15,23,42,.12)}.Ink-ContextMenu[data-color-mode=dark]{border-color:#3f3f46;background:#18181b;color:#f4f4f5;box-shadow:0 10px 40px rgba(0,0,0,.35)}@media(prefers-color-scheme: dark){.Ink-ContextMenu:not([data-color-mode]){border-color:#3f3f46;background:#18181b;color:#f4f4f5;box-shadow:0 10px 40px rgba(0,0,0,.35)}}.Ink-ContextMenu__item{border:0;background:rgba(0,0,0,0);color:inherit;border-radius:.45rem;cursor:pointer;min-width:2rem;height:2rem;padding:0 .4rem;font-weight:650;font-size:.85rem}.Ink-ContextMenu__item:hover{background:rgba(15,23,42,.05)}.Ink-ContextMenu__item--active{background:var(--ink-accent-soft);color:var(--ink-accent)}.Ink-ContextMenu__item:disabled{opacity:.45;cursor:not-allowed}.Ink-ContextMenu__item{display:block;width:100%;min-width:0;height:auto;padding:.45rem .6rem;text-align:left;font-weight:500}.Ink-ContextMenu__item:hover{background:var(--ink-accent-soft);color:var(--ink-accent)}.Ink-Icon{display:inline-flex;width:1rem;height:1rem;align-items:center;justify-content:center}.Ink-Icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.Ink-Icon--grip svg{fill:currentColor;stroke:none}.Ink-InlineToolbar{position:fixed;z-index:12;display:flex;align-items:center;gap:.1rem;padding:.25rem .3rem;border:1px solid rgba(15,23,42,.08);border-radius:.5rem;background:#fff;box-shadow:0 3px 15px rgba(15,23,42,.12),0 0 0 1px rgba(15,23,42,.03);color:var(--ink-text)}.Ink-InlineToolbar__item{min-width:1.85rem;height:1.85rem;padding:0 .35rem;border-radius:.35rem;font-size:.8rem;font-weight:650}.Ink-InlineToolbar__divider{width:1px;height:1.1rem;margin:0 .2rem;background:rgba(15,23,42,.12)}.Ink-Editor{--ink-border: #e5e7eb;--ink-bg: #ffffff;--ink-toolbar: #f8fafc;--ink-text: #0f172a;--ink-muted: #64748b;--ink-accent: #0d9488;--ink-accent-soft: #ccfbf1;--ink-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);--ink-table-header: #f1f5f9;--ink-radius: 1rem;--ink-font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;--ink-ai-accent: var(--ink-accent);--ink-ai-surface: var(--ink-toolbar);--ink-ai-border: var(--ink-border);border:1px solid var(--ink-border);border-radius:var(--ink-radius);overflow:hidden;background:var(--ink-bg);color:var(--ink-text);box-shadow:var(--ink-shadow);font-family:var(--ink-font-family)}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content{font-family:inherit;line-height:1.65}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content img{max-width:100%;height:auto}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content table{border-collapse:collapse;width:100%}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content th,.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content td{border:1px solid var(--ink-border);padding:.4rem .6rem}.Ink-Editor[data-variant=document],.Ink-Editor[data-variant=docx]{--ink-toolbar: #ffffff;box-shadow:0 4px 24px rgba(15,23,42,.06)}.Ink-Editor[data-variant=docx]{--ink-accent: #2b579a;border-color:#d0d7de;background:#f3f3f3}.Ink-Editor[data-variant=docx] .Ink-Editor__toolbar{background:linear-gradient(180deg, #ffffff 0%, #f0f3f7 100%);border-bottom:1px solid #c8d0d8}.Ink-Editor[data-variant=docx] .Ink-Editor__content{max-width:48rem;margin:1rem auto;min-height:22rem;background:#fff;border:1px solid #d8dee6;box-shadow:0 1px 2px rgba(15,23,42,.04);padding:2.5rem 3rem}.Ink-Editor[data-variant=simple]{--ink-toolbar: transparent;border:none;box-shadow:none;background:rgba(0,0,0,0)}.Ink-Editor[data-variant=simple] .Ink-Editor__toolbar{border-bottom:none;padding-inline:0;gap:.25rem}.Ink-Editor[data-variant=simple] .Ink-Editor__content{padding:.5rem 0;font-size:1rem}.Ink-Editor[data-variant=notion-like]{--ink-toolbar: transparent;--ink-accent: #111827;border:none;box-shadow:none;border-radius:0;background:#fff}.Ink-Editor[data-variant=notion-like] .Ink-Editor__toolbar{border-bottom:none;background:rgba(0,0,0,0);opacity:.85}.Ink-Editor[data-variant=notion-like] .Ink-Editor__content{max-width:42rem;margin-inline:auto;padding-block:2rem;font-size:1.125rem;line-height:1.75}.Ink-Editor[data-variant=agent]{--ink-toolbar: #f8fafc;--ink-accent: #0f766e;box-shadow:0 8px 28px rgba(15,23,42,.08);border-color:rgba(15,118,110,.25)}.Ink-Editor[data-variant=agent] .Ink-Editor__shell{position:relative}.Ink-Editor[data-variant=agent] .Ink-Editor__toolbar{background:linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%)}.Ink-Editor__agent-bar{display:flex;align-items:center;gap:.65rem;margin:.75rem 1rem 1rem;padding:.65rem .85rem;border:1px solid rgba(15,118,110,.25);border-radius:999px;background:linear-gradient(90deg, #ecfdf5 0%, #ffffff 55%);box-shadow:0 8px 20px rgba(15,118,110,.08);color:#0f766e;font-size:.9rem}.Ink-Editor[data-disabled=true]{opacity:.6;pointer-events:none}.Ink-Editor[data-chrome=borderless]{border:none;box-shadow:none;border-radius:0}.Ink-Editor[data-chrome=borderless] .Ink-Editor__toolbar{border-bottom:none;background:rgba(0,0,0,0)}.Ink-Editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.2rem;padding:.55rem .65rem;border-bottom:1px solid var(--ink-border);background:var(--ink-toolbar)}.Ink-Editor__toolbar-show{display:flex;align-items:center;padding:.35rem .65rem;border-bottom:1px solid var(--ink-border);background:var(--ink-toolbar)}.Ink-ToolbarCustomize{display:flex;flex-direction:column;flex-wrap:nowrap;gap:.5rem;padding:.75rem;border-bottom:1px solid var(--ink-border);background:var(--ink-toolbar);color:var(--ink-text)}.Ink-ToolbarCustomize__title{margin:0;font-size:.875rem;font-weight:650}.Ink-ToolbarCustomize__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem;max-height:14rem;overflow:auto}.Ink-ToolbarCustomize__item label{display:flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--ink-text);cursor:pointer}.Ink-ToolbarCustomize__actions{display:flex;flex-wrap:wrap;gap:.35rem}.Ink-Editor__button{border:0;background:rgba(0,0,0,0);color:inherit;border-radius:.45rem;cursor:pointer;min-width:2rem;height:2rem;padding:0 .4rem;font-weight:650;font-size:.85rem}.Ink-Editor__button:hover{background:rgba(15,23,42,.05)}.Ink-Editor__button--active{background:var(--ink-accent-soft);color:var(--ink-accent)}.Ink-Editor__button:disabled{opacity:.45;cursor:not-allowed}.Ink-Editor__select{border:0;background:rgba(0,0,0,0);color:inherit;border-radius:.45rem;cursor:pointer}.Ink-Editor__select:hover{background:rgba(15,23,42,.05)}.Ink-Editor__select{height:2rem;padding:0 .5rem;border:1px solid rgba(0,0,0,0)}.Ink-Editor__select:focus{outline:none;border-color:var(--ink-accent);background:#fff}.Ink-Editor__divider{width:1px;height:1.25rem;margin:0 .3rem;background:var(--ink-border)}.Ink-Editor__color{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;cursor:pointer}.Ink-Editor__color input{position:absolute;inset:0;opacity:0;cursor:pointer}.Ink-Editor__color-swatch{width:1rem;height:1rem;border-radius:999px;border:1px solid var(--ink-border)}.Ink-Editor__shell{position:relative;display:flex;align-items:stretch;min-height:0}.Ink-Editor__body{position:relative;flex:1 1 auto;min-width:0}.Ink-Editor__content{min-height:150px;padding:1.1rem 1.25rem 1.1rem 2.5rem;outline:none;overflow:auto;line-height:1.65}.Ink-Editor[data-variant=document] .Ink-Editor__content{padding:2rem 2.5rem 2rem 3rem;max-width:48rem;margin:0 auto}.Ink-Editor__content:empty::before{content:attr(data-placeholder);color:var(--ink-muted);pointer-events:none}.Ink-Editor__content img{max-width:100%;height:auto;border-radius:.35rem}.Ink-Editor__content h1,.Ink-Editor__content h2,.Ink-Editor__content h3,.Ink-Editor__content h4,.Ink-Editor__content h5,.Ink-Editor__content h6{margin:.85rem 0 .45rem;line-height:1.25}.Ink-Editor__content p,.Ink-Editor__content ul,.Ink-Editor__content ol,.Ink-Editor__content blockquote,.Ink-Editor__content pre{margin:.55rem 0}.Ink-Editor__content ul{list-style:disc;padding-inline-start:1.5rem}.Ink-Editor__content ol{list-style:decimal;padding-inline-start:1.5rem}.Ink-Editor__content ul.Ink-list--dash{list-style-type:"– "}.Ink-Editor__content ol.Ink-list--alpha{list-style-type:lower-alpha}.Ink-Editor__content .Ink-block--active{outline:1px solid rgba(13,148,136,.35);border-radius:.35rem;background:rgba(13,148,136,.03)}.Ink-Editor__content .Ink-block--dragging{opacity:.45}.Ink-Editor__content .Ink-block--drop-before{box-shadow:inset 0 2px 0 0 var(--ink-accent)}.Ink-Editor__content .Ink-block--drop-after{box-shadow:inset 0 -2px 0 0 var(--ink-accent)}.Ink-Editor__content .Ink-table{width:100%;border-collapse:collapse;margin:.75rem 0;font-size:.95rem}.Ink-Editor__content .Ink-table th,.Ink-Editor__content .Ink-table td{border:1px solid var(--ink-border);padding:.45rem .6rem;min-width:4rem}.Ink-Editor__content .Ink-table th{background:var(--ink-table-header, var(--ink-toolbar));color:var(--ink-text);font-weight:650;text-align:left}.Ink-Editor__content .Ink-tc-insert{background:rgba(34,197,94,.18);text-decoration:none;color:inherit}.Ink-Editor__content .Ink-tc-delete{background:rgba(239,68,68,.14);color:#991b1b}.Ink-Editor__content .Ink-comment-mark{background:#fde047;border-radius:.15rem;padding:0 .1rem}.Ink-Editor__footer{padding:.35rem .75rem;border-top:1px solid var(--ink-border);font-size:.75rem;color:var(--ink-muted);text-align:right}.Ink-BlockHandles{position:absolute;left:.2rem;z-index:2;display:flex;flex-direction:column;align-items:center;gap:.2rem}.Ink-BlockHandles__plus,.Ink-BlockHandles__grip,.Ink-BlockHandles__btn{width:1.5rem;height:1.5rem;border:0;border-radius:999px;background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.14);color:var(--ink-muted);cursor:pointer;font-size:.85rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;padding:0}.Ink-BlockHandles__plus{font-weight:500;font-size:1rem}.Ink-BlockHandles__grip{cursor:grab}.Ink-BlockHandles__grip .Ink-Icon{width:.85rem;height:.85rem}.Ink-BlockHandles__grip:active{cursor:grabbing}.Ink-BlockHandles__btn{width:1.35rem;height:1.35rem;font-size:.65rem;opacity:.85}.Ink-BlockHandles__plus:hover,.Ink-BlockHandles__btn:hover,.Ink-BlockHandles__grip:hover{color:var(--ink-accent);background:var(--ink-accent-soft)}.Ink-Slash{position:absolute;z-index:5;min-width:12rem;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:.55rem;box-shadow:0 4px 18px rgba(15,23,42,.12),0 0 0 1px rgba(15,23,42,.03);padding:.35rem}.Ink-Slash__item{display:block;width:100%;text-align:left;border:0;background:rgba(0,0,0,0);padding:.45rem .6rem;border-radius:.4rem;cursor:pointer;color:inherit}.Ink-Slash__item:hover{background:var(--ink-accent-soft);color:var(--ink-accent)}.Ink-TrackBar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.45rem .75rem;border-bottom:1px solid var(--ink-border);background:#fffbeb;font-size:.8rem}.Ink-TrackBar__label{font-weight:650;color:#92400e}.Ink-TrackBar__actions{display:flex;gap:.25rem}.Ink-TrackBar__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.35rem;width:100%}.Ink-TrackBar__list li{display:flex;align-items:center;gap:.25rem;background:#fff;border:1px solid #fde68a;border-radius:.45rem;padding:.2rem .35rem}.Ink-Comments{width:300px;flex:0 0 300px;border-left:1px solid var(--ink-border);background:#fcfcfd;display:flex;flex-direction:column;max-height:100%}.Ink-Comments__header,.Ink-Ai__header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .75rem;border-bottom:1px solid var(--ink-border);font-size:.9rem}.Ink-Comments__list{overflow:auto;padding:.65rem;display:flex;flex-direction:column;gap:.65rem}.Ink-Comments__empty,.Ink-Ai__empty,.Ink-Ai__hint{color:var(--ink-muted);font-size:.85rem;line-height:1.45}.Ink-Comments__thread{border:1px solid var(--ink-border);border-radius:.65rem;padding:.65rem;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04)}.Ink-Comments__thread--resolved{opacity:.65}.Ink-Comments__meta{display:flex;justify-content:space-between;gap:.5rem;font-size:.72rem;color:var(--ink-muted);margin-bottom:.35rem}.Ink-Comments__body{margin:0;font-size:.88rem}.Ink-Comments__reply{margin-top:.5rem;padding-left:.65rem;border-left:2px solid var(--ink-accent-soft)}.Ink-Comments__form{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.55rem}.Ink-Comments__form input,.Ink-Ai__form input,.Ink-Ai__translate select{flex:1 1 auto;min-width:0;border:1px solid var(--ink-border);border-radius:.45rem;padding:.4rem .5rem;font:inherit}.Ink-Comments__resolved{margin:.4rem 0 0;font-size:.75rem;color:var(--ink-muted)}.Ink-Ai{width:320px;flex:0 0 320px;border-left:1px solid var(--ink-ai-border, var(--ink-border));background:var(--ink-ai-surface, #f8fafc);display:flex;flex-direction:column;max-height:100%}.Ink-Ai[data-placement=floating]{position:absolute;right:1rem;top:3.5rem;z-index:6;border:1px solid var(--ink-ai-border, var(--ink-border));border-radius:.85rem;box-shadow:0 16px 40px rgba(15,23,42,.14);max-height:min(28rem,70vh)}.Ink-Ai[data-placement=drawer]{position:absolute;inset:0 0 0 auto;z-index:6;box-shadow:-8px 0 24px rgba(15,23,42,.08)}.Ink-Ai__tabs{display:flex;flex-wrap:wrap;gap:.2rem;padding:.4rem .55rem;border-bottom:1px solid var(--ink-ai-border, var(--ink-border))}.Ink-Ai__body{flex:1 1 auto;overflow:auto;padding:.65rem;display:flex;flex-direction:column;gap:.65rem}.Ink-Ai__history{display:flex;flex-direction:column;gap:.45rem;min-height:8rem}.Ink-Ai__turn{border-radius:.55rem;padding:.5rem .6rem;background:#fff;border:1px solid var(--ink-border);font-size:.85rem}.Ink-Ai__turn span{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;color:var(--ink-muted);margin-bottom:.2rem}.Ink-Ai__turn p{margin:0}.Ink-Ai__turn--user{border-color:rgba(13,148,136,.35);background:rgba(13,148,136,.06)}.Ink-Ai__form,.Ink-Ai__diff-actions,.Ink-Ai__actions{display:flex;flex-wrap:wrap;gap:.35rem}.Ink-Ai__action{width:100%;justify-content:flex-start;text-align:left;background:#fff;border:1px solid var(--ink-border) !important}.Ink-Ai__suggestion{border:1px solid var(--ink-border);border-radius:.55rem;padding:.55rem;background:#fff;font-size:.85rem}.Ink-Ai__suggestion--warning{border-color:#fbbf24}.Ink-Ai__suggestion--error{border-color:#f87171}.Ink-Ai__suggestion p{margin:.25rem 0}.Ink-Ai__suggestion code{display:block;font-size:.75rem;color:var(--ink-muted)}.Ink-Ai__translate label{display:flex;flex-direction:column;gap:.3rem;font-size:.8rem;color:var(--ink-muted)}.Ink-Ai__diff{border:1px solid rgba(13,148,136,.35);border-radius:.65rem;padding:.65rem;background:#fff}.Ink-Ai__diff-preview{margin:.4rem 0;padding:.45rem;border-radius:.4rem;background:rgba(13,148,136,.06);font-size:.85rem}.Ink-Ai__footer{padding:.4rem .75rem;border-top:1px solid var(--ink-ai-border, var(--ink-border));font-size:.7rem;color:var(--ink-muted)}.Ink-AiAutocomplete{position:absolute;z-index:4;pointer-events:none;color:var(--ink-muted);font-style:italic;white-space:pre-wrap;opacity:.65;user-select:none}@media(max-width: 900px){.Ink-Editor__shell{flex-direction:column}.Ink-Comments,.Ink-Ai{width:100%;flex:none;border-left:0;border-top:1px solid var(--ink-border);max-height:16rem}.Ink-Ai[data-placement=floating],.Ink-Ai[data-placement=drawer]{position:static;box-shadow:none;max-height:16rem}}.Ink-Editor[data-color-mode=light]{--ink-border: #e5e7eb;--ink-bg: #ffffff;--ink-toolbar: #f8fafc;--ink-text: #0f172a;--ink-muted: #64748b;--ink-accent: #0d9488;--ink-accent-soft: #ccfbf1;--ink-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);--ink-table-header: #f1f5f9}.Ink-Editor[data-color-mode=dark]{--ink-border: #3f3f46;--ink-bg: #18181b;--ink-toolbar: #27272a;--ink-text: #f4f4f5;--ink-muted: #a1a1aa;--ink-accent: #2dd4bf;--ink-accent-soft: rgba(45, 212, 191, 0.15);--ink-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);--ink-table-header: #27272a}@media(prefers-color-scheme: dark){.Ink-Editor:not([data-color-mode]){--ink-border: #3f3f46;--ink-bg: #18181b;--ink-toolbar: #27272a;--ink-text: #f4f4f5;--ink-muted: #a1a1aa;--ink-accent: #2dd4bf;--ink-accent-soft: rgba(45, 212, 191, 0.15);--ink-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);--ink-table-header: #27272a}}.ink-theme-snow .Ink-Editor,.Ink-Editor.ink-theme-snow{--ink-border: #e5e7eb;--ink-bg: #ffffff;--ink-toolbar: #f9fafb;--ink-text: #111827;--ink-muted: #6b7280;--ink-accent: #0f766e;--ink-accent-soft: #ccfbf1;border-radius:.75rem}.ink-theme-bubble .Ink-Editor,.Ink-Editor.ink-theme-bubble{--ink-border: transparent;--ink-bg: #ffffff;--ink-toolbar: #ffffff;--ink-text: #111827;--ink-muted: #6b7280;--ink-accent: #0f766e;--ink-accent-soft: #ccfbf1;box-shadow:0 4px 24px rgba(15,23,42,.1);border-radius:1rem}.ink-theme-dark .Ink-Editor,.Ink-Editor.ink-theme-dark{--ink-border: #3f3f46;--ink-bg: #18181b;--ink-toolbar: #27272a;--ink-text: #f4f4f5;--ink-muted: #a1a1aa;--ink-accent: #2dd4bf;--ink-accent-soft: rgb(45 212 191 / 0.15);--ink-table-header: #27272a}.ink-theme-minimal .Ink-Editor,.Ink-Editor.ink-theme-minimal{--ink-border: #e7e5e4;--ink-bg: #ffffff;--ink-toolbar: #ffffff;--ink-text: #1c1917;--ink-muted: #78716c;--ink-accent: #0f766e;--ink-accent-soft: #f0fdfa;box-shadow:none;border-radius:0}.ink-theme-minimal .Ink-Editor__toolbar,.ink-theme-minimal.Ink-Editor .Ink-Editor__toolbar{border-bottom:1px solid var(--ink-border)}.Ink-SignPad,.Ink-FindReplace{border-bottom-color:var(--ink-border);background:var(--ink-toolbar);color:var(--ink-text)}.Ink-SignPad__title,.Ink-FindReplace__title{color:var(--ink-text)}.Ink-SignPad__canvas{max-width:480px;height:180px;border-color:var(--ink-border);touch-action:none}.Ink-FindReplace__field{display:flex;flex-direction:column;flex-wrap:nowrap;gap:.25rem;font-size:.875rem;color:var(--ink-muted)}.Ink-FindReplace__field input{border:1px solid var(--ink-border);border-radius:.4rem;padding:.4rem .55rem;background:var(--ink-bg);color:var(--ink-text);font:inherit}.flex{display:flex}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.p-3{padding:.75rem}.m-0{margin:0}.w-full{width:100%}.max-w-xl{max-width:36rem}.h-44{height:11rem}.border{border-width:1px;border-style:solid}.border-b{border-bottom-width:1px;border-bottom-style:solid}.border-dashed{border-style:dashed}.rounded-lg{border-radius:.5rem}.bg-white{background-color:#fff}.cursor-crosshair{cursor:crosshair}.text-sm{font-size:.875rem}.font-semibold{font-weight:600}
|
|
1
|
+
:root{--ink-color-border: #e1e4ea;--ink-color-bg: #ffffff;--ink-color-toolbar: #ffffff;--ink-color-text: #171b24;--ink-color-muted: #667085;--ink-color-accent: #2951c4;--ink-color-accent-soft: #eaf0fe}.Ink-Button{border:0;background:rgba(0,0,0,0);color:var(--ink-muted);border-radius:.3125rem;cursor:pointer;min-width:1.75rem;width:1.75rem;height:1.75rem;padding:0;font-weight:500;font-size:.8125rem;display:inline-flex;align-items:center;justify-content:center}.Ink-Button svg{width:.9375rem;height:.9375rem;display:block}.Ink-Button:hover{background:rgba(15,23,42,.05);color:var(--ink-text)}.Ink-Button--active{background:var(--ink-accent-soft);color:var(--ink-accent);box-shadow:inset 0 0 0 1px var(--ink-accent)}.Ink-Button:disabled{opacity:.45;cursor:not-allowed}.Ink-Box{display:block;box-sizing:border-box}.Ink-Field{display:flex;flex-direction:column;flex-wrap:nowrap;gap:.25rem;font-size:.875rem;color:var(--ink-muted)}.Ink-Field input{border:1px solid var(--ink-border);border-radius:.4rem;padding:.4rem .55rem;background:var(--ink-bg);color:var(--ink-text);font:inherit}.Ink-Field__label{display:block;box-sizing:border-box;font-size:.8rem;color:var(--ink-muted)}.Ink-Canvas{display:block;max-width:100%;touch-action:none;cursor:crosshair;border:1px dashed var(--ink-border);border-radius:.5rem;background:var(--ink-bg)}.Ink-ContextMenu{position:fixed;z-index:50;min-width:11rem;padding:.3rem;border:1px solid #e5e7eb;border-radius:.65rem;background:#fff;color:#0f172a;box-shadow:0 10px 40px rgba(15,23,42,.12)}.Ink-ContextMenu[data-color-mode=dark]{border-color:#3f3f46;background:#18181b;color:#f4f4f5;box-shadow:0 10px 40px rgba(0,0,0,.35)}@media(prefers-color-scheme: dark){.Ink-ContextMenu:not([data-color-mode]){border-color:#3f3f46;background:#18181b;color:#f4f4f5;box-shadow:0 10px 40px rgba(0,0,0,.35)}}.Ink-ContextMenu__item{border:0;background:rgba(0,0,0,0);color:var(--ink-muted);border-radius:.3125rem;cursor:pointer;min-width:1.75rem;width:1.75rem;height:1.75rem;padding:0;font-weight:500;font-size:.8125rem;display:inline-flex;align-items:center;justify-content:center}.Ink-ContextMenu__item svg{width:.9375rem;height:.9375rem;display:block}.Ink-ContextMenu__item:hover{background:rgba(15,23,42,.05);color:var(--ink-text)}.Ink-ContextMenu__item--active{background:var(--ink-accent-soft);color:var(--ink-accent);box-shadow:inset 0 0 0 1px var(--ink-accent)}.Ink-ContextMenu__item:disabled{opacity:.45;cursor:not-allowed}.Ink-ContextMenu__item{display:block;width:100%;min-width:0;height:auto;padding:.45rem .6rem;text-align:left;font-weight:500}.Ink-ContextMenu__item:hover{background:var(--ink-accent-soft);color:var(--ink-accent)}.Ink-Icon{display:inline-flex;width:.9375rem;height:.9375rem;align-items:center;justify-content:center}.Ink-Icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.Ink-Icon--grip svg{fill:currentColor;stroke:none}.Ink-InlineToolbar{position:fixed;z-index:12;display:flex;align-items:center;gap:.1rem;padding:.25rem .3rem;border:1px solid rgba(15,23,42,.08);border-radius:.5rem;background:#fff;box-shadow:0 3px 15px rgba(15,23,42,.12),0 0 0 1px rgba(15,23,42,.03);color:var(--ink-text)}.Ink-InlineToolbar__item{min-width:1.85rem;height:1.85rem;padding:0 .35rem;border-radius:.35rem;font-size:.8rem;font-weight:650}.Ink-InlineToolbar__divider{width:1px;height:1.1rem;margin:0 .2rem;background:rgba(15,23,42,.12)}.Ink-Editor{--ink-border: #e1e4ea;--ink-bg: #ffffff;--ink-toolbar: #ffffff;--ink-text: #171b24;--ink-muted: #667085;--ink-accent: #2951c4;--ink-accent-soft: #eaf0fe;--ink-shadow: 0 4px 16px rgba(23, 27, 36, 0.08);--ink-table-header: #f1f5f9;--ink-ai: #0e8a6e;--ink-ai-soft: #e7f6f1;--ink-canvas: #f5f6f8;--ink-border-strong: #c9ceda;--ink-text-tertiary: #98a2b3;--ink-font-mono: IBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;--ink-radius: 0.375rem;--ink-font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;--ink-ai-accent: var(--ink-ai);--ink-ai-surface: var(--ink-ai-soft);--ink-ai-border: var(--ink-border);border:1px solid var(--ink-border);border-radius:var(--ink-radius);overflow:hidden;background:var(--ink-bg);color:var(--ink-text);box-shadow:var(--ink-shadow);font-family:var(--ink-font-family)}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content{font-family:inherit;line-height:1.65}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content img{max-width:100%;height:auto}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content table{border-collapse:collapse;width:100%}.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content th,.Ink-Editor[data-wysiwyg=true] .Ink-Editor__content td{border:1px solid var(--ink-border);padding:.4rem .6rem}.Ink-Editor[data-variant=document],.Ink-Editor[data-variant=docx]{--ink-toolbar: #ffffff;box-shadow:0 4px 16px rgba(23,27,36,.08)}.Ink-Editor[data-variant=document]{background:#f5f6f8;border-radius:.625rem}.Ink-Editor[data-variant=document] .Ink-Editor__shell{min-height:28rem}.Ink-Editor[data-variant=document] .Ink-Editor__body{background:#f5f6f8;display:flex;justify-content:center;padding:2.75rem 2.5rem 3.75rem}.Ink-Editor[data-variant=document] .Ink-Editor__content{width:100%;max-width:40rem;margin:0;padding:0 0 2rem;background:rgba(0,0,0,0)}.Ink-Editor[data-variant=document] .Ink-Editor__content h1{font-size:1.625rem;font-weight:700;letter-spacing:-0.01em;margin:0 0 .875rem}.Ink-Editor[data-variant=document] .Ink-Editor__toolbar{padding:.375rem 1rem;background:var(--ink-bg)}.Ink-Editor[data-variant=docx]{--ink-accent: #2b579a;border-color:#d0d7de;background:#f3f3f3}.Ink-Editor[data-variant=docx] .Ink-Editor__toolbar{background:linear-gradient(180deg, #ffffff 0%, #f0f3f7 100%);border-bottom:1px solid #c8d0d8}.Ink-Editor[data-variant=docx] .Ink-Editor__content{max-width:48rem;margin:1rem auto;min-height:22rem;background:#fff;border:1px solid #d8dee6;box-shadow:0 1px 2px rgba(15,23,42,.04);padding:2.5rem 3rem}.Ink-Editor[data-variant=simple]{--ink-toolbar: transparent;border:none;box-shadow:none;background:rgba(0,0,0,0)}.Ink-Editor[data-variant=simple] .Ink-Editor__toolbar{border-bottom:none;padding-inline:0;gap:.25rem}.Ink-Editor[data-variant=simple] .Ink-Editor__content{padding:.5rem 0;font-size:1rem}.Ink-Editor[data-variant=notion-like]{--ink-toolbar: transparent;--ink-accent: #111827;border:none;box-shadow:none;border-radius:0;background:#fff}.Ink-Editor[data-variant=notion-like] .Ink-Editor__toolbar{border-bottom:none;background:rgba(0,0,0,0);opacity:.85}.Ink-Editor[data-variant=notion-like] .Ink-Editor__content{max-width:42rem;margin-inline:auto;padding-block:2rem;font-size:1.125rem;line-height:1.75}.Ink-Editor[data-variant=agent]{--ink-toolbar: #f8fafc;--ink-accent: #0f766e;box-shadow:0 8px 28px rgba(15,23,42,.08);border-color:rgba(15,118,110,.25)}.Ink-Editor[data-variant=agent] .Ink-Editor__shell{position:relative}.Ink-Editor[data-variant=agent] .Ink-Editor__toolbar{background:linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%)}.Ink-Editor__agent-bar{display:flex;align-items:center;gap:.65rem;margin:.75rem 1rem 1rem;padding:.65rem .85rem;border:1px solid rgba(15,118,110,.25);border-radius:999px;background:linear-gradient(90deg, #ecfdf5 0%, #ffffff 55%);box-shadow:0 8px 20px rgba(15,118,110,.08);color:#0f766e;font-size:.9rem}.Ink-Editor[data-disabled=true]{opacity:.6;pointer-events:none}.Ink-Editor[data-chrome=borderless]{border:none;box-shadow:none;border-radius:0}.Ink-Editor[data-chrome=borderless] .Ink-Editor__toolbar{border-bottom:none;background:rgba(0,0,0,0)}.Ink-Editor__toolbar{display:flex;flex-wrap:nowrap;align-items:center;gap:.25rem;padding:.35rem .75rem;border-bottom:1px solid var(--ink-border);background:var(--ink-toolbar);overflow-x:auto;overflow-y:visible;min-height:2.5rem}.Ink-Editor__toolbar-show{display:flex;align-items:center;padding:.35rem .65rem;border-bottom:1px solid var(--ink-border);background:var(--ink-toolbar)}.Ink-ToolbarCustomize{display:flex;flex-direction:column;flex-wrap:nowrap;gap:.5rem;padding:.75rem;border-bottom:1px solid var(--ink-border);background:var(--ink-toolbar);color:var(--ink-text)}.Ink-ToolbarCustomize__title{margin:0;font-size:.875rem;font-weight:650}.Ink-ToolbarCustomize__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem;max-height:14rem;overflow:auto}.Ink-ToolbarCustomize__item label{display:flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--ink-text);cursor:pointer}.Ink-ToolbarCustomize__actions{display:flex;flex-wrap:wrap;gap:.35rem}.Ink-Editor__button{border:0;background:rgba(0,0,0,0);color:var(--ink-muted);border-radius:.3125rem;cursor:pointer;min-width:1.75rem;width:1.75rem;height:1.75rem;padding:0;font-weight:500;font-size:.8125rem;display:inline-flex;align-items:center;justify-content:center}.Ink-Editor__button svg{width:.9375rem;height:.9375rem;display:block}.Ink-Editor__button:hover{background:rgba(15,23,42,.05);color:var(--ink-text)}.Ink-Editor__button--active{background:var(--ink-accent-soft);color:var(--ink-accent);box-shadow:inset 0 0 0 1px var(--ink-accent)}.Ink-Editor__button:disabled{opacity:.45;cursor:not-allowed}.Ink-Editor__style-dd{position:relative;display:inline-flex;align-items:center}.Ink-Editor__style-dd-trigger{display:inline-flex;align-items:center;gap:.375rem;border:1px solid var(--ink-border);border-radius:.3125rem;padding:.25rem .5rem .25rem .625rem;background:var(--ink-bg);color:var(--ink-text);font-family:inherit;font-size:.78125rem;font-weight:500;line-height:1.2;cursor:pointer;height:1.75rem;min-width:7.25rem}.Ink-Editor__style-dd-trigger:hover{border-color:var(--ink-border-strong)}.Ink-Editor__style-dd-trigger:disabled{opacity:.45;cursor:not-allowed}.Ink-Editor__style-dd-trigger:focus{outline:none;box-shadow:0 0 0 2px var(--ink-accent-soft)}.Ink-Editor__select-chev{width:.5625rem;height:.5625rem;opacity:.6;pointer-events:none;flex-shrink:0}.Ink-Editor__style-menu{position:absolute;top:calc(100% + .35rem);left:0;z-index:30;min-width:11.25rem;padding:.3rem;background:#fff;border:1px solid #e1e4ea;border-radius:.5rem;box-shadow:0 .75rem 2rem rgba(23,27,36,.12);overflow:hidden;color:#171b24}.Ink-Editor__style-menu--portal{position:fixed;top:0;left:0;z-index:4000}.Ink-Editor__style-menu--rich{min-width:11.25rem}.Ink-Editor__style-option{display:flex;align-items:center;position:relative;width:100%;border:0;background:rgba(0,0,0,0);text-align:left;padding:.45rem .85rem .45rem 1.85rem;font-family:inherit;font-size:.8125rem;font-weight:500;color:#171b24;cursor:pointer;border-radius:.375rem}.Ink-Editor__style-option:hover{background:#eaf0fe;color:#171b24}.Ink-Editor__style-option--sel{background:#2951c4;color:#fff}.Ink-Editor__style-option--sel:hover{background:#2951c4;color:#fff}.Ink-Editor__style-check{position:absolute;left:.55rem;font-size:.7rem;font-weight:600;color:inherit}.Ink-Editor__glyph{font-size:.8125rem;line-height:1;font-weight:500;color:inherit}.Ink-Editor__glyph--bold{font-weight:700}.Ink-Editor__glyph--italic{font-style:italic}.Ink-Editor__glyph--underline{text-decoration:underline}.Ink-Editor__glyph--strike{text-decoration:line-through}.Ink-Editor__divider{width:1px;height:1.125rem;margin:0 .5rem;background:var(--ink-border);align-self:center}.Ink-Editor__color{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;cursor:pointer}.Ink-Editor__color input{position:absolute;inset:0;opacity:0;cursor:pointer}.Ink-Editor__color-swatch{width:1rem;height:1rem;border-radius:999px;border:1px solid var(--ink-border)}.Ink-Editor__shell{position:relative;display:flex;align-items:stretch;min-height:0}.Ink-Editor__body{position:relative;flex:1 1 auto;min-width:0}.Ink-Editor__content{min-height:150px;padding:1.1rem 1.25rem 1.1rem 2.5rem;outline:none;overflow:auto;line-height:1.65}.Ink-Editor__content:empty::before{content:attr(data-placeholder);color:var(--ink-text-tertiary);font-size:.90625rem;pointer-events:none}.Ink-Editor__content img{max-width:100%;height:auto;border-radius:.35rem}.Ink-Editor__content h1,.Ink-Editor__content h2,.Ink-Editor__content h3,.Ink-Editor__content h4,.Ink-Editor__content h5,.Ink-Editor__content h6{margin:.85rem 0 .45rem;line-height:1.25}.Ink-Editor__content p,.Ink-Editor__content ul,.Ink-Editor__content ol,.Ink-Editor__content blockquote,.Ink-Editor__content pre{margin:.55rem 0}.Ink-Editor__content ul{list-style:disc;padding-inline-start:1.5rem}.Ink-Editor__content ol{list-style:decimal;padding-inline-start:1.5rem}.Ink-Editor__content ul.Ink-list--dash{list-style-type:"– "}.Ink-Editor__content ol.Ink-list--alpha{list-style-type:lower-alpha}.Ink-Editor__content ul.Ink-list--check{list-style:none;padding-inline-start:.25rem}.Ink-Editor__content ul.Ink-list--check li{position:relative;padding-left:1.5rem}.Ink-Editor__content ul.Ink-list--check li::before{content:"";position:absolute;left:0;top:.3rem;width:.8125rem;height:.8125rem;border:1px solid var(--ink-border-strong);border-radius:.1875rem;background:var(--ink-bg)}.Ink-Editor__content .Ink-callout{display:flex;gap:.625rem;align-items:flex-start;border-left:.15625rem solid var(--ink-ai);background:var(--ink-ai-soft);border-radius:0 .375rem .375rem 0;padding:.625rem .875rem;margin:1.25rem 0 .5rem}.Ink-Editor__content .Ink-callout p{font-size:.84375rem;font-style:italic;color:var(--ink-ai);line-height:1.6;margin:0}.Ink-AiPill{margin-left:auto;display:inline-flex;align-items:center;gap:.375rem;background:var(--ink-ai-soft);color:var(--ink-ai);border:0;border-radius:.3125rem;padding:.3125rem .625rem;font-family:inherit;font-size:.78125rem;font-weight:600;line-height:1.2;cursor:pointer;height:auto}.Ink-AiPill:hover,.Ink-AiPill:focus{background:var(--ink-ai-soft);color:var(--ink-ai);outline:none}.Ink-AiPill:disabled{opacity:.45;cursor:not-allowed}.Ink-AiPill__dot{width:.3125rem;height:.3125rem;border-radius:999px;background:var(--ink-ai);flex-shrink:0}.Ink-Editor__button--wide{width:auto;min-width:0;padding:0 .5rem;gap:.3125rem}.Ink-Editor__button-label{font-size:.75rem;font-weight:500;color:var(--ink-muted)}.Ink-Editor__content .Ink-block--dragging{opacity:.45}.Ink-Editor__content .Ink-block--drop-before{box-shadow:inset 0 2px 0 0 var(--ink-accent)}.Ink-Editor__content .Ink-block--drop-after{box-shadow:inset 0 -2px 0 0 var(--ink-accent)}.Ink-Editor__content .Ink-table{width:100%;border-collapse:collapse;margin:.75rem 0;font-size:.95rem}.Ink-Editor__content .Ink-table th,.Ink-Editor__content .Ink-table td{border:1px solid var(--ink-border);padding:.45rem .6rem;min-width:4rem}.Ink-Editor__content .Ink-table th{background:var(--ink-table-header, var(--ink-toolbar));color:var(--ink-text);font-weight:650;text-align:left}.Ink-Editor__content .Ink-tc-insert{background:rgba(34,197,94,.18);text-decoration:none;color:inherit}.Ink-Editor__content .Ink-tc-delete{background:rgba(239,68,68,.14);color:#991b1b}.Ink-Editor__content .Ink-comment-mark{background:#fde047;border-radius:.15rem;padding:0 .1rem}.Ink-Editor__footer{display:flex;align-items:center;justify-content:space-between;padding:.45rem 1.25rem;border-top:1px solid var(--ink-border);font-family:var(--ink-font-mono);font-size:.65625rem;color:var(--ink-text-tertiary)}.Ink-Editor__footer-meta{display:flex;gap:.875rem}.Ink-Editor__footer-sync{display:inline-flex;align-items:center;gap:.375rem}.Ink-Editor__footer-sync::before{content:"";width:.375rem;height:.375rem;border-radius:999px;background:#0e8a6e}.Ink-Outline{width:15rem;flex-shrink:0;background:#fafbfc;border-right:1px solid var(--ink-border);padding:1rem .75rem;display:flex;flex-direction:column;gap:.125rem;overflow:auto}.Ink-Outline__label{font-family:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.625rem;letter-spacing:.06em;text-transform:uppercase;color:#98a2b3;padding:0 .375rem;margin-bottom:.25rem}.Ink-Outline__item{display:flex;align-items:center;gap:.375rem;width:100%;border:0;background:rgba(0,0,0,0);color:var(--ink-muted);text-align:left;font-size:.78125rem;line-height:1.3;padding:.375rem .5rem;border-radius:.3125rem;cursor:pointer}.Ink-Outline__item--h1{font-weight:600;color:var(--ink-text)}.Ink-Outline__item--h2{padding-left:1.25rem}.Ink-Outline__item--h3{padding-left:1.75rem}.Ink-Outline__item--active{background:var(--ink-accent-soft);color:var(--ink-accent);font-weight:500}.Ink-Outline__item-dot{width:.25rem;height:.25rem;border-radius:999px;background:#c9ceda;flex-shrink:0}.Ink-BlockHandles{position:absolute;left:.2rem;z-index:2;display:flex;flex-direction:column;align-items:center;gap:.2rem}.Ink-BlockHandles__plus,.Ink-BlockHandles__grip,.Ink-BlockHandles__btn{width:1.5rem;height:1.5rem;border:0;border-radius:999px;background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.14);color:var(--ink-muted);cursor:pointer;font-size:.85rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;padding:0}.Ink-BlockHandles__plus{font-weight:500;font-size:1rem}.Ink-BlockHandles__grip{cursor:grab}.Ink-BlockHandles__grip .Ink-Icon{width:.85rem;height:.85rem}.Ink-BlockHandles__grip:active{cursor:grabbing}.Ink-BlockHandles__btn{width:1.35rem;height:1.35rem;font-size:.65rem;opacity:.85}.Ink-BlockHandles__plus:hover,.Ink-BlockHandles__btn:hover,.Ink-BlockHandles__grip:hover{color:var(--ink-accent);background:var(--ink-accent-soft)}.Ink-Slash{position:absolute;z-index:5;width:17.5rem;background:var(--ink-bg);border:1px solid var(--ink-border-strong);border-radius:.5rem;box-shadow:var(--ink-shadow);overflow:hidden}.Ink-Slash__search{display:flex;align-items:center;gap:.5rem;padding:.55rem .75rem;border-bottom:1px solid var(--ink-border);font-family:var(--ink-font-mono);font-size:.75rem;color:var(--ink-text-tertiary)}.Ink-Slash__cat{font-family:var(--ink-font-mono);font-size:.625rem;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-text-tertiary);padding:.5rem .75rem .25rem}.Ink-Slash__item{display:flex;align-items:center;gap:.625rem;width:100%;text-align:left;border:0;background:rgba(0,0,0,0);padding:.45rem .75rem;cursor:pointer;color:inherit}.Ink-Slash__item:hover,.Ink-Slash__item--sel{background:var(--ink-accent-soft)}.Ink-Slash__mark{width:1.625rem;height:1.625rem;border-radius:.3rem;background:var(--ink-canvas);border:1px solid var(--ink-border);display:flex;align-items:center;justify-content:center;color:var(--ink-muted);font-size:.6875rem;flex-shrink:0;font-weight:600}.Ink-Slash__item:hover .Ink-Slash__mark,.Ink-Slash__item--sel .Ink-Slash__mark{background:var(--ink-bg);border-color:var(--ink-accent);color:var(--ink-accent)}.Ink-Slash__mark--ai{background:var(--ink-ai-soft);border-color:var(--ink-ai);color:var(--ink-ai)}.Ink-Slash__item:hover .Ink-Slash__mark--ai,.Ink-Slash__item--sel .Ink-Slash__mark--ai{background:var(--ink-bg);border-color:var(--ink-ai);color:var(--ink-ai)}.Ink-Slash__txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:.1rem}.Ink-Slash__name{font-size:.78125rem;font-weight:600;color:var(--ink-text)}.Ink-Slash__desc{font-size:.6875rem;color:var(--ink-text-tertiary)}.Ink-Slash__key{font-family:var(--ink-font-mono);font-size:.625rem;color:var(--ink-text-tertiary);background:var(--ink-canvas);border-radius:.2rem;padding:.125rem .3rem}.Ink-Slash__hint{display:flex;align-items:center;gap:.125rem;flex-wrap:wrap;padding:.55rem .75rem;border-top:1px solid var(--ink-border);font-size:.6875rem;color:var(--ink-text-tertiary)}.Ink-Slash__caret{width:.09375rem;height:.875rem;background:var(--ink-accent);display:inline-block;animation:ink-slash-caret 1.1s steps(1) infinite}@keyframes ink-slash-caret{50%{opacity:0}}.Ink-TrackBar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.45rem .75rem;border-bottom:1px solid var(--ink-border);background:#fffbeb;font-size:.8rem}.Ink-TrackBar__label{font-weight:650;color:#92400e}.Ink-TrackBar__actions{display:flex;gap:.25rem}.Ink-TrackBar__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.35rem;width:100%}.Ink-TrackBar__list li{display:flex;align-items:center;gap:.25rem;background:#fff;border:1px solid #fde68a;border-radius:.45rem;padding:.2rem .35rem}.Ink-Comments{width:300px;flex:0 0 300px;border-left:1px solid var(--ink-border);background:#fcfcfd;display:flex;flex-direction:column;max-height:100%}.Ink-Comments__header,.Ink-Ai__header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .75rem;border-bottom:1px solid var(--ink-border);font-size:.9rem}.Ink-Comments__list{overflow:auto;padding:.65rem;display:flex;flex-direction:column;gap:.65rem}.Ink-Comments__empty,.Ink-Ai__empty,.Ink-Ai__hint{color:var(--ink-muted);font-size:.85rem;line-height:1.45}.Ink-Comments__thread{border:1px solid var(--ink-border);border-radius:.65rem;padding:.65rem;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04)}.Ink-Comments__thread--resolved{opacity:.65}.Ink-Comments__meta{display:flex;justify-content:space-between;gap:.5rem;font-size:.72rem;color:var(--ink-muted);margin-bottom:.35rem}.Ink-Comments__body{margin:0;font-size:.88rem}.Ink-Comments__reply{margin-top:.5rem;padding-left:.65rem;border-left:2px solid var(--ink-accent-soft)}.Ink-Comments__form{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.55rem}.Ink-Comments__form input,.Ink-Ai__form input,.Ink-Ai__translate select{flex:1 1 auto;min-width:0;border:1px solid var(--ink-border);border-radius:.45rem;padding:.4rem .5rem;font:inherit}.Ink-Comments__resolved{margin:.4rem 0 0;font-size:.75rem;color:var(--ink-muted)}.Ink-Ai{width:320px;flex:0 0 320px;border-left:1px solid var(--ink-ai-border, var(--ink-border));background:var(--ink-ai-surface, #f8fafc);display:flex;flex-direction:column;max-height:100%}.Ink-Ai[data-placement=floating]{position:absolute;right:1rem;top:3.5rem;z-index:6;border:1px solid var(--ink-ai-border, var(--ink-border));border-radius:.85rem;box-shadow:0 16px 40px rgba(15,23,42,.14);max-height:min(28rem,70vh)}.Ink-Ai[data-placement=drawer]{position:absolute;inset:0 0 0 auto;z-index:6;box-shadow:-8px 0 24px rgba(15,23,42,.08)}.Ink-Ai__tabs{display:flex;flex-wrap:wrap;gap:.2rem;padding:.4rem .55rem;border-bottom:1px solid var(--ink-ai-border, var(--ink-border))}.Ink-Ai__body{flex:1 1 auto;overflow:auto;padding:.65rem;display:flex;flex-direction:column;gap:.65rem}.Ink-Ai__history{display:flex;flex-direction:column;gap:.45rem;min-height:8rem}.Ink-Ai__turn{border-radius:.55rem;padding:.5rem .6rem;background:#fff;border:1px solid var(--ink-border);font-size:.85rem}.Ink-Ai__turn span{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;color:var(--ink-muted);margin-bottom:.2rem}.Ink-Ai__turn p{margin:0}.Ink-Ai__turn--user{border-color:rgba(13,148,136,.35);background:rgba(13,148,136,.06)}.Ink-Ai__form,.Ink-Ai__diff-actions,.Ink-Ai__actions{display:flex;flex-wrap:wrap;gap:.35rem}.Ink-Ai__action{width:100%;justify-content:flex-start;text-align:left;background:#fff;border:1px solid var(--ink-border) !important}.Ink-Ai__suggestion{border:1px solid var(--ink-border);border-radius:.55rem;padding:.55rem;background:#fff;font-size:.85rem}.Ink-Ai__suggestion--warning{border-color:#fbbf24}.Ink-Ai__suggestion--error{border-color:#f87171}.Ink-Ai__suggestion p{margin:.25rem 0}.Ink-Ai__suggestion code{display:block;font-size:.75rem;color:var(--ink-muted)}.Ink-Ai__translate label{display:flex;flex-direction:column;gap:.3rem;font-size:.8rem;color:var(--ink-muted)}.Ink-Ai__diff{border:1px solid rgba(13,148,136,.35);border-radius:.65rem;padding:.65rem;background:#fff}.Ink-Ai__diff-preview{margin:.4rem 0;padding:.45rem;border-radius:.4rem;background:rgba(13,148,136,.06);font-size:.85rem}.Ink-Ai__footer{padding:.4rem .75rem;border-top:1px solid var(--ink-ai-border, var(--ink-border));font-size:.7rem;color:var(--ink-muted)}.Ink-AiAutocomplete{position:absolute;z-index:4;pointer-events:none;color:var(--ink-muted);font-style:italic;white-space:pre-wrap;opacity:.65;user-select:none}@media(max-width: 900px){.Ink-Editor__shell{flex-direction:column}.Ink-Comments,.Ink-Ai{width:100%;flex:none;border-left:0;border-top:1px solid var(--ink-border);max-height:16rem}.Ink-Ai[data-placement=floating],.Ink-Ai[data-placement=drawer]{position:static;box-shadow:none;max-height:16rem}}.Ink-Editor[data-color-mode=light]{--ink-border: #e1e4ea;--ink-bg: #ffffff;--ink-toolbar: #ffffff;--ink-text: #171b24;--ink-muted: #667085;--ink-accent: #2951c4;--ink-accent-soft: #eaf0fe;--ink-shadow: 0 4px 16px rgba(23, 27, 36, 0.08);--ink-table-header: #f1f5f9;--ink-ai: #0e8a6e;--ink-ai-soft: #e7f6f1;--ink-canvas: #f5f6f8;--ink-border-strong: #c9ceda;--ink-text-tertiary: #98a2b3;--ink-font-mono: IBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace}.Ink-Editor[data-color-mode=dark]{--ink-border: #3f3f46;--ink-bg: #18181b;--ink-toolbar: #27272a;--ink-text: #f4f4f5;--ink-muted: #a1a1aa;--ink-accent: #7b97ea;--ink-accent-soft: rgba(41, 81, 196, 0.22);--ink-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);--ink-table-header: #27272a;--ink-ai: #0e8a6e;--ink-ai-soft: #e7f6f1;--ink-canvas: #f5f6f8;--ink-border-strong: #c9ceda;--ink-text-tertiary: #98a2b3;--ink-font-mono: IBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace}@media(prefers-color-scheme: dark){.Ink-Editor:not([data-color-mode]){--ink-border: #3f3f46;--ink-bg: #18181b;--ink-toolbar: #27272a;--ink-text: #f4f4f5;--ink-muted: #a1a1aa;--ink-accent: #7b97ea;--ink-accent-soft: rgba(41, 81, 196, 0.22);--ink-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);--ink-table-header: #27272a;--ink-ai: #0e8a6e;--ink-ai-soft: #e7f6f1;--ink-canvas: #f5f6f8;--ink-border-strong: #c9ceda;--ink-text-tertiary: #98a2b3;--ink-font-mono: IBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace}}.ink-theme-snow .Ink-Editor,.Ink-Editor.ink-theme-snow{--ink-border: #e5e7eb;--ink-bg: #ffffff;--ink-toolbar: #f9fafb;--ink-text: #111827;--ink-muted: #6b7280;--ink-accent: #0f766e;--ink-accent-soft: #ccfbf1;border-radius:.75rem}.ink-theme-bubble .Ink-Editor,.Ink-Editor.ink-theme-bubble{--ink-border: transparent;--ink-bg: #ffffff;--ink-toolbar: #ffffff;--ink-text: #111827;--ink-muted: #6b7280;--ink-accent: #0f766e;--ink-accent-soft: #ccfbf1;box-shadow:0 4px 24px rgba(15,23,42,.1);border-radius:1rem}.ink-theme-dark .Ink-Editor,.Ink-Editor.ink-theme-dark{--ink-border: #3f3f46;--ink-bg: #18181b;--ink-toolbar: #27272a;--ink-text: #f4f4f5;--ink-muted: #a1a1aa;--ink-accent: #2dd4bf;--ink-accent-soft: rgb(45 212 191 / 0.15);--ink-table-header: #27272a}.ink-theme-minimal .Ink-Editor,.Ink-Editor.ink-theme-minimal{--ink-border: #e7e5e4;--ink-bg: #ffffff;--ink-toolbar: #ffffff;--ink-text: #1c1917;--ink-muted: #78716c;--ink-accent: #0f766e;--ink-accent-soft: #f0fdfa;box-shadow:none;border-radius:0}.ink-theme-minimal .Ink-Editor__toolbar,.ink-theme-minimal.Ink-Editor .Ink-Editor__toolbar{border-bottom:1px solid var(--ink-border)}.Ink-SignPad,.Ink-FindReplace{border-bottom-color:var(--ink-border);background:var(--ink-toolbar);color:var(--ink-text)}.Ink-SignPad__title,.Ink-FindReplace__title{color:var(--ink-text)}.Ink-SignPad__canvas{max-width:480px;height:180px;border-color:var(--ink-border);touch-action:none}.Ink-FindReplace__field{display:flex;flex-direction:column;flex-wrap:nowrap;gap:.25rem;font-size:.875rem;color:var(--ink-muted)}.Ink-FindReplace__field input{border:1px solid var(--ink-border);border-radius:.4rem;padding:.4rem .55rem;background:var(--ink-bg);color:var(--ink-text);font:inherit}.flex{display:flex}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.p-3{padding:.75rem}.m-0{margin:0}.w-full{width:100%}.max-w-xl{max-width:36rem}.h-44{height:11rem}.border{border-width:1px;border-style:solid}.border-b{border-bottom-width:1px;border-bottom-style:solid}.border-dashed{border-style:dashed}.rounded-lg{border-radius:.5rem}.bg-white{background-color:#fff}.cursor-crosshair{cursor:crosshair}.text-sm{font-size:.875rem}.font-semibold{font-weight:600}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export type { ToolbarOption, InkEditorProps, ToolbarButtonProps, DropdownOption, ToolbarDropdownProps, ToolbarColorPickerProps, TypoFixResult, SlashCommandItem, } from './ink.types';
|
|
1
|
+
export type { ToolbarOption, InkEditorProps, ToolbarButtonProps, DropdownOption, ToolbarDropdownProps, ToolbarColorPickerProps, TypoFixResult, SlashCommandItem, SlashInsert, } from './ink.types';
|
|
2
2
|
export type { InkAiCapability, InkAiRequest, InkAiResponse, InkAiAgent, InkAiPlugin, InkAiChatTurn, InkAiDiffSuggestion, InkAiReviewSuggestion, InkAiContextFile, InkAiDocumentSnapshot, InkAiModelCatalogEntry, InkAiProvider, InkAiCostControlHooks, InkAiModerationHook, InkAiPermissionsHook, InkAiExternalKnowledgeHook, InkAiQualityEvalHook, InkAiFallbackChain, InkAiUiTheme, InkAiConfig, } from './ai.types';
|
|
3
3
|
export type { InkCommentReply, InkCommentThread, InkCommentsChangeHandler, } from './comments.types';
|
|
4
4
|
export type { InkTrackChangeType, InkTrackChange, InkTrackChangesChangeHandler, } from './trackChanges.types';
|
|
5
5
|
export type { InkFeatureName, InkFeaturesConfig, InkEditorVariant, InkEditorChrome, InkColorMode, InkAiPlacement, } from './features.types';
|
|
6
6
|
export type { InkPremiumFeature, InkPasteMode, InkIconKey, InkIconMap, InkThemeTokens, InkPremiumConfig, InkResolvedPremium, InkImageUploadHandler, InkThemeStyle, } from './premium.types';
|
|
7
|
+
export type { OutlineItem } from './outline.types';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,GACf,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,GACd,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { InkCommentThread, InkCommentsChangeHandler } from './comments.types';
|
|
|
4
4
|
import { InkColorMode, InkEditorChrome, InkEditorVariant, InkFeaturesConfig } from './features.types';
|
|
5
5
|
import { InkIconMap, InkImageUploadHandler, InkPasteMode, InkPremiumConfig, InkThemeTokens } from './premium.types';
|
|
6
6
|
import { InkTrackChange, InkTrackChangesChangeHandler } from './trackChanges.types';
|
|
7
|
-
export type ToolbarOption = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'paragraph' | 'headingDropdown' | 'fontDropdown' | 'bulletList' | 'orderedList' | 'listDropdown' | 'blockquote' | 'code' | 'link' | 'image' | 'table' | 'signature' | 'findReplace' | 'findReplaceDropdown' | 'horizontalRule' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'textColor' | 'highlightColor' | 'directionLtr' | 'directionRtl' | 'superscript' | 'subscript' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'clearFormat' | 'divider';
|
|
7
|
+
export type ToolbarOption = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'paragraph' | 'headingDropdown' | 'fontDropdown' | 'bulletList' | 'orderedList' | 'checklist' | 'listDropdown' | 'blockquote' | 'code' | 'link' | 'image' | 'table' | 'signature' | 'findReplace' | 'findReplaceDropdown' | 'horizontalRule' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'textColor' | 'highlightColor' | 'directionLtr' | 'directionRtl' | 'superscript' | 'subscript' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'clearFormat' | 'divider';
|
|
8
8
|
export interface InkEditorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
9
9
|
value?: string;
|
|
10
10
|
defaultValue?: string;
|
|
@@ -48,6 +48,7 @@ export interface InkEditorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
|
|
|
48
48
|
onToolbarChange?: (items: ToolbarOption[]) => void;
|
|
49
49
|
toolbarHidden?: boolean;
|
|
50
50
|
onToolbarHiddenChange?: (hidden: boolean) => void;
|
|
51
|
+
showOutline?: boolean;
|
|
51
52
|
}
|
|
52
53
|
export interface ToolbarButtonProps {
|
|
53
54
|
icon: ReactNode;
|
|
@@ -55,10 +56,13 @@ export interface ToolbarButtonProps {
|
|
|
55
56
|
active?: boolean;
|
|
56
57
|
onClick: () => void;
|
|
57
58
|
disabled?: boolean;
|
|
59
|
+
className?: string;
|
|
58
60
|
}
|
|
59
61
|
export interface DropdownOption {
|
|
60
62
|
value: string;
|
|
61
63
|
label: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
mark?: string;
|
|
62
66
|
}
|
|
63
67
|
export interface ToolbarDropdownProps {
|
|
64
68
|
options: DropdownOption[];
|
|
@@ -78,10 +82,15 @@ export interface TypoFixResult {
|
|
|
78
82
|
html: string;
|
|
79
83
|
fixedCount: number;
|
|
80
84
|
}
|
|
85
|
+
export type SlashInsert = 'heading1' | 'heading2' | 'heading3' | 'paragraph' | 'bulletList' | 'orderedList' | 'checklist' | 'table' | 'ai' | 'image' | 'code' | 'callout' | 'quote';
|
|
81
86
|
export interface SlashCommandItem {
|
|
82
87
|
id: string;
|
|
83
88
|
label: string;
|
|
84
89
|
keywords: string[];
|
|
85
|
-
insert:
|
|
90
|
+
insert: SlashInsert;
|
|
91
|
+
description: string;
|
|
92
|
+
category: string;
|
|
93
|
+
shortcut: string;
|
|
94
|
+
mark: string;
|
|
86
95
|
}
|
|
87
96
|
//# sourceMappingURL=ink.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ink.types.d.ts","sourceRoot":"","sources":["../../src/types/ink.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OA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CAAC,EAAE,qBAAqB,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ink.types.d.ts","sourceRoot":"","sources":["../../src/types/ink.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEzF,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,WAAW,GACX,eAAe,GACf,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,cAAc,GACd,YAAY,GACZ,aAAa,GACb,WAAW,GACX,cAAc,GACd,YAAY,GACZ,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,WAAW,GACX,aAAa,GACb,qBAAqB,GACrB,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,cAAc,GACd,UAAU,GAC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IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ToolbarOption } from './ink.types';
|
|
3
|
-
export type InkPremiumFeature = 'icons' | 'theme' | 'richPaste' | 'imageUpload' | 'wysiwyg';
|
|
3
|
+
export type InkPremiumFeature = 'icons' | 'theme' | 'richPaste' | 'imageUpload' | 'wysiwyg' | 'splitEditors';
|
|
4
4
|
export type InkPasteMode = 'plain' | 'rich';
|
|
5
|
-
export type InkIconKey = Extract<ToolbarOption, 'bold' | 'italic' | 'underline' | 'strikethrough' | 'bulletList' | 'orderedList' | 'link' | 'image' | 'table' | 'signature' | 'findReplace' | 'horizontalRule' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'clearFormat' | 'directionLtr' | 'directionRtl' | 'superscript' | 'subscript' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'blockquote' | 'code'>;
|
|
5
|
+
export type InkIconKey = Extract<ToolbarOption, 'bold' | 'italic' | 'underline' | 'strikethrough' | 'bulletList' | 'orderedList' | 'checklist' | 'link' | 'image' | 'table' | 'signature' | 'findReplace' | 'horizontalRule' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'clearFormat' | 'directionLtr' | 'directionRtl' | 'superscript' | 'subscript' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'blockquote' | 'code'>;
|
|
6
6
|
export type InkIconMap = Partial<Record<InkIconKey, ReactNode>>;
|
|
7
7
|
export interface InkThemeTokens {
|
|
8
8
|
border?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"premium.types.d.ts","sourceRoot":"","sources":["../../src/types/premium.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,OAAO,GACP,WAAW,GACX,aAAa,GACb,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"premium.types.d.ts","sourceRoot":"","sources":["../../src/types/premium.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,OAAO,GACP,WAAW,GACX,aAAa,GACb,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,OAAO,CAC9B,aAAa,EACX,MAAM,GACN,QAAQ,GACR,WAAW,GACX,eAAe,GACf,YAAY,GACZ,aAAa,GACb,WAAW,GACX,MAAM,GACN,OAAO,GACP,OAAO,GACP,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,cAAc,GACd,UAAU,GACV,IAAI,GACJ,aAAa,GACb,cAAc,GACd,cAAc,GACd,aAAa,GACb,WAAW,GACX,WAAW,GACX,aAAa,GACb,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,MAAM,CACT,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;CAC9C;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAE7E,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -7,7 +7,10 @@ export type { BlockDropPosition } from './blocks.utils';
|
|
|
7
7
|
export { wrapInsertHtml, wrapDeleteHtml, createTrackChange, acceptTrackChangeInHtml, rejectTrackChangeInHtml, } from './trackChanges.utils';
|
|
8
8
|
export { createCommentThread, wrapSelectionAsComment, removeCommentMark, } from './comments.utils';
|
|
9
9
|
export { InkHistoryStack } from './history.utils';
|
|
10
|
-
export { filterSlashCommands, extractSlashQuery } from './slash.utils';
|
|
10
|
+
export { filterSlashCommands, extractSlashQuery, groupSlashCommands } from './slash.utils';
|
|
11
|
+
export type { SlashCommandGroup } from './slash.utils';
|
|
12
|
+
export { countWords } from './words.utils';
|
|
13
|
+
export { collectOutlineItems, getCaretLineCol, scrollOutlineHeading } from './outline.utils';
|
|
11
14
|
export { resolveInkPremium, hasInkPremiumFeature, isInkPremiumLicenseKey, themeTokensToStyle, } from './premium.utils';
|
|
12
15
|
export { mintInkPremiumLicenseKey } from './license.utils';
|
|
13
16
|
export { sanitizePastedHtml, extractClipboardHtml, extractClipboardText, } from './paste.utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EACL,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAi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mB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants/numbers.cjs"),N=require("../constants/generals.const.cjs"),a=require("../constants/defaults.const.cjs");require("../constants/openai.const.cjs");require("react/jsx-runtime");require("./paste.utils.cjs");require("react");require("react-dom");const _={H1:e.NUMBER_ONE,H2:e.NUMBER_TWO,H3:e.NUMBER_THREE},O=r=>{if(!r)return[];const i=r.querySelectorAll(a.INK_OUTLINE_HEADING_SELECTOR),t=[];return i.forEach((n,l)=>{if(!(n instanceof HTMLElement))return;const o=_[n.tagName];if(!o)return;const s=(n.textContent??N.EMPTY_STRING).trim();s&&t.push({index:l,level:o,text:s})}),t},R=(r,i)=>{const n=r.querySelectorAll(a.INK_OUTLINE_HEADING_SELECTOR).item(i);n instanceof HTMLElement&&n.scrollIntoView({block:"center",behavior:"smooth"})},f=r=>{if(!r)return{line:e.NUMBER_ONE,col:e.NUMBER_ONE};const i=window.getSelection();if(!i||i.rangeCount===e.NUMBER_ZERO)return{line:e.NUMBER_ONE,col:e.NUMBER_ONE};const t=i.getRangeAt(e.NUMBER_ZERO);if(!r.contains(t.startContainer))return{line:e.NUMBER_ONE,col:e.NUMBER_ONE};const n=r.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, pre");let l=e.NUMBER_ONE,o=!1;n.forEach((E,u)=>{o||!(E instanceof HTMLElement)||(E.contains(t.startContainer)||E===t.startContainer)&&(l=u+e.NUMBER_ONE,o=!0)});const s=o?n.item(l-e.NUMBER_ONE):null;if(!(s instanceof HTMLElement))return{line:l,col:e.NUMBER_ONE};const c=t.cloneRange();return c.selectNodeContents(s),c.setEnd(t.startContainer,t.startOffset),{line:l,col:c.toString().length+e.NUMBER_ONE}};exports.collectOutlineItems=O;exports.getCaretLineCol=f;exports.scrollOutlineHeading=R;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OutlineItem } from '../types';
|
|
2
|
+
export declare const collectOutlineItems: (root: HTMLElement | null) => OutlineItem[];
|
|
3
|
+
export declare const scrollOutlineHeading: (root: HTMLElement, index: number) => void;
|
|
4
|
+
export declare const getCaretLineCol: (root: HTMLElement | null) => {
|
|
5
|
+
line: number;
|
|
6
|
+
col: number;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=outline.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outline.utils.d.ts","sourceRoot":"","sources":["../../src/utils/outline.utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAQ5C,eAAO,MAAM,mBAAmB,GAAI,MAAM,WAAW,GAAG,IAAI,KAAG,WAAW,EAazE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,MAAM,WAAW,EAAE,OAAO,MAAM,KAAG,IAKvE,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,WAAW,GAAG,IAAI,KACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CA8B7B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { NUMBER_ONE as t, NUMBER_ZERO as f, NUMBER_THREE as m, NUMBER_TWO as g } from "../constants/numbers.js";
|
|
2
|
+
import { EMPTY_STRING as h } from "../constants/generals.const.js";
|
|
3
|
+
import { INK_OUTLINE_HEADING_SELECTOR as u } from "../constants/defaults.const.js";
|
|
4
|
+
import "../constants/openai.const.js";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
import "./paste.utils.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
const p = {
|
|
10
|
+
H1: t,
|
|
11
|
+
H2: g,
|
|
12
|
+
H3: m
|
|
13
|
+
}, O = (r) => {
|
|
14
|
+
if (!r) return [];
|
|
15
|
+
const o = r.querySelectorAll(u), e = [];
|
|
16
|
+
return o.forEach((n, i) => {
|
|
17
|
+
if (!(n instanceof HTMLElement)) return;
|
|
18
|
+
const l = p[n.tagName];
|
|
19
|
+
if (!l) return;
|
|
20
|
+
const c = (n.textContent ?? h).trim();
|
|
21
|
+
c && e.push({ index: i, level: l, text: c });
|
|
22
|
+
}), e;
|
|
23
|
+
}, A = (r, o) => {
|
|
24
|
+
const n = r.querySelectorAll(u).item(o);
|
|
25
|
+
n instanceof HTMLElement && n.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
26
|
+
}, I = (r) => {
|
|
27
|
+
if (!r) return { line: t, col: t };
|
|
28
|
+
const o = window.getSelection();
|
|
29
|
+
if (!o || o.rangeCount === f)
|
|
30
|
+
return { line: t, col: t };
|
|
31
|
+
const e = o.getRangeAt(f);
|
|
32
|
+
if (!r.contains(e.startContainer))
|
|
33
|
+
return { line: t, col: t };
|
|
34
|
+
const n = r.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, pre");
|
|
35
|
+
let i = t, l = !1;
|
|
36
|
+
n.forEach((a, E) => {
|
|
37
|
+
l || !(a instanceof HTMLElement) || (a.contains(e.startContainer) || a === e.startContainer) && (i = E + t, l = !0);
|
|
38
|
+
});
|
|
39
|
+
const c = l ? n.item(i - t) : null;
|
|
40
|
+
if (!(c instanceof HTMLElement))
|
|
41
|
+
return { line: i, col: t };
|
|
42
|
+
const s = e.cloneRange();
|
|
43
|
+
return s.selectNodeContents(c), s.setEnd(e.startContainer, e.startOffset), { line: i, col: s.toString().length + t };
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
O as collectOutlineItems,
|
|
47
|
+
I as getCaretLineCol,
|
|
48
|
+
A as scrollOutlineHeading
|
|
49
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../constants/numbers.cjs"),o=require("../constants/defaults.const.cjs");require("../constants/openai.const.cjs");require("react/jsx-runtime");require("./paste.utils.cjs");require("react");require("react-dom");const a=(r,e)=>r.label.toLowerCase().includes(e)||r.description.toLowerCase().includes(e)||r.category.toLowerCase().includes(e)||r.shortcut.toLowerCase().includes(e)?!0:r.keywords.some(t=>t.includes(e)),S=r=>{const e=r.trim().toLowerCase();return e?o.INK_SLASH_COMMANDS.filter(t=>a(t,e)).slice(0,c.INK_SLASH_MENU_MAX_ITEMS):o.INK_SLASH_COMMANDS.slice(0,c.INK_SLASH_MENU_MAX_ITEMS)},i=r=>{const e=[],t=new Map;return r.forEach(s=>{const u=s.category||o.SLASH_CATEGORY_BASIC,n=t.get(u);if(!n){e.push(u),t.set(u,[s]);return}n.push(s)}),e.map(s=>({category:s,items:t.get(s)??[]}))},l=r=>{const e=r.match(/(?:^|\s)\/([^\s]*)$/);return e?e[1]??"":null};exports.extractSlashQuery=l;exports.filterSlashCommands=S;exports.groupSlashCommands=i;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { SlashCommandItem } from '../types';
|
|
2
|
+
export type SlashCommandGroup = {
|
|
3
|
+
category: string;
|
|
4
|
+
items: SlashCommandItem[];
|
|
5
|
+
};
|
|
2
6
|
export declare const filterSlashCommands: (query: string) => SlashCommandItem[];
|
|
7
|
+
export declare const groupSlashCommands: (items: SlashCommandItem[]) => SlashCommandGroup[];
|
|
3
8
|
export declare const extractSlashQuery: (text: string) => string | null;
|
|
4
9
|
//# sourceMappingURL=slash.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash.utils.d.ts","sourceRoot":"","sources":["../../src/utils/slash.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slash.utils.d.ts","sourceRoot":"","sources":["../../src/utils/slash.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B,CAAC;AAUF,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,gBAAgB,EAOnE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,gBAAgB,EAAE,KAAG,iBAAiB,EAiB/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,IAIzD,CAAC"}
|
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import { INK_SLASH_MENU_MAX_ITEMS as
|
|
2
|
-
import { INK_SLASH_COMMANDS as
|
|
1
|
+
import { INK_SLASH_MENU_MAX_ITEMS as u } from "../constants/numbers.js";
|
|
2
|
+
import { INK_SLASH_COMMANDS as c, SLASH_CATEGORY_BASIC as a } from "../constants/defaults.const.js";
|
|
3
3
|
import "../constants/openai.const.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "./paste.utils.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
const
|
|
8
|
+
const i = (t, r) => t.label.toLowerCase().includes(r) || t.description.toLowerCase().includes(r) || t.category.toLowerCase().includes(r) || t.shortcut.toLowerCase().includes(r) ? !0 : t.keywords.some((e) => e.includes(r)), d = (t) => {
|
|
9
9
|
const r = t.trim().toLowerCase();
|
|
10
|
-
return r ?
|
|
11
|
-
|
|
10
|
+
return r ? c.filter((e) => i(e, r)).slice(
|
|
11
|
+
0,
|
|
12
|
+
u
|
|
13
|
+
) : c.slice(0, u);
|
|
14
|
+
}, L = (t) => {
|
|
15
|
+
const r = [], e = /* @__PURE__ */ new Map();
|
|
16
|
+
return t.forEach((o) => {
|
|
17
|
+
const s = o.category || a, n = e.get(s);
|
|
18
|
+
if (!n) {
|
|
19
|
+
r.push(s), e.set(s, [o]);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
n.push(o);
|
|
23
|
+
}), r.map((o) => ({
|
|
24
|
+
category: o,
|
|
25
|
+
items: e.get(o) ?? []
|
|
26
|
+
}));
|
|
27
|
+
}, _ = (t) => {
|
|
12
28
|
const r = t.match(/(?:^|\s)\/([^\s]*)$/);
|
|
13
29
|
return r ? r[1] ?? "" : null;
|
|
14
30
|
};
|
|
15
31
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
32
|
+
_ as extractSlashQuery,
|
|
33
|
+
d as filterSlashCommands,
|
|
34
|
+
L as groupSlashCommands
|
|
18
35
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../constants/numbers.cjs"),i=require("../constants/generals.const.cjs");require("../constants/openai.const.cjs");require("react/jsx-runtime");require("./paste.utils.cjs");require("react");require("react-dom");const n=r=>{const e=r.trim();return e?e.split(i.INK_WORD_SPLIT).filter(Boolean).length:t.NUMBER_ZERO};exports.countWords=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"words.utils.d.ts","sourceRoot":"","sources":["../../src/utils/words.utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,MAIzC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NUMBER_ZERO as o } from "../constants/numbers.js";
|
|
2
|
+
import { INK_WORD_SPLIT as i } from "../constants/generals.const.js";
|
|
3
|
+
import "../constants/openai.const.js";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
import "./paste.utils.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "react-dom";
|
|
8
|
+
const c = (t) => {
|
|
9
|
+
const r = t.trim();
|
|
10
|
+
return r ? r.split(i).filter(Boolean).length : o;
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
c as countWords
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgedevstack/ink",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "ForgeStack rich text editor for React — WYSIWYG with tables, track changes, comments, block handles, sign pad, and pluggable Ink AI (BYO LLM). The writing layer of ForgeStack.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|