@senguoyun/dsh-arkme 0.1.66 → 0.1.67

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/lib/client.js CHANGED
@@ -22888,7 +22888,7 @@ function(test) {
22888
22888
  qrcode.stringToBytes;
22889
22889
  //#endregion
22890
22890
  //#region package.json
22891
- var version$3 = "0.1.66";
22891
+ var version$3 = "0.1.67";
22892
22892
  //#endregion
22893
22893
  //#region src/client/arkme-billing.css?inline
22894
22894
  var arkme_billing_default = ".arkme-billing-backdrop {\n z-index: 120;\n backdrop-filter: blur(3px);\n background: #181b223d;\n place-items: center;\n padding: 28px;\n display: grid;\n position: fixed;\n inset: 0;\n}\n\n.arkme-billing-recharge-dialog, .arkme-billing-payment-dialog {\n color: #20232c;\n background: #fff;\n border: 1px solid #dedfe3;\n border-radius: 20px;\n width: min(620px, 100%);\n max-height: min(720px, 100vh - 56px);\n overflow-y: auto;\n box-shadow: 0 24px 72px #191c232e;\n}\n\n.arkme-billing-payment-dialog {\n width: min(420px, 100%);\n}\n\n.arkme-billing-dialog-header {\n border-bottom: 1px solid #ececef;\n justify-content: space-between;\n align-items: flex-start;\n gap: 18px;\n min-height: 78px;\n padding: 20px 22px 16px;\n display: flex;\n}\n\n.arkme-billing-dialog-header h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n line-height: 25px;\n}\n\n.arkme-billing-dialog-header p {\n overflow-wrap: anywhere;\n color: #8a8e96;\n margin: 4px 0 0;\n font-size: 12px;\n line-height: 18px;\n}\n\n.arkme-billing-dialog-header > button {\n color: #777c85;\n width: 32px;\n height: 32px;\n font: inherit;\n cursor: pointer;\n background: none;\n border: 0;\n border-radius: 9px;\n flex: none;\n place-items: center;\n font-size: 22px;\n display: grid;\n}\n\n.arkme-billing-dialog-header > button:hover {\n color: #20232c;\n background: #f3f3f5;\n}\n\n.arkme-billing-dialog-body {\n padding: 18px 22px 22px;\n}\n\n.arkme-billing-dialog-balance {\n border-bottom: 1px solid #ececef;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n column-gap: 12px;\n min-height: 48px;\n padding: 0 2px 16px;\n display: grid;\n}\n\n.arkme-billing-dialog-balance > span {\n color: #8a8e96;\n grid-column: 1;\n font-size: 11px;\n line-height: 16px;\n}\n\n.arkme-billing-dialog-balance > strong {\n grid-column: 1;\n font-size: 22px;\n font-weight: 600;\n line-height: 28px;\n}\n\n.arkme-billing-dialog-balance > button, .arkme-billing-error > button {\n color: #626772;\n height: 30px;\n font: inherit;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 9px;\n grid-area: 1 / 2 / span 2;\n padding: 0 12px;\n font-size: 11px;\n}\n\n.arkme-billing-products-section, .arkme-billing-payment-section {\n padding-top: 17px;\n}\n\n.arkme-billing-products-section h3, .arkme-billing-payment-section h3 {\n color: #747984;\n margin: 0 0 11px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n}\n\n.arkme-billing-product-grid {\n width: 100%;\n}\n\n.arkme-billing-product-grid > button {\n color: #20232c;\n min-width: 0;\n min-height: 62px;\n font: inherit;\n text-align: left;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 11px;\n align-content: center;\n gap: 4px;\n padding: 9px 11px;\n display: grid;\n}\n\n.arkme-billing-product-grid > button:hover {\n background: #f8f8f9;\n border-color: #cfd2d8;\n}\n\n.arkme-billing-product-grid > button.is-selected {\n border-color: #75839e;\n box-shadow: 0 0 0 1px #75839e;\n}\n\n.arkme-billing-product-grid > button > span {\n white-space: nowrap;\n text-overflow: ellipsis;\n font-size: 12px;\n font-weight: 500;\n line-height: 17px;\n overflow: hidden;\n}\n\n.arkme-billing-product-grid > button > strong {\n font-size: 14px;\n font-weight: 600;\n line-height: 19px;\n}\n\n.arkme-billing-payment-actions {\n flex-wrap: wrap;\n gap: 10px;\n display: flex;\n}\n\n.arkme-billing-payment-actions > button {\n color: #333842;\n min-width: 154px;\n height: 38px;\n font: inherit;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 10px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n padding: 0 14px;\n font-size: 12px;\n display: inline-flex;\n}\n\n.arkme-billing-payment-actions > button:hover {\n background: #f7f7f8;\n border-color: #cfd3da;\n}\n\n.arkme-billing-payment-actions > button:disabled, .arkme-billing-product-grid > button:disabled {\n opacity: .48;\n cursor: default;\n}\n\n.arkme-billing-platform-icon {\n flex: none;\n width: 18px;\n height: 18px;\n}\n\n.arkme-billing-platform-icon.is-alipay {\n color: #1677ff;\n}\n\n.arkme-billing-platform-icon.is-wechat {\n color: #07c160;\n}\n\n.arkme-billing-state {\n color: #858992;\n margin: 12px 0 2px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.arkme-billing-error {\n color: #b54841;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n margin-top: 10px;\n font-size: 12px;\n line-height: 18px;\n display: flex;\n}\n\n.arkme-billing-error.is-purchase {\n justify-content: flex-start;\n}\n\n.arkme-billing-payment-content {\n text-align: center;\n justify-items: center;\n gap: 10px;\n padding: 28px 24px 18px;\n display: grid;\n}\n\n.arkme-billing-payment-content > .arkme-billing-platform-icon {\n width: 38px;\n height: 38px;\n margin-bottom: 4px;\n}\n\n.arkme-billing-payment-content > img {\n border-radius: 10px;\n width: 210px;\n height: 210px;\n}\n\n.arkme-billing-payment-content > strong {\n font-size: 14px;\n font-weight: 600;\n line-height: 21px;\n}\n\n.arkme-billing-payment-content > p {\n color: #858992;\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n}\n\n.arkme-billing-payment-content.is-paid > strong {\n color: #16794f;\n font-size: 18px;\n line-height: 25px;\n}\n\n.arkme-billing-payment-content.is-paid > .arkme-billing-error {\n justify-content: center;\n}\n\n.arkme-billing-payment-content.is-crediting > strong {\n color: #335f9e;\n}\n\n.arkme-billing-dialog-actions {\n flex-wrap: wrap;\n justify-content: center;\n gap: 9px;\n padding: 0 22px 20px;\n display: flex;\n}\n\n.arkme-billing-dialog-actions > button, .arkme-billing-primary-action {\n color: #3c424d;\n height: 34px;\n font: inherit;\n cursor: pointer;\n background: #fff;\n border: 1px solid #dfe1e5;\n border-radius: 9px;\n padding: 0 14px;\n font-size: 12px;\n}\n\n.arkme-billing-dialog-actions > .arkme-billing-primary-action, .arkme-billing-payment-content > .arkme-billing-primary-action {\n color: #fff;\n background: #20232d;\n border-color: #20232d;\n}\n";
@@ -105269,6 +105269,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
105269
105269
  }
