Browse Source

Inventory: a spool's slicer preset can be removed (#3596)

- The Slicer Preset field in the spool form has a remove button, so a
  configured spool can go back to Stock in an edit or a copy
- Search text stays inside the field: closing the list without picking
  shows the preset's name again, and typed text is never saved as the
  preset name
- Saving after only clicking into the field no longer keeps the preset
  code with an empty name when the preset is not in the list
- The same field on the SpoolBuddy write-tag page gets the same fix
- A preset name is only sent together with a preset code
- New label translated in every locale; tests for keeping the name,
  ignoring search text and removing the preset in edit and copy
maziggy 3 days ago
parent
commit
99d6e52923
100 changed files with 223 additions and 19 deletions
  1. 1 0
      CHANGELOG.md
  2. 161 0
      frontend/src/__tests__/components/SpoolFormPresetField.test.tsx
  3. 4 2
      frontend/src/components/SpoolFormModal.tsx
  4. 31 8
      frontend/src/components/spool-form/FilamentSection.tsx
  5. 1 0
      frontend/src/i18n/locales/de.ts
  6. 1 0
      frontend/src/i18n/locales/en.ts
  7. 1 0
      frontend/src/i18n/locales/es.ts
  8. 1 0
      frontend/src/i18n/locales/fr.ts
  9. 1 0
      frontend/src/i18n/locales/it.ts
  10. 1 0
      frontend/src/i18n/locales/ja.ts
  11. 1 0
      frontend/src/i18n/locales/ko.ts
  12. 1 0
      frontend/src/i18n/locales/nl.ts
  13. 1 0
      frontend/src/i18n/locales/pl.ts
  14. 1 0
      frontend/src/i18n/locales/pt-BR.ts
  15. 1 0
      frontend/src/i18n/locales/ru.ts
  16. 1 0
      frontend/src/i18n/locales/sv.ts
  17. 1 0
      frontend/src/i18n/locales/tr.ts
  18. 1 0
      frontend/src/i18n/locales/uk.ts
  19. 1 0
      frontend/src/i18n/locales/zh-CN.ts
  20. 1 0
      frontend/src/i18n/locales/zh-TW.ts
  21. 3 1
      frontend/src/pages/spoolbuddy/SpoolBuddyWriteTagPage.tsx
  22. 0 0
      static/assets/AdditionalSection-37O86NZl.js
  23. 0 0
      static/assets/AdditionalSection-oqynIyS4.js
  24. 0 0
      static/assets/AmsUnitCard-CNVK4RRu.js
  25. 0 0
      static/assets/ArchivesPage-CmGmi94a.js
  26. 0 0
      static/assets/AreaChart-DkPCKOxM.js
  27. 0 0
      static/assets/AssignToAmsModal-Bela8YWk.js
  28. 0 0
      static/assets/AuthContext-Db9wjW6t.js
  29. 0 0
      static/assets/AuthContext-kGqbKbCL.js
  30. 1 1
      static/assets/Button-BWGu1oiu.js
  31. 0 0
      static/assets/CamWallPage-D7tgm-BJ.js
  32. 0 0
      static/assets/CameraDiagnoseModal-OOM7Cl5u.js
  33. 0 0
      static/assets/CameraPage-BJhhjHaZ.js
  34. 1 1
      static/assets/Card-BDKa9Xcj.js
  35. 0 0
      static/assets/CartesianChart-CkIcV5cK.js
  36. 0 0
      static/assets/ColumnConfigModal-D71tLKQM.js
  37. 0 0
      static/assets/ConfigureAmsSlotModal-DivWOG9_.js
  38. 0 0
      static/assets/ConfirmModal-HpxKA3FP.js
  39. 0 0
      static/assets/ConfirmModal-hUTo4339.js
  40. 0 0
      static/assets/ConfirmOutcomeDialog-pv4_J_2i.js
  41. 0 0
      static/assets/ConnectAuthorizePage-CXcnGX8W.js
  42. 0 0
      static/assets/ConnectionDiagnostic-B3aZLqUp.js
  43. 0 0
      static/assets/ConnectionDiagnostic-BYvKBjRf.js
  44. 0 0
      static/assets/ContextMenu-CtlCWqq2.js
  45. 0 0
      static/assets/CopyButton-VSZOp_cF.js
  46. 0 0
      static/assets/EmbeddedCameraViewer-Ceo_NZ1P.js
  47. 0 0
      static/assets/ErrorBarContext-CbMrxc0Z.js
  48. 0 0
      static/assets/ExternalLinkPage-CbzAXXd8.js
  49. 1 1
      static/assets/FilamentSwatch-AN4JnOMA.js
  50. 0 1
      static/assets/FileManagerPage-zud_CKHa.js
  51. 0 0
      static/assets/FileUploadModal-CcARUVyY.js
  52. 0 0
      static/assets/FinancePage-BUpFsnYe.js
  53. 0 0
      static/assets/FinancePage-D6niJjkh.js
  54. 0 0
      static/assets/GCodeViewerPage-rsdx8uri.js
  55. 0 0
      static/assets/GcodeToolpathViewer-CaKqX_YV.js
  56. 0 0
      static/assets/GroupEditPage-Bc48BAfK.js
  57. 0 0
      static/assets/GroupEditPage-ExNYzF1c.js
  58. 0 0
      static/assets/IconPicker-CzuoW1AK.js
  59. 0 0
      static/assets/ImagePreviewModal-BLl5jSxo.js
  60. 0 0
      static/assets/InventoryPage-CcJbN6RJ.js
  61. 0 0
      static/assets/InventoryPage-Cd0Qp_iO.js
  62. 0 0
      static/assets/Layout-C0Z7QNWF.js
  63. 0 0
      static/assets/Layout-Do5qTpzI.js
  64. 0 0
      static/assets/LibraryTrashPage-C_DhhL5a.js
  65. 0 0
      static/assets/LoginPage-BMXa_taB.js
  66. 0 0
      static/assets/MaintenancePage-Cz9KQeSY.js
  67. 0 0
      static/assets/MaintenancePage-m2wfcCzN.js
  68. 0 0
      static/assets/MergeDuplicatesModal-CKcBGrD-.js
  69. 0 0
      static/assets/MergeDuplicatesModal-CjHOxCkm.js
  70. 0 0
      static/assets/ModelSourcesPage-DMdM82N-.js
  71. 0 0
      static/assets/NotificationsPage-hgKMk09u.js
  72. 1 1
      static/assets/NumberInput-Ch9lKbOs.js
  73. 1 1
      static/assets/OverlayFrame-Co09Kvw_.js
  74. 0 0
      static/assets/PdfPreviewModal-O8QJoap4.js
  75. 0 0
      static/assets/PrintModal-BkBy1IO4.js
  76. 0 0
      static/assets/PrinterLocationsPage-B1AJ6RJ-.js
  77. 0 0
      static/assets/PrintersPage-CIHNCRzC.js
  78. 0 0
      static/assets/PrintersPage-DgogQ8tL.js
  79. 0 0
      static/assets/ProfilesPage-COEYFNy5.js
  80. 0 0
      static/assets/ProjectDetailPage-CqmadOek.js
  81. 0 0
      static/assets/ProjectsPage-pjIGWbnP.js
  82. 0 0
      static/assets/QueryClientProvider-DdZM8x2F.js
  83. 0 0
      static/assets/QueuePage-Zk8K-pM0.js
  84. 0 0
      static/assets/ReferenceLine-DORUTbT2.js
  85. 0 0
      static/assets/RichTextEditor-1NtUYuoH.js
  86. 0 0
      static/assets/SettingsPage-C4ZyHXUi.js
  87. 0 0
      static/assets/SettingsPage-CzpiMKmX.js
  88. 0 0
      static/assets/SetupPage-CGfD0dSL.js
  89. 0 0
      static/assets/SetupPage-Cj176561.js
  90. 0 0
      static/assets/SkipObjectsModal-M_-IOa_j.js
  91. 0 0
      static/assets/SliceModal-DXli5pCO.js
  92. 0 0
      static/assets/SpoolBuddyAmsPage-DYjjer3N.js
  93. 0 0
      static/assets/SpoolBuddyDashboard-CqovfO_5.js
  94. 0 0
      static/assets/SpoolBuddyInventoryPage-BTDgSIZS.js
  95. 1 0
      static/assets/SpoolBuddySettingsPage-Du4WmVDM.js
  96. 0 1
      static/assets/SpoolBuddySettingsPage-wYYR8BMM.js
  97. 0 0
      static/assets/SpoolBuddyWriteTagPage-B8WB6HPG.js
  98. 0 0
      static/assets/SpoolBuddyWriteTagPage-DS4LsSVX.js
  99. 1 1
      static/assets/SpoolIcon-D5P4psHM.js
  100. 0 0
      static/assets/SpreadsheetPreviewModal-zt7zVubP.js

