Skip to content

Commit 77a3c38

Browse files
SoliEstreclaude
andcommitted
refactor!: rename sidebar components to neutral names (decouple from Notelle)
estreuv-notelle-sidebar → estreuv-sidebar, estreuv-notelle-item → estreuv-sidebar-item (modules sidebar.js / sidebar-item.js). 이벤트 estreuv-sidebar-activate, intent 키 sidebarCollapsed/sidebarActive. 클래스 EstreuvSidebar/EstreuvSidebarItem. 사용자 결정: 'Notelle' 은 미착수 별도 제품 브랜드라 라이브러리에서 디커플링(선점·혼선 방지). 제품 착수 시 공개. 전 참조 일괄 갱신 (src·test·measure 필터·docs·playground·create-estreuv 템플릿·README). BREAKING (pre-1.0 early access) → estreuv 0.3.0 (changeset). test 38/38, I1 689·I3 4.30KB, types 재생성, playground 계약·docs 빌드 그린. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6395d22 commit 77a3c38

16 files changed

Lines changed: 75 additions & 72 deletions

File tree

.changeset/sidebar-rename.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"estreuv": minor
3+
---
4+
5+
Rename the sidebar components to neutral names: `estreuv-notelle-sidebar``estreuv-sidebar`, `estreuv-notelle-item``estreuv-sidebar-item` (modules `estreuv/sidebar.js`, `estreuv/sidebar-item.js`). The activation event is now `estreuv-sidebar-activate` and intent keys are `sidebarCollapsed` / `sidebarActive`. **Breaking** for the sidebar prototype (pre-1.0 early access) — the "Notelle" name is reserved for a separate future product and decoupled from the library.

packages/create-estreuv/templates/pair-overlay/ESTREUV-PAIR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ Then register `HomePageHandler` for your page and, before `estreUi.init()`,
5252
`await estreuvReady` so the tiles exist when `onOpen` wires the provider.
5353
5454
Use `<estreuv-dark-mode-tile>`, `<estreuv-clock-tile>`,
55-
`<estreuv-notif-count-tile>` (and Notelle sidebar/item) anywhere in your
55+
`<estreuv-notif-count-tile>` (and the sidebar/item) anywhere in your
5656
article markup (e.g. `staticDoc.html`).

packages/docs/.vitepress/theme/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default {
1111
import('estreuv/dark-mode-tile.js');
1212
import('estreuv/clock-tile.js');
1313
import('estreuv/notif-count-tile.js');
14-
import('estreuv/notelle-sidebar.js');
15-
import('estreuv/notelle-item.js');
14+
import('estreuv/sidebar.js');
15+
import('estreuv/sidebar-item.js');
1616
}
1717
},
1818
};

