Commit Graph

26 Commits

Author SHA1 Message Date
gm
41c73fecd5 ui: structured record collection — collect node schema parsing (v0.9)
수집 노드의 하위 노드를 레코드 필드 스키마로 인식:
- buildSchemaMap(): 수집 섹션의 child sections → 파싱 마크 맵
- parseRecordLine(): 한 줄을 inline 마크 기준으로 분리 → {mark: value} 레코드
- parseInstance(): 스키마 있으면 레코드 파싱, 없으면 기존 토큰 분리
- mergedToText(): 레코드 → inline 재구성 (김양모12시), 단순 → per_line 토큰
- mergedToJSON(): 레코드 → 첫 필드=부모SECTION, 나머지=자식SECTION 계층 구조
- renderFillerTemplateView(): 스키마 필드를 칩 안에 인라인 배지로 표시

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 17:53:25 +09:00
gm
e332e357b9 ui: per_line 전용 UI 블록 분리 (노드 설정 내 별도 섹션)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 17:25:41 +09:00
gm
c215f28a2f ui: add per_line dedicated control in Builder detail panel (v0.8)
- 노드 설정에 '한 줄에 N개씩' 숫자 입력란 추가 (어트리뷰트 수동 입력 불필요)
- 캔버스 카드 footer에 ×N 배지로 per_line 값 표시
- setPerLine() 함수: 빈값/0이면 속성 자동 제거

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 17:17:50 +09:00
gm
f64f8f3eb8 ui: add Tab 3 '구조 추출' — text form to node structure extractor (v0.7)
- 텍스트 양식 붙여넣기 → 섹션 구조 실시간 추출 + 트리 미리보기
- 구분자 수동 입력 및 자동 감지 (첫 등장 순서로 L1·L2·... 결정)
- '내용 포함' 토글: 섹션 헤더만 or 내용도 값으로 포함
- '← Builder에 적용' 버튼으로 추출된 구조를 Tab 1에 로드

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 16:59:11 +09:00
gm
c860035822 ui: add collect/fixed role distinction to nodes (v0.6)
- Builder: 역할 토글(🔒고정/📥수집) in detail panel struct settings
- Canvas: collect 노드 헤더 파란 배경 + 📥 배지
- Tab2 template view: selective mode일 때 수집/고정 배지 표시
- Tab2 merge: collect 섹션만 토큰 수집, 고정 섹션은 템플릿 값 그대로 출력
- Backwards compatible: collect 섹션이 없으면 기존처럼 전체 수집

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 15:32:59 +09:00
gm
5a86d52813 ui: redesign Tab 2 as text-paste form merger (Option A)
Workflow:
  1. Load template JSON (defines section structure)
  2. Paste multiple text-format forms into textarea
  3. Parser splits by title mark, collects tokens per section key
  4. Merged output in text or JSON format

Key changes:
- splitIntoInstances(): split at each title-mark line boundary
- parseInstance(): match section headers by mark+name, tokenize value lines
- mergedToText(): walk template tree, output tokens with per_line chunking
- mergedToJSON(): reconstruct ROOT/SECTION/VALUE tree with merged tokens
- Template view: compact inline chip display of section structure
- Instance counter badge shows how many forms were detected
- JSON export: each token becomes a separate VALUE node (data_type:string)
- per_line attribute on SECTION controls line wrapping in text output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 14:11:59 +09:00
gm
c38d071a86 ui: add content filler tab (Step 3)
- New '내용 채우기' tab with full JSON template import workflow
- Load Builder JSON (slim or full) → parse ROOT/SECTION/VALUE tree
- Render form: each SECTION as a card, VALUE nodes as input fields
  (string → textarea, other types → input)