+ 1 - 0
CHANGELOG.md

@@ -15,6 +15,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **Choose which printer an "Any model" job takes (#2915, requested by @bryanmahin, contributed by @Keybored02 in #3547)** — Several printers of a model can take an "Any model" job, and the one with the fewest print hours always got it. **Settings > Workflow > Printer Order for Any-Model Jobs** now chooses: the fewest print hours (the default, as before), the most (use up the machines near replacement first), the printer idle the longest (by its last finished print; one that never printed goes first), or the printers' own priority, a number in **Edit Printer** (lowest first, none last). The order only ranks printers that can take the job: a busy, offline or filament-short printer is still passed over, and preferred colours still come first. Powering a printer on with an Auto Power On plug follows the same order.
 
 ### Fixed
+- **A spool's slicer preset can be removed, and opening the field no longer loses its name (#3596, reported by @dertbv)** — the Slicer Preset field in the spool form had no way to remove a preset, so a configured spool could not go back to Stock, in an edit or a copy. Clicking into the field also emptied it, and saving then kept the preset but stored no name for it when the preset was not in the current list, for example a Bambu Cloud preset while the cloud list was unavailable. The spool then showed the raw preset code. The field now has a remove button, closing the list without picking shows the preset again, and text typed to search is never saved as the preset's name. The same applies to the SpoolBuddy write-tag page.
 - **The Slice dialog lists presets when a Bambu Cloud account has none of one type (#3593, reported by @KevinMidboe)** — Bambu Cloud answers "nothing here" for a preset type with an empty value instead of an empty list, for example on an account with no filament presets of its own. Bambuddy did not handle that, so with a Bambu Cloud sign-in on the Profiles page the Slice dialog showed "Failed to load presets" and offered no presets at all, local ones included, and the Profiles page's cloud list failed the same way. Such a type now reads as empty, and the presets the account does have are listed.
 - **Monitor-only MQTT plugs are no longer switched by automation (#3583, reported by @paulleonartcalvo)** — Bambuddy only listens to an MQTT plug, so it cannot turn one on or off, but its Auto On and Auto Off were on by default, hidden in the plug's settings, and every automation tried anyway. With an MQTT plug for metering and a switchable plug on the same printer, the queue could pick the MQTT plug to power the printer on, fail, and hold the job with "the smart plug could not power it on". A printer whose only plug was an MQTT plug counted as one the queue could switch on, so its job said "Offline" instead of that it has no Auto On plug. Auto-off at print end, "auto off after this job", auto-off after drying, plug schedules and the AI failure detection's power-off all logged a failed turn-off for it. All of them now leave MQTT plugs alone, and an auto-off still pending on one from an earlier version is cleared at startup. Home Assistant scripts linked to a printer still run at print start as before.
 - **An MQTT plug keeps a print's energy across midnight (#3582, reported by @paulleonartcalvo)** — A print's energy is what the plug's counter went up by between its start and its end, and an MQTT plug had one energy value that Bambuddy used as both today's and the lifetime counter. Many devices publish a daily counter there (Tasmota's `ENERGY.Today`), which drops back to zero at midnight: a print that ran past midnight came out negative and got no energy or energy cost, or ended above its start and silently lost everything before midnight. MQTT plugs now have an **Energy JSON Path (lifetime)** and its own multiplier, read from the energy topic, for the counter that never resets (Tasmota's `ENERGY.Total`, in the same message). With it set, per-print energy and cost use the lifetime counter, the plug feeds the hourly snapshots behind the Statistics date filters and the all-time total, and the energy summary under Settings > Smart Plugs counts it in the lifetime total. A topic with only the lifetime counter still gets a Today, worked out from the snapshots. Without it, a plug reads its one energy value as before, so nothing changes for a topic that already carries a lifetime counter. Translated in all locales; wiki updated. Covered by backend and frontend tests.

+ 161 - 0
frontend/src/__tests__/components/SpoolFormPresetField.test.tsx

@@ -0,0 +1,161 @@
+/**
+ * The Slicer Preset field of the spool form (#3596).
+ *
+ * The spool's preset is a Bambu Cloud one that is not in the list (the cloud
+ * list failed to load), so only the stored name can show it. Focusing the
+ * field and leaving it must keep that name, search text must never become the
+ * name, and the preset can be removed so the spool is Stock again.
+ */
+
+import React from 'react';
+import { describe, it, expect, vi, beforeEach } from 'vitest';
+import { screen, waitFor, fireEvent } from '@testing-library/react';
+import { render } from '../utils';
+import { SpoolFormModal } from '../../components/SpoolFormModal';
+import type { InventorySpool } from '../../api/client';
+
+vi.mock('../../api/client', () => ({
+  api: {
+    getSettings: vi.fn().mockResolvedValue({}),
+    getAuthStatus: vi.fn().mockResolvedValue({ auth_enabled: false }),
+    getCloudStatus: vi.fn().mockResolvedValue({ is_authenticated: false }),
+    orcaCloudStatus: vi.fn().mockResolvedValue({ connected: false }),
+    orcaCloudListProfiles: vi.fn().mockResolvedValue({ filament: [] }),
+    getFilamentPresets: vi.fn().mockResolvedValue([]),
+    getSpoolCatalog: vi.fn().mockResolvedValue([]),
+    getLocations: vi.fn().mockResolvedValue([]),
+    // Elegoo is only known for PLA here — the pairing that used to hide it
+    // from the brand list as soon as ASA was selected.
+    getColorCatalog: vi.fn().mockResolvedValue([
+      { manufacturer: 'Elegoo', color_name: 'Red', hex_color: 'FF0000', material: 'PLA' },
+      { manufacturer: 'Polymaker', color_name: 'Blue', hex_color: '0000FF', material: 'ASA' },
+    ]),
+    getLocalPresets: vi.fn().mockResolvedValue({ filament: [] }),
+    getBuiltinFilaments: vi.fn().mockResolvedValue([
+      { filament_id: 'GFA05', name: 'Generic ASA' },
+    ]),
+    getPrinters: vi.fn().mockResolvedValue([]),
+    getPrinterStatus: vi.fn().mockResolvedValue(null),
+    getSpoolUsageHistory: vi.fn().mockResolvedValue([]),
+    createSpool: vi.fn().mockResolvedValue({ id: 99 }),
+    updateSpool: vi.fn().mockResolvedValue({ id: 7 }),
+    saveSpoolKProfiles: vi.fn().mockResolvedValue([]),
+    getSpoolFilamentPresets: vi.fn().mockResolvedValue([]),
+    saveSpoolFilamentPresets: vi.fn().mockResolvedValue([]),
+    getSpoolmanFilamentPresets: vi.fn().mockResolvedValue([]),
+    saveSpoolmanFilamentPresets: vi.fn().mockResolvedValue([]),
+    getSpoolmanInventoryFilaments: vi.fn().mockResolvedValue([]),
+    getAssignments: vi.fn().mockResolvedValue([]),
+    unassignSpool: vi.fn().mockResolvedValue({}),
+  },
+  ApiError: class ApiError extends Error {
+    status: number;
+    constructor(message: string, status: number) {
+      super(message);
+      this.status = status;
+    }
+  },
+}));
+
+const mockShowToast = vi.fn();
+vi.mock('../../contexts/ToastContext', async (importOriginal) => {
+  const actual = await importOriginal<typeof import('../../contexts/ToastContext')>();
+  return {
+    ...actual,
+    useToast: () => ({ showToast: mockShowToast }),
+  };
+});
+
+import { api } from '../../api/client';
+
+const presetSpool: InventorySpool = {
+  id: 7,
+  material: 'PLA',
+  subtype: null,
+  brand: null,
+  color_name: null,
+  rgba: '808080FF',
+  extra_colors: null,
+  effect_type: null,
+  label_weight: 1000,
+  core_weight: 250,
+  core_weight_catalog_id: null,
+  weight_used: 0,
+  slicer_filament: 'P90fd24f',
+  slicer_filament_name: 'My PLA',
+  nozzle_temp_min: null,
+  nozzle_temp_max: null,
+  note: null,
+  added_full: null,
+  last_used: null,
+  encode_time: null,
+  tag_uid: null,
+  tray_uuid: null,
+  data_origin: null,
+  tag_type: null,
+  archived_at: null,
+  created_at: '2025-01-01T00:00:00Z',
+  updated_at: '2025-01-01T00:00:00Z',
+  k_profiles: [],
+} as unknown as InventorySpool;
+
+function openForm(mode: 'edit' | 'copy') {
+  render(<SpoolFormModal isOpen={true} onClose={vi.fn()} spool={presetSpool} mode={mode} currencySymbol="$" />);
+}
+
+const presetField = () => screen.getByPlaceholderText('Search filament presets...');
+
+function sentPreset(mode: 'edit' | 'copy') {
+  const data =
+    mode === 'edit'
+      ? vi.mocked(api.updateSpool).mock.calls[0][1]
+      : vi.mocked(api.createSpool).mock.calls[0][0];
+  const { slicer_filament, slicer_filament_name } = data as Record<string, unknown>;
+  return { slicer_filament, slicer_filament_name };
+}
+
+describe('SpoolFormModal slicer preset field (#3596)', () => {
+  beforeEach(() => {
+    vi.clearAllMocks();
+  });
+
+  it('keeps the preset and its name when the field is opened and left', async () => {
+    openForm('edit');
+    await waitFor(() => expect(presetField()).toHaveValue('My PLA'));
+
+    fireEvent.focus(presetField());
+    expect(presetField()).toHaveValue('');
+    fireEvent.mouseDown(document.body);
+    expect(presetField()).toHaveValue('My PLA');
+
+    fireEvent.click(screen.getByRole('button', { name: /save/i }));
+    await waitFor(() => expect(api.updateSpool).toHaveBeenCalled());
+    expect(sentPreset('edit')).toEqual({ slicer_filament: 'P90fd24f', slicer_filament_name: 'My PLA' });
+  });
+
+  it('does not save typed search text as the preset name', async () => {
+    openForm('edit');
+    await waitFor(() => expect(presetField()).toHaveValue('My PLA'));
+
+    fireEvent.focus(presetField());
+    fireEvent.change(presetField(), { target: { value: 'Generic' } });
+    fireEvent.mouseDown(document.body);
+
+    fireEvent.click(screen.getByRole('button', { name: /save/i }));
+    await waitFor(() => expect(api.updateSpool).toHaveBeenCalled());
+    expect(sentPreset('edit')).toEqual({ slicer_filament: 'P90fd24f', slicer_filament_name: 'My PLA' });
+  });
+
+  it.each(['edit', 'copy'] as const)('removes the preset in %s, so the spool is Stock', async (mode) => {
+    openForm(mode);
+    await waitFor(() => expect(presetField()).toHaveValue('My PLA'));
+
+    fireEvent.click(screen.getByRole('button', { name: 'Remove preset' }));
+    expect(presetField()).toHaveValue('');
+    expect(screen.queryByRole('button', { name: 'Remove preset' })).not.toBeInTheDocument();
+
+    fireEvent.click(screen.getByRole('button', { name: mode === 'edit' ? /save/i : 'Copy Spool' }));
+    await waitFor(() => expect(mode === 'edit' ? api.updateSpool : api.createSpool).toHaveBeenCalled());
+    expect(sentPreset(mode)).toEqual({ slicer_filament: null, slicer_filament_name: null });
+  });
+});

+ 4 - 2
frontend/src/components/SpoolFormModal.tsx

@@ -1120,8 +1120,10 @@ export function SpoolFormModal({
       return;
     }
 
-    // Find preset name from selected option
-    const presetName = selectedPresetOption?.displayName || presetInputValue || null;
+    // The chosen preset's name; none without a preset (#3596).
+    const presetName = formData.slicer_filament
+      ? selectedPresetOption?.displayName || presetInputValue || null
+      : null;
 
     const data: Record<string, unknown> = {
       material: formData.material || null,

+ 31 - 8
frontend/src/components/spool-form/FilamentSection.tsx

@@ -1,5 +1,5 @@
 import { useState, useRef, useEffect, useMemo } from 'react';
-import { Search, Loader2, ChevronDown, Cloud, CloudOff } from 'lucide-react';
+import { Search, Loader2, ChevronDown, Cloud, CloudOff, X } from 'lucide-react';
 import { useTranslation } from 'react-i18next';
 import type { FilamentSectionProps, FilamentOption } from './types';
 import { KNOWN_VARIANTS } from './constants';
@@ -52,6 +52,11 @@ export function FilamentSection({
 }: FilamentSectionProps) {
   const { t } = useTranslation();
   const [presetDropdownOpen, setPresetDropdownOpen] = useState(false);
+  // What is typed into the open preset list. Kept apart from presetInputValue,
+  // which is the chosen preset's name and is what gets saved: closing the list
+  // without picking shows that name again, and search text never becomes the
+  // name (#3596).
+  const [presetSearch, setPresetSearch] = useState('');
   const [brandDropdownOpen, setBrandDropdownOpen] = useState(false);
   const [subtypeDropdownOpen, setSubtypeDropdownOpen] = useState(false);
   const [materialDropdownOpen, setMaterialDropdownOpen] = useState(false);
@@ -91,13 +96,13 @@ export function FilamentSection({
 
   // Filtered presets based on search
   const filteredPresets = useMemo(() => {
-    if (!presetInputValue) return filamentOptions;
-    const search = presetInputValue.toLowerCase();
+    if (!presetSearch) return filamentOptions;
+    const search = presetSearch.toLowerCase();
     return filamentOptions.filter(o =>
       o.displayName.toLowerCase().includes(search) ||
       o.code.toLowerCase().includes(search),
     );
-  }, [filamentOptions, presetInputValue]);
+  }, [filamentOptions, presetSearch]);
 
   // Filtered brands
   const filteredBrands = useMemo(() => {
@@ -155,6 +160,7 @@ export function FilamentSection({
     updateField('slicer_filament', option.code);
     setPresetInputValue(option.displayName);
     setPresetDropdownOpen(false);
+    setPresetSearch('');
 
     // Auto-fill material, brand and subtype from the preset name — but only
     // where the value is still empty or was itself put there by the previously
@@ -249,18 +255,35 @@ export function FilamentSection({
             <Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-bambu-gray/50 pointer-events-none" />
             <input
               type="text"
-              className="w-full pl-9 pr-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white text-sm placeholder:text-bambu-gray/50 focus:outline-none focus:border-bambu-green"
+              className={`w-full pl-9 ${formData.slicer_filament ? 'pr-9' : 'pr-3'} py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white text-sm placeholder:text-bambu-gray/50 focus:outline-none focus:border-bambu-green`}
               placeholder={t('inventory.searchPresets')}
-              value={presetInputValue}
+              value={presetDropdownOpen ? presetSearch : presetInputValue}
               onChange={(e) => {
-                setPresetInputValue(e.target.value);
+                setPresetSearch(e.target.value);
                 setPresetDropdownOpen(true);
               }}
               onFocus={() => {
                 setPresetDropdownOpen(true);
-                setPresetInputValue('');
+                setPresetSearch('');
               }}
             />
+            {/* Removing the preset is how a spool goes back to Stock (#3596). */}
+            {formData.slicer_filament && (
+              <button
+                type="button"
+                className="absolute right-2 top-1/2 -translate-y-1/2 p-1 text-bambu-gray hover:text-white"
+                title={t('inventory.clearPreset')}
+                aria-label={t('inventory.clearPreset')}
+                onClick={() => {
+                  updateField('slicer_filament', '');
+                  setPresetInputValue('');
+                  setPresetSearch('');
+                  setPresetDropdownOpen(false);
+                }}
+              >
+                <X className="w-4 h-4" />
+              </button>
+            )}
             {presetDropdownOpen && (
               <div className="absolute z-50 w-full mt-1 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg shadow-lg max-h-64 overflow-y-auto">
                 {filteredPresets.length === 0 ? (

+ 1 - 0
frontend/src/i18n/locales/de.ts

@@ -5343,6 +5343,7 @@ export default {
     slicerFilamentName: 'Slicer-Preset-Name',
     slicerPreset: 'Slicer-Preset',
     searchPresets: 'Filament-Presets suchen...',
+    clearPreset: 'Preset entfernen',
     selectedPreset: 'Ausgewählt',
     noPresetsFound: 'Keine Presets gefunden',
     tempOverrides: 'Temperatur-Überschreibungen',

+ 1 - 0
frontend/src/i18n/locales/en.ts

@@ -5381,6 +5381,7 @@ export default {
     slicerFilamentName: 'Slicer Preset Name',
     slicerPreset: 'Slicer Preset',
     searchPresets: 'Search filament presets...',
+    clearPreset: 'Remove preset',
     selectedPreset: 'Selected',
     noPresetsFound: 'No presets found',
     tempOverrides: 'Temperature Overrides',

+ 1 - 0
frontend/src/i18n/locales/es.ts

@@ -5345,6 +5345,7 @@ export default {
     slicerFilamentName: 'Nombre del preajuste del laminador',
     slicerPreset: 'Preajuste del laminador',
     searchPresets: 'Buscar preajustes de filamento...',
+    clearPreset: 'Quitar preajuste',
     selectedPreset: 'Seleccionado',
     noPresetsFound: 'No se encontraron preajustes',
     tempOverrides: 'Anulaciones de temperatura',

+ 1 - 0
frontend/src/i18n/locales/fr.ts

@@ -5331,6 +5331,7 @@ export default {
     slicerFilamentName: 'Nom du Preset Slicer',
     slicerPreset: 'Preset Slicer',
     searchPresets: 'Chercher presets...',
+    clearPreset: 'Retirer le preset',
     selectedPreset: 'Sélectionné',
     noPresetsFound: 'Aucun preset trouvé',
     tempOverrides: 'Exceptions Température',

+ 1 - 0
frontend/src/i18n/locales/it.ts

@@ -5330,6 +5330,7 @@ export default {
     slicerFilamentName: 'Nome Preset Slicer',
     slicerPreset: 'Preset Slicer',
     searchPresets: 'Cerca preset filamento...',
+    clearPreset: 'Rimuovi preset',
     selectedPreset: 'Selezionato',
     noPresetsFound: 'Nessun preset trovato',
     tempOverrides: 'Override Temperatura',

+ 1 - 0
frontend/src/i18n/locales/ja.ts

@@ -5343,6 +5343,7 @@ export default {
     slicerFilamentName: 'スライサープリセット名',
     slicerPreset: 'スライサープリセット',
     searchPresets: 'フィラメントプリセットを検索...',
+    clearPreset: 'プリセットを解除',
     selectedPreset: '選択済み',
     noPresetsFound: 'プリセットが見つかりません',
     tempOverrides: '温度オーバーライド',

+ 1 - 0
frontend/src/i18n/locales/ko.ts

@@ -5131,6 +5131,7 @@ export default {
     slicerFilamentName: '슬라이서 프리셋 이름',
     slicerPreset: '슬라이서 프리셋',
     searchPresets: '필라멘트 프리셋 검색...',
+    clearPreset: '프리셋 제거',
     selectedPreset: '선택됨',
     noPresetsFound: '프리셋을 찾을 수 없음',
     tempOverrides: '온도 재정의',

+ 1 - 0
frontend/src/i18n/locales/nl.ts

@@ -5379,6 +5379,7 @@ export default {
     slicerFilamentName: 'Naam slicerpreset',
     slicerPreset: 'Slicer-preset',
     searchPresets: 'Filamentpresets zoeken...',
+    clearPreset: 'Preset verwijderen',
     selectedPreset: 'Geselecteerd',
     noPresetsFound: 'Geen presets gevonden',
     tempOverrides: 'Temperatuuroverschrijvingen',

+ 1 - 0
frontend/src/i18n/locales/pl.ts

@@ -5381,6 +5381,7 @@ export default {
     slicerFilamentName: 'Nazwa profilu slicera',
     slicerPreset: 'Profil slicera',
     searchPresets: 'Szukaj profili filamentu...',
+    clearPreset: 'Usuń profil',
     selectedPreset: 'Wybrany',
     noPresetsFound: 'Nie znaleziono profili',
     tempOverrides: 'Nadpisania temperatur',

+ 1 - 0
frontend/src/i18n/locales/pt-BR.ts

@@ -5330,6 +5330,7 @@ export default {
     slicerFilamentName: 'Nome do Predefinido do Fatiador',
     slicerPreset: 'Predefinido do Fatiador',
     searchPresets: 'Pesquisar predefinições de filamento...',
+    clearPreset: 'Remover predefinição',
     selectedPreset: 'Selecionado',
     noPresetsFound: 'Nenhuma predefinição encontrada',
     tempOverrides: 'Substituições de Temperatura',

+ 1 - 0
frontend/src/i18n/locales/ru.ts

@@ -5121,6 +5121,7 @@ export default {
     slicerFilamentName: "Название пресета слайсера",
     slicerPreset: "Пресет слайсера",
     searchPresets: "Поиск пресетов филамента…",
+    clearPreset: "Убрать пресет",
     selectedPreset: "Выбрано",
     noPresetsFound: "Пресеты не найдены",
     tempOverrides: "Переопределение температур",

+ 1 - 0
frontend/src/i18n/locales/sv.ts

@@ -5411,6 +5411,7 @@ errors: {
     slicerFilamentName: 'Slicer-förinställningsnamn',
     slicerPreset: 'Slicer-förinställning',
     searchPresets: 'Sök filamentförinställningar...',
+    clearPreset: 'Ta bort förinställning',
     selectedPreset: 'Vald',
     noPresetsFound: 'Inga förinställningar hittade',
     tempOverrides: 'Temperaturåsidosättningar',

+ 1 - 0
frontend/src/i18n/locales/tr.ts

@@ -5332,6 +5332,7 @@ export default {
     slicerFilamentName: 'Dilimleyici Ön Ayar Adı',
     slicerPreset: 'Dilimleyici Ön Ayarı',
     searchPresets: 'Filament ön ayarlarında ara...',
+    clearPreset: 'Ön ayarı kaldır',
     selectedPreset: 'Seçildi',
     noPresetsFound: 'Ön ayar bulunamadı',
     tempOverrides: 'Sıcaklık Geçersiz Kılmaları',

+ 1 - 0
frontend/src/i18n/locales/uk.ts

@@ -5375,6 +5375,7 @@ export default {
     slicerFilamentName: "Назва профілю слайсера",
     slicerPreset: "Попереднє налаштування слайсера",
     searchPresets: "Шукати профілі філаменту...",
+    clearPreset: "Прибрати профіль",
     selectedPreset: "Вибране",
     noPresetsFound: "Попередніх налаштувань не знайдено",
     tempOverrides: "Перевизначення температури",

+ 1 - 0
frontend/src/i18n/locales/zh-CN.ts

@@ -5330,6 +5330,7 @@ export default {
     slicerFilamentName: '切片预设名称',
     slicerPreset: '切片预设',
     searchPresets: '搜索耗材预设...',
+    clearPreset: '移除预设',
     selectedPreset: '已选择',
     noPresetsFound: '未找到预设',
     tempOverrides: '温度覆盖',

+ 1 - 0
frontend/src/i18n/locales/zh-TW.ts

@@ -5330,6 +5330,7 @@ export default {
     slicerFilamentName: '切片預設名稱',
     slicerPreset: '切片預設',
     searchPresets: '搜尋耗材預設...',
+    clearPreset: '移除預設',
     selectedPreset: '已選擇',
     noPresetsFound: '未找到預設',
     tempOverrides: '溫度覆蓋',

+ 3 - 1
frontend/src/pages/spoolbuddy/SpoolBuddyWriteTagPage.tsx

@@ -805,7 +805,9 @@ function NewSpoolTouchForm({ currencySymbol, onCreated, selectedSpool, spoolmanM
       return;
     }
 
-    const presetName = selectedPresetOption?.displayName || presetInputValue || null;
+    const presetName = formData.slicer_filament
+      ? selectedPresetOption?.displayName || presetInputValue || null
+      : null;
     const payload: Record<string, unknown> = {
       material: formData.material,
       subtype: formData.subtype || null,

File diff suppressed because it is too large
+ 0 - 0
static/assets/AdditionalSection-37O86NZl.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/AdditionalSection-oqynIyS4.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/AmsUnitCard-CNVK4RRu.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ArchivesPage-CmGmi94a.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/AreaChart-DkPCKOxM.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/AssignToAmsModal-Bela8YWk.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/AuthContext-Db9wjW6t.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/AuthContext-kGqbKbCL.js


+ 1 - 1
static/assets/Button-Dk615dwb.js → static/assets/Button-BWGu1oiu.js

@@ -1 +1 @@
-import{w as e}from"./client-MyvT0tak.js";var t=e();function n({variant:e=`primary`,size:n=`md`,className:r=``,children:i,...a}){return(0,t.jsx)(`button`,{className:`inline-flex items-center justify-center font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-bambu-dark disabled:opacity-50 disabled:cursor-not-allowed ${{primary:`bg-bambu-green hover:bg-bambu-green-light text-white focus:ring-bambu-green`,secondary:`bg-bambu-dark-tertiary hover:bg-bambu-gray-dark text-white focus:ring-bambu-gray`,danger:`bg-red-600 hover:bg-red-700 text-white focus:ring-red-500`,ghost:`bg-transparent hover:bg-bambu-dark-tertiary text-bambu-gray-light hover:text-white`}[e]} ${{sm:`px-3 py-1.5 text-sm gap-1.5 min-h-[44px] md:min-h-0`,md:`px-4 py-2 text-sm gap-2 min-h-[44px] md:min-h-0`,lg:`px-6 py-3 text-base gap-2 min-h-[48px] md:min-h-0`}[n]} ${r}`,...a,children:i})}export{n as t};
+import{T as e}from"./client-CI_mRuxq.js";var t=e();function n({variant:e=`primary`,size:n=`md`,className:r=``,children:i,...a}){return(0,t.jsx)(`button`,{className:`inline-flex items-center justify-center font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-bambu-dark disabled:opacity-50 disabled:cursor-not-allowed ${{primary:`bg-bambu-green hover:bg-bambu-green-light text-white focus:ring-bambu-green`,secondary:`bg-bambu-dark-tertiary hover:bg-bambu-gray-dark text-white focus:ring-bambu-gray`,danger:`bg-red-600 hover:bg-red-700 text-white focus:ring-red-500`,ghost:`bg-transparent hover:bg-bambu-dark-tertiary text-bambu-gray-light hover:text-white`}[e]} ${{sm:`px-3 py-1.5 text-sm gap-1.5 min-h-[44px] md:min-h-0`,md:`px-4 py-2 text-sm gap-2 min-h-[44px] md:min-h-0`,lg:`px-6 py-3 text-base gap-2 min-h-[48px] md:min-h-0`}[n]} ${r}`,...a,children:i})}export{n as t};

File diff suppressed because it is too large
+ 0 - 0
static/assets/CamWallPage-D7tgm-BJ.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/CameraDiagnoseModal-OOM7Cl5u.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/CameraPage-BJhhjHaZ.js


+ 1 - 1
static/assets/Card-D08KwdrO.js → static/assets/Card-BDKa9Xcj.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-MyvT0tak.js";var r=e(t(),1),i=n(),a=(0,r.createContext)(`normal`);function o({density:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s({children:e,className:t=``,onClick:n,onContextMenu:r,...a}){return(0,i.jsx)(`div`,{className:`bg-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary card-shadow ${n?`cursor-pointer`:``} ${t}`,onClick:n,onContextMenu:r,...a,children:e})}function c({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`px-4 py-2.5`:`px-6 py-4`} border-b border-bambu-dark-tertiary ${t}`,children:e})}function l({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`p-4`:`p-6`} ${t}`,children:e})}export{c as i,l as n,o as r,s as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{A as t,T as n}from"./client-CI_mRuxq.js";var r=e(t(),1),i=n(),a=(0,r.createContext)(`normal`);function o({density:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s({children:e,className:t=``,onClick:n,onContextMenu:r,...a}){return(0,i.jsx)(`div`,{className:`bg-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary card-shadow ${n?`cursor-pointer`:``} ${t}`,onClick:n,onContextMenu:r,...a,children:e})}function c({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`px-4 py-2.5`:`px-6 py-4`} border-b border-bambu-dark-tertiary ${t}`,children:e})}function l({children:e,className:t=``,dense:n}){let o=(0,r.useContext)(a)===`dense`;return(0,i.jsx)(`div`,{className:`${n??o?`p-4`:`p-6`} ${t}`,children:e})}export{c as i,l as n,o as r,s as t};

File diff suppressed because it is too large
+ 0 - 0
static/assets/CartesianChart-CkIcV5cK.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ColumnConfigModal-D71tLKQM.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ConfigureAmsSlotModal-DivWOG9_.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ConfirmModal-HpxKA3FP.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ConfirmModal-hUTo4339.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ConfirmOutcomeDialog-pv4_J_2i.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ConnectAuthorizePage-CXcnGX8W.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ConnectionDiagnostic-B3aZLqUp.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ConnectionDiagnostic-BYvKBjRf.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ContextMenu-CtlCWqq2.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/CopyButton-VSZOp_cF.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/EmbeddedCameraViewer-Ceo_NZ1P.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ErrorBarContext-CbMrxc0Z.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ExternalLinkPage-CbzAXXd8.js


+ 1 - 1
static/assets/FilamentSwatch-CjUd2OuH.js → static/assets/FilamentSwatch-AN4JnOMA.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-MyvT0tak.js";import{n as r,r as i}from"./filamentSwatchHelpers-C3r5m07g.js";var a=e(t(),1),o=n();function s({rgba:e,extraColors:t,effectType:n,subtype:s,className:c=`w-5 h-5`,shape:l=`circle`,style:u,title:d,effectSize:f}){let p=(0,a.useMemo)(()=>i(t),[t]),m=(0,a.useMemo)(()=>r({effectSize:f,rgba:e,extraColors:t,effectType:n,subtype:s}),[f,e,t,n,s]),h=m.backgroundImage,g=m.backgroundSize,_=l===`circle`||l===`pill`?`rounded-full`:`rounded`,v=(()=>{if(!e)return;let t=e.replace(/^#/,``);return t.length>=8&&t.substring(6,8).toLowerCase()!==`ff`?`#${t.substring(0,8)}`:`#${t.substring(0,6)}`})(),y=d??(p.length>0?p.join(`, `):v);return(0,o.jsx)(`span`,{"data-testid":`filament-swatch`,className:`${c} ${_} border border-black/20 inline-block flex-shrink-0`,style:{backgroundImage:h,backgroundSize:g,...u},title:y})}export{s as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{A as t,T as n}from"./client-CI_mRuxq.js";import{n as r,r as i}from"./filamentSwatchHelpers-C3r5m07g.js";var a=e(t(),1),o=n();function s({rgba:e,extraColors:t,effectType:n,subtype:s,className:c=`w-5 h-5`,shape:l=`circle`,style:u,title:d,effectSize:f}){let p=(0,a.useMemo)(()=>i(t),[t]),m=(0,a.useMemo)(()=>r({effectSize:f,rgba:e,extraColors:t,effectType:n,subtype:s}),[f,e,t,n,s]),h=m.backgroundImage,g=m.backgroundSize,_=l===`circle`||l===`pill`?`rounded-full`:`rounded`,v=(()=>{if(!e)return;let t=e.replace(/^#/,``);return t.length>=8&&t.substring(6,8).toLowerCase()!==`ff`?`#${t.substring(0,8)}`:`#${t.substring(0,6)}`})(),y=d??(p.length>0?p.join(`, `):v);return(0,o.jsx)(`span`,{"data-testid":`filament-swatch`,className:`${c} ${_} border border-black/20 inline-block flex-shrink-0`,style:{backgroundImage:h,backgroundSize:g,...u},title:y})}export{s as t};

File diff suppressed because it is too large
+ 0 - 1
static/assets/FileManagerPage-zud_CKHa.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/FileUploadModal-CcARUVyY.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/FinancePage-BUpFsnYe.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/FinancePage-D6niJjkh.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/GCodeViewerPage-rsdx8uri.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/GcodeToolpathViewer-CaKqX_YV.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/GroupEditPage-Bc48BAfK.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/GroupEditPage-ExNYzF1c.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/IconPicker-CzuoW1AK.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ImagePreviewModal-BLl5jSxo.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/InventoryPage-CcJbN6RJ.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/InventoryPage-Cd0Qp_iO.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/Layout-C0Z7QNWF.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/Layout-Do5qTpzI.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/LibraryTrashPage-C_DhhL5a.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/LoginPage-BMXa_taB.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/MaintenancePage-Cz9KQeSY.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/MaintenancePage-m2wfcCzN.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/MergeDuplicatesModal-CKcBGrD-.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/MergeDuplicatesModal-CjHOxCkm.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ModelSourcesPage-DMdM82N-.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/NotificationsPage-hgKMk09u.js


+ 1 - 1
static/assets/NumberInput-Dpt1IWQn.js → static/assets/NumberInput-Ch9lKbOs.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-MyvT0tak.js";var r=e(t(),1),i=n();function a({value:e,onChange:t,min:n,max:a,integer:o=!0,fallback:s,onBlur:c,...l}){let[u,d]=(0,r.useState)(null),f=e=>o?parseInt(e,10):parseFloat(e),p=e=>(n===void 0||e>=n)&&(a===void 0||e<=a),m=e=>Math.min(a??1/0,Math.max(n??-1/0,e));return(0,i.jsx)(`input`,{...l,type:`number`,min:n,max:a,value:u??e??``,onChange:n=>{let r=n.target.value;d(r);let i=f(r);!Number.isNaN(i)&&p(i)&&i!==e&&t(i)},onBlur:n=>{if(u!==null){let n=f(u),r=Number.isNaN(n)?s:n;r!==void 0&&m(r)!==e&&t(m(r)),d(null)}c?.(n)}})}export{a as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{A as t,T as n}from"./client-CI_mRuxq.js";var r=e(t(),1),i=n();function a({value:e,onChange:t,min:n,max:a,integer:o=!0,fallback:s,onBlur:c,...l}){let[u,d]=(0,r.useState)(null),f=e=>o?parseInt(e,10):parseFloat(e),p=e=>(n===void 0||e>=n)&&(a===void 0||e<=a),m=e=>Math.min(a??1/0,Math.max(n??-1/0,e));return(0,i.jsx)(`input`,{...l,type:`number`,min:n,max:a,value:u??e??``,onChange:n=>{let r=n.target.value;d(r);let i=f(r);!Number.isNaN(i)&&p(i)&&i!==e&&t(i)},onBlur:n=>{if(u!==null){let n=f(u),r=Number.isNaN(n)?s:n;r!==void 0&&m(r)!==e&&t(m(r)),d(null)}c?.(n)}})}export{a as t};

+ 1 - 1
static/assets/OverlayFrame-DKqJYLlo.js → static/assets/OverlayFrame-Co09Kvw_.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,k as n,w as r}from"./client-MyvT0tak.js";var i=e(n(),1);function a(e,n=null,r=0){let[a,o]=(0,i.useState)(null);return(0,i.useEffect)(()=>{if(!e)return;let i=new AbortController,a;return t.getOverlayLogo(n,i.signal).then(e=>{i.signal.aborted||(e?(a=URL.createObjectURL(e),o({url:a,token:n,revision:r})):o(null))}).catch(()=>{i.signal.aborted||o(null)}),()=>{i.abort(),a&&URL.revokeObjectURL(a)}},[e,n,r]),e&&a?.token===n&&a.revision===r?a.url:null}var o={logo:!1,logoRevision:0,from:``,to:``};function s(e){return/^#[0-9a-f]{6}$/i.test(e)}function c(e,t){return e&&t&&s(e)&&s(t)?`linear-gradient(to right, ${e}, ${t})`:void 0}function l(e){if(e)return{backgroundImage:e,backgroundClip:`text`,WebkitBackgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`}}var u={landscape:{width:1920,height:1080},portrait:{width:1080,height:1920}},d=r();function f({layout:e,preview:t=!1,children:n}){let r=(0,i.useRef)(null),[a,o]=(0,i.useState)(0),{width:s,height:c}=u[e];(0,i.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>o(Math.min(e.clientWidth/s,e.clientHeight/c));if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[s,c]);let l={width:s,height:c,"--overlay-vmin":`10.8px`,"--overlay-height":`${c}px`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(${a})`,transformOrigin:`center`};return(0,d.jsx)(`div`,{ref:r,className:t?`relative w-full overflow-hidden`:`fixed inset-0 overflow-hidden`,style:t?{aspectRatio:`${s} / ${c}`}:void 0,children:(0,d.jsx)(`div`,{style:l,children:n})})}export{c as a,s as i,u as n,l as o,o as r,a as s,f as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{A as t,T as n,o as r}from"./client-CI_mRuxq.js";var i=e(t(),1);function a(e,t=null,n=0){let[a,o]=(0,i.useState)(null);return(0,i.useEffect)(()=>{if(!e)return;let i=new AbortController,a;return r.getOverlayLogo(t,i.signal).then(e=>{i.signal.aborted||(e?(a=URL.createObjectURL(e),o({url:a,token:t,revision:n})):o(null))}).catch(()=>{i.signal.aborted||o(null)}),()=>{i.abort(),a&&URL.revokeObjectURL(a)}},[e,t,n]),e&&a?.token===t&&a.revision===n?a.url:null}var o={logo:!1,logoRevision:0,from:``,to:``};function s(e){return/^#[0-9a-f]{6}$/i.test(e)}function c(e,t){return e&&t&&s(e)&&s(t)?`linear-gradient(to right, ${e}, ${t})`:void 0}function l(e){if(e)return{backgroundImage:e,backgroundClip:`text`,WebkitBackgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`}}var u={landscape:{width:1920,height:1080},portrait:{width:1080,height:1920}},d=n();function f({layout:e,preview:t=!1,children:n}){let r=(0,i.useRef)(null),[a,o]=(0,i.useState)(0),{width:s,height:c}=u[e];(0,i.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>o(Math.min(e.clientWidth/s,e.clientHeight/c));if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[s,c]);let l={width:s,height:c,"--overlay-vmin":`10.8px`,"--overlay-height":`${c}px`,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%) scale(${a})`,transformOrigin:`center`};return(0,d.jsx)(`div`,{ref:r,className:t?`relative w-full overflow-hidden`:`fixed inset-0 overflow-hidden`,style:t?{aspectRatio:`${s} / ${c}`}:void 0,children:(0,d.jsx)(`div`,{style:l,children:n})})}export{c as a,s as i,u as n,l as o,o as r,a as s,f as t};

File diff suppressed because it is too large
+ 0 - 0
static/assets/PdfPreviewModal-O8QJoap4.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/PrintModal-BkBy1IO4.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/PrinterLocationsPage-B1AJ6RJ-.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/PrintersPage-CIHNCRzC.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/PrintersPage-DgogQ8tL.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ProfilesPage-COEYFNy5.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ProjectDetailPage-CqmadOek.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ProjectsPage-pjIGWbnP.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/QueryClientProvider-DdZM8x2F.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/QueuePage-Zk8K-pM0.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/ReferenceLine-DORUTbT2.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/RichTextEditor-1NtUYuoH.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SettingsPage-C4ZyHXUi.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SettingsPage-CzpiMKmX.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SetupPage-CGfD0dSL.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SetupPage-Cj176561.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SkipObjectsModal-M_-IOa_j.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SliceModal-DXli5pCO.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SpoolBuddyAmsPage-DYjjer3N.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SpoolBuddyDashboard-CqovfO_5.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SpoolBuddyInventoryPage-BTDgSIZS.js


File diff suppressed because it is too large
+ 1 - 0
static/assets/SpoolBuddySettingsPage-Du4WmVDM.js


File diff suppressed because it is too large
+ 0 - 1
static/assets/SpoolBuddySettingsPage-wYYR8BMM.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SpoolBuddyWriteTagPage-B8WB6HPG.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/SpoolBuddyWriteTagPage-DS4LsSVX.js


+ 1 - 1
static/assets/SpoolIcon-Cp29egKy.js → static/assets/SpoolIcon-D5P4psHM.js

@@ -1 +1 @@
-import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{k as t,w as n}from"./client-MyvT0tak.js";import{n as r}from"./filamentSwatchHelpers-C3r5m07g.js";import{t as i}from"./spoolPaint-Imx_KAjK.js";var a=e(t(),1),o=n();function s({spool:e,inset:t,size:n,border:i}){let s=n>=80?`card`:`preview`,c=(0,a.useMemo)(()=>r({effectSize:s,rgba:e.rgba,extraColors:e.extra_colors,effectType:e.effect_type,subtype:e.subtype}),[s,e.rgba,e.extra_colors,e.effect_type,e.subtype]),l=`${t*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-paint`,className:`absolute rounded-full box-border`,style:{top:l,left:l,right:l,bottom:l,...c,backgroundPosition:`center`,border:i}})}function c({inset:e}){let t=`${e*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-shade`,className:`absolute rounded-full`,style:{top:t,left:t,right:t,bottom:t,backgroundColor:`rgba(0, 0, 0, 0.15)`}})}function l({color:e,isEmpty:t,size:n=32,spool:r}){return t?(0,o.jsx)(`div`,{className:`rounded-full border-2 border-dashed border-zinc-500 flex items-center justify-center`,style:{width:n,height:n},children:(0,o.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-zinc-600`})}):i(r)?(0,o.jsxs)(`div`,{className:`relative shrink-0`,style:{width:n,height:n},children:[(0,o.jsx)(s,{spool:r,size:n,inset:2/32,border:`${1.5*n/32}px solid rgba(255, 255, 255, 0.7)`}),(0,o.jsx)(c,{inset:5/32})]}):(0,o.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 32 32`,children:[(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`14`,fill:e,stroke:`white`,strokeWidth:`1.5`,strokeOpacity:`0.7`}),(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`11`,fill:e,style:{filter:`brightness(0.85)`}})]})}export{s as n,c as r,l as t};
+import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{A as t,T as n}from"./client-CI_mRuxq.js";import{n as r}from"./filamentSwatchHelpers-C3r5m07g.js";import{t as i}from"./spoolPaint-Imx_KAjK.js";var a=e(t(),1),o=n();function s({spool:e,inset:t,size:n,border:i}){let s=n>=80?`card`:`preview`,c=(0,a.useMemo)(()=>r({effectSize:s,rgba:e.rgba,extraColors:e.extra_colors,effectType:e.effect_type,subtype:e.subtype}),[s,e.rgba,e.extra_colors,e.effect_type,e.subtype]),l=`${t*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-paint`,className:`absolute rounded-full box-border`,style:{top:l,left:l,right:l,bottom:l,...c,backgroundPosition:`center`,border:i}})}function c({inset:e}){let t=`${e*100}%`;return(0,o.jsx)(`div`,{"data-testid":`spool-shade`,className:`absolute rounded-full`,style:{top:t,left:t,right:t,bottom:t,backgroundColor:`rgba(0, 0, 0, 0.15)`}})}function l({color:e,isEmpty:t,size:n=32,spool:r}){return t?(0,o.jsx)(`div`,{className:`rounded-full border-2 border-dashed border-zinc-500 flex items-center justify-center`,style:{width:n,height:n},children:(0,o.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-zinc-600`})}):i(r)?(0,o.jsxs)(`div`,{className:`relative shrink-0`,style:{width:n,height:n},children:[(0,o.jsx)(s,{spool:r,size:n,inset:2/32,border:`${1.5*n/32}px solid rgba(255, 255, 255, 0.7)`}),(0,o.jsx)(c,{inset:5/32})]}):(0,o.jsxs)(`svg`,{width:n,height:n,viewBox:`0 0 32 32`,children:[(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`14`,fill:e,stroke:`white`,strokeWidth:`1.5`,strokeOpacity:`0.7`}),(0,o.jsx)(`circle`,{cx:`16`,cy:`16`,r:`11`,fill:e,style:{filter:`brightness(0.85)`}})]})}export{s as n,c as r,l as t};

File diff suppressed because it is too large
+ 0 - 0
static/assets/SpreadsheetPreviewModal-zt7zVubP.js


Some files were not shown because too many files changed in this diff