Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(login): temp fix for macro wireframe showing broken colors (#137)
Seamusf169d35f6fe7
diff --git a/js/app/packages/app/component/auth/ThreeWireframe.tsx b/js/app/packages/app/component/auth/ThreeWireframe.tsxindex b24b6abf75..b50388c80a 100644--- a/js/app/packages/app/component/auth/ThreeWireframe.tsx+++ b/js/app/packages/app/component/auth/ThreeWireframe.tsx@@ -3,6 +3,7 @@ import * as THREE from 'three';import isWebGL2Available from 'three/addons/capabilities/WebGL.js';import { OrbitControls } from 'three/addons/controls/OrbitControls.js';import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';+import { createThemeEffect } from '../../../block-theme/signals/themeReactive';import modelM from './model-m.glb?inline';import {colorAccent,@@ -117,6 +118,8 @@ export default function ThreeWireframe(props: ThreeWireframeProps) {updateWireframeColors(currentWireframe);});+ createThemeEffect(setColor);+onPointerMove = (event: PointerEvent) => {const rect = canvas.getBoundingClientRect();pointer.x = ((event.clientX - rect.left) / rect.width) * 2 - 1;diff --git a/js/app/packages/app/component/auth/store.ts b/js/app/packages/app/component/auth/store.tsindex 5dee7c098a..a7d51ee863 100644--- a/js/app/packages/app/component/auth/store.ts+++ b/js/app/packages/app/component/auth/store.ts@@ -1,12 +1,13 @@import { createSignal } from 'solid-js';import * as THREE from 'three';+import { themeReactive } from '../../../block-theme/signals/themeReactive';export const [colorContrast, setColorContrast] = createSignal<THREE.Color>();export const [colorAccent, setColorAccent] = createSignal<THREE.Color>();export const [colorBase, setColorBase] = createSignal<THREE.Color>();export const rafSpeed = navigator.vendor?.includes('Apple') ? 2 : 1;export const [currentTheme, setCurrentTheme] = createSignal();-export const [pixelation, setPixelation] = createSignal(0.78);+export const [pixelation, setPixelation] = createSignal(1);export const [speed, setSpeed] = createSignal(1);export interface ThemeColor {@@ -103,22 +104,21 @@ export function oklchToRgb(}export function getCurrentTheme(): ThemeColor {- const style = getComputedStyle(document.body);return {accent: oklchToRgb(- Number(style.getPropertyValue('--accent-l')),- Number(style.getPropertyValue('--accent-c')),- Number(style.getPropertyValue('--accent-h'))+ themeReactive.a0.l[0](),+ themeReactive.a0.c[0](),+ themeReactive.a0.h[0]()),surface: oklchToRgb(- Number(style.getPropertyValue('--surface-l')),- Number(style.getPropertyValue('--surface-c')),- Number(style.getPropertyValue('--surface-h'))+ themeReactive.b0.l[0](),+ themeReactive.b0.c[0](),+ themeReactive.b0.h[0]()),contrast: oklchToRgb(- Number(style.getPropertyValue('--contrast-l')),- Number(style.getPropertyValue('--contrast-c')),- Number(style.getPropertyValue('--contrast-h'))+ themeReactive.c0.l[0](),+ themeReactive.c0.c[0](),+ themeReactive.c0.h[0]()),};}diff --git a/js/app/packages/app/index.css b/js/app/packages/app/index.cssindex 22b770e0c8..84a05b99ee 100644--- a/js/app/packages/app/index.css+++ b/js/app/packages/app/index.css@@ -4,9 +4,9 @@@source '../../packages/core/component/LexicalMarkdown/theme.ts';@config '../../tailwind.config.ts';-@property --a0l { syntax: "<number>"; inherits: false; initial-value: 0.61; }-@property --a0c { syntax: "<number>"; inherits: false; initial-value: 0.37; }-@property --a0h { syntax: "<angle>"; inherits: false; initial-value: 14deg; }+@property --a0l { syntax: "<number>"; inherits: false; initial-value: 0.8854; }+@property --a0c { syntax: "<number>"; inherits: false; initial-value: 0.2003; }+@property --a0h { syntax: "<angle>"; inherits: false; initial-value: 145.5deg; }@property --a1l { syntax: "<number>"; inherits: false; initial-value: 0.61; }@property --a1c { syntax: "<number>"; inherits: false; initial-value: 0.37; }@property --a1h { syntax: "<angle>"; inherits: false; initial-value: 54deg; }diff --git a/js/app/packages/block-theme/signals/themeReactive.ts b/js/app/packages/block-theme/signals/themeReactive.tsindex 2e7e929fad..beca3f9644 100644--- a/js/app/packages/block-theme/signals/themeReactive.ts+++ b/js/app/packages/block-theme/signals/themeReactive.ts@@ -50,56 +50,57 @@ function jamTransition(): void {}, 100);}}+const ALL_THEME_SIGNALS = [+ themeReactive.a0.l[0],+ themeReactive.a0.c[0],+ themeReactive.a0.h[0],+ themeReactive.a1.l[0],+ themeReactive.a1.c[0],+ themeReactive.a1.h[0],+ themeReactive.a2.l[0],+ themeReactive.a2.c[0],+ themeReactive.a2.h[0],+ themeReactive.a3.l[0],+ themeReactive.a3.c[0],+ themeReactive.a3.h[0],+ themeReactive.a4.l[0],+ themeReactive.a4.c[0],+ themeReactive.a4.h[0],+ themeReactive.b0.l[0],+ themeReactive.b0.c[0],+ themeReactive.b0.h[0],+ themeReactive.b1.l[0],+ themeReactive.b1.c[0],+ themeReactive.b1.h[0],+ themeReactive.b2.l[0],+ themeReactive.b2.c[0],+ themeReactive.b2.h[0],+ themeReactive.b3.l[0],+ themeReactive.b3.c[0],+ themeReactive.b3.h[0],+ themeReactive.b4.l[0],+ themeReactive.b4.c[0],+ themeReactive.b4.h[0],+ themeReactive.c0.l[0],+ themeReactive.c0.h[0],+ themeReactive.c0.c[0],+ themeReactive.c1.l[0],+ themeReactive.c1.c[0],+ themeReactive.c1.h[0],+ themeReactive.c2.l[0],+ themeReactive.c2.c[0],+ themeReactive.c2.h[0],+ themeReactive.c3.l[0],+ themeReactive.c3.c[0],+ themeReactive.c3.h[0],+ themeReactive.c4.l[0],+ themeReactive.c4.c[0],+ themeReactive.c4.h[0],+];createEffect(on(- [- themeReactive.a0.l[0],- themeReactive.a0.c[0],- themeReactive.a0.h[0],- themeReactive.a1.l[0],- themeReactive.a1.c[0],- themeReactive.a1.h[0],- themeReactive.a2.l[0],- themeReactive.a2.c[0],- themeReactive.a2.h[0],- themeReactive.a3.l[0],- themeReactive.a3.c[0],- themeReactive.a3.h[0],- themeReactive.a4.l[0],- themeReactive.a4.c[0],- themeReactive.a4.h[0],- themeReactive.b0.l[0],- themeReactive.b0.c[0],- themeReactive.b0.h[0],- themeReactive.b1.l[0],- themeReactive.b1.c[0],- themeReactive.b1.h[0],- themeReactive.b2.l[0],- themeReactive.b2.c[0],- themeReactive.b2.h[0],- themeReactive.b3.l[0],- themeReactive.b3.c[0],- themeReactive.b3.h[0],- themeReactive.b4.l[0],- themeReactive.b4.c[0],- themeReactive.b4.h[0],- themeReactive.c0.l[0],- themeReactive.c0.h[0],- themeReactive.c0.c[0],- themeReactive.c1.l[0],- themeReactive.c1.c[0],- themeReactive.c1.h[0],- themeReactive.c2.l[0],- themeReactive.c2.c[0],- themeReactive.c2.h[0],- themeReactive.c3.l[0],- themeReactive.c3.c[0],- themeReactive.c3.h[0],- themeReactive.c4.l[0],- themeReactive.c4.c[0],- themeReactive.c4.h[0],- ],+ ALL_THEME_SIGNALS,() => {jamTransition();@@ -425,3 +426,7 @@ createEffect({ defer: true }));++export function createThemeEffect(cb: () => void) {+ return createEffect(on(ALL_THEME_SIGNALS, cb));+}