npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cp949/geul-core

v0.1.1

Published

Readme

@cp949/geul-core

Tiptap을 비공개 편집 엔진으로 감싼 프레임워크 비의존 headless editor controller다. React 없이 저수준 API로 에디터를 직접 제어하거나, @cp949/geul-react가 제공하지 않는 자체 UI를 얹어야 할 때 쓴다.

React를 쓴다면 보통 이 패키지를 직접 import할 필요 없다 — @cp949/geul-react가 필요한 타입과 함수를 재수출한다.

최소 사용 예

import { createEditor } from "@cp949/geul-core";
import { createEmptyDocument, createRandomDocumentId } from "@cp949/geul-model";

// 인자는 블록 id를 만드는 함수다.
// createRandomDocumentId는 Chrome75 호환 UUID v4 생성기다.
const initialDocument = createEmptyDocument(createRandomDocumentId);
const controller = createEditor({ initialDocument });

controller.mount(document.getElementById("editor")!);

controller.commands.toggleBold(); // 타입별 명령은 commands.* 아래 있다
controller.getDocument(); // 현재 Document 스냅샷(@cp949/geul-model의 Document)

controller.unmount(); // DOM에서 분리(재마운트 가능)
controller.destroy(); // 세션 영구 종료

담고 있는 것

  • 명령: controller.commands.*(서식 토글·블록 타입 변경·들여쓰기 등 타입별 명령)와 insertBlocks/updateBlock/removeBlocks 등 임의 Block 형태를 받는 범용 조작 API
  • 조회: getDocument/getBlock/getPrevBlock/getNextBlock/forEachBlock으로 저장 Block 트리를 순회
  • 확장 지점: customBlocks/customInlineContent(커스텀 블록·인라인 타입 등록), enabledBlockTypes({ mode: "allow" | "deny", types }로 타입 제한 — isBlockTypeEnabled(type)으로 조회), uploadFile(미디어 업로드 콜백), pasteHandler
  • 이벤트: onChange/onBeforeChange/onSelectionChange/onMount/onUnmount

전체 옵션은 CreateEditorOptions, 전체 컨트롤러 표면은 EditorController 타입을 본다.

알려진 제약

  • DOM에 의존한다(tsconfig.json의 lib에 DOM 포함) — 브라우저 또는 jsdom 같은 DOM 환경이 필요하다. 서버에서 문서만 다루려면 DOM-free인 @cp949/geul-model/@cp949/geul-io를 쓴다.
  • Tiptap·ProseMirror의 raw 타입(Editor, PM 노드 등)은 공개 표면에 없다 — 패키지 경계 밖으로 노출하지 않는다.