105270
105270
  function ArkmeLongArticleDialog({ sourceRef, item, onClose, onCreated, onUpdated }) {
105271
105271
  const { notice: imageNotice, showNotice: showImageNotice } = useArkmeFileActionNotice(5e3);
105272
+ const messageActionRef = (0, react$1.useRef)(item?.messageActionRef);
105273
+ messageActionRef.current = item?.messageActionRef;
105272
105274
  const itemUid = item?.itemUid;
105273
105275
  const creating = item === void 0;
105274
105276
  const [detail, setDetail] = (0, react$1.useState)();
@@ -105358,7 +105360,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
105358
105360
  try {
105359
105361
  const value = await callArkme("source.long-article.detail", {
105360
105362
  sourceRef,
105361
- itemUid
105363
+ itemUid,
105364
+ messageActionRef: messageActionRef.current
105362
105365
  });
105363
105366
  setDetail(value);
105364
105367
  setDraftFormat(value.textFormat ?? "plain");
@@ -105667,9 +105670,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
105667
105670
  };
105668
105671
  const titleValue = editing ? title : detail?.title ?? item?.title ?? "";
105669
105672
  const textValue = editing ? textContent : detail?.textContent ?? item?.textContent ?? "";
105673
+ const readFormat = detail === void 0 ? item?.textFormat : detail.textFormat;
105674
+ const readBlocks = detail === void 0 ? item?.contentBlocks : detail.contentBlocks;
105670
105675
  const staticDuration = detail?.thinkingDurationMillis ?? Math.max(0, (item?.recordDurationMillis ?? 0) + (item?.editDurationMillis ?? 0));
105671
105676
  const metaDuration = editing ? displayedDurationMillis : staticDuration;
105672
- const wordCount = article || detail?.textFormat === "markdown" ? arkmeMarkdownPlainText(textValue).replace(/\[图片\]/g, "").length : textValue.length;
105677
+ const wordCount = article || readFormat === "markdown" ? arkmeMarkdownPlainText(textValue).replace(/\[图片\]/g, "").length : textValue.length;
105673
105678
  const sendAt = detail?.sendAtMillis ?? item?.sendAtMillis ?? 0;
105674
105679
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
105675
105680
  style: styles$60.overlay,
@@ -105832,9 +105837,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
105832
105837
  onChange: (event) => {
105833
105838
  setTextContent(event.target.value);
105834
105839
  }
105835
- }) : detail?.textFormat === "markdown" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ArkmeLongArticleBody, {
105840
+ }) : readFormat === "markdown" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ArkmeLongArticleBody, {
105836
105841
  text: textValue,
105837
- blocks: detail?.contentBlocks,
105842
+ blocks: readBlocks,
105838
105843
  textStyle: {
105839
105844
  fontSize: styles$60.bodyRead?.fontSize,
105840
105845
  lineHeight: styles$60.bodyRead?.lineHeight