UNPKG

@plotinus/matrix-package-calculator

Version:

Calculator components for the Matrix framework - basic arithmetic operations with UI

33 lines (32 loc) 1.58 kB
export { CalculatorComponent } from './calculator.component.js'; export { CalculatorPresentationElement } from '../../presentation/calculator-presentation.js'; // Component metadata export const componentInfo = { name: 'calculator', tag: 'calculator', type: 'complex', version: '1.0.0', description: 'Calculator component with mathematical operations' }; // Auto-registration for browser environments if (typeof window !== 'undefined' && typeof customElements !== 'undefined') { console.log('[Calculator] 🎨 AUTO-REGISTRATION: Checking for calculator-presentation'); try { const presElement = globalThis.CalculatorPresentationElement || window.CalculatorPresentationElement; console.log('[Calculator] 🎨 CalculatorPresentationElement available:', !!presElement); if (!customElements.get('calculator-presentation') && presElement) { console.log('[Calculator] 🎨 AUTO-REGISTRATION: Defining calculator-presentation element'); customElements.define('calculator-presentation', presElement); console.log('[Calculator] 🎨 AUTO-REGISTRATION: Successfully registered calculator-presentation'); } else { console.log('[Calculator] 🎨 AUTO-REGISTRATION: calculator-presentation already registered or element not found'); } } catch (e) { console.log('[Calculator] 🎨 AUTO-REGISTRATION: Error during registration:', e); } } else { console.log('[Calculator] 🎨 AUTO-REGISTRATION: Skipped (window or customElements not available)'); }