@fileverse-dev/ddoc 7.0.0 → 7.0.1

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.
@@ -5,6 +5,11 @@ export declare const shouldShow: ({ editor }: {
5
5
  editor: Editor;
6
6
  }) => boolean;
7
7
  export declare const shouldShowIgnoringFocus: (editor: Editor) => boolean;
8
+ export declare const canCreateInlineComment: ({ isCollabDocumentPublished, disableInlineComment, }: {
9
+ isCollabDocumentPublished: boolean;
10
+ disableInlineComment: boolean;
11
+ }) => boolean;
12
+ export declare const shouldOfferNewCommentDraft: (isCommentActive: boolean, isCommentResolved: boolean) => boolean;
8
13
  /**
9
14
  * Whether the bubble menu should take itself out of the way.
10
15
  *
@@ -19100,28 +19100,31 @@ function nt(t) {
19100
19100
  e.setMeta(Vr, { rebuild: !0 }), t.view.dispatch(e);
19101
19101
  }
19102
19102
  function hD(t, e, n) {
19103
- var o;
19103
+ var s;
19104
19104
  const r = n();
19105
- for (const s of r) {
19106
- if (s.deleted || s.isSuggestion && s.resolved)
19105
+ let o = null;
19106
+ for (const i of r) {
19107
+ if (i.deleted || i.isSuggestion && i.resolved)
19107
19108
  continue;
19108
- if (s.isSuggestion && s.suggestionType === "add") {
19109
- const a = va(
19110
- s,
19109
+ if (i.isSuggestion && i.suggestionType === "add") {
19110
+ const l = va(
19111
+ i,
19111
19112
  t.state,
19112
19113
  r
19113
19114
  );
19114
- if (a === null) continue;
19115
- const l = a + (((o = s.suggestedContent) == null ? void 0 : o.length) ?? 0);
19116
- if (e >= a && e <= l)
19117
- return s;
19115
+ if (l === null) continue;
19116
+ const c = l + (((s = i.suggestedContent) == null ? void 0 : s.length) ?? 0);
19117
+ if (e >= l && e <= c)
19118
+ return i;
19118
19119
  continue;
19119
19120
  }
19120
- const i = vt(s, t.state);
19121
- if (i && e >= i.from && e <= i.to)
19122
- return s;
19121
+ const a = vt(i, t.state);
19122
+ if (a && e >= a.from && e <= a.to) {
19123
+ if (!i.resolved) return i;
19124
+ o ?? (o = i);
19125
+ }
19123
19126
  }
19124
- return null;
19127
+ return o;
19125
19128
  }
19126
19129
  function mD(t, e, n) {
19127
19130
  const r = n().find(
@@ -39967,7 +39970,7 @@ ${u}
39967
39970
  f = h.showLoader(), p = h.removeLoader;
39968
39971
  }
39969
39972
  try {
39970
- const h = await a.arrayBuffer(), { default: m } = await import("./index-C2HUe78M.mjs").then((v) => v.i), { value: g } = await m.convertToHtml(
39973
+ const h = await a.arrayBuffer(), { default: m } = await import("./index-CB4VB025.mjs").then((v) => v.i), { value: g } = await m.convertToHtml(
39971
39974
  { arrayBuffer: h },
39972
39975
  {
39973
39976
  styleMap: pk,
@@ -44285,7 +44288,7 @@ const U5 = (t, e) => {
44285
44288
  async function d(f, p, h) {
44286
44289
  if (f.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || f.name.endsWith(".docx"))
44287
44290
  try {
44288
- const m = await f.arrayBuffer(), { default: g } = await import("./index-C2HUe78M.mjs").then((C) => C.i), { value: y } = await g.convertToHtml(
44291
+ const m = await f.arrayBuffer(), { default: g } = await import("./index-CB4VB025.mjs").then((C) => C.i), { value: y } = await g.convertToHtml(
44289
44292
  { arrayBuffer: m },
44290
44293
  {
44291
44294
  styleMap: pk,
@@ -44471,8 +44474,8 @@ export {
44471
44474
  FA as g,
44472
44475
  Qj as h,
44473
44476
  nv as i,
44474
- _I as j,
44475
- d6 as k,
44477
+ d6 as j,
44478
+ _I as k,
44476
44479
  Gv as l,
44477
44480
  sI as m,
44478
44481
  Xj as n,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "7.0.0",
5
+ "version": "7.0.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-ddocs.git"
@@ -1,6 +1,6 @@
1
1
  // This file is the `@fileverse-dev/ddoc/tailwind` preset. It composes the ui preset
2
2
  // (dark mode, theme, design-system classes) and adds the `mobile` screen.
3
- // It also adds the ddoc-* variants (docs/DROP_IN_EDITOR.md §2.9).
3
+ // It also adds the ddoc-* variants (AGENTS.md, Layout contract).
4
4
  // Consumers: `presets: [require('@fileverse-dev/ddoc/tailwind')]` and add
5
5
  // node_modules/@fileverse-dev/ddoc/dist/**/*.{js,mjs} plus
6
6
  // node_modules/@fileverse/ui/dist/**/*.{js,mjs} to `content` (the dist is chunked).