- Nested sections auto-indent with accent left-border via CSS
- Real-time text/JSON preview as values are typed
- Copy button for filled text or filled JSON output
- fillerToText() mirrors toText() logic using stored FV values
- fillerToJSON() reconstructs full JSON with FV values substituted
- Escape key + backdrop click close filler import modal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 12:47:45 +09:00
gm
97e2406044 ui: 2D canvas tree builder (Step 2)
- Replace list-based editor with 2D canvas tree visualization
- Nodes laid out by depth column + subtree-height algorithm
- Bezier curves connect parent→child (accent-colored when selected)
- Click node to select; detail panel on right shows editable fields
- Canvas toolbar holds doc title/mark + add/import/new actions
- Inline renderNode() removed; renderValue() for node-type shows reference widget with → navigate button
- addTopNode()/addChildNode() auto-select the new node
- Preview panel stays in right-panel stacked under detail

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 12:31:36 +09:00
gm
45677d7b18 ui: add main tab navigation skeleton (Step 1)
- Add top-level tab bar (양식 만들기 / 내용 채우기)
- Wrap existing builder in panel-builder tab panel
- Move action buttons (불러오기, 새 문서) into editor panel header
- Add placeholder panel-filler tab panel (Step 3 예정)
- Add switchTab() for tab switching
- Bump version badge to v0.5

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 11:35:28 +09:00
gm
65e946b4e3 fix(ui): 노드 사이 기본 줄바꿈 제거
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 02:02:10 +09:00
gm
8b0842eb80 feat(ui): prefix/suffix에서 \n \t \r 이스케이프 시퀀스 지원
unesc(): 입력값 \n→실제줄바꿈, \t→탭, \r→CR
reesc(): 상태값을 표시용 이스케이프 문자열로 역변환
renderSetting 입력 필드에 적용, placeholder에 사용법 표시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 02:01:24 +09:00
gm
309c45886e fix(ui): prefix/suffix 기본값 null 복원 (빈 문자열로 초기화)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 01:59:48 +09:00
gm
b6f54d0187 refactor(ui): 노드 구조 추가 정리
- buildNode 템플릿에서 header/footer 완전 제거
- prefix/suffix 추가 시 기본값 '\n' (줄바꿈)으로 초기화
- 노드 간 구분자 제거: join('\n') → join('') (기본적으로 아무것도 없음)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 01:56:19 +09:00
gm
3449df10bc refactor(ui): 구조 대폭 간소화
- 자료형: node/string/int/bool/date 5개만 유지, integer→int, boolean→bool
- 리스트 타입 완전 제거 (기존 데이터 → string으로 자동 마이그레이션)
- nextSep/childSep 제거 (노드 간 구분은 항상 줄바꿈)
- header/footer 제거
- prefix = 노드 전체 앞 문자열, suffix = 노드 전체 뒤 문자열로 재정의
- toText(): prefix/suffix 렌더링, list 로직 제거, 구조 단순화
- toJSON(): list/nextSep/childSep/header/footer 제거
- parseJsonSection: 동일하게 단순화, 구버전 LIST → string 호환
- doImport: flush() → string value 생성
- CSS: list 전용 스타일 제거

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 01:53:50 +09:00
gm
28e52e9ce0 feat(ui): JSON에 nextSep/childSep/nameNewline 포함 및 복원
toJSON() serNode에 nextSep, childSep, nameNewline 필드 추가.
parseJsonSection에서 해당 필드 읽어 노드에 복원.
JSON slim/full 양쪽 모두 포함됨 (값이 null이 아니므로 stripNulls 통과).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 01:30:11 +09:00
gm
702eb918ee feat(ui): JSON → 노드 불러오기 탭 추가
불러오기 모달에 텍스트/JSON 탭 구분 추가.
JSON 탭: ROOT→SECTION→LIST/VALUE 구조를 노드 트리로 복원.
- SECTION: mark, content, header/footer/prefix/suffix, attributes 복원
- LIST: LIST_ITEM들을 names로 결합, category 복원
- SECTION 중첩: node-type value로 재귀 복원
- VALUE: data_type/value → scalar val 복원
- nextSep/childSep/nameNewline은 기본값으로 초기화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 01:14:52 +09:00
gm
63cb612a6e feat(ui): 이름 줄바꿈 토글 및 구분자 옵션을 노드 설정으로 이동
- 노드에 nameNewline(bool, default:true) 속성 추가
  - true: 이름 다음 줄바꿈 후 값 출력 (기존 동작)
  - false: 이름 바로 뒤에 값 연결 (인라인)
  - 첫 번째 list/scalar에만 적용, 이후는 항상 '\n' 사용
- 구분자 설정 바(sep-bar)를 노드 설정 섹션 내부로 이동
  - 다음 노드 / 하위 노드 / 이름 뒤 3개 행 항상 표시
  - 선택적 설정(header 등)은 드롭다운으로 하단에 추가
