@feedmepos/mf-menu 0.32.71 → 0.32.72-dev.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.
Files changed (74) hide show
  1. package/dist/{App-Bay6p3xd.js → App-DpBAxq_x.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Je_NoQ3y.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BE34SL6B.js} +12 -12
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-DBjYkJhB.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-Cg4oaBql.js} +3 -3
  4. package/dist/{Catalog-DfWHNm4n.js → Catalog-BCKu3av3.js} +20 -20
  5. package/dist/{Category-51BrJsdv.js → Category-D8fstrW5.js} +4 -4
  6. package/dist/{Category-m45WrP7O.js → Category-DRyJ8Y9S.js} +4 -4
  7. package/dist/{CookingGuide-Dk-ibGYd.js → CookingGuide-BKTlBPm-.js} +46 -46
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzpScELw.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BHqJGqLf.js} +1 -1
  9. package/dist/{Group-NUWfR17j.js → Group-DMLdJAIA.js} +1 -1
  10. package/dist/{Group-CZDoqPK7.js → Group-_vEUeyva.js} +3 -3
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-h8zygLBJ.js → Group.vue_vue_type_script_setup_true_lang-BEONKZuB.js} +7 -7
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Dq5jMv3_.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B2pS71Xq.js} +24 -24
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-EsQKUSJa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BHNmNXw0.js} +7 -7
  14. package/dist/{Ingredient-CcnUyiM5.js → Ingredient-DeGrqMqN.js} +4 -4
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BwxZEDVT.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DFOcD2mw.js} +2 -2
  16. package/dist/{LinkProductSideSheet-ClMiajzX.js → LinkProductSideSheet-BZNe2r8t.js} +4 -4
  17. package/dist/{MenuSetting-Dw3lVHtp.js → MenuSetting-yb8w_Nwc.js} +7 -7
  18. package/dist/{OrderPacing-Dh8T7OKW.js → OrderPacing-DRApEr9x.js} +5 -5
  19. package/dist/{PrintRoute-BrSaSZI3.js → PrintRoute-DK3ZMajo.js} +10 -10
  20. package/dist/{Product-CQ7AuhbY.js → Product-CBhhhicD.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-Bw6l2IEC.js → Product.vue_vue_type_script_setup_true_lang-CPgECJwS.js} +14 -14
  22. package/dist/ProductInternalTools-D8j9hMuA.js +439 -0
  23. package/dist/{Products-CoL7S7-1.js → Products-Db0Ihn6p.js} +47 -47
  24. package/dist/{Publish-C_lOqrSX.js → Publish-BFBUjUWu.js} +4 -4
  25. package/dist/{Recipe-Ce8qXnG5.js → Recipe-B0r5vJz6.js} +5 -5
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DMB9bFg9.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-C8Jk7KEh.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-D9i9tMAj.js → RuleView.vue_vue_type_script_setup_true_lang-DPCcNBrm.js} +193 -193
  28. package/dist/{Scheduler-B2ZtWIPp.js → Scheduler-yOdnbwyV.js} +17 -17
  29. package/dist/{ServingSequence-BWZ1YpzI.js → ServingSequence-CEcYzZKq.js} +3 -3
  30. package/dist/{Setting-CdxNVi7G.js → Setting-CEwxLrwm.js} +5 -5
  31. package/dist/{Subcategory-Bn0O6i5t.js → Subcategory-b1NEH4Rt.js} +6 -6
  32. package/dist/{Takeaway-yE0GhL5I.js → Takeaway-BwGq2ti3.js} +4 -4
  33. package/dist/{Takeaway-luRkknPl.js → Takeaway-C4X3hjz2.js} +1 -1
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CnZTbF3e.js → Takeaway.vue_vue_type_script_setup_true_lang-Da28Vzx1.js} +5 -5
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-B3N7_zfR.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-DIP7cNpd.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-BLzzBcqV.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CCYzllV_.js} +2 -2
  37. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BvnoCeCw.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-e_pAe_Ob.js} +15 -15
  38. package/dist/{Unit-JPFtrbuS.js → Unit-DWGvi3C5.js} +2 -2
  39. package/dist/{Variant-BGJ-aKF1.js → Variant-2YYwBJmZ.js} +3 -3
  40. package/dist/{_id_-BUlkRwgU.js → _id_-3pf3YlPS.js} +10 -10
  41. package/dist/{app-2VeaJE9t.js → app-D1p44Rbf.js} +37 -37
  42. package/dist/{app-CMjz-bvL.js → app-D6CmNX90.js} +1 -1
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/app.d.ts +20 -0
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +65 -16
  46. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  47. package/dist/assets/{linked-status-B9caUckb.js → linked-status-B_5fbldk.js} +4 -4
  48. package/dist/assets/{menu-export-DYfPYpgS.js → menu-export-Dje2CzXB.js} +3 -3
  49. package/dist/assets/{override-menu-uNjUqcak.js → override-menu-CpJc9-6f.js} +4 -4
  50. package/dist/assets/{validate-menu-BiXMOXpN.js → validate-menu-CpDDVAwU.js} +3 -3
  51. package/dist/{catalog--64fgdzd.js → catalog-Ds7c8bSK.js} +1 -1
  52. package/dist/{catalogSetting-CplTgRmk.js → catalogSetting-qbnlvX9R.js} +1 -1
  53. package/dist/{currency-CjYkQ4FL.js → currency-BQjK22_U.js} +1 -1
  54. package/dist/dayjs.min-BjENDBB5.js +7 -0
  55. package/dist/{discardConfirm-DOc0ieeO.js → discardConfirm-DhbS0wLN.js} +1 -1
  56. package/dist/{index-BrtZ42qx.js → index-BqB1Vagh.js} +6 -6
  57. package/dist/{index-CTA48kW2.js → index-C2rMjg4b.js} +1 -1
  58. package/dist/{index-Dw_Fw5ni.js → index-YU-FPKch.js} +5 -5
  59. package/dist/{index.vue_vue_type_script_setup_true_lang-BCZZq6zJ.js → index.vue_vue_type_script_setup_true_lang-DILo07iQ.js} +4420 -4414
  60. package/dist/{item-DL0lbXPC.js → item-CN-mYmn-.js} +1158 -1163
  61. package/dist/{jszip.min-CTn9qnAT.js → jszip.min-DdiexxWX.js} +3 -3
  62. package/dist/{linkProducts-DNPyRjOC.js → linkProducts-DSa1bP0Z.js} +4 -4
  63. package/dist/{memberPricing-ByMD7Sun.js → memberPricing-BLIgqSgU.js} +1 -1
  64. package/dist/{menu-C77otNXH.js → menu-kYSa55lO.js} +1 -1
  65. package/dist/{menuV2-Bi_EMfOM.js → menuV2-BJ-6TZDX.js} +24 -24
  66. package/dist/{order_pacing-29v64nh0.js → order_pacing-CeCi-pP3.js} +5 -5
  67. package/dist/{priceTier-BscL3YjX.js → priceTier-CsF1g5ie.js} +1 -1
  68. package/dist/{rules-BYL-otiB.js → rules-C3jtb0rM.js} +3 -3
  69. package/dist/{scheduler-Cqvnr0u1.js → scheduler-DZpjPLLc.js} +5 -5
  70. package/dist/{toExcel-421pbm-Z.js → toExcel-DI9BOlMc.js} +2 -2
  71. package/dist/{unit-DDtyAbV0.js → unit-DeNymCWc.js} +17 -17
  72. package/package.json +1 -1
  73. package/dist/ProductInternalTools-2rYX2GR0.js +0 -416
  74. package/dist/dayjs.min-DCMtwvjf.js +0 -7
