Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

538 B
Raw Blame
import { createContext, useContext } from 'solid-js';
import { IDENTITY_MATRIX } from '../constants/constants';
import type { Mat4, ViewBox } from '../types/svgTypes';

export const ParentMatrixContext = createContext<() => Mat4>(
  () => IDENTITY_MATRIX
);

export function useParentMatrix(): () => Mat4 {
  return useContext(ParentMatrixContext);
}

export const ViewBoxContext = createContext<ViewBox>({
  minX: 0,
  minY: 0,
  width: 0,
  height: 0,
});

export function useViewBox(): ViewBox {
  return useContext(ViewBoxContext);
}