- renderSepBar → renderStructSettings 리네임

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 00:54:12 +09:00
gm
df011a5fcc feat(ui): 인라인 구분자 지원 및 리스트 자료형 제거
- VALUE_TYPES에서 '리스트 (List)' 제거
- SEP_CFG에 '줄바꿈' 프리셋 추가 (없음/줄바꿈/빈줄)
- toText() 재작성: lines 배열 → string 직접 결합 방식으로 변경
  - 인라인 구분자(예: '/') 사용 시 a/b/c 형태로 한 줄 출력
  - ss() 함수: none='' / newline='\n' / blank='\n\n' / 직접입력=그대로
  - pendingSep 패턴으로 연속 child node 간 구분자 처리

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 00:28:03 +09:00
gm
881b3d1f10 feat(ui): 노드 구분자 설정 추가 (다음 노드 / 하위 노드)
각 노드 카드 바디 상단에 구분자 설정 바 추가.
- 다음 노드 (nextSep): 이 노드 뒤~다음 형제 노드 사이 구분
- 하위 노드 (childSep): 이 노드 헤더~첫 자식 노드 사이 구분
- 프리셋: 없음 / 빈 줄 / 직접 입력
- toText()에 applySep() 적용, list 뒤 빈 줄은 기존 유지
- 기존 저장 데이터 normalizeState()로 자동 마이그레이션

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 00:07:31 +09:00
gm
65f5d4b422 feat(ui): 어트리뷰트 키를 드롭다운 선택으로 변경
ATTR_KEYS 목록 정의 (lang/id/class/href/align/order/required/readonly/
hidden/weight/style + 직접 입력). 이미 추가된 키는 드롭다운에서 제외.
키는 배지 레이블로 표시, 값만 자유 입력. 직접 입력 선택 시 prompt()로
키 이름 수동 입력 지원.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 23:59:41 +09:00
gm
839a3222ec refactor(ui): 노드 중심 전면 개편 v0.4
- 노드 헤더: 구분자·이름·숨기기 토글·이동·삭제
- 값 섹션: 드롭다운으로 list/node/string/integer 등 타입별 값 추가, 복수 지원
  - list: 이름목록·카테고리·구분자·줄당 N명
  - node: 하위 노드 카드 인라인 중첩 렌더링
  - 스칼라: 단순 입력(textarea는 markdown/html/json/code)
- 노드 설정 섹션: 드롭다운으로 필요한 옵션만 추가, 미선택=기본값
  - header/footer/prefix/suffix/attributes
- 데이터 모델: sections[]+groups[]+children[] → nodes[]+values[] 통합
- 구버전 localStorage 자동 마이그레이션

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 23:54:11 +09:00
gm
33a1296e8b refactor(ui): per-node delimiter, node settings panel consolidation
각 노드가 독립적인 구분자를 가지도록 전면 개편. 전역 구분자 설정 카드 제거.
노드 카드 구조: 구분자·제목·노드설정·하위노드. 이름 목록(LIST 그룹)을
노드설정 패널 안으로 통합. 불러오기 모달에 구분자 직접 입력 추가.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 23:21:16 +09:00
gm
3940d0c0ea refactor(ui): node-centric settings panel redesign
데이터 모델
- sec.name → sec.content (CTNode content 필드와 통일)
- grp.cat → grp.attributes.category (어트리뷰트 편집기로 통합)
- 모든 노드(SECTION, LIST)에 CTNode 기본 필드 추가:
  header / footer / prefix / suffix / data_type / value

노드 설정 패널 (▶ 노드 설정, 접이식)
- 텍스트 장식: header / footer / prefix / suffix
- 어트리뷰트: key-value 동적 추가·수정·삭제 (level은 자동 관리)
- 값: DataType 드롭다운(17종) + value 입력
- 비기본값 설정 시 파란 점(●) 표시
- openSettings Set으로 접이 상태 렌더 간 유지

기타
- mkSec / mkGrp / nodeDefaults 팩토리로 기본값 통일
- migrate()로 구버전 localStorage 자동 변환
- toJSON: header/footer/prefix/suffix/data_type/value 포함
- 구분자·한줄 옵션은 그룹 하단에 유지

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 00:28:56 +09:00
gm
7a7ff84a2d feat(ui): per-group separator and namesPerLine settings
- 전역 namesPerLine 제거 → 그룹별 개별 설정으로 전환
- 각 이름 그룹 카드에 두 가지 옵션 추가:
  - 구분자: 공백 / ", " / " / " / 줄바꿈(↵) 칩 + 직접 입력
  - 한 줄 N개: 0=제한없음, 줄바꿈 모드 시 자동 비활성화
- mkGrp() 헬퍼로 그룹 기본값(sep=' ', namesPerLine=0) 통일

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 23:56:08 +09:00
gm
f81fb09e3b feat(ui): add namesPerLine setting to builder
- 구분자 설정 카드에 '한 줄 N개' 입력란 추가
- 0 = 제한 없음 (기존 동작 유지)
- N > 0 이면 이름을 N개씩 줄 분할, 카테고리 prefix는 첫 줄에만
- localStorage 저장/복원 포함

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 23:43:21 +09:00
gm
bbee99a225 feat(ui): add standalone HTML form builder
- 좌측: 시각적 편집기 (섹션/이름그룹 추가·삭제·순서변경)
- 우측: 텍스트/JSON slim/JSON full 실시간 미리보기 + 복사
- 구분자 자유 설정 (이모지·문자열·임의 개수 레벨)
- 텍스트 불러오기 (EmojiMarkupParser JS 포트)
- localStorage 자동저장

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 22:41:50 +09:00