@@ -1,5 +1,5 @@
1
1
  import { defineStore as r } from "pinia";
2
- import { J as a, K as s, L as l } from "./index.vue_vue_type_script_setup_true_lang-BCZZq6zJ.js";
2
+ import { K as a, L as s, M as l } from "./index.vue_vue_type_script_setup_true_lang-DILo07iQ.js";
3
3
  const u = {
4
4
  async read() {
5
5
  return a(await s().get("/public-setting"));
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as e, i as r, j as o, o as t, r as i, u as p } from "./app-2VeaJE9t.js";
1
+ import { F as e, i as r, j as o, o as t, r as i, u as p } from "./app-D1p44Rbf.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  r as i18nMessages,
@@ -1601,6 +1601,10 @@ export declare const i18nMessages: {
1601
1601
  };
1602
1602
  productInternalTools: {
1603
1603
  title: string;
1604
+ unreadable_images: {
1605
+ title: string;
1606
+ message: string;
1607
+ };
1604
1608
  };
1605
1609
  publish: {
1606
1610
  title: string;
@@ -3661,6 +3665,10 @@ export declare const i18nMessages: {
3661
3665
  };
3662
3666
  productInternalTools: {
3663
3667
  title: string;
3668
+ unreadable_images: {
3669
+ title: string;
3670
+ message: string;
3671
+ };
3664
3672
  };
3665
3673
  publish: {
3666
3674
  title: string;
@@ -5719,6 +5727,10 @@ export declare const i18nMessages: {
5719
5727
  };
5720
5728
  productInternalTools: {
5721
5729
  title: string;
5730
+ unreadable_images: {
5731
+ title: string;
5732
+ message: string;
5733
+ };
5722
5734
  };
5723
5735
  publish: {
5724
5736
  title: string;
@@ -7778,6 +7790,10 @@ export declare const i18nMessages: {
7778
7790
  };
7779
7791
  productInternalTools: {
7780
7792
  title: string;
7793
+ unreadable_images: {
7794
+ title: string;
7795
+ message: string;
7796
+ };
7781
7797
  };
7782
7798
  publish: {
7783
7799
  title: string;
@@ -9825,6 +9841,10 @@ export declare const i18nMessages: {
9825
9841
  };
9826
9842
  productInternalTools: {
9827
9843
  title: string;
9844
+ unreadable_images: {
9845
+ title: string;
9846
+ message: string;
9847
+ };
9828
9848
  };
9829
9849
  publish: {
9830
9850
  title: string;
@@ -63,6 +63,22 @@ export declare function validateImageType(file: File): string | null;
63
63
  * the images already in the wild.
64
64
  */
65
65
  export declare const MAX_IMAGE_EDGE = 2000;
66
+ /**
67
+ * What an upload is aimed at, as opposed to what the service will still accept.
68
+ *
69
+ * Exported because it is a contract, not a tuning knob: POS cannot render a large image —
70
+ * it crashes — so "did these bytes go through compression" is a question callers have to be
71
+ * able to ask (`meetsUploadBudget`), not just something this module does on the way past.
72
+ *
73
+ * `MAX_IMAGE_BYTES` is a 413 boundary, not a target, and using it as one is what merchants
74
+ * saw as "compression that does nothing": a heavy original re-encoded at `OUTPUT_QUALITY`
75
+ * landed at 8 MB, sat under the limit, and no further round ran. A 2000px JPEG of a real
76
+ * photo is a few hundred KB, so this sits just above where photography lands and below
77
+ * anything that would be heavy on a POS tile or a QR menu card. Enforced by the loop in
78
+ * `canvasToFile`, which spends quality to get here — a full-frame 2000x2000 photo does
79
+ * cross it and comes back one quality step down, which is the intended trade.
80
+ */
81
+ export declare const TARGET_UPLOAD_BYTES: number;
66
82
  /**
67
83
  * Encodes an edited canvas as a file guaranteed to be uploadable.
68
84
  *
@@ -72,8 +88,10 @@ export declare const MAX_IMAGE_EDGE = 2000;
72
88
  * the dead end this feature exists to remove. Quality is spent first and pixels second,
73
89
  * because a slightly softer photo beats a smaller one.
74
90
  *
75
- * PNG is kept only when the caller asks for it (a source with transparency); it has no
76
- * quality lever, so it is shrunk by size alone.
91
+ * Callers ask for JPEG (see `compressImageForUpload`); `mime` still honours a deliberate
92
+ * PNG, which has no quality lever and is shrunk by size alone. Lossy output is flattened
93
+ * onto white first, in place — every canvas reaching here is minted for this encode (a
94
+ * cropper result or `fileToCanvas` output), never one a caller keeps using.
77
95
  */
78
96
  export declare function canvasToFile(canvas: HTMLCanvasElement, options: {
79
97
  fileName: string;
@@ -82,20 +100,51 @@ export declare function canvasToFile(canvas: HTMLCanvasElement, options: {
82
100
  maxBytes?: number;
83
101
  }): Promise<File>;
84
102
  /**
85
- * Re-encodes a picked file to `MAX_IMAGE_EDGE` / `OUTPUT_QUALITY` before it is uploaded.
86
- *
87
- * Unconditional by design. The single-thumbnail flow this feature replaced compressed
88
- * every image on the way out (4:3, 2000px, JPEG q0.75); the multi-image rewrite dropped
89
- * that for a plain size check, which let a full-resolution phone photo reach
90
- * media-service verbatim as long as it happened to sit under `MAX_IMAGE_BYTES`. So the
91
- * trigger is the edge cap now, not the byte limit an 8 MB 12MP original is compressed
92
- * exactly like a 12 MB one.
93
- *
94
- * The one file handed back untouched is the one re-encoding would only make worse: canvas
95
- * has no quality lever for PNG and re-encodes an already-optimised one bigger, and a JPEG
96
- * already saved below `OUTPUT_QUALITY` grows too. When the source is inside the edge cap, already
97
- * uploadable, in the very format the encoder would have written, and smaller than what
98
- * came back, the original wins — "compressed" has to mean smaller.
103
+ * Whether a file already satisfies everything an upload guarantees, so re-encoding it would
104
+ * only cost a generation of JPEG loss.
105
+ *
106
+ * Deliberately strict on all three axes, because the consumer is unforgiving: POS crashes on
107
+ * a large image, so anything that cannot be proven compressed has to be compressed. JPEG is
108
+ * required rather than preferred a PNG in budget today is still a format whose weight does
109
+ * not track its pixel count, and it is the format that produced the 8 MB "compressed" upload
110
+ * in the first place.
111
+ *
112
+ * `dimensions` is optional only because a caller that has not decoded the image yet cannot
113
+ * supply it; omitting it makes this answer the question for bytes and format alone, so a
114
+ * caller that can decode should pass it.
115
+ */
116
+ export declare function meetsUploadBudget(file: File, dimensions?: {
117
+ width: number;
118
+ height: number;
119
+ } | null): boolean;
120
+ /**
121
+ * Re-encodes a picked file as a `MAX_IMAGE_EDGE` / `OUTPUT_QUALITY` JPEG before upload.
122
+ *
123
+ * Unconditional, and unconditionally JPEG — both learned the hard way. The multi-image
124
+ * rewrite replaced the single-thumbnail flow's always-compress (4:3, 2000px, JPEG q0.75)
125
+ * with a plain size check, so a full-resolution phone photo reached media-service verbatim
126
+ * whenever it sat under `MAX_IMAGE_BYTES`; putting the edge cap back still kept a PNG
127
+ * source as PNG, and canvas PNG is lossless, so a 10 MB photo saved as PNG came back ~8 MB
128
+ * and counted as compressed. Product photos gain nothing from an alpha channel, so
129
+ * transparency is flattened onto white and everything leaves as JPEG. (The backfill script
130
+ * still keeps a genuinely transparent PNG as PNG: it rewrites production originals
131
+ * irreversibly, so changing what an already-approved image shows is a line it does not
132
+ * cross. A new upload is previewed in the editor before the merchant confirms it.)
133
+ *
134
+ * The only file handed back untouched is a JPEG that is already leaner than the encode —
135
+ * one saved below `OUTPUT_QUALITY` grows if re-encoded, and skipping that spares it a
136
+ * second generation of loss for nothing. Restricted to JPEG sources on purpose, rather
137
+ * than "whatever is smaller": product images have no use for an alpha channel, so no
138
+ * upload path may leave a PNG or WebP in storage, and a JPEG source cannot carry
139
+ * transparency in the first place. The trade is known and accepted — a lean PNG of flat
140
+ * colour (a logo, a screenshot of a menu) re-encodes bigger, because JPEG spends bits on
141
+ * exactly the hard edges PNG stores for free. Every stored original being one format is
142
+ * worth that.
143
+ *
144
+ * Note what the passthrough cannot wave through: the encode it is compared against is
145
+ * bounded by `TARGET_UPLOAD_BYTES`, so a heavy original has nothing lean to tie with. The
146
+ * comparison used to be against a same-format encode, which is how a 10 MB PNG kept its
147
+ * own bytes.
99
148
  */
100
149
  export declare function compressImageForUpload(file: File, unreadableMessage?: string): Promise<File>;
101
150
  /**