microboard-ui-temp 0.1.39 → 0.1.40

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.
Files changed (2) hide show
  1. package/dist/index.js +32 -33
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -341589,7 +341589,6 @@ class Location {
341589
341589
  }
341590
341590
 
341591
341591
  // src/entities/AIInput/utils.ts
341592
- var { i18n: i18n5 } = conf;
341593
341592
  var PLACEHOLDER_OFFSET = "\t\t\t\t\t\t\t\t\t\t\t\t";
341594
341593
  var getTextFromItem = (item) => {
341595
341594
  const richText = item.getRichText();
@@ -341763,7 +341762,7 @@ function createNode2(board, inputValue, isUserRequest, parentItem, contextItems
341763
341762
  nodeRichText.applyMaxWidth(600);
341764
341763
  nodeRichText.setSelectionHorisontalAlignment("left");
341765
341764
  nodeRichText.container.right = nodeRichText.container.left + 600;
341766
- nodeRichText.editor.insertCopiedText(i18n5.t("AIInput.awaitingImageGeneration"));
341765
+ nodeRichText.editor.insertCopiedText(conf.i18n.t("AIInput.awaitingImageGeneration"));
341767
341766
  node4.setId(crypto.randomUUID());
341768
341767
  } else {
341769
341768
  node4 = new AINode(board, isUserRequest, parentNodeId, contextItems, threadDirection);
@@ -341772,7 +341771,7 @@ function createNode2(board, inputValue, isUserRequest, parentItem, contextItems
341772
341771
  nodeRichText.setSelectionHorisontalAlignment("left");
341773
341772
  nodeRichText.container.right = nodeRichText.container.left + 600;
341774
341773
  if (withPlaceholder) {
341775
- nodeRichText.editor.insertCopiedText(i18n5.t("AIInput.generatingResponse") + PLACEHOLDER_OFFSET);
341774
+ nodeRichText.editor.insertCopiedText(conf.i18n.t("AIInput.generatingResponse") + PLACEHOLDER_OFFSET);
341776
341775
  } else {
341777
341776
  nodeRichText.editor.insertCopiedText(inputValue);
341778
341777
  }
@@ -343704,7 +343703,7 @@ var Transition2 = ({
343704
343703
  };
343705
343704
 
343706
343705
  // src/features/UserPlan/PlanCards.tsx
343707
- var { i18n: i18n6 } = conf;
343706
+ var { i18n: i18n5 } = conf;
343708
343707
  var annualToMonthlyPrice = (price) => price ? Math.round(price / 12) : 0;
343709
343708
  function BasicPlanCard() {
343710
343709
  const { t: t10 } = useTranslation();
@@ -343739,7 +343738,7 @@ function BasicPlanCard() {
343739
343738
  className: PlanCards_module_default.downgradeDesc
343740
343739
  }, t10("userPlan.downgradeModal.description", {
343741
343740
  planName: conf.planNames[account.billingInfo?.plan.name ?? "basic"],
343742
- currentPeriodEnd: new Intl.DateTimeFormat(i18n6.language, {
343741
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n5.language, {
343743
343742
  year: "numeric",
343744
343743
  month: "numeric",
343745
343744
  day: "numeric"
@@ -343750,7 +343749,7 @@ function BasicPlanCard() {
343750
343749
  header: "Тариф обновлен",
343751
343750
  body: t10("userPlan.downgradeModal.description", {
343752
343751
  planName: conf.planNames[account.billingInfo?.plan.name ?? "basic"],
343753
- currentPeriodEnd: new Intl.DateTimeFormat(i18n6.language, {
343752
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n5.language, {
343754
343753
  year: "numeric",
343755
343754
  month: "numeric",
343756
343755
  day: "numeric"
@@ -343770,7 +343769,7 @@ function BasicPlanCard() {
343770
343769
  }),
343771
343770
  additionalFeature: t10("userPlan.plans.basic.tokensFeature"),
343772
343771
  additionalFeatureTooltip: t10("userPlan.tokensTooltip"),
343773
- activationDate: new Intl.DateTimeFormat(i18n6.language, {
343772
+ activationDate: new Intl.DateTimeFormat(i18n5.language, {
343774
343773
  year: "numeric",
343775
343774
  month: "numeric",
343776
343775
  day: "numeric"
@@ -343818,7 +343817,7 @@ function PlusAIPlanCard() {
343818
343817
  className: PlanCards_module_default.downgradeDesc
343819
343818
  }, t10("userPlan.downgradeModal.description", {
343820
343819
  planName: conf.planNames["plusAI"],
343821
- currentPeriodEnd: new Intl.DateTimeFormat(i18n6.language, {
343820
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n5.language, {
343822
343821
  year: "numeric",
343823
343822
  month: "numeric",
343824
343823
  day: "numeric"
@@ -343829,7 +343828,7 @@ function PlusAIPlanCard() {
343829
343828
  header: "Тариф обновлен",
343830
343829
  body: t10("userPlan.downgradeModal.description", {
343831
343830
  planName: conf.planNames["plusAI"],
343832
- currentPeriodEnd: new Intl.DateTimeFormat(i18n6.language, {
343831
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n5.language, {
343833
343832
  year: "numeric",
343834
343833
  month: "numeric",
343835
343834
  day: "numeric"
@@ -343915,7 +343914,7 @@ function PlusPlanCard() {
343915
343914
  className: PlanCards_module_default.downgradeDesc
343916
343915
  }, t10("userPlan.downgradeModal.description", {
343917
343916
  planName: conf.planNames["plus"],
343918
- currentPeriodEnd: new Intl.DateTimeFormat(i18n6.language, {
343917
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n5.language, {
343919
343918
  year: "numeric",
343920
343919
  month: "numeric",
343921
343920
  day: "numeric"
@@ -343926,7 +343925,7 @@ function PlusPlanCard() {
343926
343925
  header: "Тариф обновлен",
343927
343926
  body: t10("userPlan.downgradeModal.description", {
343928
343927
  planName: conf.planNames["plus"],
343929
- currentPeriodEnd: new Intl.DateTimeFormat(i18n6.language, {
343928
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n5.language, {
343930
343929
  year: "numeric",
343931
343930
  month: "numeric",
343932
343931
  day: "numeric"
@@ -344051,7 +344050,7 @@ var LimitsTable_module_default = {
344051
344050
  };
344052
344051
 
344053
344052
  // src/features/UserPlan/HistoryTable.tsx
344054
- var { i18n: i18n7 } = conf;
344053
+ var { i18n: i18n6 } = conf;
344055
344054
  var PAYMENT_TYPE_DISPLAYNAME = {
344056
344055
  card: "Card",
344057
344056
  crypto: "Crypto"
@@ -344081,7 +344080,7 @@ function HistoryTable() {
344081
344080
  })));
344082
344081
  }
344083
344082
  var centToUsd2 = (cents) => cents / 100;
344084
- var formatDate = (date) => new Intl.DateTimeFormat(i18n7.language, {
344083
+ var formatDate = (date) => new Intl.DateTimeFormat(i18n6.language, {
344085
344084
  year: "numeric",
344086
344085
  month: "numeric",
344087
344086
  day: "numeric"
@@ -344096,7 +344095,7 @@ function ModelRow({
344096
344095
  }) {
344097
344096
  const { t: t10 } = useTranslation();
344098
344097
  const getPlanDisplayName = (planName) => {
344099
- return i18n7.language === "ru" ? t10(`userPlan.historyTable.planDisplayName.${planName}`, planName) : PLAN_DISPLAYNAME[planName] || planName;
344098
+ return i18n6.language === "ru" ? t10(`userPlan.historyTable.planDisplayName.${planName}`, planName) : PLAN_DISPLAYNAME[planName] || planName;
344100
344099
  };
344101
344100
  return /* @__PURE__ */ import_react168.default.createElement("tr", null, /* @__PURE__ */ import_react168.default.createElement("td", {
344102
344101
  className: LimitsTable_module_default.model
@@ -344245,7 +344244,7 @@ function Tooltip2({ text: text5, x: x9, y: y14, visible }) {
344245
344244
  // src/features/UserPlan/LimitsModal.tsx
344246
344245
  var LIMITS_MODAL_ID = Symbol("limitsModal");
344247
344246
  function LimitsModal() {
344248
- const { t: t10, i18n: i18n8 } = useTranslation();
344247
+ const { t: t10, i18n: i18n7 } = useTranslation();
344249
344248
  const account = useAccount2();
344250
344249
  const { openModal: openModal2 } = useUiModalContext();
344251
344250
  const handleBackButton = () => openModal2(USER_PLAN_MODAL_ID);
@@ -344259,7 +344258,7 @@ function LimitsModal() {
344259
344258
  className: UserPlanModal_module_default.downgradeDesc
344260
344259
  }, t10("userPlan.downgradeModal.description", {
344261
344260
  planName: conf.planNames[account.billingInfo?.plan.name ?? "basic"],
344262
- currentPeriodEnd: new Intl.DateTimeFormat(i18n8.language, {
344261
+ currentPeriodEnd: new Intl.DateTimeFormat(i18n7.language, {
344263
344262
  year: "numeric",
344264
344263
  month: "numeric",
344265
344264
  day: "numeric"
@@ -344349,18 +344348,18 @@ function UserPlanUsage({
344349
344348
  history: history2,
344350
344349
  hasHistory
344351
344350
  }) {
344352
- const { t: t10, i18n: i18n8 } = useTranslation();
344351
+ const { t: t10, i18n: i18n7 } = useTranslation();
344353
344352
  const { openModal: openModal2 } = useUiModalContext();
344354
344353
  const account = useAccount2();
344355
344354
  const handleOpenLimitsModal = () => openModal2(LIMITS_MODAL_ID);
344356
344355
  const handleOpenHistoryModal = () => openModal2(HISTORY_MODAL_ID);
344357
- const formattedCancellationDate = new Intl.DateTimeFormat(i18n8.language, {
344356
+ const formattedCancellationDate = new Intl.DateTimeFormat(i18n7.language, {
344358
344357
  year: "numeric",
344359
344358
  month: "numeric",
344360
344359
  day: "numeric"
344361
344360
  }).format(new Date(cancellationDate ?? Date.now()));
344362
344361
  const previousCancellationDate = new Date(new Date(cancellationDate ?? Date.now()).setDate(new Date(cancellationDate ?? Date.now()).getDate() - 1));
344363
- const formattedPreviousCancellationDate = new Intl.DateTimeFormat(i18n8.language, {
344362
+ const formattedPreviousCancellationDate = new Intl.DateTimeFormat(i18n7.language, {
344364
344363
  year: "numeric",
344365
344364
  month: "numeric",
344366
344365
  day: "numeric"
@@ -344423,7 +344422,7 @@ function UserPlanUsage({
344423
344422
  var USER_PLAN_MODAL_ID = "USER_PLAN_MODAL_ID";
344424
344423
  function UserPlanModal() {
344425
344424
  const { openModal: openModal2 } = useUiModalContext();
344426
- const { t: t10, i18n: i18n8 } = useTranslation();
344425
+ const { t: t10, i18n: i18n7 } = useTranslation();
344427
344426
  const account = useAccount2();
344428
344427
  const currentModelId = account.billingInfo?.plan.name === "plusAI" ? "gpt-4o" : "gpt-4o-mini";
344429
344428
  const currentModel = account.billingInfo?.models.find(({ id: id3 }) => id3 === currentModelId);
@@ -356508,8 +356507,8 @@ var LandingMenu_module_default = {
356508
356507
  // src/features/LandingMenu/LandingMenu.tsx
356509
356508
  function LandingMenu() {
356510
356509
  const [isOpen, setIsOpen] = import_react296.useState(true);
356511
- const { t: t10, i18n: i18n8 } = useTranslation();
356512
- const isRu = i18n8.language === "ru";
356510
+ const { t: t10, i18n: i18n7 } = useTranslation();
356511
+ const isRu = i18n7.language === "ru";
356513
356512
  const landingUrl = isRu ? LANDING_URL : LANDING_URL_EN;
356514
356513
  if (!isMicroboardIframe()) {
356515
356514
  return null;
@@ -356580,8 +356579,8 @@ var MobileLandingMenu_module_default = {
356580
356579
  // src/features/LandingMenu/MobileLandingMenu.tsx
356581
356580
  function MobileLandingMenu() {
356582
356581
  const [isOpen, setIsOpen] = import_react297.useState(false);
356583
- const { t: t10, i18n: i18n8 } = useTranslation();
356584
- const isRu = i18n8.language === "ru";
356582
+ const { t: t10, i18n: i18n7 } = useTranslation();
356583
+ const isRu = i18n7.language === "ru";
356585
356584
  const landingUrl = isRu ? LANDING_URL : LANDING_URL_EN;
356586
356585
  if (!isMicroboardIframe()) {
356587
356586
  return null;
@@ -356704,10 +356703,10 @@ var CookiesModal_module_default = {
356704
356703
  var CookiesModal = ({
356705
356704
  className
356706
356705
  }) => {
356707
- const { t: t10, i18n: i18n8 } = useTranslation();
356706
+ const { t: t10, i18n: i18n7 } = useTranslation();
356708
356707
  const [open, setOpen] = import_react299.useState(false);
356709
356708
  const redirectOnPolicy = () => {
356710
- const policyUrl = i18n8.language === "ru" ? "https://app.microboard.io/pdf/privacy_policy_ru.pdf" : "https://app.microboard.io/pdf/privacy_policy_en.pdf";
356709
+ const policyUrl = i18n7.language === "ru" ? "https://app.microboard.io/pdf/privacy_policy_ru.pdf" : "https://app.microboard.io/pdf/privacy_policy_en.pdf";
356711
356710
  window.location.href = policyUrl;
356712
356711
  };
356713
356712
  const onAccept = () => {
@@ -443841,7 +443840,7 @@ var pasteWelcomeBoardData = (board, lang) => {
443841
443840
  function WelcomePage() {
443842
443841
  const { app } = useAppContext();
443843
443842
  const navigate = useNavigate();
443844
- const { i18n: i18n8, t: t11 } = useTranslation();
443843
+ const { i18n: i18n7, t: t11 } = useTranslation();
443845
443844
  const boardsList = useBoardsList();
443846
443845
  const createPublicBoard = async (app2) => {
443847
443846
  const lastBoardId = app2.getLastBoardId();
@@ -443852,7 +443851,7 @@ function WelcomePage() {
443852
443851
  const boardId = await boardsList.createBoard(t11("board.welcomeBoardTitle"), true);
443853
443852
  await app2.openBoard(boardId);
443854
443853
  const board = app2.getBoard();
443855
- pasteWelcomeBoardData(board, i18n8.language);
443854
+ pasteWelcomeBoardData(board, i18n7.language);
443856
443855
  return boardId;
443857
443856
  };
443858
443857
  import_react417.default.useEffect(() => {
@@ -443868,7 +443867,7 @@ var BoardPage = () => {
443868
443867
  const { app } = useAppContext();
443869
443868
  const board = app.getBoard();
443870
443869
  const params = useParams();
443871
- const { t: t11, i18n: i18n8 } = useTranslation();
443870
+ const { t: t11, i18n: i18n7 } = useTranslation();
443872
443871
  const navigate = useNavigate();
443873
443872
  const { search: search3 } = useLocation();
443874
443873
  const [searchParams] = useSearchParams();
@@ -443927,7 +443926,7 @@ var BoardPage = () => {
443927
443926
  });
443928
443927
  app.render();
443929
443928
  const board2 = app.getBoard();
443930
- pasteWelcomeBoardData(board2, i18n8.language);
443929
+ pasteWelcomeBoardData(board2, i18n7.language);
443931
443930
  });
443932
443931
  });
443933
443932
  } else {
@@ -444432,7 +444431,7 @@ var AuthLayout_module_default = {
444432
444431
  var AuthLayout = ({ showPolicies }) => {
444433
444432
  const location3 = useLocation();
444434
444433
  const navigate = useNavigate();
444435
- const { t: t11, i18n: i18n8 } = useTranslation();
444434
+ const { t: t11, i18n: i18n7 } = useTranslation();
444436
444435
  import_react429.useEffect(() => {
444437
444436
  const params = new URLSearchParams(location3.search);
444438
444437
  if (params.get("authException") === "true") {
@@ -444456,10 +444455,10 @@ var AuthLayout = ({ showPolicies }) => {
444456
444455
  }, /* @__PURE__ */ import_react429.default.createElement(Outlet, null)), showPolicies && /* @__PURE__ */ import_react429.default.createElement("div", {
444457
444456
  className: AuthLayout_module_default.policy
444458
444457
  }, t11("auth.policyWith"), " ", /* @__PURE__ */ import_react429.default.createElement(OuterLink, {
444459
- href: i18n8.language === "ru" ? window.location.origin + "/pdf/terms_conditions_ru.pdf" : window.location.origin + "/pdf/terms_conditions_en.pdf",
444458
+ href: i18n7.language === "ru" ? window.location.origin + "/pdf/terms_conditions_ru.pdf" : window.location.origin + "/pdf/terms_conditions_en.pdf",
444460
444459
  className: AuthLayout_module_default.policyLink
444461
444460
  }, t11("auth.termsAndConditions")), " ", t11("common.and"), " ", /* @__PURE__ */ import_react429.default.createElement(OuterLink, {
444462
- href: i18n8.language === "ru" ? window.location.origin + "/pdf/privacy_policy_ru.pdf" : window.location.origin + "/pdf/privacy_policy_en.pdf",
444461
+ href: i18n7.language === "ru" ? window.location.origin + "/pdf/privacy_policy_ru.pdf" : window.location.origin + "/pdf/privacy_policy_en.pdf",
444463
444462
  className: AuthLayout_module_default.policyLink
444464
444463
  }, t11("auth.privacyPolicy")))));
444465
444464
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",