packages/docs/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ interface EstreIntent {
5757
## Bundled components
5858

5959
`estreuv/dark-mode-tile.js` · `estreuv/clock-tile.js` · `estreuv/notif-count-tile.js` ·
60-
`estreuv/notelle-sidebar.js` · `estreuv/notelle-item.js` — see [Tiles](/tiles).
60+
`estreuv/sidebar.js` · `estreuv/sidebar-item.js` — see [Tiles](/tiles).
6161

6262
::: info Generated from types
6363
This reference tracks the shipped `.d.ts`. A fully type-generated API site (typedoc) is a planned

packages/docs/guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inside an existing EstreUI app incrementally — one tile at a time — or use i
2222
`onRelease` dispatched to your components, with per-tick dedup so each fires exactly once.
2323
- **Intent context** — uni-directional state sharing over `@lit/context` (prop-down / event-up).
2424
- **Alienese aliases** — short attribute aliases (`*t``text`, etc.) at zero build cost.
25-
- **Bundled tiles** — dark-mode, clock, notif-count, and a Notelle sidebar to learn from or use directly.
25+
- **Bundled tiles** — dark-mode, clock, notif-count, and a sidebar to learn from or use directly.
2626

2727
## Footprint
2828

packages/docs/tiles.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ A badge counter driven by **external / intent** state. `bump(by)` and `clear()`
4545

4646
Methods: `.bump(by = 1)`, `.clear()`.
4747

48-
## `<estreuv-notelle-sidebar>` + `<estreuv-notelle-item>`
48+
## `<estreuv-sidebar>` + `<estreuv-sidebar-item>`
4949

50-
A nested-container prototype — a sidebar with light-DOM `<estreuv-notelle-item>` children. Demonstrates
50+
A nested-container prototype — a sidebar with light-DOM `<estreuv-sidebar-item>` children. Demonstrates
5151
**nested lifecycle** (children receive hooks via the flat dispatch) and host-level event bubbling.
5252

5353
```estreuv-demo
54-
<estreuv-notelle-sidebar title="Notelle">
55-
<estreuv-notelle-item label="Inbox" icon="📥"></estreuv-notelle-item>
56-
<estreuv-notelle-item label="Archive" icon="🗄"></estreuv-notelle-item>
57-
<estreuv-notelle-item label="Trash" icon="🗑"></estreuv-notelle-item>
58-
</estreuv-notelle-sidebar>
54+
<estreuv-sidebar title="Menu">
55+
<estreuv-sidebar-item label="Inbox" icon="📥"></estreuv-sidebar-item>
56+
<estreuv-sidebar-item label="Archive" icon="🗄"></estreuv-sidebar-item>
57+
<estreuv-sidebar-item label="Trash" icon="🗑"></estreuv-sidebar-item>
58+
</estreuv-sidebar>
5959
```
6060

6161
::: tip Live pair demo

packages/estreuv/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ the JS-side convention only.
120120
| `applyAliases`, `resolveAlias`, `isAliasApplied`, `ALIENESE_DEFAULT_ALIASES` | Alienese aliases |
121121

122122
Bundled tiles: `estreuv/dark-mode-tile.js`, `estreuv/clock-tile.js`, `estreuv/notif-count-tile.js`,
123-
`estreuv/notelle-sidebar.js`, `estreuv/notelle-item.js`.
123+
`estreuv/sidebar.js`, `estreuv/sidebar-item.js`.
124124

125125
## Footprint
126126

packages/estreuv/scripts/measure-bundle.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ for (const f of SRC_FILES) {
4545
// ─── I3: minified + gzip (lit core external) ────────────────────────────
4646
const tmp = mkdtempSync(join(tmpdir(), 'estreuv-bundle-'));
4747
const entryPath = join(tmp, 'entry.js');
48-
// 배럴 (index.js) + 모든 component 파일 (tile · notelle 등) 을 하나의 entry 로 — 소비자가 실제로 끌어다 쓰는 전부.
48+
// 배럴 (index.js) + 모든 component 파일 (tile · sidebar 등) 을 하나의 entry 로 — 소비자가 실제로 끌어다 쓰는 전부.
4949
// (index.js 의 deps 와 중복되는 모듈은 esbuild 가 dedupe)
5050
const componentFiles = SRC_FILES.filter(f => f !== 'index.js'
51-
&& (f.endsWith('-tile.js') || f.endsWith('-sidebar.js') || f.endsWith('-item.js')));
51+
&& (f.endsWith('-tile.js') || f.endsWith('sidebar.js') || f.endsWith('-item.js')));
5252
const entry = [
5353
`export * from ${JSON.stringify(join(SRC_DIR, 'index.js'))};`,
5454
...componentFiles.map(f => `import ${JSON.stringify(join(SRC_DIR, f))};`),
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/**
2-
* EstreUV — Notelle Item (Phase C) — 사이드바 안의 항목 component
2+
* EstreUV — Sidebar Item — 사이드바 안의 항목 component
33
*
4-
* `<estreuv-notelle-sidebar>` 의 slot 에 light-DOM 자식으로 배치됨. 따라서:
4+
* `<estreuv-sidebar>` 의 slot 에 light-DOM 자식으로 배치됨. 따라서:
55
* - article 의 `dispatchLifecycle(articleRoot, ...)` 가 `querySelectorAll('[data-estreuv]')` 로 직접 찾음
66
* → 사이드바와 *독립적으로* article lifecycle 을 받음 (중첩 깊이 무관)
77
* - 동시에 부모 사이드바로부터 `compact` / `active` prop 을 prop-down 으로 받음 (단방향, race 없음)
8-
* - 클릭 시 `notelle-item-activate` 이벤트를 부모 사이드바에 event-up
8+
* - 클릭 시 `estreuv-sidebar-activate` 이벤트를 부모 사이드바에 event-up
99
*
1010
* 이중 채널 구조: (1) article ↔ item lifecycle (flat dispatch), (2) sidebar ↔ item state (prop-down/event-up).
11-
* 두 채널이 서로 간섭하지 않음 — Phase B 의 채널 분리 원칙이 nested 케이스에서도 성립.
11+
* 두 채널이 서로 간섭하지 않음 — 채널 분리 원칙이 nested 케이스에서도 성립.
1212
*/
1313

1414
import { html, css } from 'lit';
1515
import { EstreUVElement } from './estreuv-element.js';
1616
import { applyAliases } from './alienese-alias.js';
1717

18-
export class NotelleItem extends EstreUVElement {
18+
export class EstreuvSidebarItem extends EstreUVElement {
1919

2020
/** Alienese: `*t` → `label`, `*ic` → `icon` */
2121
static aliases = { '*t': 'label', '*ic': 'icon' };
@@ -61,7 +61,7 @@ export class NotelleItem extends EstreUVElement {
6161
}
6262

6363
_activate() {
64-
this.dispatchEvent(new CustomEvent('notelle-item-activate', {
64+
this.dispatchEvent(new CustomEvent('estreuv-sidebar-activate', {
6565
detail: { label: this.label },
6666
bubbles: true,
6767
composed: true,
@@ -86,5 +86,5 @@ export class NotelleItem extends EstreUVElement {
8686
}
8787
}
8888

89-
applyAliases(NotelleItem);
90-
customElements.define('estreuv-notelle-item', NotelleItem);
89+
applyAliases(EstreuvSidebarItem);
90+
customElements.define('estreuv-sidebar-item', EstreuvSidebarItem);
Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
/**
2-
* EstreUV — Notelle Sidebar prototype (Phase C) — nested 컨테이너 케이스
2+
* EstreUV — Sidebar — nested 컨테이너 케이스
33
*
4-
* 사이드바 컨테이너 component. 안의 항목들 (`<estreuv-notelle-item>`) 도 EstreUV component →
4+
* 사이드바 컨테이너 component. 안의 항목들 (`<estreuv-sidebar-item>`) 도 EstreUV component →
55
* **중첩 lifecycle** 검증: article 의 lifecycle dispatch (`dispatchLifecycle(articleRoot, ...)`)
66
* 가 `querySelectorAll('[data-estreuv]')` 로 *임의 깊이의* 자손을 평면적으로 찾으므로,
77
* 사이드바도 + 그 안의 항목들도 모두 동명 lifecycle 메서드를 받는다. 별도 sub-coordinator 불필요.
88
*
9-
* 핵심 검증 (Phase C):
9+
* 핵심 검증:
1010
* - F1 확장: nested EstreUV component 가 article lifecycle 에 균일 참여 (사이드바 + N개 항목 모두 onShow/onHide 받음)
1111
* - 리소스 분리: 사이드바의 collapsed state 변경은 prop-down (각 item 이 받음). 양방향 race 없음
12-
* - Notelle 류 UI (사이드바 + 항목 리스트) 가 EstreUV 로 자연스럽게 — D2 (OS shell 마이그레이션) 의 정성 근거
13-
*
14-
* Estrelle Phase 1~2 OS shell 의 사이드바/리스트 컴포넌트가 이 패턴으로 마이그레이션 가능.
12+
* - 사이드바 + 항목 리스트 류 UI 가 EstreUV 로 자연스럽게 — D2 (OS shell 마이그레이션) 의 정성 근거
1513
*/
1614

1715
import { html, css } from 'lit';
1816
import { EstreUVElement } from './estreuv-element.js';
1917
import { applyAliases } from './alienese-alias.js';
2018

21-
export class NotelleSidebar extends EstreUVElement {
19+
export class EstreuvSidebar extends EstreUVElement {
2220

23-
/** Alienese: `*t` → `title`, `*on` → `collapsed` 의 반대... → 그냥 `*t` 만 (collapsed 는 boolean 이라 별도) */
21+
/** Alienese: `*t` → `title` */
2422
static aliases = { '*t': 'title' };
2523

2624
static properties = {
@@ -64,23 +62,23 @@ export class NotelleSidebar extends EstreUVElement {
6462
super();
6563
this.collapsed = false;
6664
this.activeLabel = '';
67-
this.title = 'Notelle';
65+
this.title = 'Menu';
6866
}
6967

7068
connectedCallback() {
7169
super.connectedCallback();
7270
// 항목 클릭 이벤트는 host (light DOM) 에서 직접 받음 — slot 경유 shadow 전파 의존 X
73-
this.addEventListener('notelle-item-activate', this._onItemActivate);
71+
this.addEventListener('estreuv-sidebar-activate', this._onItemActivate);
7472
}
7573

7674
disconnectedCallback() {
77-
this.removeEventListener('notelle-item-activate', this._onItemActivate);
75+
this.removeEventListener('estreuv-sidebar-activate', this._onItemActivate);
7876
super.disconnectedCallback();
7977
}
8078

8179
/** collapsed / activeLabel 변경을 슬롯된 항목들에 prop-down (양방향 race 없음 — owner 단방향) */
8280
_propagateToItems() {
83-
const items = this.querySelectorAll('estreuv-notelle-item');
81+
const items = this.querySelectorAll('estreuv-sidebar-item');
8482
items.forEach((item) => {
8583
item.compact = this.collapsed;
8684
item.active = item.label === this.activeLabel;
@@ -96,15 +94,15 @@ export class NotelleSidebar extends EstreUVElement {
9694

9795
toggleCollapsed() {
9896
this.collapsed = !this.collapsed;
99-
this.requestIntentUpdate({ notelleSidebarCollapsed: this.collapsed });
97+
this.requestIntentUpdate({ sidebarCollapsed: this.collapsed });
10098
}
10199

102-
/** 항목 클릭 시 (item 이 'notelle-item-activate' 이벤트 dispatch) → active 갱신 + intent 위임 */
100+
/** 항목 클릭 시 (item 이 'estreuv-sidebar-activate' 이벤트 dispatch) → active 갱신 + intent 위임 */
103101
_onItemActivate(e) {
104102
const label = e.detail?.label;
105103
if (label == null) return;
106104
this.activeLabel = label;
107-
this.requestIntentUpdate({ notelleActive: label });
105+
this.requestIntentUpdate({ sidebarActive: label });
108106
}
109107

110108
render() {
@@ -130,10 +128,10 @@ export class NotelleSidebar extends EstreUVElement {
130128
super.onShow(handle);
131129
// intent 에서 collapsed / active 복원 (재방문 시 매번)
132130
const intent = this.intent ?? {};
133-
if (intent.notelleSidebarCollapsed != null) this.collapsed = !!intent.notelleSidebarCollapsed;
134-
if (intent.notelleActive != null) this.activeLabel = String(intent.notelleActive);
131+
if (intent.sidebarCollapsed != null) this.collapsed = !!intent.sidebarCollapsed;
132+
if (intent.sidebarActive != null) this.activeLabel = String(intent.sidebarActive);
135133
}
136134
}
137135

138-
applyAliases(NotelleSidebar);
139-
customElements.define('estreuv-notelle-sidebar', NotelleSidebar);
136+
applyAliases(EstreuvSidebar);
137+
customElements.define('estreuv-sidebar', EstreuvSidebar);

0 commit comments

Comments
 (0)