mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-11-04 04:44:31 +01:00 
			
		
		
		
	feat: include frame names in canvas searches (#9484)
* fix frame name clipping on zooming * include assistant font * default frame name * extend search to frame names * add a simple test * collpase search match items * id check out of loop * fix frame name check * include focusedId for small perf improvement * optionally show and hide collapse icon * update section title * fix tests * rename `serverSide` -> `private` * revert: do not reset zoom on zoom change * feat: do not close menu on repeated ctrl+f * remove collapsible * tweak results CSS * remove redundant check * set `appState.searchMatches` to null if empty --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
		@@ -143,6 +143,7 @@ export const FONT_FAMILY = {
 | 
			
		||||
  "Lilita One": 7,
 | 
			
		||||
  "Comic Shanns": 8,
 | 
			
		||||
  "Liberation Sans": 9,
 | 
			
		||||
  Assistant: 10,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const FONT_FAMILY_FALLBACKS = {
 | 
			
		||||
 
 | 
			
		||||
@@ -22,8 +22,10 @@ export interface FontMetadata {
 | 
			
		||||
  };
 | 
			
		||||
  /** flag to indicate a deprecated font */
 | 
			
		||||
  deprecated?: true;
 | 
			
		||||
  /** flag to indicate a server-side only font */
 | 
			
		||||
  serverSide?: true;
 | 
			
		||||
  /**
 | 
			
		||||
   * whether this is a font that users can use (= shown in font picker)
 | 
			
		||||
   */
 | 
			
		||||
  private?: true;
 | 
			
		||||
  /** flag to indiccate a local-only font */
 | 
			
		||||
  local?: true;
 | 
			
		||||
  /** flag to indicate a fallback font */
 | 
			
		||||
@@ -98,7 +100,16 @@ export const FONT_METADATA: Record<number, FontMetadata> = {
 | 
			
		||||
      descender: -434,
 | 
			
		||||
      lineHeight: 1.15,
 | 
			
		||||
    },
 | 
			
		||||
    serverSide: true,
 | 
			
		||||
    private: true,
 | 
			
		||||
  },
 | 
			
		||||
  [FONT_FAMILY.Assistant]: {
 | 
			
		||||
    metrics: {
 | 
			
		||||
      unitsPerEm: 2048,
 | 
			
		||||
      ascender: 1021,
 | 
			
		||||
      descender: -287,
 | 
			
		||||
      lineHeight: 1.25,
 | 
			
		||||
    },
 | 
			
		||||
    private: true,
 | 
			
		||||
  },
 | 
			
		||||
  [FONT_FAMILY_FALLBACKS.Xiaolai]: {
 | 
			
		||||
    metrics: {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user