
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
nvm use
npm install c2i d3
# 또는
nvm use
yarn add c2i d3
⚠️ d3는 peerDependency이므로 반드시 별도 설치 필요
최신 웹 개발 환경(React, Vue, Svelte, Vite, Webpack 등)에서 사용
// React, Svelte, Vue 등에서
import { FlameFurance } from 'c2i';
Node.js, 구버전 번들러 환경에서 사용
// Node.js, 구버전 번들러
const { FlameFurance } = require('c2i');
CDN, script 태그로 바로 사용하는 경우
<script src="https://unpkg.com/c2i/dist/c2i.umd.js"></script>
<script>
// 전역 변수 C2I로 접근
C2I.FlameFurance();
</script>
import { FlameFurance } from 'c2i';
function App() {
return
<div>
<div
style={{
flex: 1,
overflow: "hidden",
textAlign: "center",
position: "relative",
paddingBottom: showChartPanel ? `${controlPanelHeight}px` : "0px",
transition: "padding-bottom 0.4s ease-in-out",
}}
>
{mapData && (
<FlameFurance
ref={furnaceRef}
options={furnaceOptions}
data={mapData as IDynamicData}
theme={pageTheme?.key.includes("dark") ? "dark" : "light"}
alertTrigger={alertTrigger}
/>
)}
</div>
</div>;
}
<script setup lang="ts">
import { C2iFlameFurance } from 'c2i';
</script>
<template>
<C2iFlameFurance
options={furnaceOptions}
data={mapData as IDynamicData}
theme={pageTheme?.key.includes("dark") ? "dark" : "light"}
alertTrigger={alertTrigger} />
</template>
<script lang="ts">
import { C2iFlameFurance } from 'c2i';
</script>
const { C2iFlameFurance } = require('c2i');
console.log(C2iFlameFurance());
| 구분 | 문법 | 환경 | 용도/특징 |
|---|---|---|---|
| ESM | import/export | 브라우저, Node, 번들러 | 최신 웹, 트리쉐이킹, 모듈화, 표준 |
| CJS | require/module.exports | Node.js | 서버, CLI, 오래된 패키지 |
| UMD | 즉시실행함수(전역+모듈) | 브라우저, Node, AMD | 어디서나 동작, CDN, 전역 변수 접근 |
"main": CommonJS 엔트리 (dist/c2i.cjs.js)"module": ESM 엔트리 (dist/c2i.es.js)"types": 타입 정의 (dist/types/index.d.ts)"exports": 환경별 엔트리 지정 (import, require, browser)"peerDependencies": d3, react, vue, svelte, three 등C2iFlameFurance 컴포넌트는 C2iAlertLight와 C2iAlertSound를 통합한 완전한 알림 시스템을 제공합니다.
C2iAlertLight는 다음 기능들을 통합 제공합니다:
다음과 같은 온도 상태를 자동으로 감지합니다:
복합 알림 통합: 여러 도금로에서 동시에 알림이 발생하는 경우, 가장 긴급한 알림 하나만 제공하여 알림 중복을 방지합니다.
알림 우선순위:
const furnaceVis = new C2iFlameFurance({
// ... 기타 옵션들
onAlertStateChange: (alertStates) => {
// 알림 상태가 변경될 때마다 호출됨
console.log('현재 알림 상태:', alertStates)
// 외부에서 소리나 경광등 처리
alertStates.forEach(alert => {
if (alert.status === 'CRITICAL') {
// 긴급 알림 처리
playEmergencySound()
activateEmergencyLight()
} else if (alert.status === 'WARNING') {
// 경고 알림 처리
playWarningSound()
activateWarningLight()
}
})
},
alertCheckInterval: 1000 // 알림 체크 간격 (밀리초)
})
// 현재 알림 상태 조회
const alertStates = furnaceVis.getAlertStates()
// 특정 알림 제거
furnaceVis.clearAlertState('alert_id')
// 모든 알림 제거
furnaceVis.clearAllAlertStates()
// 알림 콜백 동적 설정
furnaceVis.setAlertStateChangeCallback((alertStates) => {
// 새로운 콜백 함수
})
// 알림 임계값 설정
furnaceVis.setAlertLimitData({
alertMin: 426, // 긴급 알림 최소 온도
alertMax: 690, // 긴급 알림 최대 온도
warnMin: 428, // 경고 알림 최소 온도
warnMax: 680 // 경고 알림 최대 온도
})
interface IAlertState {
id: string // 알림 고유 ID
type: AlertType // 통합된 알림 타입
category: AlertCategory // 알림 카테고리 (SYSTEM_OFF/TEMPERATURE_CRITICAL/TEMPERATURE_WARNING/DEVIATION_BIG/DEVIATION_SMALL)
severity: AlertSeverity // 알림 심각도 (CRITICAL/WARNING/NORMAL/OFF)
message: string // 알림 메시지
furnaceId?: string // 도금로 ID (개별 도금로 알림인 경우)
zoneIndex?: number // 존 인덱스
temperature?: number // 현재 온도
averageTemp?: number // 평균 온도
deviation?: number // 평균 대비 편차
timestamp: number // 알림 발생 시간
}
import { useEffect, useRef } from 'react'
import { C2iFlameFurance } from 'c2i'
function FurnaceDashboard() {
const furnaceRef = useRef(null)
useEffect(() => {
if (furnaceRef.current) {
// 알림 콜백 설정
furnaceRef.current.setAlertStateChangeCallback((alertStates) => {
// React 상태 업데이트
setAlerts(alertStates)
// 외부 알림 시스템 연동
if (alertStates.some(alert => alert.status === 'CRITICAL')) {
triggerEmergencyProtocol()
}
})
}
}, [])
return (
<div>
<C2iFlameFurance
ref={furnaceRef}
options={furnaceOptions}
data={furnaceData}
/>
{/* 알림 상태 표시 */}
<AlertStatusPanel alerts={alerts} />
</div>
)
}
추가로 궁금한 점이나, 특정 프레임워크/환경에서의 사용법이 더 필요하시면 언제든 문의해 주세요!
FAQs
C2I(Chart Intelligence Insights) Copyright (c) 2025 Greg Han
The npm package c2i receives a total of 0 weekly downloads. As such, c2i popularity was classified as not popular.
We found that c2i demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.