@cyberyozh/text-editor 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/render.mjs CHANGED
@@ -2265,22 +2265,29 @@ function Table({ children }) {
2265
2265
  useEffect(() => {
2266
2266
  if (wrapperRef.current && undefinedCount > 0) {
2267
2267
  const containerWidth = wrapperRef.current.clientWidth;
2268
- const remainingSpace = containerWidth - totalDefinedWidth;
2268
+ const remainingSpace = containerWidth - totalDefinedWidth - 2;
2269
2269
  const calculatedWidth = Math.floor(remainingSpace / undefinedCount);
2270
2270
  setUndefinedColWidth(calculatedWidth > 0 ? calculatedWidth : void 0);
2271
2271
  }
2272
2272
  }, [totalDefinedWidth, undefinedCount]);
2273
- const tableWidth = undefinedCount > 0 && undefinedColWidth ? totalDefinedWidth + undefinedColWidth * undefinedCount : totalDefinedWidth > 0 ? totalDefinedWidth : void 0;
2274
- return /* @__PURE__ */ jsx67("div", { ref: wrapperRef, className: "tableWrapper", children: /* @__PURE__ */ jsxs21("table", { style: tableWidth ? { width: `${tableWidth}px` } : void 0, children: [
2275
- colWidths.length > 0 && /* @__PURE__ */ jsx67("colgroup", { children: colWidths.map((width, index) => /* @__PURE__ */ jsx67(
2276
- "col",
2277
- {
2278
- style: width ? { width: `${width}px` } : undefinedColWidth ? { width: `${undefinedColWidth}px` } : void 0
2279
- },
2280
- index
2281
- )) }),
2282
- /* @__PURE__ */ jsx67("tbody", { children })
2283
- ] }) });
2273
+ const tableWidth = undefinedCount > 0 && undefinedColWidth ? totalDefinedWidth + undefinedColWidth * undefinedCount + 2 : totalDefinedWidth > 0 ? totalDefinedWidth + 2 : void 0;
2274
+ return /* @__PURE__ */ jsx67(
2275
+ "div",
2276
+ {
2277
+ ref: wrapperRef,
2278
+ className: "tableWrapper",
2279
+ children: /* @__PURE__ */ jsxs21("table", { style: tableWidth ? { width: `${tableWidth}px` } : void 0, children: [
2280
+ colWidths.length > 0 && /* @__PURE__ */ jsx67("colgroup", { children: colWidths.map((width, index) => /* @__PURE__ */ jsx67(
2281
+ "col",
2282
+ {
2283
+ style: width ? { width: `${width}px` } : undefinedColWidth ? { width: `${undefinedColWidth}px` } : void 0
2284
+ },
2285
+ index
2286
+ )) }),
2287
+ /* @__PURE__ */ jsx67("tbody", { children })
2288
+ ] })
2289
+ }
2290
+ );
2284
2291
  }
2285
2292
 
2286
2293
  // src/utils/detect-video-hosting.ts