@arcforgelabs/flow 2026.10.34 → 2026.10.36

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.
@@ -11,6 +11,7 @@ import { themeStylesheet } from '../theme/themes.js';
11
11
  // /assets/theme/<file>.js the theme engine itself, as browser modules
12
12
  // /assets/ui/<file> Flow's components (flow.css) and page scripts
13
13
  // /assets/fonts/<pkg>/… the families' faces (server/theme/font-families.js)
14
+ // /assets/icons/<name>.svg one Lucide icon (lucide-static, ISC), for any page
14
15
  // Only the files named here are served. They change only with a release, so
15
16
  // browsers may keep them for an hour.
16
17
 
@@ -20,7 +21,9 @@ const themeDir = join(here, '..', 'theme');
20
21
  const logoDir = join(here, 'logos');
21
22
  const LOGO_FILES = new Set(['xero.svg', 'seazona.svg', 'sentry.svg']);
22
23
  const THEME_FILES = new Set(['themes.js', 'color-contrast.js', 'openclaw-palettes.js', 'font-families.js']);
23
- const UI_FILES = new Set(['flow.css', 'appearance.js', 'clerk-appearance.js', 'app.js', 'invoicing.js', 'invoice-notes.js', 'invoicing-settings.js', 'automations.js', 'invoice-rules.js', 'line-mappings.js', 'price-list.js', 'custom-fields.js', 'jobs.js', 'job-board.js', 'monitoring.js', 'search.js', 'alerts.js', 'flow-mark.svg']);
24
+ const UI_FILES = new Set(['flow.css', 'appearance.js', 'clerk-appearance.js', 'app.js', 'invoicing.js', 'invoice-notes.js', 'job-change.js', 'invoicing-settings.js', 'automations.js', 'invoice-rules.js', 'line-mappings.js', 'price-list.js', 'custom-fields.js', 'jobs.js', 'job-board.js', 'job-view.js', 'monitoring.js', 'search.js', 'alerts.js', 'flow-mark.svg']);
25
+ const iconDir = join(dirname(require.resolve('lucide-static/package.json')), 'icons');
26
+ const ICON_FILE = /^[a-z0-9]+(?:-[a-z0-9]+)*\.svg$/;
24
27
  const MAX_AGE = '1h';
25
28
 
26
29
  // Send one named file from dir. Passing dir as root limits the dotfile check
@@ -49,6 +52,13 @@ export function createUiAssetsRouter({ rateLimitPerMinute = 600 } = {}) {
49
52
  // Each integration's logo, the maker's own mark (Integrations).
50
53
  router.get('/assets/ui/logos/:file', sendFrom(logoDir, LOGO_FILES));
51
54
 
55
+ // The whole Lucide set: a page names any icon, and only the icons a page
56
+ // uses are fetched. A name outside the set falls through to the 404.
57
+ router.get('/assets/icons/:file', (req, res, next) => {
58
+ if (!ICON_FILE.test(req.params.file)) return next();
59
+ sendNamed(res, next, iconDir, req.params.file);
60
+ });
61
+
52
62
  for (const name of FONT_PACKAGES) {
53
63
  const dir = dirname(require.resolve(`@fontsource-variable/${name}/LICENSE`));
54
64
  router.get(`/assets/fonts/${name}/index.css`, (_req, res, next) => sendNamed(res, next, dir, 'index.css'));