diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 171b37c..8dbb496 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -13,13 +13,13 @@ labels: bug ## Environment - Necto version: - macOS version: -- Target connection: -- iOS version of the connected app: +- Target connection: +- iOS or Android version of the connected app: ## Steps to reproduce diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 521b255..5500005 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -51,7 +51,7 @@ jobs: retention-days: 1 sdk: - name: SDK Build & Tests + name: iOS SDK Build & Tests if: github.server_url == 'https://github.com' runs-on: macos-26 timeout-minutes: 30 @@ -86,7 +86,7 @@ jobs: retention-days: 1 e2e: - name: Simulator Connection & CLI E2E + name: iOS Simulator Connection & CLI E2E needs: [mac, sdk] if: github.server_url == 'https://github.com' runs-on: macos-26 @@ -178,6 +178,65 @@ jobs: SDK/Plugins/*/Android/build/reports/tests retention-days: 7 + android-e2e: + name: Android Emulator Connection E2E + if: github.server_url == 'https://github.com' + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 17 + cache: gradle + - name: Allow the runner to use KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + - name: Install Android SDK packages + run: > + (yes || true) | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager + "platforms;android-35" "build-tools;35.0.0" "platform-tools" "emulator" + "system-images;android-35;google_apis;x86_64" + - name: Build the Android sample + working-directory: SDK/Android + run: ./gradlew :sample:assembleDebug --console=plain + - name: Boot an emulator + env: + # avdmanager and the emulator look for AVDs in different default folders here. + ANDROID_AVD_HOME: ${{ runner.temp }}/avd + run: | + mkdir -p "$ANDROID_AVD_HOME" + echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd --force \ + --name necto --package "system-images;android-35;google_apis;x86_64" + nohup $ANDROID_HOME/emulator/emulator -avd necto -no-window -no-audio -no-boot-anim \ + -no-snapshot -gpu swiftshader_indirect > "$RUNNER_TEMP/emulator.log" 2>&1 & + adb=$ANDROID_HOME/platform-tools/adb + timeout 180 $adb wait-for-device + timeout 300 $adb shell 'until [ "$(getprop sys.boot_completed)" = 1 ]; do sleep 2; done' + $adb shell svc power stayon true + $adb shell wm dismiss-keyguard + # The Necto host runs on macOS only and hosted Mac runners cannot run an emulator, + # so this speaks to the SDK directly, the way the host does over ADB. + - name: Test the SDK connection on the emulator + run: | + script/android-sample emulator-5554 --sdk-only + script/test-android-security + - name: Upload emulator E2E results + if: always() + uses: actions/upload-artifact@v7 + with: + name: android-emulator-e2e-results + path: | + Build/Android/Logs + Build/Android/security-results.json + ${{ runner.temp }}/emulator.log + retention-days: 7 + docs: name: Documentation Build if: github.server_url == 'https://github.com' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abaf118..af15da3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,3 +92,37 @@ jobs: VERSION: ${{ inputs.version }} RELEASE_COMMIT: ${{ needs.build.outputs.commit }} run: node script/github-release.mjs publish "$VERSION" "$RELEASE_COMMIT" + + android: + name: Android SDK on JitPack + needs: [build, publish] + runs-on: ubuntu-24.04 + timeout-minutes: 30 + permissions: + contents: read + env: + VERSION: ${{ inputs.version }} + steps: + - uses: actions/checkout@v7 + with: + ref: ${{ needs.build.outputs.commit }} + persist-credentials: false + - uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 17 + cache: gradle + - name: Install Android SDK packages + run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platforms;android-35" "build-tools;35.0.0" + # JitPack builds a tag on its first request, and the build log answers once the + # build has ended. Asking here keeps the first app that adds the release from waiting. + - name: Build the release on JitPack + run: | + curl --fail --silent --show-error --max-time 900 \ + "https://jitpack.io/com/github/toss/necto/$VERSION/build.log" | tail -n 20 + status="$(curl --fail --silent --show-error https://jitpack.io/api/builds/com.github.toss/necto \ + | jq -r --arg version "$VERSION" '.["com.github.toss"].necto[$version]')" + echo "JitPack build of $VERSION: $status" + [[ "$status" == ok ]] + - name: Check selective consumers against JitPack + run: script/test-android-consumer --jitpack "$VERSION" diff --git a/CONTRIBUTING-ko.md b/CONTRIBUTING-ko.md index 081860b..9b3deba 100644 --- a/CONTRIBUTING-ko.md +++ b/CONTRIBUTING-ko.md @@ -21,7 +21,7 @@ Necto에 관심을 가져 주셔서 감사해요. 이슈와 풀 리퀘스트를 버그 신고나 기능 제안은 이슈로 남겨 주세요. 보안 취약점은 [보안 정책](SECURITY.md)에 따라 악용 방법이나 민감한 데이터를 공개하지 않고 문의해 주세요. -버그 리포트에는 Necto 버전, macOS 버전, 타깃 연결 방식(USB 실기기 또는 시뮬레이터), 재현 방법이 필요해요. +버그 리포트에는 Necto 버전, macOS 버전, 타깃 연결 방식(USB 실기기, 시뮬레이터 또는 에뮬레이터), 재현 방법이 필요해요. Necto의 기능 화면은 웹 플러그인이에요. 새 기능을 제안할 때는 셸·SDK·런타임 변경에 앞서 플러그인으로 구현할 수 있는지 검토해 주세요. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9586e0..e200666 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ For potential vulnerabilities, follow [SECURITY.md](SECURITY.md) before posting Use issues to report bugs or propose features. A bug report needs the Necto version, the macOS version, how the target was connected -(USB device or simulator), and steps to reproduce. +(USB device, simulator or emulator), and steps to reproduce. Necto's feature screens are web plugins. When proposing a feature, consider a plugin implementation before changes to the shell, SDK or runtime. diff --git a/Necto/ContentView.swift b/Necto/ContentView.swift index 04b1cab..095fa0d 100644 --- a/Necto/ContentView.swift +++ b/Necto/ContentView.swift @@ -48,6 +48,13 @@ struct ContentView: View { .onReceive(NotificationCenter.default.publisher(for: .nectoShowSettings)) { _ in if window.isMain { window.isShowingSettings = true } } + .onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in + Task { await model.updater.check(quietly: true) } + Task { + await model.load() + await model.checkPluginUpdates() + } + } .onReceive(NotificationCenter.default.publisher(for: .nectoFindInPanel)) { _ in if window.isMain { find.open() } } @@ -121,131 +128,135 @@ struct ContentView: View { .background(NectoTheme.sidebar) } - /// A `List` for its selection, its keyboard, its accessibility and its reordering. - /// - /// Hand-drawing these rows cost the sidebar all four — all to avoid one selection - /// highlight. The platform does the list; the highlight is suppressed in - /// `ListChromeOff` instead. + private enum SidebarAnchor: Hashable { + case app(String) + } + + /// A `List` for its selection, keyboard, accessibility and reordering. private var sidebarList: some View { - List(selection: sidebarSelection) { - if model.apps.isEmpty { - HStack(spacing: 6) { - Image(systemName: "cable.connector.slash") - Text("No app connected") + ScrollViewReader { proxy in + List(selection: sidebarSelection) { + if model.apps.isEmpty { + HStack(spacing: 6) { + Image(systemName: "cable.connector.slash") + Text("No app connected") + } + .font(.necto(.caption, scale: scale)) + .foregroundStyle(NectoTheme.textTertiary) + .padding(.horizontal, 12) + .padding(.vertical, 6) + .plainRow() } - .font(.necto(.caption, scale: scale)) - .foregroundStyle(NectoTheme.textTertiary) - .padding(.horizontal, 12) - .padding(.vertical, 6) - .plainRow() - } - ForEach(model.apps) { app in - AppHeader( - name: app.name, - bundleID: app.bundleID, - iconData: app.devices.first?.appIcon, - scale: scale - ) - .plainRow() - - ForEach(app.devices) { device in - DeviceRow( - device: device, - isSelected: window.selectedAppID == device.id, + ForEach(model.apps) { app in + AppHeader( + name: app.name, + bundleID: app.bundleID, + iconData: app.devices.first?.appIcon, scale: scale - ) { - window.selectedAppID = device.id - } + ) .plainRow() - } - } + .id(SidebarAnchor.app(app.id)) - if !window.activeDevicePlugins.isEmpty || !window.disabledDevicePlugins.isEmpty { - Section { - ForEach(window.activeDevicePlugins) { plugin in - SidebarItem( - title: plugin.manifest.name, - systemImage: plugin.manifest.icon.systemName, - trailing: plugin.manifest.version, - isSelected: !window.isShowingSettings && window.selectedPluginID == plugin.id, + ForEach(app.devices) { device in + DeviceRow( + device: device, + isSelected: window.selectedAppID == device.id, scale: scale - ) - .contextMenu { - Button(NectoL10n.text("Disable")) { model.setPlugin(plugin.id, enabled: false) } + ) { + window.selectedAppID = device.id } - .plainRow(isSelected: window.selectedPluginID == plugin.id) - .tag(plugin.id) - } - .onMove { from, to in - model.moveDevicePlugins(from: from, to: to, target: window.selectedTarget) + .plainRow() } + } - // The disabled sink to the bottom, in gray. Clicking one is not a - // dead end: its pane says what happened and offers the way back. - ForEach(window.disabledDevicePlugins) { plugin in - SidebarItem( - title: plugin.manifest.name, - systemImage: plugin.manifest.icon.systemName, - trailing: NectoL10n.text("off"), - isSelected: !window.isShowingSettings && window.selectedPluginID == plugin.id, - scale: scale, - isDimmed: true - ) - .contextMenu { - Button(NectoL10n.text("Enable")) { model.setPlugin(plugin.id, enabled: true) } + if !window.activeDevicePlugins.isEmpty || !window.disabledDevicePlugins.isEmpty { + Section { + pluginGroup("Device Plugins", showsSearch: true) + .plainRow() + + ForEach(window.activeDevicePlugins) { plugin in + SidebarItem( + title: plugin.manifest.name, + systemImage: plugin.manifest.icon.systemName, + trailing: plugin.manifest.version, + isSelected: !window.isShowingSettings && window.selectedPluginID == plugin.id, + scale: scale + ) + .contextMenu { + Button(NectoL10n.text("Disable")) { model.setPlugin(plugin.id, enabled: false) } + } + .plainRow(isSelected: window.selectedPluginID == plugin.id) + .tag(plugin.id) + } + .onMove { from, to in + model.moveDevicePlugins(from: from, to: to, target: window.selectedTarget) + } + + // The disabled sink to the bottom, in gray. Clicking one is not a + // dead end: its pane says what happened and offers the way back. + ForEach(window.disabledDevicePlugins) { plugin in + SidebarItem( + title: plugin.manifest.name, + systemImage: plugin.manifest.icon.systemName, + trailing: NectoL10n.text("off"), + isSelected: !window.isShowingSettings && window.selectedPluginID == plugin.id, + scale: scale, + isDimmed: true + ) + .contextMenu { + Button(NectoL10n.text("Enable")) { model.setPlugin(plugin.id, enabled: true) } + } + .plainRow(isSelected: window.selectedPluginID == plugin.id) + .tag(plugin.id) } - .plainRow(isSelected: window.selectedPluginID == plugin.id) - .tag(plugin.id) } - } header: { - // The category words, straight from the architecture: what the - // selected device's app carries, then what this Mac installed. - pluginGroup("Device Plugins", showsSearch: true) - .plainRow() - .listRowBackground(NectoTheme.sidebar) } - } - if !model.enabledPlugins.isEmpty { - Section { - // `editActions: .move` rather than a drag of our own: `ForEach` - // writes the rearranged list straight back through the binding, and - // the drag, its animation and the keyboard all stay the platform's. - ForEach(model.enabledPlugins) { plugin in - SidebarItem( - title: plugin.manifest.name, - systemImage: plugin.manifest.icon.systemName, - trailing: plugin.manifest.version, - isSelected: !window.isShowingSettings && window.selectedPluginID == plugin.id, - scale: scale + if !model.enabledPlugins.isEmpty { + Section { + pluginGroup( + "Desktop Plugins", + showsSearch: window.activeDevicePlugins.isEmpty && window.disabledDevicePlugins.isEmpty ) - .plainRow(isSelected: window.selectedPluginID == plugin.id) - .tag(plugin.id) - } - .onMove { from, to in - model.movePlugins(from: from, to: to) - } - } header: { - pluginGroup( - "Desktop Plugins", - showsSearch: window.activeDevicePlugins.isEmpty && window.disabledDevicePlugins.isEmpty - ) .plainRow() - // A section header is sticky and gets a material behind it - // unless it is told otherwise. - .listRowBackground(NectoTheme.sidebar) + + // `editActions: .move` rather than a drag of our own: `ForEach` + // writes the rearranged list straight back through the binding, and + // the drag, its animation and the keyboard all stay the platform's. + ForEach(model.enabledPlugins) { plugin in + SidebarItem( + title: plugin.manifest.name, + systemImage: plugin.manifest.icon.systemName, + trailing: plugin.manifest.version, + isSelected: !window.isShowingSettings && window.selectedPluginID == plugin.id, + scale: scale + ) + .plainRow(isSelected: window.selectedPluginID == plugin.id) + .tag(plugin.id) + } + .onMove { from, to in + model.movePlugins(from: from, to: to) + } + } + } + } + .listStyle(.plain) + .focusEffectDisabled() + .listSectionSeparator(.hidden) + .contentMargins(.all, 0, for: .scrollContent) + .scrollContentBackground(.hidden) + // AppKit rejects a zero minimum; use the same height as the rows themselves. + .environment(\.defaultMinListRowHeight, NectoTheme.rowHeight * scale) + .clipped() + .onChange(of: Set(model.connectedApps.map(\.id))) { previous, current in + guard !current.subtracting(previous).isEmpty, let first = model.apps.first else { return } + // Wait for List to apply the inserted rows before resolving their positions. + DispatchQueue.main.async { + proxy.scrollTo(SidebarAnchor.app(first.id), anchor: .top) } } } - .listStyle(.plain) - .focusEffectDisabled() - .listSectionSeparator(.hidden) - .contentMargins(.all, 0, for: .scrollContent) - .scrollContentBackground(.hidden) - // AppKit rejects a zero minimum; use the same height as the rows themselves. - .environment(\.defaultMinListRowHeight, NectoTheme.rowHeight * scale) - .clipped() } @ViewBuilder @@ -260,7 +271,7 @@ struct ContentView: View { disabledPluginIDs: Set(window.disabledDevicePlugins.map(\.id)), scale: scale, selection: sidebarSelection, isSearching: $isSearchingPlugins ) - .padding(.trailing, 2) + .padding(.trailing, 12) .padding(.top, 8) } } @@ -285,44 +296,18 @@ struct ContentView: View { systemImage: "slider.horizontal.3", // The count rather than a bare dot: one plugin that would not load and // eleven refused calls are different situations. - trailing: updaterIsQuiet && model.unreadIssueCount > 0 ? String(model.unreadIssueCount) : "", + trailing: model.unreadIssueCount > 0 ? String(model.unreadIssueCount) : "", trailingIsIssue: model.unreadIssueCount > 0, isSelected: window.isShowingSettings, - scale: scale + scale: scale, + hasUpdate: model.updater.hasUpdate || !model.pluginUpdates.isEmpty ) { window.isShowingSettings = true } - .overlay(alignment: .trailing) { - sidebarUpdateControl.padding(.trailing, 16) - } .padding(.vertical, 8) } } - private var updaterIsQuiet: Bool { - switch model.updater.phase { - case .available, .working: false - default: true - } - } - - /// The one place an update announces itself: a button beside Settings, and the - /// step it is on while it runs. Everything quieter stays in the About row. - @ViewBuilder - private var sidebarUpdateControl: some View { - switch model.updater.phase { - case .available: - Button(NectoL10n.text("Update")) { Task { await model.updater.update() } } - .buttonStyle(NectoButtonStyle(scale: scale, primary: true)) - case let .working(step): - Text(step) - .font(.necto(.caption, scale: scale)) - .foregroundStyle(NectoTheme.textTertiary) - default: - EmptyView() - } - } - private var detail: some View { VStack(spacing: 0) { TitleBar(leadingInset: 12, scale: scale) { diff --git a/Necto/NectoAppModel.swift b/Necto/NectoAppModel.swift index 22895fe..fdd01db 100644 --- a/Necto/NectoAppModel.swift +++ b/Necto/NectoAppModel.swift @@ -19,7 +19,10 @@ final class NectoAppModel { ) ?? NectoSemanticVersion(major: 0, minor: 0, patch: 0) private(set) var plugins: [NectoInstalledPlugin] = [] { - didSet { refreshBackgroundPanels() } + didSet { + refreshBackgroundPanels() + prunePluginUpdates() + } } /// Why a plugin on disk is not in `plugins`, keyed by folder name. Shown in /// Settings rather than only printed, because a plugin that silently fails to @@ -279,11 +282,8 @@ final class NectoAppModel { private(set) var pluginUpdates: [String: PluginUpdate] = [:] private(set) var isCheckingUpdates = false - /// Opening the Plugins page checks, and people open it often. Anonymous GitHub - /// allows sixty requests an hour, and every repository followed costs one request - /// plus one for each plugin installed from it, so an unthrottled check on every - /// visit would spend the hour and then report a rate limit as if something were - /// wrong. Asking explicitly ignores this. + /// Activation and opening Plugins share a throttle because each repository and + /// plugin manifest costs a GitHub request. Explicit checks bypass it. private var lastUpdateCheck: Date? private static let updateCheckInterval: TimeInterval = 15 * 60 @@ -307,7 +307,7 @@ final class NectoAppModel { isCheckingUpdates = true defer { isCheckingUpdates = false } - var found: [String: PluginUpdate] = [:] + var found = pluginUpdates var releases: [String: NectoReleaseSource.Release] = [:] for plugin in plugins { @@ -345,6 +345,7 @@ final class NectoAppModel { } } + found.removeValue(forKey: plugin.id) guard let offer = release.offers.first(where: { $0.manifest?.id == plugin.id }), let manifest = offer.manifest, let published = NectoSemanticVersion(manifest.version), @@ -360,9 +361,22 @@ final class NectoAppModel { } pluginUpdates = found + prunePluginUpdates() lastUpdateCheck = Date() } + private func prunePluginUpdates() { + pluginUpdates = pluginUpdates.filter { id, update in + plugins.contains { plugin in + guard plugin.id == id, plugin.source == .installed, + let origin = plugin.installation?.origin, + let installed = NectoSemanticVersion(plugin.manifest.version) else { return false } + return installed < update.version && origin.host == update.repository.host + && origin.owner == update.repository.owner && origin.repository == update.repository.name + } + } + } + /// Fetches the newer release and asks, the same way a first install asks. An /// update is not a smaller decision than an install: it can bind to something the /// last version did not. @@ -370,7 +384,6 @@ final class NectoAppModel { guard let update = pluginUpdates[pluginID], installer.enqueueUpdate(offer: update.offer, repository: update.repository, tag: update.tag, expecting: pluginID) else { return } - pluginUpdates.removeValue(forKey: pluginID) } // MARK: Removing @@ -488,6 +501,7 @@ final class NectoAppModel { await installer.reloadPlugins() await startControlServer() Task { await updater.check(quietly: true) } + Task { await checkPluginUpdates() } startWatchingConnections() } diff --git a/Necto/NectoSidebar.swift b/Necto/NectoSidebar.swift index a59c542..b46859e 100644 --- a/Necto/NectoSidebar.swift +++ b/Necto/NectoSidebar.swift @@ -146,6 +146,7 @@ struct SidebarItem: View { let scale: CGFloat /// Sunken: a disabled plugin, present but not in play. var isDimmed = false + var hasUpdate = false var select: (() -> Void)? @State private var isHovering = false @@ -168,16 +169,23 @@ struct SidebarItem: View { .font(.necto(.caption, scale: scale)) .foregroundStyle(trailingIsIssue ? NectoTheme.danger : NectoTheme.textTertiary) .lineLimit(1) + + if hasUpdate { + NectoUpdateDot() + } } .font(.necto(.label, scale: scale)) .foregroundStyle(isDimmed ? NectoTheme.textTertiary : isSelected ? NectoTheme.text : NectoTheme.textSecondary) - .padding(.horizontal, 8) + .padding(.leading, 8) + .padding(.trailing, 16) .frame(height: NectoTheme.rowHeight * scale) .background(background, in: RoundedRectangle(cornerRadius: NectoTheme.radiusControl)) .contentShape(Rectangle()) .padding(.horizontal, 8) .onHover { isHovering = $0 } .modifier(TapIfPresent(action: select)) + .accessibilityElement(children: .combine) + .accessibilityValue(hasUpdate ? NectoL10n.text("Update available") : "") } private var background: Color { @@ -336,10 +344,11 @@ struct DeviceRow: View { // or a simulator belongs to the symbol on the left. Circle() .fill(NectoTheme.success) - .frame(width: 6, height: 6) + .frame(width: NectoTheme.statusDotSize, height: NectoTheme.statusDotSize) } .font(.necto(.label, scale: scale)) - .padding(.horizontal, 8) + .padding(.leading, 8) + .padding(.trailing, 16) .frame(height: NectoTheme.rowHeight * scale) .background(background, in: RoundedRectangle(cornerRadius: NectoTheme.radiusControl)) .contentShape(Rectangle()) diff --git a/Necto/NectoSplitView.swift b/Necto/NectoSplitView.swift index 584fe3e..2ab863f 100644 --- a/Necto/NectoSplitView.swift +++ b/Necto/NectoSplitView.swift @@ -72,6 +72,44 @@ struct NectoSplitView: NSViewControllerRepresentabl } } + override func viewDidLayout() { + super.viewDidLayout() + if scrollerStyleObservation == nil { + configureSidebarList(in: sidebarHost.view) + } + } + + private func configureSidebarList(in view: NSView) { + if let scrollView = view as? NSScrollView, + let table = scrollView.documentView as? NSTableView { + // List restores the system style after inserting rows. Observe the + // scroll view so initial connections also keep overlay scrollbars. + scrollerStyleObservation = scrollView.observe(\.scrollerStyle, options: [.initial, .new]) { scrollView, _ in + MainActor.assumeIsolated { + if scrollView.scrollerStyle != .overlay { + scrollView.scrollerStyle = .overlay + } + } + } + // SwiftUI's plain List uses AppKit's fullWidth style, which adds + // padding outside the row's own insets. Settings has only our insets. + tableStyleObservation = table.observe(\.style, options: [.initial, .new]) { table, _ in + MainActor.assumeIsolated { + if table.style != .plain { + table.style = .plain + } + table.intercellSpacing.width = 0 + } + } + return + } + for child in view.subviews where scrollerStyleObservation == nil { + configureSidebarList(in: child) + } + } + + private var scrollerStyleObservation: NSKeyValueObservation? + private var tableStyleObservation: NSKeyValueObservation? private var hasPlacedDivider = false @available(*, unavailable) diff --git a/Necto/NectoTheme.swift b/Necto/NectoTheme.swift index 949e0c9..7cf729d 100644 --- a/Necto/NectoTheme.swift +++ b/Necto/NectoTheme.swift @@ -43,6 +43,7 @@ enum NectoTheme { static let rowHeight: CGFloat = 26 static let buttonHeight: CGFloat = 24 static let toolbarHeight: CGFloat = 38 + static let statusDotSize: CGFloat = 6 private static func adaptive(light: UInt32, dark: UInt32) -> Color { Color(nsColor: NSColor(name: nil) { appearance in diff --git a/Necto/NectoUpdater.swift b/Necto/NectoUpdater.swift index 3e0d0f6..1f4746d 100644 --- a/Necto/NectoUpdater.swift +++ b/Necto/NectoUpdater.swift @@ -22,15 +22,18 @@ final class NectoUpdater { /// or a stray copy. It should not overwrite whatever it is running from. case outside(NectoSemanticVersion) /// One human-readable step: Downloading…, Verifying…, Installing… - case working(String) + case working(String, progress: Double? = nil) case failed(String) } private(set) var phase: Phase = .idle + var hasUpdate: Bool { availableRelease.map { $0.version > current } ?? false } + private let current: NectoSemanticVersion private var availableRelease: NectoAppRelease? private var isChecking = false + private var lastCheck: Date? init(current: NectoSemanticVersion) { self.current = current @@ -41,8 +44,9 @@ final class NectoUpdater { func check(quietly: Bool = false) async { if case .working = phase { return } guard !isChecking else { return } + if quietly, let lastCheck, Date().timeIntervalSince(lastCheck) < 15 * 60 { return } isChecking = true - defer { isChecking = false } + defer { isChecking = false; lastCheck = Date() } await performCheck(quietly: quietly) } @@ -60,7 +64,7 @@ final class NectoUpdater { } } catch { if case .working = phase { return } - phase = quietly ? .idle : .failed(Self.message(of: error)) + if !quietly { phase = .failed(Self.message(of: error)) } } } @@ -89,8 +93,14 @@ final class NectoUpdater { let handoffExecutable = workspace.appending(path: "finish-update") try FileManager.default.copyItem(at: helper, to: handoffExecutable) - phase = .working(NectoL10n.text("Downloading…")) - let image = try await release.downloadImage(into: workspace) + let downloadStep = NectoL10n.text("Downloading…") + phase = .working(downloadStep) + let image = try await release.downloadImage(into: workspace) { [weak self] progress in + Task { @MainActor in + guard let self, case let .working(step, _) = self.phase, step == downloadStep else { return } + self.phase = .working(downloadStep, progress: progress) + } + } phase = .working(NectoL10n.text("Verifying…")) try await release.verifyImageChecksum(at: image) diff --git a/Necto/SettingsScreen.swift b/Necto/SettingsScreen.swift index e908689..554a6e2 100644 --- a/Necto/SettingsScreen.swift +++ b/Necto/SettingsScreen.swift @@ -59,6 +59,8 @@ struct SettingsScreen: View { ], selection: page, scale: scale, + updates: Set([model.updater.hasUpdate ? Page.general : nil, + model.pluginUpdates.isEmpty ? nil : Page.plugins].compactMap { $0 }), width: Binding( get: { CGFloat(navWidth) }, set: { navWidth = Double($0) } @@ -120,7 +122,7 @@ struct SettingsScreen: View { NectoRow( label: NectoL10n.text("Language"), - hint: NectoL10n.text("Changes Necto's native interface. Plugins manage their own language."), + hint: NectoL10n.text("Necto's display language. Plugins use their own language settings."), scale: scale, fontFamily: appearanceFont ) { @@ -144,7 +146,7 @@ struct SettingsScreen: View { NectoRow( label: NectoL10n.text("Text size"), - hint: NectoL10n.text("Applies to the app and to every plugin. \u{2318}+ and \u{2318}- also move it."), + hint: NectoL10n.text("Text size in the app and plugins. Shortcuts: \u{2318}+ and \u{2318}-."), scale: scale, fontFamily: appearanceFont ) { @@ -160,7 +162,7 @@ struct SettingsScreen: View { NectoRow( label: NectoL10n.text("UI font"), - hint: NectoL10n.text("A font family or CSS fallback stack."), + hint: NectoL10n.text("Font for the app and plugin interface."), scale: scale, fontFamily: appearanceFont ) { @@ -175,7 +177,7 @@ struct SettingsScreen: View { NectoRow( label: NectoL10n.text("Code font"), - hint: NectoL10n.text("Used for code, values and plugin data."), + hint: NectoL10n.text("Font for code, values and plugin data."), scale: scale, fontFamily: appearanceFont ) { @@ -203,15 +205,17 @@ struct SettingsScreen: View { NectoSectionTitle(NectoL10n.text("About"), scale: scale) - NectoRow(label: "Necto", hint: updateHint, scale: scale) { + NectoRow(label: "Necto", hint: updateHint, scale: scale, hasUpdate: model.updater.hasUpdate) { HStack(spacing: 8) { updateControl NectoRowValue(value: String(describing: NectoAppModel.nectoVersion), scale: scale) + // The fixed-width progress view can otherwise collapse this text to zero width. + .fixedSize() } } NectoRow( label: NectoL10n.text("Protocol"), - hint: NectoL10n.text("The wire version this build speaks."), + hint: NectoL10n.text("Version used to communicate with connected apps."), scale: scale ) { NectoRowValue(value: "1", scale: scale) @@ -222,7 +226,7 @@ struct SettingsScreen: View { label: NectoL10n.text("Command line tool"), hint: NectoL10n.text(model.cliInstaller.isInstalled ? "Use necto or necto-cli in your terminal." - : "Adds necto and necto-cli to /usr/local/bin. macOS will ask for administrator approval."), + : "Use necto or necto-cli in your terminal. Installation requires administrator approval."), scale: scale ) { Button(NectoL10n.text(model.cliInstaller.isInstalling ? "Installing…" @@ -296,10 +300,10 @@ struct SettingsScreen: View { case .checking: NectoL10n.text("Checking for updates…") case .upToDate: NectoL10n.text("Up to date.") case let .available(version): - NectoL10n.format("%@ is out — one click installs and relaunches.", String(describing: version)) + NectoL10n.format("Version %@ is available. Necto restarts after updating.", String(describing: version)) case let .outside(version): - NectoL10n.format("%@ is out, but Necto is not running from /Applications.", String(describing: version)) - case let .working(step): step + NectoL10n.format("Version %@ is available. Move Necto to Applications to update.", String(describing: version)) + case .working: "" case let .failed(reason): reason } } @@ -319,7 +323,11 @@ struct SettingsScreen: View { case .idle, .upToDate: Button(NectoL10n.text("Check for updates")) { Task { await model.updater.check() } } .buttonStyle(NectoButtonStyle(scale: scale, quiet: true)) - case .checking, .working: + case let .working(step, progress): + NectoUpdateProgress(step: step, fraction: progress, scale: scale) + .padding(.horizontal, 8) + .frame(width: NectoNav.defaultWidth) + case .checking: EmptyView() } } @@ -376,17 +384,17 @@ struct SettingsScreen: View { @ViewBuilder private var plugins: some View { - NectoSectionTitle(NectoL10n.text("Installed"), scale: scale, isFirst: true) + NectoSectionTitle(NectoL10n.text("Installed plugins"), scale: scale, isFirst: true) PluginTable(model: model, scale: scale) - NectoSectionTitle(NectoL10n.text("Add and edit"), scale: scale) + NectoSectionTitle(NectoL10n.text("Install and manage"), scale: scale) NectoRow( label: NectoL10n.text("Install from GitHub"), - hint: NectoL10n.text("Install the latest release from a repository, or choose a specific release."), + hint: NectoL10n.text("Install using a repository or release URL."), scale: scale ) { Button(NectoL10n.text("Add…")) { model.beginAddingLink() } @@ -396,7 +404,7 @@ struct SettingsScreen: View { NectoRow( label: NectoL10n.text("Install from a file"), hint: NectoL10n.text( - "Install a built desktop plugin from a folder or zip file. Necto does not verify the source or check for updates for file installs. Device plugins must be included in the app's Swift package." + "Install from a folder or ZIP file. Source verification and update checks are not available." ), scale: scale ) { @@ -406,7 +414,7 @@ struct SettingsScreen: View { NectoRow( label: NectoL10n.text("Plugins folder"), - hint: NectoL10n.text("After adding or changing a plugin folder, reload and approve the plugin. Deleting its folder also removes its permissions."), + hint: NectoL10n.text("Reload after adding or changing a plugin folder."), scale: scale ) { HStack(spacing: 8) { @@ -421,11 +429,11 @@ struct SettingsScreen: View { NectoRow( label: NectoL10n.text("Updates"), hint: NectoL10n.text( - "Checks for newer versions of plugins installed from a repository when you open this page. To check without downloading the archive, the release must include a separate manifest file." + "Check for updates to plugins installed from GitHub." ), scale: scale ) { - Button(model.isCheckingUpdates ? NectoL10n.text("Checking…") : NectoL10n.text("Check again")) { + Button(model.isCheckingUpdates ? NectoL10n.text("Checking…") : NectoL10n.text("Check for updates")) { Task { await model.checkPluginUpdates(quietly: false) } } .buttonStyle(NectoButtonStyle(scale: scale, quiet: true)) @@ -433,16 +441,16 @@ struct SettingsScreen: View { } if !model.pluginUpdates.isEmpty { - NectoSectionTitle(NectoL10n.text("Newer releases"), scale: scale) + NectoSectionTitle(NectoL10n.text("Available updates"), scale: scale) ForEach(model.pluginUpdates.sorted(by: { $0.value.name < $1.value.name }), id: \.key) { id, update in NectoRow( label: update.name, hint: NectoL10n.format( - "%@ is published at %@. Installing it asks again, because a new version can bind to something the last one did not.", - String(describing: update.version), - update.repository.label + "Version %@ is available.", + String(describing: update.version) ), - scale: scale + scale: scale, + hasUpdate: true ) { Button(NectoL10n.text("Update")) { model.installUpdate(for: id) } .buttonStyle(NectoButtonStyle(scale: scale)) @@ -466,7 +474,7 @@ struct SettingsScreen: View { ForEach(model.pluginsAwaitingApproval) { plugin in NectoRow( label: plugin.manifest.name, - hint: NectoL10n.text("These files are new or have changed. They will not run until you approve their source."), + hint: NectoL10n.text("Review the source before running new or changed files."), scale: scale ) { HStack(spacing: 8) { diff --git a/Necto/UI/NectoLayout.swift b/Necto/UI/NectoLayout.swift index 7dff266..b747c8d 100644 --- a/Necto/UI/NectoLayout.swift +++ b/Necto/UI/NectoLayout.swift @@ -41,6 +41,7 @@ struct NectoRow: View { var hint: String? let scale: CGFloat var fontFamily: String? = nil + var hasUpdate = false @ViewBuilder let control: () -> Control var body: some View { @@ -60,8 +61,13 @@ struct NectoRow: View { .frame(maxWidth: .infinity, alignment: .leading) control() + + if hasUpdate { + NectoUpdateDot() + .padding(.trailing, 8) + } } - .padding(.vertical, 8) + .padding(8) .frame(minHeight: 38) .overlay(alignment: .top) { Rectangle().fill(NectoTheme.border).frame(height: 1) @@ -91,6 +97,7 @@ struct NectoNav: View { let items: [(value: Value, label: String, systemImage: String)] let selection: Value let scale: CGFloat + var updates: Set = [] /// Persisted by the owner; the border is a handle, so a label that outgrows the /// column is dragged out of its trouble rather than truncated forever. @Binding var width: CGFloat @@ -105,7 +112,8 @@ struct NectoNav: View { label: item.label, systemImage: item.systemImage, isSelected: item.value == selection, - scale: scale + scale: scale, + hasUpdate: updates.contains(item.value) ) { select(item.value) } } @@ -145,6 +153,7 @@ struct NectoNavItem: View { let systemImage: String let isSelected: Bool let scale: CGFloat + var hasUpdate = false let select: () -> Void @State private var isHovering = false @@ -159,6 +168,11 @@ struct NectoNavItem: View { Text(label).lineLimit(1) Spacer(minLength: 0) + + if hasUpdate { + NectoUpdateDot() + .padding(.trailing, 8) + } } .font(.necto(.label, scale: scale)) .foregroundStyle(isSelected || isHovering ? NectoTheme.text : NectoTheme.textSecondary) @@ -170,6 +184,7 @@ struct NectoNavItem: View { .buttonStyle(.plain) .onHover { isHovering = $0 } .accessibilityLabel(label) + .accessibilityValue(hasUpdate ? NectoL10n.text("Update available") : "") } private var background: Color { @@ -178,6 +193,43 @@ struct NectoNavItem: View { } } +struct NectoUpdateDot: View { + var body: some View { + Circle() + .fill(NectoTheme.danger) + .frame(width: NectoTheme.statusDotSize, height: NectoTheme.statusDotSize) + .help(NectoL10n.text("Update available")) + .accessibilityHidden(true) + } +} + +struct NectoUpdateProgress: View { + let step: String + let fraction: Double? + let scale: CGFloat + + var body: some View { + VStack(alignment: .leading, spacing: 4) { + HStack(spacing: 8) { + Text(step) + Spacer(minLength: 0) + if let fraction { + Text(fraction, format: .percent.precision(.fractionLength(0))) + .monospacedDigit() + } + } + .font(.necto(.caption, scale: scale)) + .foregroundStyle(NectoTheme.textSecondary) + + ProgressView(value: fraction) + .progressViewStyle(.linear) + .controlSize(.small) + .tint(NectoTheme.accent) + .accessibilityLabel(step) + } + } +} + // MARK: Pairs /// `.necto-pairs`. One label column for the whole list, so values line down the pane diff --git a/Necto/en.lproj/Localizable.strings b/Necto/en.lproj/Localizable.strings index 71b728f..724d9a4 100644 --- a/Necto/en.lproj/Localizable.strings +++ b/Necto/en.lproj/Localizable.strings @@ -21,14 +21,14 @@ "Log" = "Log"; "Appearance" = "Appearance"; "Language" = "Language"; -"Changes Necto's native interface. Plugins manage their own language." = "Changes Necto's native interface. Plugins manage their own language."; +"Necto's display language. Plugins use their own language settings." = "Necto's display language. Plugins use their own language settings."; "System" = "System"; "Text size" = "Text size"; -"Applies to the app and to every plugin. ⌘+ and ⌘- also move it." = "Applies to the app and to every plugin. ⌘+ and ⌘- also move it."; +"Text size in the app and plugins. Shortcuts: ⌘+ and ⌘-." = "Text size in the app and plugins. Shortcuts: ⌘+ and ⌘-."; "UI font" = "UI font"; -"A font family or CSS fallback stack." = "A font family or CSS fallback stack."; +"Font for the app and plugin interface." = "Font for the app and plugin interface."; "Code font" = "Code font"; -"Used for code, values and plugin data." = "Used for code, values and plugin data."; +"Font for code, values and plugin data." = "Font for code, values and plugin data."; "Android" = "Android"; "Android SDK" = "Android SDK"; "Automatic" = "Automatic"; @@ -39,11 +39,11 @@ "Choose the Android SDK folder." = "Choose the Android SDK folder."; "About" = "About"; "Protocol" = "Protocol"; -"The wire version this build speaks." = "The wire version this build speaks."; +"Version used to communicate with connected apps." = "Version used to communicate with connected apps."; "Checking for updates…" = "Checking for updates…"; "Up to date." = "Up to date."; -"%@ is out — one click installs and relaunches." = "%@ is out — one click installs and relaunches."; -"%@ is out, but Necto is not running from /Applications." = "%@ is out, but Necto is not running from /Applications."; +"Version %@ is available. Necto restarts after updating." = "Version %@ is available. Necto restarts after updating."; +"Version %@ is available. Move Necto to Applications to update." = "Version %@ is available. Move Necto to Applications to update."; "Show releases" = "Show releases"; "Retry" = "Retry"; "Check for updates" = "Check for updates"; @@ -54,7 +54,7 @@ "Connections, plugins and refused calls appear here." = "Connections, plugins and refused calls appear here."; "%ld earlier lines dropped." = "%ld earlier lines dropped."; "Installed" = "Installed"; -"Add and edit" = "Add and edit"; +"Install and manage" = "Install and manage"; "Install" = "Install"; "Choose…" = "Choose…"; "Plugins folder" = "Plugins folder"; @@ -64,6 +64,8 @@ "Could not install" = "Could not install"; "Not loaded" = "Not loaded"; +"Installed plugins" = "Installed plugins"; + /* Plugin management */ "On" = "On"; "Name" = "Name"; @@ -78,10 +80,10 @@ "Update from file…" = "Update from file…"; "The ID matches, but Necto cannot verify the author of local files. Only update if you trust their source. This keeps existing permissions and settings, including Shell Access." = "The ID matches, but Necto cannot verify the author of local files. Only update if you trust their source. This keeps existing permissions and settings, including Shell Access."; "This folder has no installation identity yet. Confirm its source to register it as a new installation. Previous permissions are not inherited." = "This folder has no installation identity yet. Confirm its source to register it as a new installation. Previous permissions are not inherited."; -"After adding or changing a plugin folder, reload and approve the plugin. Deleting its folder also removes its permissions." = "After adding or changing a plugin folder, reload and approve the plugin. Deleting its folder also removes its permissions."; +"Reload after adding or changing a plugin folder." = "Reload after adding or changing a plugin folder."; "Review required" = "Review required"; "Review" = "Review"; -"These files are new or have changed. They will not run until you approve their source." = "These files are new or have changed. They will not run until you approve their source."; +"Review the source before running new or changed files." = "Review the source before running new or changed files."; "Expected plugin id '%@', but the selected files use '%@'." = "Expected plugin id '%@', but the selected files use '%@'."; "%@ by %@ · web assets only, no native code" = "%@ by %@ · web assets only, no native code"; "Replaces %@" = "Replaces %@"; @@ -127,8 +129,6 @@ "Which apps and devices are connected." = "Which apps and devices are connected."; "Saves files it produces into your Downloads folder. Never overwrites." = "Saves files it produces into your Downloads folder. Never overwrites."; "Opens Finder on a file it saved. Cannot point anywhere else." = "Opens Finder on a file it saved. Cannot point anywhere else."; -"Runs Bash commands on this Mac, subject to the Shell Access policy in Settings." = "Runs Bash commands on this Mac, subject to the Shell Access policy in Settings."; -"Asks you to add exact Bash commands to this plugin's approved list." = "Asks you to add exact Bash commands to this plugin's approved list."; "Every request the connected app makes, including headers and bodies." = "Every request the connected app makes, including headers and bodies."; "Empties the request log kept by the app." = "Empties the request log kept by the app."; "Everything the connected app has logged." = "Everything the connected app has logged."; @@ -191,7 +191,7 @@ "Command line tool" = "Command line tool"; "Install CLI" = "Install CLI"; "Use necto or necto-cli in your terminal." = "Use necto or necto-cli in your terminal."; -"Adds necto and necto-cli to /usr/local/bin. macOS will ask for administrator approval." = "Adds necto and necto-cli to /usr/local/bin. macOS will ask for administrator approval."; +"Use necto or necto-cli in your terminal. Installation requires administrator approval." = "Use necto or necto-cli in your terminal. Installation requires administrator approval."; "Could not install the CLI. %@" = "Could not install the CLI. %@"; "This app does not contain the CLI." = "This app does not contain the CLI."; "Another item exists at %@. Move it before installing the CLI." = "Another item exists at %@. Move it before installing the CLI."; @@ -199,7 +199,7 @@ "Install from GitHub" = "Install from GitHub"; "Reading…" = "Reading…"; "Install from a file" = "Install from a file"; -"Install a built desktop plugin from a folder or zip file. Necto does not verify the source or check for updates for file installs. Device plugins must be included in the app's Swift package." = "Install a built desktop plugin from a folder or zip file. Necto does not verify the source or check for updates for file installs. Device plugins must be included in the app's Swift package."; +"Install from a folder or ZIP file. Source verification and update checks are not available." = "Install from a folder or ZIP file. Source verification and update checks are not available."; "Install from %@" = "Install from %@"; "The release says nothing about this one. What it binds is on the next screen." = "The release says nothing about this one. What it binds is on the next screen."; "'%@' is not a GitHub repository address." = "'%@' is not a GitHub repository address."; @@ -210,11 +210,12 @@ "GitHub answered %@ and would not say more." = "GitHub answered %@ and would not say more."; "This holds several plugins (%@). Install them one at a time, or give Necto the repository they were published from." = "This holds several plugins (%@). Install them one at a time, or give Necto the repository they were published from."; "Updates" = "Updates"; -"Checks for newer versions of plugins installed from a repository when you open this page. To check without downloading the archive, the release must include a separate manifest file." = "Checks for newer versions of plugins installed from a repository when you open this page. To check without downloading the archive, the release must include a separate manifest file."; +"Update available" = "Update available"; +"Check for updates to plugins installed from GitHub." = "Check for updates to plugins installed from GitHub."; "Checking…" = "Checking…"; "Check again" = "Check again"; -"Newer releases" = "Newer releases"; -"%@ is published at %@. Installing it asks again, because a new version can bind to something the last one did not." = "%@ is published at %@. Installing it asks again, because a new version can bind to something the last one did not."; +"Available updates" = "Available updates"; +"Version %@ is available." = "Version %@ is available."; "Install %@" = "Install %@"; "%@ has no release tagged %@." = "%@ has no release tagged %@."; "Nothing at %@ answered. Either the address is wrong, or the repository is private and needs a GitHub login through gh." = "Nothing at %@ answered. Either the address is wrong, or the repository is private and needs a GitHub login through gh."; @@ -226,7 +227,7 @@ "That release." = "That release."; "A release page, pasted as it is." = "A release page, pasted as it is."; "Could not read that" = "Could not read that"; -"Install the latest release from a repository, or choose a specific release." = "Install the latest release from a repository, or choose a specific release."; +"Install using a repository or release URL." = "Install using a repository or release URL."; "Add…" = "Add…"; "Keeps running while other panels are visible. Disabling the plugin stops it." = "Keeps running while other panels are visible. Disabling the plugin stops it."; diff --git a/Necto/ko.lproj/Localizable.strings b/Necto/ko.lproj/Localizable.strings index a575750..186528d 100644 --- a/Necto/ko.lproj/Localizable.strings +++ b/Necto/ko.lproj/Localizable.strings @@ -11,83 +11,85 @@ "Settings" = "설정"; "Update" = "업데이트"; "off" = "꺼짐"; -"%@ is disabled" = "%@이(가) 비활성화되어 있습니다"; -"The app still carries it. Nothing is shown on this Mac." = "앱에는 포함되어 있지만 이 Mac에는 표시되지 않습니다."; -"No plugins yet" = "아직 플러그인이 없습니다"; -"Connect an app and its plugins appear here on their own." = "앱을 연결하면 포함된 플러그인이 자동으로 표시됩니다."; +"%@ is disabled" = "%@ 비활성화됨"; +"The app still carries it. Nothing is shown on this Mac." = "앱에 포함된 플러그인이지만 이 Mac에서는 표시하지 않아요."; +"No plugins yet" = "플러그인 없음"; +"Connect an app and its plugins appear here on their own." = "앱을 연결하면 플러그인이 표시돼요."; /* Settings */ "General" = "일반"; "Log" = "로그"; "Appearance" = "화면 설정"; "Language" = "언어"; -"Changes Necto's native interface. Plugins manage their own language." = "Necto의 네이티브 화면에 적용됩니다. 플러그인 언어는 각 플러그인에서 관리합니다."; +"Necto's display language. Plugins use their own language settings." = "Necto의 표시 언어예요. 플러그인은 자체 설정을 따라요."; "System" = "시스템"; "Text size" = "텍스트 크기"; -"Applies to the app and to every plugin. ⌘+ and ⌘- also move it." = "앱과 모든 플러그인에 적용됩니다. ⌘+와 ⌘-로도 조절할 수 있습니다."; -"UI font" = "UI 글꼴"; -"A font family or CSS fallback stack." = "글꼴 이름 또는 CSS 대체 글꼴 목록입니다."; +"Text size in the app and plugins. Shortcuts: ⌘+ and ⌘-." = "앱과 플러그인에 적용해요. ⌘+ / ⌘-"; +"UI font" = "화면 글꼴"; +"Font for the app and plugin interface." = "앱과 플러그인 화면에 사용할 글꼴이에요."; "Code font" = "코드 글꼴"; -"Used for code, values and plugin data." = "코드, 값, 플러그인 데이터에 사용됩니다."; +"Font for code, values and plugin data." = "코드와 데이터에 사용할 글꼴이에요."; "Android" = "Android"; "Android SDK" = "Android SDK"; "Automatic" = "자동"; -"Found automatically. Choose a folder if adb is elsewhere." = "자동으로 찾았습니다. adb가 다른 곳에 있다면 폴더를 지정하세요."; -"Not found. Choose the SDK folder that holds platform-tools." = "찾지 못했습니다. platform-tools가 들어 있는 SDK 폴더를 지정하세요."; -"Uses adb from this folder." = "이 폴더의 adb를 사용합니다."; -"No platform-tools/adb in this folder." = "이 폴더에 platform-tools/adb가 없습니다."; +"Found automatically. Choose a folder if adb is elsewhere." = "자동으로 찾았어요. adb가 다른 곳에 있다면 폴더를 지정하세요."; +"Not found. Choose the SDK folder that holds platform-tools." = "찾지 못했어요. platform-tools가 들어 있는 SDK 폴더를 지정하세요."; +"Uses adb from this folder." = "이 폴더의 adb를 사용해요."; +"No platform-tools/adb in this folder." = "이 폴더에 platform-tools/adb가 없어요."; "Choose the Android SDK folder." = "Android SDK 폴더를 선택하세요."; "About" = "정보"; "Protocol" = "프로토콜"; -"The wire version this build speaks." = "이 빌드가 사용하는 통신 프로토콜 버전입니다."; +"Version used to communicate with connected apps." = "연결된 앱과 통신할 때 사용하는 버전이에요."; "Checking for updates…" = "업데이트 확인 중…"; -"Up to date." = "최신 버전입니다."; -"%@ is out — one click installs and relaunches." = "%@ 버전이 있습니다. 한 번에 설치하고 다시 실행할 수 있습니다."; -"%@ is out, but Necto is not running from /Applications." = "%@ 버전이 있지만 Necto가 /Applications에서 실행 중이지 않습니다."; -"Show releases" = "릴리즈 보기"; +"Up to date." = "최신 버전이에요."; +"Version %@ is available. Necto restarts after updating." = "%@ 버전이 있어요. 업데이트 후 앱이 다시 실행돼요."; +"Version %@ is available. Move Necto to Applications to update." = "%@ 버전이 있어요. Necto를 응용 프로그램 폴더로 옮겨 업데이트해 주세요."; +"Show releases" = "릴리스 보기"; "Retry" = "다시 시도"; -"Check for updates" = "업데이트 확인하기"; +"Check for updates" = "업데이트 확인"; "What Necto did" = "Necto 동작 기록"; "Copy all" = "전체 복사"; "Copied" = "복사됨"; -"Nothing logged yet" = "아직 기록된 로그가 없습니다"; -"Connections, plugins and refused calls appear here." = "연결, 플러그인, 거절된 호출이 여기에 표시됩니다."; -"%ld earlier lines dropped." = "이전 로그 %ld줄이 삭제되었습니다."; +"Nothing logged yet" = "기록된 로그 없음"; +"Connections, plugins and refused calls appear here." = "연결 상태와 플러그인 동작, 거절된 요청을 확인해요."; +"%ld earlier lines dropped." = "이전 로그 %ld줄이 삭제됐어요."; "Installed" = "설치됨"; -"Add and edit" = "추가 및 관리"; +"Install and manage" = "설치 및 관리"; "Install" = "설치"; "Choose…" = "선택…"; "Plugins folder" = "플러그인 폴더"; -"Dropping a folder in installs it; deleting it removes it." = "폴더를 넣으면 설치되고 삭제하면 제거됩니다."; +"Dropping a folder in installs it; deleting it removes it." = "폴더를 넣으면 설치되고 삭제하면 제거돼요."; "Open" = "열기"; "Reload" = "새로고침"; "Could not install" = "설치할 수 없음"; "Not loaded" = "로드되지 않음"; +"Installed plugins" = "설치된 플러그인"; + /* Plugin management */ "On" = "사용"; "Name" = "이름"; "Version" = "버전"; "Source" = "출처"; -"Nothing installed yet." = "아직 설치된 플러그인이 없습니다."; +"Nothing installed yet." = "설치된 플러그인이 없어요."; "Enable %@" = "%@ 활성화"; "Remove" = "제거"; "Install %@?" = "%@을(를) 설치할까요?"; "Update %@?" = "%@을(를) 업데이트할까요?"; "Update %@" = "%@ 업데이트"; "Update from file…" = "파일로 업데이트…"; -"The ID matches, but Necto cannot verify the author of local files. Only update if you trust their source. This keeps existing permissions and settings, including Shell Access." = "ID는 같지만 Necto가 로컬 파일의 제작자를 확인할 수는 없습니다. 출처를 신뢰하는 경우에만 업데이트하세요. 셸 접근을 포함한 기존 권한과 설정을 유지합니다."; -"This folder has no installation identity yet. Confirm its source to register it as a new installation. Previous permissions are not inherited." = "아직 설치 식별자가 없는 폴더입니다. 출처를 확인하면 새 설치로 등록합니다. 이전 권한은 승계하지 않습니다."; -"After adding or changing a plugin folder, reload and approve the plugin. Deleting its folder also removes its permissions." = "폴더를 추가하거나 변경했다면 새로고침 후 플러그인을 승인해 주세요. 폴더를 삭제하면 해당 플러그인의 권한도 제거합니다."; +"The ID matches, but Necto cannot verify the author of local files. Only update if you trust their source. This keeps existing permissions and settings, including Shell Access." = "ID는 같지만 파일의 제작자는 확인할 수 없어요. 출처를 신뢰할 때만 업데이트해 주세요. 셸 권한을 포함한 기존 권한과 설정은 유지돼요."; +"This folder has no installation identity yet. Confirm its source to register it as a new installation. Previous permissions are not inherited." = "아직 등록되지 않은 폴더예요. 출처를 확인하면 새 플러그인으로 등록해요. 기존 권한은 이어받지 않아요."; +"Reload after adding or changing a plugin folder." = "폴더를 추가하거나 변경한 뒤 새로고침해 주세요."; "Review required" = "확인 필요"; "Review" = "확인"; -"These files are new or have changed. They will not run until you approve their source." = "새로 추가되었거나 내용이 변경된 파일입니다. 출처를 확인하기 전에는 실행하지 않습니다."; -"Expected plugin id '%@', but the selected files use '%@'." = "플러그인 ID가 '%@'이어야 하지만 선택한 파일의 ID는 '%@'입니다."; +"Review the source before running new or changed files." = "새로 추가되거나 변경된 파일이에요. 실행하려면 출처를 확인해 주세요."; +"Expected plugin id '%@', but the selected files use '%@'." = "플러그인 ID가 '%@'이어야 해요. 선택한 파일의 ID는 '%@'예요."; "%@ by %@ · web assets only, no native code" = "%@ · %@ 제작 · 네이티브 코드 없이 웹 에셋만 포함"; "Replaces %@" = "%@ 교체"; -"A plugin with this id is already installed. This one takes its place in the sidebar, and starts with nothing agreed to and no stored settings of its own." = "같은 ID의 플러그인이 이미 설치되어 있습니다. 새 플러그인이 사이드바의 기존 항목을 교체하며, 권한과 저장된 설정은 이어받지 않습니다."; -"This plugin asks for nothing. It can draw, and that is all." = "이 플러그인은 아무 권한도 요청하지 않습니다. 화면만 표시할 수 있습니다."; -"Installing is the agreement. An update that binds to something new asks again." = "설치하면 위 권한에 동의합니다. 업데이트에서 새 권한을 사용하면 다시 확인합니다."; +"A plugin with this id is already installed. This one takes its place in the sidebar, and starts with nothing agreed to and no stored settings of its own." = "같은 ID의 플러그인이 있어요. 새 플러그인으로 교체하며 기존 권한과 설정은 이어받지 않아요."; +"This plugin asks for nothing. It can draw, and that is all." = "요청하는 권한이 없어요. 화면만 표시할 수 있어요."; +"Installing is the agreement. An update that binds to something new asks again." = "설치하면 위 권한에 동의해요. 새 권한이 필요한 업데이트는 다시 확인해요."; "Cancel" = "취소"; "app" = "앱"; @@ -97,44 +99,42 @@ "Connected over USB" = "USB로 연결됨"; "App %@" = "앱 %@"; "Necto SDK %@" = "Necto SDK %@"; -"Choose a plugin folder or a zip of one." = "플러그인 폴더 또는 zip 파일을 선택하세요."; +"Choose a plugin folder or a zip of one." = "플러그인 폴더 또는 ZIP 파일을 선택해 주세요."; "Could not remove: %@" = "제거할 수 없음: %@"; -"Another plugin already uses the id '%@'" = "다른 플러그인이 이미 '%@' ID를 사용하고 있습니다"; -"No manifest.json was found in what was downloaded" = "다운로드한 항목에서 manifest.json을 찾을 수 없습니다"; -"manifest.json could not be read: %@" = "manifest.json을 읽을 수 없습니다: %@"; -"%@ is already installed" = "%@이(가) 이미 설치되어 있습니다"; -"Could not unpack the archive: %@" = "압축 파일을 풀 수 없습니다: %@"; -"This plugin binds to '%@', which a connected app answers. A plugin that needs the app rides in the app: add its Swift package there, and it appears here on its own." = "이 플러그인은 연결된 앱이 응답하는 '%@'에 연결됩니다. 앱이 필요한 플러그인은 앱에 포함되어야 합니다. 앱의 Swift 패키지에 추가하면 자동으로 표시됩니다."; -"The latest release has no readable tag" = "최신 릴리즈의 태그를 읽을 수 없습니다"; +"Another plugin already uses the id '%@'" = "다른 플러그인이 이미 '%@' ID를 사용하고 있어요"; +"No manifest.json was found in what was downloaded" = "다운로드한 항목에서 manifest.json을 찾을 수 없어요"; +"manifest.json could not be read: %@" = "manifest.json을 읽을 수 없어요: %@"; +"%@ is already installed" = "%@ 설치됨"; +"Could not unpack the archive: %@" = "압축 파일을 풀 수 없어요: %@"; +"This plugin binds to '%@', which a connected app answers. A plugin that needs the app rides in the app: add its Swift package there, and it appears here on its own." = "'%@'은(는) 연결된 앱이 제공해요. 이 플러그인은 앱의 Swift 패키지에 추가해야 해요. 앱을 연결하면 자동으로 표시돼요."; +"The latest release has no readable tag" = "최신 릴리스의 태그를 읽을 수 없어요"; "Downloading…" = "다운로드 중…"; -"The release carries no dmg and hash to verify" = "릴리즈에 검증할 dmg와 해시가 없습니다"; +"The release carries no dmg and hash to verify" = "릴리스에 검증할 dmg와 해시가 없어요"; "Verifying…" = "검증 중…"; -"The download did not match its published hash. Nothing was installed." = "다운로드한 파일의 해시가 게시된 값과 다릅니다. 아무것도 설치하지 않았습니다."; +"The download did not match its published hash. Nothing was installed." = "다운로드한 파일의 해시가 게시된 값과 달라요. 아무것도 설치하지 않았어요."; "Installing…" = "설치 중…"; -"The dmg contains no app" = "dmg에 앱이 없습니다"; +"The dmg contains no app" = "dmg에 앱이 없어요"; "Relaunching…" = "다시 실행 중…"; -"The update's integrity, app ID or version could not be verified. Nothing was installed." = "업데이트 파일의 무결성, 앱 ID 또는 버전을 확인하지 못했습니다. 아무것도 설치하지 않았습니다."; -"The release does not provide valid app assets." = "릴리스에 유효한 앱 파일이 없습니다."; -"The update download failed (HTTP %d)." = "업데이트 다운로드에 실패했습니다(HTTP %d)."; -"The update check failed (HTTP %d)." = "업데이트 확인에 실패했습니다(HTTP %d)."; -"The update download exceeded its size limit." = "업데이트 다운로드가 용량 제한을 초과했습니다."; +"The update's integrity, app ID or version could not be verified. Nothing was installed." = "업데이트 파일의 무결성, 앱 ID 또는 버전을 확인하지 못해 설치하지 않았어요."; +"The release does not provide valid app assets." = "릴리스에 유효한 앱 파일이 없어요."; +"The update download failed (HTTP %d)." = "업데이트 다운로드에 실패했어요(HTTP %d)."; +"The update check failed (HTTP %d)." = "업데이트 확인에 실패했어요(HTTP %d)."; +"The update download exceeded its size limit." = "업데이트 다운로드가 용량 제한을 초과했어요."; /* Bridge permission wording */ -"Which version of Necto is running." = "실행 중인 Necto 버전을 확인합니다."; -"A repeating tick from Necto, for plugins that need one." = "주기 실행이 필요한 플러그인에 Necto의 반복 신호를 전달합니다."; -"Reads settings it stored itself, in a space only it can read." = "플러그인 전용 공간에 저장한 설정을 읽습니다."; -"Stores its own settings, in a space only it can read." = "플러그인 전용 공간에 자체 설정을 저장합니다."; -"Which apps and devices are connected." = "연결된 앱과 기기를 확인합니다."; -"Saves files it produces into your Downloads folder. Never overwrites." = "생성한 파일을 다운로드 폴더에 저장하며 기존 파일은 덮어쓰지 않습니다."; -"Opens Finder on a file it saved. Cannot point anywhere else." = "저장한 파일을 Finder에서 보여주며 다른 위치는 가리킬 수 없습니다."; -"Runs Bash commands on this Mac, subject to the Shell Access policy in Settings." = "이 Mac에서 Bash 명령어를 실행하며 설정의 셸 권한 정책을 따릅니다."; -"Asks you to add exact Bash commands to this plugin's approved list." = "이 플러그인의 승인 목록에 정확한 Bash 명령어를 추가하도록 요청합니다."; -"Every request the connected app makes, including headers and bodies." = "연결된 앱의 모든 요청을 헤더와 본문까지 확인합니다."; -"Empties the request log kept by the app." = "앱이 보관한 요청 로그를 비웁니다."; -"Everything the connected app has logged." = "연결된 앱이 기록한 모든 로그를 확인합니다."; -"Empties the event log kept by the app." = "앱이 보관한 이벤트 로그를 비웁니다."; -"What the connected app is spending: memory, frame rate, CPU." = "연결된 앱의 메모리, 프레임률, CPU 사용량을 확인합니다."; -"Not described by this version of Necto. Only install it if you trust the author." = "이 Necto 버전에 설명이 없습니다. 제작자를 신뢰하는 경우에만 설치하세요."; +"Which version of Necto is running." = "실행 중인 Necto 버전을 확인해요."; +"A repeating tick from Necto, for plugins that need one." = "Necto에서 주기적으로 신호를 받아요."; +"Reads settings it stored itself, in a space only it can read." = "이 플러그인만 접근할 수 있는 공간에서 자체 설정을 읽어요."; +"Stores its own settings, in a space only it can read." = "이 플러그인만 접근할 수 있는 공간에 자체 설정을 저장해요."; +"Which apps and devices are connected." = "연결된 앱과 기기를 확인해요."; +"Saves files it produces into your Downloads folder. Never overwrites." = "만든 파일을 다운로드 폴더에 저장해요. 기존 파일은 덮어쓰지 않아요."; +"Opens Finder on a file it saved. Cannot point anywhere else." = "저장한 파일을 Finder에서 열어요. 다른 위치는 열 수 없어요."; +"Every request the connected app makes, including headers and bodies." = "연결된 앱의 모든 요청을 헤더와 본문까지 확인해요."; +"Empties the request log kept by the app." = "앱이 보관한 요청 로그를 비워요."; +"Everything the connected app has logged." = "연결된 앱이 기록한 모든 로그를 확인해요."; +"Empties the event log kept by the app." = "앱이 보관한 이벤트 로그를 비워요."; +"What the connected app is spending: memory, frame rate, CPU." = "연결된 앱의 메모리, 프레임률, CPU 사용량을 확인해요."; +"Not described by this version of Necto. Only install it if you trust the author." = "이 버전의 Necto에는 권한 설명이 없어요. 제작자를 신뢰할 때만 설치해 주세요."; "Find…" = "찾기…"; "Find in panel" = "패널에서 찾기"; "No matches" = "일치 없음"; @@ -144,89 +144,90 @@ "Plugin ID" = "플러그인 ID"; "Plugin-provided message" = "플러그인이 작성한 설명"; "Allow shell access?" = "셸 명령어 실행을 허용할까요?"; -"Approving adds these exact commands to this plugin's Command approval list." = "승인하면 표시된 명령어가 이 플러그인의 명령별 승인 목록에 정확한 문자열로 추가됩니다."; +"Approving adds these exact commands to this plugin's Command approval list." = "승인하면 표시된 명령어를 그대로 이 플러그인의 승인 목록에 추가해요."; "Deny" = "거절"; "Approve" = "승인"; "Full access for this plugin" = "이 플러그인 전체 허용"; -"This plugin will be able to run any shell command without asking again." = "이 플러그인은 다시 묻지 않고 모든 셸 명령어를 실행할 수 있습니다."; +"This plugin will be able to run any shell command without asking again." = "이 플러그인은 다시 묻지 않고 모든 셸 명령어를 실행할 수 있어요."; /* Shell access settings */ "Shell Access" = "셸 권한"; "Shell access" = "셸 권한"; "Global override" = "전체 허용"; "Full Access" = "전체 허용"; -"Allow every desktop plugin and CLI request without confirmation." = "모든 데스크톱 플러그인과 CLI 요청이 확인 없이 실행되도록 허용합니다."; -"Plugin-level settings are ignored" = "플러그인별 설정이 무시됩니다"; -"Turning Full Access off restores every saved plugin setting." = "전체 허용을 끄면 저장된 플러그인별 설정이 다시 적용됩니다."; +"Allow every desktop plugin and CLI request without confirmation." = "모든 데스크탑 플러그인과 CLI의 셸 요청을 확인 없이 허용해요."; +"Plugin-level settings are ignored" = "플러그인별 설정은 적용되지 않아요"; +"Turning Full Access off restores every saved plugin setting." = "전체 허용을 끄면 플러그인별 설정이 다시 적용돼요."; "Plugin access" = "플러그인별 권한"; -"Select a plugin to review or change its shell permissions." = "플러그인을 선택해 셸 권한을 확인하거나 변경하세요."; +"Select a plugin to review or change its shell permissions." = "플러그인을 선택해 셸 권한을 확인하거나 바꿔 주세요."; "CLI access" = "CLI 권한"; -"Plugins without the shell bridge do not appear here." = "셸 브릿지를 사용하지 않는 플러그인은 표시되지 않습니다."; +"Plugins without the shell bridge do not appear here." = "셸 브리지를 사용하는 플러그인만 표시해요."; "Enable Full Access?" = "전체 허용을 켤까요?"; -"Every desktop plugin and necto-cli command will run without confirmation." = "모든 데스크톱 플러그인과 necto-cli 명령어가 확인 없이 실행됩니다."; +"Every desktop plugin and necto-cli command will run without confirmation." = "모든 데스크탑 플러그인과 necto-cli가 셸 명령어를 확인 없이 실행해요."; "No plugin-level protection" = "플러그인별 보호 없음"; -"This mode gives every caller the same shell access as a local native app." = "이 모드에서는 모든 호출자가 로컬 네이티브 앱과 동일한 셸 권한을 가집니다."; +"This mode gives every caller the same shell access as a local native app." = "모든 호출자가 이 Mac의 일반 앱과 같은 셸 권한을 가져요."; "Protected" = "보호됨"; "Command approval · %ld command" = "명령별 승인 · %ld개"; "Command approval · %ld commands" = "명령별 승인 · %ld개"; "Full access" = "전체 허용"; "Access for this plugin" = "이 플러그인의 권한"; -"Reject every shell request from this plugin." = "이 플러그인의 모든 셸 요청을 거절합니다."; +"Reject every shell request from this plugin." = "이 플러그인의 모든 셸 요청을 거절해요."; "Command approval" = "명령별 승인"; -"Run only the exact commands listed below." = "아래 목록과 정확히 일치하는 명령어만 실행합니다."; -"Run any shell command from this plugin without confirmation." = "이 플러그인의 모든 셸 명령어를 확인 없이 실행합니다."; -"This plugin has the same shell access as a local native app." = "이 플러그인은 로컬 네이티브 앱과 동일한 셸 권한을 가집니다."; +"Run only the exact commands listed below." = "아래 목록과 정확히 일치하는 명령어만 실행해요."; +"Run any shell command from this plugin without confirmation." = "이 플러그인의 모든 셸 명령어를 확인 없이 실행해요."; +"This plugin has the same shell access as a local native app." = "이 플러그인은 이 Mac의 일반 앱과 같은 셸 권한을 가져요."; "by %@" = "%@ 제작"; "Approved commands" = "승인된 명령어"; "Add command…" = "명령어 추가…"; "No approved commands" = "승인된 명령어 없음"; -"Add one here or approve a request from the plugin." = "여기에서 추가하거나 플러그인의 요청을 승인하세요."; +"Add one here or approve a request from the plugin." = "여기에서 추가하거나 플러그인의 요청을 승인해 주세요."; "Remove all commands" = "모든 명령어 제거"; "Add an approved command" = "승인할 명령어 추가"; -"%@ may run this exact command without asking again." = "%@이(가) 이 명령어를 다시 묻지 않고 실행할 수 있습니다."; +"%@ may run this exact command without asking again." = "%@에서 이 명령어를 다시 묻지 않고 실행할 수 있어요."; "Add" = "추가"; "Agent skills" = "에이전트 스킬"; "Could not install the skill." = "스킬을 설치하지 못했어요."; -"Use Necto from %@." = "%@에서 Necto를 사용할 수 있습니다."; +"Use Necto from %@." = "%@에서 Necto를 사용할 수 있어요."; "Command line tool" = "명령줄 도구"; "Install CLI" = "CLI 설치"; -"Use necto or necto-cli in your terminal." = "터미널에서 necto 또는 necto-cli를 사용할 수 있습니다."; -"Adds necto and necto-cli to /usr/local/bin. macOS will ask for administrator approval." = "/usr/local/bin에 necto와 necto-cli를 연결합니다. 설치할 때 macOS에서 관리자 승인을 요청합니다."; -"Could not install the CLI. %@" = "CLI를 설치하지 못했습니다. %@"; -"This app does not contain the CLI." = "이 앱에는 CLI가 포함되어 있지 않습니다."; -"Another item exists at %@. Move it before installing the CLI." = "%@에 다른 파일이나 링크가 있습니다. 해당 항목을 옮긴 뒤 CLI를 설치해 주세요."; -"The CLI links could not be verified. Try installing again." = "CLI 연결을 확인하지 못했습니다. 다시 설치해 주세요."; +"Use necto or necto-cli in your terminal." = "터미널에서 necto 또는 necto-cli를 사용할 수 있어요."; +"Use necto or necto-cli in your terminal. Installation requires administrator approval." = "터미널에서 necto 또는 necto-cli를 사용해요. 설치 시 관리자 승인이 필요해요."; +"Could not install the CLI. %@" = "CLI를 설치하지 못했어요. %@"; +"This app does not contain the CLI." = "이 앱에는 CLI가 포함되어 있지 않아요."; +"Another item exists at %@. Move it before installing the CLI." = "%@에 다른 파일이나 링크가 있어요. 해당 항목을 옮긴 뒤 CLI를 설치해 주세요."; +"The CLI links could not be verified. Try installing again." = "CLI 연결을 확인하지 못했어요. 다시 설치해 주세요."; "Install from GitHub" = "GitHub에서 설치"; "Reading…" = "읽는 중…"; "Install from a file" = "파일에서 설치"; -"Install a built desktop plugin from a folder or zip file. Necto does not verify the source or check for updates for file installs. Device plugins must be included in the app's Swift package." = "빌드된 데스크탑 플러그인 폴더 또는 zip을 설치합니다. 파일로 설치하면 출처와 새 버전을 확인할 수 없습니다. 기기 플러그인은 여기서 설치하지 않고 앱의 Swift 패키지에 포함합니다."; +"Install from a folder or ZIP file. Source verification and update checks are not available." = "폴더 또는 ZIP 파일로 설치해요. 출처 검증과 업데이트 알림은 지원하지 않아요."; "Install from %@" = "%@에서 설치"; -"The release says nothing about this one. What it binds is on the next screen." = "릴리스에 이 플러그인 설명이 없습니다. 무엇에 연결되는지는 다음 화면에서 확인합니다."; -"'%@' is not a GitHub repository address." = "'%@'은(는) GitHub 저장소 주소가 아닙니다."; -"%@ has published no releases yet. A folder or zip of one can still be installed with Choose…." = "%@에 아직 발행된 릴리스가 없습니다. 폴더나 zip은 선택…으로 설치할 수 있습니다."; -"The release of %@ carries no plugin archive." = "%@의 릴리스에 플러그인 아카이브가 없습니다."; -"Runs Bash commands on this Mac, subject to the Shell Access policy in Settings." = "이 Mac에서 Bash 명령어를 실행합니다. 설정의 셸 권한 정책을 따릅니다."; -"Asks you to add exact Bash commands to this plugin's approved list." = "이 플러그인의 승인 목록에 특정 Bash 명령어를 추가할지 묻습니다."; -"GitHub answered %@ and would not say more." = "GitHub이 %@로 답했고 더 알려주지 않았습니다."; -"This holds several plugins (%@). Install them one at a time, or give Necto the repository they were published from." = "여러 플러그인(%@)이 들어 있습니다. 하나씩 설치하거나, 발행된 저장소 주소를 알려주세요."; +"The release says nothing about this one. What it binds is on the next screen." = "플러그인 설명이 없어요. 요청하는 권한은 다음 화면에서 확인해 주세요."; +"'%@' is not a GitHub repository address." = "GitHub 저장소 주소가 아니에요: %@"; +"%@ has published no releases yet. A folder or zip of one can still be installed with Choose…." = "%@에 릴리스가 없어요. 폴더나 ZIP 파일은 '선택…'으로 설치할 수 있어요."; +"The release of %@ carries no plugin archive." = "%@ 릴리스에 플러그인 파일이 없어요."; +"Runs Bash commands on this Mac, subject to the Shell Access policy in Settings." = "이 Mac에서 Bash 명령어를 실행해요. 설정의 셸 권한을 따라요."; +"Asks you to add exact Bash commands to this plugin's approved list." = "특정 Bash 명령어를 이 플러그인의 승인 목록에 추가할지 물어요."; +"GitHub answered %@ and would not say more." = "GitHub 응답: %@. 자세한 오류 정보는 없어요."; +"This holds several plugins (%@). Install them one at a time, or give Necto the repository they were published from." = "플러그인이 여러 개 있어요(%@). 하나씩 설치하거나 GitHub 저장소 주소를 입력해 주세요."; "Updates" = "업데이트"; -"Checks for newer versions of plugins installed from a repository when you open this page. To check without downloading the archive, the release must include a separate manifest file." = "이 화면을 열면 저장소에서 설치한 플러그인의 새 버전을 확인합니다. 릴리스에 아카이브와 manifest 파일이 함께 있어야 플러그인을 내려받지 않고 새 버전을 확인할 수 있습니다."; +"Update available" = "업데이트 있음"; +"Check for updates to plugins installed from GitHub." = "GitHub에서 설치한 플러그인의 새 버전을 확인해요."; "Checking…" = "확인 중…"; "Check again" = "다시 확인"; -"Newer releases" = "새 릴리스"; -"%@ is published at %@. Installing it asks again, because a new version can bind to something the last one did not." = "%@이(가) %@에 발행되어 있습니다. 새 버전은 이전에 없던 것에 연결될 수 있어 설치할 때 다시 묻습니다."; +"Available updates" = "업데이트 가능"; +"Version %@ is available." = "%@ 버전이 있어요."; "Install %@" = "%@ 설치"; -"%@ has no release tagged %@." = "%@에 %@ 태그의 릴리스가 없습니다."; -"Nothing at %@ answered. Either the address is wrong, or the repository is private and needs a GitHub login through gh." = "%@에서 아무 응답이 없습니다. 주소가 틀렸거나, 비공개 저장소라 gh로 GitHub에 로그인해야 합니다."; -"%@ answers no one without a GitHub login, and gh is not installed. Install it with Homebrew, then run gh auth login." = "%@은(는) GitHub 로그인 없이는 응답하지 않는데 gh가 설치돼 있지 않습니다. Homebrew로 설치한 뒤 gh auth login을 실행해 주세요."; +"%@ has no release tagged %@." = "%@에 %@ 태그의 릴리스가 없어요."; +"Nothing at %@ answered. Either the address is wrong, or the repository is private and needs a GitHub login through gh." = "%@에서 응답이 없어요. 주소를 확인해 주세요. 비공개 저장소는 gh로 GitHub에 로그인해야 해요."; +"%@ answers no one without a GitHub login, and gh is not installed. Install it with Homebrew, then run gh auth login." = "%@에 접근하려면 GitHub 로그인이 필요해요. Homebrew로 gh를 설치한 뒤 gh auth login을 실행해 주세요."; "Done" = "닫기"; -"%@ holds %@ plugins. Each one is approved on its own screen." = "%@에 플러그인이 %@개 있습니다. 각각 별도 화면에서 승인합니다."; -"Necto reads the release, then shows what the plugin binds to before installing it." = "릴리스를 읽고, 설치하기 전에 이 플러그인이 무엇에 연결되는지 보여줍니다."; -"The latest release." = "최신 릴리스."; -"That release." = "그 릴리스."; -"A release page, pasted as it is." = "그대로 붙여넣은 릴리스 페이지."; -"Could not read that" = "읽지 못했습니다"; -"Install the latest release from a repository, or choose a specific release." = "저장소의 최신 릴리스나 특정 릴리스를 선택해 설치합니다."; +"%@ holds %@ plugins. Each one is approved on its own screen." = "%@에 플러그인 %@개가 있어요. 하나씩 확인하고 설치해 주세요."; +"Necto reads the release, then shows what the plugin binds to before installing it." = "설치 전에 플러그인이 요청하는 권한을 확인해요."; +"The latest release." = "최신 릴리스"; +"That release." = "선택한 릴리스"; +"A release page, pasted as it is." = "입력한 릴리스 페이지"; +"Could not read that" = "불러오지 못했어요"; +"Install using a repository or release URL." = "저장소나 릴리스 주소로 설치해요."; "Add…" = "추가…"; "Keeps running while other panels are visible. Disabling the plugin stops it." = "다른 패널을 볼 때에도 실행돼요. 플러그인을 비활성화하면 중단돼요."; @@ -235,8 +236,8 @@ "Finish the current CLI installation first." = "진행 중인 CLI 플러그인 설치를 먼저 완료해 주세요."; -"This plugin is displayed in another window." = "이 플러그인은 다른 창에 표시되고 있어요."; -"Activate this window to bring it here." = "이 창을 활성화하면 여기에서 볼 수 있어요."; +"This plugin is displayed in another window." = "다른 창에 열린 플러그인이에요."; +"Activate this window to bring it here." = "이 창을 활성화하면 플러그인을 가져와요."; "Search plugins" = "플러그인 검색"; -"No plugins found" = "검색 결과가 없어요"; +"No plugins found" = "검색 결과 없음"; diff --git a/NectoMac/Sources/NectoMacService/NectoAppRelease.swift b/NectoMac/Sources/NectoMacService/NectoAppRelease.swift index 8314a1c..f18e043 100644 --- a/NectoMac/Sources/NectoMacService/NectoAppRelease.swift +++ b/NectoMac/Sources/NectoMacService/NectoAppRelease.swift @@ -73,8 +73,10 @@ public struct NectoAppRelease: Sendable { imageSHA256 = hash } - public func downloadImage(into directory: URL) async throws -> URL { - let image = try await Self.download(imageURL, maximumBytes: Self.maximumImageBytes) + public func downloadImage( + into directory: URL, progress: @escaping @Sendable (Double?) -> Void = { _ in } + ) async throws -> URL { + let image = try await Self.download(imageURL, maximumBytes: Self.maximumImageBytes, progress: progress) defer { try? FileManager.default.removeItem(at: image) } try Task.checkCancellation() let destination = directory.appending(path: imageURL.lastPathComponent) @@ -88,13 +90,15 @@ public struct NectoAppRelease: Sendable { guard output.exitCode == 0, let digest, digest == imageSHA256 else { throw Failure.checksumMismatch } } - static func download(_ url: URL, maximumBytes: Int) async throws -> URL { + static func download( + _ url: URL, maximumBytes: Int, progress: @escaping @Sendable (Double?) -> Void = { _ in } + ) async throws -> URL { let configuration = URLSessionConfiguration.ephemeral configuration.timeoutIntervalForRequest = 30 configuration.timeoutIntervalForResource = 180 var request = URLRequest(url: url) request.setValue("Necto", forHTTPHeaderField: "User-Agent") - return try await Download(maximumBytes: maximumBytes).run(request, configuration: configuration) + return try await Download(maximumBytes: maximumBytes, progress: progress).run(request, configuration: configuration) } static func permitsDownloadURL(_ url: URL) -> Bool { @@ -114,13 +118,17 @@ public struct NectoAppRelease: Sendable { private final class Download: NSObject, URLSessionDownloadDelegate, @unchecked Sendable { private let maximumBytes: Int + private let progress: @Sendable (Double?) -> Void private let lock = NSLock() private var continuation: CheckedContinuation? private var session: URLSession? private var task: URLSessionDownloadTask? private var downloaded: URL? private var failure: (any Error)? - init(maximumBytes: Int) { self.maximumBytes = maximumBytes } + init(maximumBytes: Int, progress: @escaping @Sendable (Double?) -> Void) { + self.maximumBytes = maximumBytes + self.progress = progress + } func run(_ request: URLRequest, configuration: URLSessionConfiguration) async throws -> URL { try await withTaskCancellationHandler { @@ -153,7 +161,14 @@ public struct NectoAppRelease: Sendable { func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) { - if totalBytesWritten > maximumBytes || totalBytesExpectedToWrite > maximumBytes { cancel(Failure.tooLarge) } + if totalBytesWritten > maximumBytes || totalBytesExpectedToWrite > maximumBytes { + cancel(Failure.tooLarge) + return + } + guard (downloadTask.response as? HTTPURLResponse)?.statusCode == 200 else { return } + progress(totalBytesExpectedToWrite > 0 + ? min(1, max(0, Double(totalBytesWritten) / Double(totalBytesExpectedToWrite))) + : nil) } func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { diff --git a/NectoMac/Tests/NectoMacServiceTests/NectoUpdateDownloadTests.swift b/NectoMac/Tests/NectoMacServiceTests/NectoUpdateDownloadTests.swift index 90d8e06..dfb86be 100644 --- a/NectoMac/Tests/NectoMacServiceTests/NectoUpdateDownloadTests.swift +++ b/NectoMac/Tests/NectoMacServiceTests/NectoUpdateDownloadTests.swift @@ -75,6 +75,35 @@ struct NectoUpdateDownloadTests { } } + @Test("reports received progress before the download finishes", arguments: [true, false]) + func downloadProgress(knownLength: Bool) async throws { + let bytes = String(repeating: "x", count: 16_384) + let response = knownLength + ? "HTTP/1.1 200 OK\r\nContent-Length: 65536\r\n\r\n\(bytes)" + : "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n4000\r\n\(bytes)\r\n" + try await serve(response, keepOpen: true) { url in + let samples = AsyncStream.makeStream() + defer { samples.continuation.finish() } + let task = Task { + try await NectoAppRelease.download(url, maximumBytes: 65_536) { fraction in + samples.continuation.yield(fraction) + } + } + defer { task.cancel() } + for await fraction in samples.stream { + if knownLength { + let value = try #require(fraction) + #expect(value > 0 && value <= 0.25) + } else { + #expect(fraction == nil) + } + break + } + task.cancel() + await #expect(throws: CancellationError.self) { try await task.value } + } + } + @Test("rejects empty successful downloads") func emptyDownload() async throws { _ = try await serve("HTTP/1.1 200 OK\r\nContent-Length: 0\r\nConnection: close\r\n\r\n") { url in diff --git a/SDK/Android/docs/verification.md b/SDK/Android/docs/verification.md index 71efcf1..b9de647 100644 --- a/SDK/Android/docs/verification.md +++ b/SDK/Android/docs/verification.md @@ -41,7 +41,7 @@ Run on an Android 17 emulator (`sdk_gphone64_arm64`, API 37) on an Apple silicon | --- | --- | | `script/test-android-sample` | ✅ The target appears as `android:emulator-5554`. Every shipped panel's operations are available. `events.detail` answers. `{"limit":0}` is refused with `INVALID_INPUT`. A `performance.observe` stream ends and a new one starts. `files.roots` and `preferences.suites` answer. `events.clear` works. A force stop ends an open stream with `TARGET_DISCONNECTED` and removes the target, and a relaunch brings it back | | `script/test-android-security` | ✅ A silent handshake is dropped after 5 seconds. Frames of 0 bytes, 64 KiB + 1 and 4 GiB are dropped, as are nesting past 64, a frame that stalls for 10 seconds, and 33 concurrent requests. A request then succeeds without restarting the app | -| `script/test-android-artifacts` | ✅ `necto-android` declares no permission. 24 packaged panel files equal the iOS ones. Only the debug sample is debuggable | +| `script/test-android-artifacts` | ✅ No SDK module declares a permission, and each plugin module carries only its own panel | Repeated over USB on a Samsung Galaxy S25+ (`SM-S936N`, Android 17, API 37): `script/test-android-sample` and `script/test-android-security` both pass, with the diff --git a/SDK/Plugins/Events/Panel/assets/index.css b/SDK/Plugins/Events/Panel/assets/index.css index c67f300..80b5cd2 100644 --- a/SDK/Plugins/Events/Panel/assets/index.css +++ b/SDK/Plugins/Events/Panel/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.col-time{width:116px}.col-level{width:84px}.col-tag{width:120px}.event-search{max-width:360px}.event-level-filter{max-width:132px;flex:0 0 132px}.event-category-filter{max-width:180px;flex:0 1 180px}.necto-table{table-layout:fixed}.event-row td{vertical-align:middle}.event-message-cell{min-width:0}.event-message{display:block;overflow:hidden;color:var(--necto-text-secondary);text-overflow:ellipsis;white-space:nowrap}.event-detail-content{display:grid;gap:var(--necto-space-3)}.event-detail-section{min-width:0}.event-detail-message{margin:0;white-space:pre-wrap;word-break:break-word}.event-detail-expand{margin-top:var(--necto-space-2)} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.col-time{width:116px}.col-level{width:84px}.col-tag{width:120px}.event-search{max-width:360px}.event-level-filter{max-width:132px;flex:0 0 132px}.event-category-filter{max-width:180px;flex:0 1 180px}.necto-table{table-layout:fixed}.event-row td{vertical-align:middle}.event-message-cell{min-width:0}.event-message{display:block;overflow:hidden;color:var(--necto-text-secondary);text-overflow:ellipsis;white-space:nowrap}.event-detail-content{display:grid;gap:var(--necto-space-3)}.event-detail-section{min-width:0}.event-detail-message{margin:0;white-space:pre-wrap;word-break:break-word}.event-detail-expand{margin-top:var(--necto-space-2)} diff --git a/SDK/Plugins/Events/Panel/assets/index.js b/SDK/Plugins/Events/Panel/assets/index.js index 483eb93..8a2bd57 100644 --- a/SDK/Plugins/Events/Panel/assets/index.js +++ b/SDK/Plugins/Events/Panel/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();var Y="necto",ie=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function V(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function ae(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[Y])}async function C(e,t={}){var r,i,s;const n=(s=(i=(r=globalThis.window)==null?void 0:r.webkit)==null?void 0:i.messageHandlers)==null?void 0:s[Y];if(!n)throw new ie;const o=await n.postMessage({type:e,...t});if(!o.ok)throw V(o.error);return o.value}var v=new Map;function se(e,t){v.set(e,t)}function le(e){v.delete(e)}function ce(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=v.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var o;const n=v.get(e);v.delete(e),(o=n==null?void 0:n.onError)==null||o.call(n,V(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{v.delete(e)})}function Z(){var n,o;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((o=globalThis.navigator)==null?void 0:o.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function k(e){return(t,n={})=>{var r;return(((r=e[Z()])==null?void 0:r[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(i,s)=>n[s]===void 0?i:String(n[s]))}}var de=k({ko:{"Resize details":"상세 패널 크기 조절"}});function ue(e){try{const t=JSON.parse(e??"null"),n=o=>typeof o=="number"&&Number.isFinite(o)&&o>0?o:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function ge(e){let t;try{t=ue(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(o){n();const r=o.closest(".necto-app"),i=o.querySelector(".necto-detail-title");if(!r||!i)return;r.classList.add("necto-dock-layout");const s=document.createElement("div");s.className="necto-resize",s.tabIndex=0,s.setAttribute("role","separator"),s.setAttribute("aria-label",de("Resize details")),o.prepend(s);let u="right",E=0,L=0,D=0;const F=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},I=()=>{const{width:d,height:A}=r.getBoundingClientRect();u=d<=640?"bottom":"right",L=u==="right"?280:Math.min(180,A/2),D=Math.max(L,u==="right"?d-240:A-160),E=Math.max(L,Math.min(D,u==="right"?t.width??d*.45:t.height??280)),r.dataset.detailPosition=u,r.style.setProperty("--necto-detail-size",`${E}px`),s.setAttribute("aria-orientation",u==="right"?"vertical":"horizontal"),s.setAttribute("aria-valuemin",String(L)),s.setAttribute("aria-valuemax",String(D)),s.setAttribute("aria-valuenow",String(Math.round(E)))},H=d=>{t[u==="right"?"width":"height"]=Math.max(L,Math.min(D,d)),I()};s.addEventListener("keydown",d=>{const A=u==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];A.includes(d.key)&&(d.preventDefault(),H(E+(d.key===A[0]?24:-24)),F())});let S;s.addEventListener("pointerdown",d=>{d.button===0&&(d.preventDefault(),s.setPointerCapture(d.pointerId),S={coordinate:u==="right"?d.clientX:d.clientY,size:E},s.dataset.dragging="true")}),s.addEventListener("pointermove",d=>{S&&H(S.size+S.coordinate-(u==="right"?d.clientX:d.clientY))});const U=()=>{S=void 0,delete s.dataset.dragging,F()};s.addEventListener("pointerup",U),s.addEventListener("lostpointercapture",U);const j=new ResizeObserver(I);j.observe(r),I(),n=()=>j.disconnect()},unmount(){n()}}}ce();function pe(){return ae()}function fe(e){return e instanceof Error&&"code"in e}function me(){return C("context")}async function ve(){await C("ready")}function J(){return{send(e,t={}){return C("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,o){const r=await C("subscribe",{operationID:e,input:t});return se(r,{onEvent:n,onError:o}),{id:r,async unsubscribe(){le(r),await C("unsubscribe",{subscriptionID:r})}}}}}function he(e,t){var n;return((n=e.operations.find(o=>o.id===t))==null?void 0:n.available)??!1}var h={isAvailable:pe,context:me,ready:ve,locale:Z,createTranslator:k,isOperationAvailable:he,device:J(),desktop:J()};const l=k({ko:{"Search level, tag, or message":"레벨, 태그 또는 메시지 검색","Search events":"이벤트 검색","All levels":"모든 레벨",Warning:"경고",Error:"오류","Filter by level":"레벨로 필터링","All categories":"모든 카테고리","Filter by category":"카테고리로 필터링","Resize event detail":"이벤트 상세 높이 조절","Close event detail":"이벤트 상세 닫기",Clear:"비우기","Nothing logged yet":"아직 기록된 이벤트가 없습니다","Events the connected app records appear here as they happen.":"연결된 앱이 기록한 이벤트가 실시간으로 표시됩니다.",Time:"시간",Level:"레벨",Tag:"태그",Category:"카테고리",Message:"메시지",Metadata:"메타데이터",Source:"출처","Loading…":"불러오는 중…","Nothing else was recorded.":"추가로 기록된 내용이 없습니다.","Show full value":"전체 보기","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작합니다."}});function be(e){const t=Object.entries(e.detail).filter(([n])=>n!=="level"&&n!=="category"&&n!=="message").sort(([n],[o])=>n.localeCompare(o));return{message:e.message,fields:[["level",e.level],["category",e.tag],...t]}}function _(e,t=500){const n=e.replace(/\s+/g," ").trim(),o=Math.max(1,Math.floor(t));return n.length<=o?n:`${n.slice(0,o-1)}…`}function ye(e){return[...new Set([...e].map(t=>t.tag).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function G(e,t,n){e.set(t.id,t);const o=[],r=Math.max(0,Math.floor(n));for(;e.size>r;){let i=null;for(const s of e.values())(i===null||s.atK(r,t,n,o)).sort((r,i)=>i.at-r.at)}const Q={debug:"idle",info:"info",warn:"warning",error:"danger"};function ee(e){const t=new Date(e),n=(o,r=2)=>String(o).padStart(r,"0");return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function a(e,t={},n=[]){const o=document.createElement(e);for(const[r,i]of Object.entries(t))i!==void 0&&o.setAttribute(r,i);return o.append(...n),o}const m=new Map;let P="",f="",q="",c=null,b=null;const O=ge("necto.event-log.detail"),te=500,T=2e3,z=document.getElementById("body"),Ee=document.getElementById("count"),N=document.getElementById("search"),x=document.getElementById("level"),y=document.getElementById("category");let M=null;const p=new Map;N.placeholder=l("Search level, tag, or message");N.setAttribute("aria-label",l("Search events"));for(const[e,t]of[["",l("All levels")],["debug","Debug"],["info","Info"],["warn",l("Warning")],["error",l("Error")]])x.append(a("option",{value:e},[t]));x.setAttribute("aria-label",l("Filter by level"));y.setAttribute("aria-label",l("Filter by category"));y.append(a("option",{value:""},[l("All categories")]));document.getElementById("clear").textContent=l("Clear");function Le(){return we(m.values(),q,P,f)}function ne(e){Ee.textContent=e===m.size?String(e):`${e} / ${m.size}`}function oe(e){const t=a("tr",{class:"event-row","aria-selected":e.id===c?"true":void 0},[a("td",{class:"necto-numeric"},[ee(e.at)]),a("td",{},[a("span",{class:`necto-status necto-status-${Q[e.level]}`},[e.level.toUpperCase()])]),a("td",{},[a("span",{class:"necto-badge"},[e.tag])]),a("td",{class:"event-message-cell"},[a("span",{class:"event-message"},[_(e.message)])])]);return e.hasDetail&&(t.tabIndex=0,t.addEventListener("click",()=>void $(e.id)),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),$(e.id))})),p.set(e.id,t),t}let W="";function re(){const e=ye(m.values()),t=e.join("");if(t===W)return;W=t;const n=f;y.replaceChildren(a("option",{value:""},[l("All categories")]),...e.map(o=>a("option",{value:o},[o]))),f=e.includes(n)?n:"",y.value=f}function g(){var o;re();const e=Le();if(c&&!e.some(r=>r.id===c)&&(c=null,w=null,O.unmount(),(o=document.querySelector(".necto-detail"))==null||o.remove()),ne(e.length),M=null,p.clear(),z.replaceChildren(),!e.length){z.append(a("div",{class:"necto-empty"},[a("p",{class:"necto-empty-title"},[b??l("Nothing logged yet")]),a("p",{class:"necto-caption"},[l("Events the connected app records appear here as they happen.")])]));return}const t=a("tr",{},[a("th",{class:"col-time necto-numeric"},[l("Time")]),a("th",{class:"col-level"},[l("Level")]),a("th",{class:"col-tag"},[l("Category")]),a("th",{},[l("Message")])]);M=a("tbody",{},e.map(oe));const n=a("table",{class:"necto-table"},[a("thead",{},[t]),M]);z.append(n),c&&B()}let w=null;async function $(e){var o,r;const t=c;if(c=c===e?null:e,w=null,t&&((o=p.get(t))==null||o.removeAttribute("aria-selected")),c&&((r=p.get(c))==null||r.setAttribute("aria-selected","true")),B(),!c)return;const n=c;try{const i=await h.device.send("events.detail",{eventID:n});if(c!==n)return;w=i.event}catch(i){if(c!==n)return;b=R(i)}B()}function B(){var r,i;if(O.unmount(),(r=document.querySelector(".necto-detail"))==null||r.remove(),!c)return;const e=a("aside",{class:"necto-detail"}),t=a("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":l("Close event detail")},["✕"]);t.addEventListener("click",()=>void $(c));const n=w===null?null:be(w),o=m.get(c);e.append(a("div",{class:"necto-detail-title"},[...o?[a("span",{class:`necto-status necto-status-${Q[o.level]}`},[o.level.toUpperCase()]),a("span",{class:"necto-badge"},[o.tag]),a("span",{class:"necto-numeric"},[ee(o.at)])]:[],a("span",{class:"necto-detail-title-url"},[_((o==null?void 0:o.message)??"",200)]),t]),a("div",{class:"necto-detail-body event-detail-content"},n===null?[a("p",{class:"necto-caption"},[l("Loading…")])]:[a("section",{class:"event-detail-section"},[a("h3",{class:"necto-section-title"},[l("Message")]),Ae(n.message)]),a("section",{class:"event-detail-section"},[a("h3",{class:"necto-section-title"},[l("Metadata")]),a("dl",{class:"necto-pairs"},n.fields.map(([s,u])=>a("div",{},[a("dt",{},[Se(s)]),Ce(u)])))])])),(i=document.querySelector(".necto-app"))==null||i.append(e),O.mount(e)}function Se(e){switch(e){case"level":return l("Level");case"category":return l("Category");case"source":return l("Source");default:return e}}function Ae(e){const t=a("div"),n=e.length>T,o=n?`${e.slice(0,T-1)}…`:e,r=a("pre",{class:"necto-code event-detail-message"},[o]);if(t.append(r),n){const i=a("button",{type:"button",class:"necto-button necto-button-quiet event-detail-expand"},[l("Show full value")]);i.addEventListener("click",()=>{r.textContent=e,i.remove()}),t.append(i)}return t}function Ce(e){const t=a("dd",{},[_(e,T)]);if(e.length<=T)return t;const n=a("button",{type:"button",class:"necto-button necto-button-quiet"},[l("Show full value")]);return n.addEventListener("click",()=>t.replaceChildren(e)),t.append(" ",n),t}function Me(e){var o,r;const t=G(m,e,te),n=f;if(re(),M===null||n!==f){g();return}(o=p.get(e.id))==null||o.remove(),p.delete(e.id),K(e,q,P,f)&&M.prepend(oe(e));for(const i of t)(r=p.get(i))==null||r.remove(),p.delete(i),c===i&&(c=null,w=null,B());ne(p.size)}function R(e){return fe(e)?e.message:String(e)}N.addEventListener("input",()=>{q=N.value,g()});x.addEventListener("change",()=>{P=x.value,g()});y.addEventListener("change",()=>{f=y.value,g()});var X;(X=document.getElementById("clear"))==null||X.addEventListener("click",()=>{h.device.send("events.clear").then(()=>{m.clear(),c=null,g()}).catch(e=>{b=R(e),g()})});async function De(){if(!h.isAvailable()){b=l("This plugin only works inside Necto"),g();return}g();try{const e=await h.device.send("events.list",{limit:500});for(const n of e.events)G(m,n,te);g();const t=await h.device.subscribe("events.observe",{},({event:n})=>{Me(n)},n=>{b=n.message,g()})}catch(e){b=R(e),g()}await h.ready()}De(); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();var Y="necto",ie=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function V(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function ae(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[Y])}async function C(e,t={}){var r,i,s;const n=(s=(i=(r=globalThis.window)==null?void 0:r.webkit)==null?void 0:i.messageHandlers)==null?void 0:s[Y];if(!n)throw new ie;const o=await n.postMessage({type:e,...t});if(!o.ok)throw V(o.error);return o.value}var v=new Map;function se(e,t){v.set(e,t)}function le(e){v.delete(e)}function ce(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=v.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var o;const n=v.get(e);v.delete(e),(o=n==null?void 0:n.onError)==null||o.call(n,V(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{v.delete(e)})}function Z(){var n,o;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((o=globalThis.navigator)==null?void 0:o.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function k(e){return(t,n={})=>{var r;return(((r=e[Z()])==null?void 0:r[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(i,s)=>n[s]===void 0?i:String(n[s]))}}var de=k({ko:{"Resize details":"상세 패널 크기 조절"}});function ue(e){try{const t=JSON.parse(e??"null"),n=o=>typeof o=="number"&&Number.isFinite(o)&&o>0?o:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function ge(e){let t;try{t=ue(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(o){n();const r=o.closest(".necto-app"),i=o.querySelector(".necto-detail-title");if(!r||!i)return;r.classList.add("necto-dock-layout");const s=document.createElement("div");s.className="necto-resize",s.tabIndex=0,s.setAttribute("role","separator"),s.setAttribute("aria-label",de("Resize details")),o.prepend(s);let u="right",E=0,L=0,D=0;const F=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},I=()=>{const{width:d,height:A}=r.getBoundingClientRect();u=d<=640?"bottom":"right",L=u==="right"?280:Math.min(180,A/2),D=Math.max(L,u==="right"?d-240:A-160),E=Math.max(L,Math.min(D,u==="right"?t.width??d*.45:t.height??280)),r.dataset.detailPosition=u,r.style.setProperty("--necto-detail-size",`${E}px`),s.setAttribute("aria-orientation",u==="right"?"vertical":"horizontal"),s.setAttribute("aria-valuemin",String(L)),s.setAttribute("aria-valuemax",String(D)),s.setAttribute("aria-valuenow",String(Math.round(E)))},H=d=>{t[u==="right"?"width":"height"]=Math.max(L,Math.min(D,d)),I()};s.addEventListener("keydown",d=>{const A=u==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];A.includes(d.key)&&(d.preventDefault(),H(E+(d.key===A[0]?24:-24)),F())});let S;s.addEventListener("pointerdown",d=>{d.button===0&&(d.preventDefault(),s.setPointerCapture(d.pointerId),S={coordinate:u==="right"?d.clientX:d.clientY,size:E},s.dataset.dragging="true")}),s.addEventListener("pointermove",d=>{S&&H(S.size+S.coordinate-(u==="right"?d.clientX:d.clientY))});const U=()=>{S=void 0,delete s.dataset.dragging,F()};s.addEventListener("pointerup",U),s.addEventListener("lostpointercapture",U);const j=new ResizeObserver(I);j.observe(r),I(),n=()=>j.disconnect()},unmount(){n()}}}ce();function pe(){return ae()}function fe(e){return e instanceof Error&&"code"in e}function me(){return C("context")}async function ve(){await C("ready")}function J(){return{send(e,t={}){return C("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,o){const r=await C("subscribe",{operationID:e,input:t});return se(r,{onEvent:n,onError:o}),{id:r,async unsubscribe(){le(r),await C("unsubscribe",{subscriptionID:r})}}}}}function he(e,t){var n;return((n=e.operations.find(o=>o.id===t))==null?void 0:n.available)??!1}var h={isAvailable:pe,context:me,ready:ve,locale:Z,createTranslator:k,isOperationAvailable:he,device:J(),desktop:J()};const l=k({ko:{"Search level, tag, or message":"레벨, 태그 또는 메시지 검색","Search events":"이벤트 검색","All levels":"모든 레벨",Warning:"경고",Error:"오류","Filter by level":"레벨로 필터링","All categories":"모든 카테고리","Filter by category":"카테고리로 필터링","Resize event detail":"이벤트 상세 높이 조절","Close event detail":"이벤트 상세 닫기",Clear:"비우기","Nothing logged yet":"아직 기록된 이벤트가 없어요","Events the connected app records appear here as they happen.":"연결된 앱이 기록한 이벤트가 실시간으로 표시돼요.",Time:"시간",Level:"레벨",Tag:"태그",Category:"카테고리",Message:"메시지",Metadata:"메타데이터",Source:"출처","Loading…":"불러오는 중…","Nothing else was recorded.":"추가로 기록된 내용이 없어요.","Show full value":"전체 보기","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작해요."}});function be(e){const t=Object.entries(e.detail).filter(([n])=>n!=="level"&&n!=="category"&&n!=="message").sort(([n],[o])=>n.localeCompare(o));return{message:e.message,fields:[["level",e.level],["category",e.tag],...t]}}function _(e,t=500){const n=e.replace(/\s+/g," ").trim(),o=Math.max(1,Math.floor(t));return n.length<=o?n:`${n.slice(0,o-1)}…`}function ye(e){return[...new Set([...e].map(t=>t.tag).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function G(e,t,n){e.set(t.id,t);const o=[],r=Math.max(0,Math.floor(n));for(;e.size>r;){let i=null;for(const s of e.values())(i===null||s.atK(r,t,n,o)).sort((r,i)=>i.at-r.at)}const Q={debug:"idle",info:"info",warn:"warning",error:"danger"};function ee(e){const t=new Date(e),n=(o,r=2)=>String(o).padStart(r,"0");return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function a(e,t={},n=[]){const o=document.createElement(e);for(const[r,i]of Object.entries(t))i!==void 0&&o.setAttribute(r,i);return o.append(...n),o}const m=new Map;let P="",f="",q="",c=null,b=null;const O=ge("necto.event-log.detail"),te=500,T=2e3,z=document.getElementById("body"),Ee=document.getElementById("count"),N=document.getElementById("search"),x=document.getElementById("level"),y=document.getElementById("category");let M=null;const p=new Map;N.placeholder=l("Search level, tag, or message");N.setAttribute("aria-label",l("Search events"));for(const[e,t]of[["",l("All levels")],["debug","Debug"],["info","Info"],["warn",l("Warning")],["error",l("Error")]])x.append(a("option",{value:e},[t]));x.setAttribute("aria-label",l("Filter by level"));y.setAttribute("aria-label",l("Filter by category"));y.append(a("option",{value:""},[l("All categories")]));document.getElementById("clear").textContent=l("Clear");function Le(){return we(m.values(),q,P,f)}function ne(e){Ee.textContent=e===m.size?String(e):`${e} / ${m.size}`}function oe(e){const t=a("tr",{class:"event-row","aria-selected":e.id===c?"true":void 0},[a("td",{class:"necto-numeric"},[ee(e.at)]),a("td",{},[a("span",{class:`necto-status necto-status-${Q[e.level]}`},[e.level.toUpperCase()])]),a("td",{},[a("span",{class:"necto-badge"},[e.tag])]),a("td",{class:"event-message-cell"},[a("span",{class:"event-message"},[_(e.message)])])]);return e.hasDetail&&(t.tabIndex=0,t.addEventListener("click",()=>void $(e.id)),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),$(e.id))})),p.set(e.id,t),t}let W="";function re(){const e=ye(m.values()),t=e.join("");if(t===W)return;W=t;const n=f;y.replaceChildren(a("option",{value:""},[l("All categories")]),...e.map(o=>a("option",{value:o},[o]))),f=e.includes(n)?n:"",y.value=f}function g(){var o;re();const e=Le();if(c&&!e.some(r=>r.id===c)&&(c=null,w=null,O.unmount(),(o=document.querySelector(".necto-detail"))==null||o.remove()),ne(e.length),M=null,p.clear(),z.replaceChildren(),!e.length){z.append(a("div",{class:"necto-empty"},[a("p",{class:"necto-empty-title"},[b??l("Nothing logged yet")]),a("p",{class:"necto-caption"},[l("Events the connected app records appear here as they happen.")])]));return}const t=a("tr",{},[a("th",{class:"col-time necto-numeric"},[l("Time")]),a("th",{class:"col-level"},[l("Level")]),a("th",{class:"col-tag"},[l("Category")]),a("th",{},[l("Message")])]);M=a("tbody",{},e.map(oe));const n=a("table",{class:"necto-table"},[a("thead",{},[t]),M]);z.append(n),c&&B()}let w=null;async function $(e){var o,r;const t=c;if(c=c===e?null:e,w=null,t&&((o=p.get(t))==null||o.removeAttribute("aria-selected")),c&&((r=p.get(c))==null||r.setAttribute("aria-selected","true")),B(),!c)return;const n=c;try{const i=await h.device.send("events.detail",{eventID:n});if(c!==n)return;w=i.event}catch(i){if(c!==n)return;b=R(i)}B()}function B(){var r,i;if(O.unmount(),(r=document.querySelector(".necto-detail"))==null||r.remove(),!c)return;const e=a("aside",{class:"necto-detail"}),t=a("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":l("Close event detail")},["✕"]);t.addEventListener("click",()=>void $(c));const n=w===null?null:be(w),o=m.get(c);e.append(a("div",{class:"necto-detail-title"},[...o?[a("span",{class:`necto-status necto-status-${Q[o.level]}`},[o.level.toUpperCase()]),a("span",{class:"necto-badge"},[o.tag]),a("span",{class:"necto-numeric"},[ee(o.at)])]:[],a("span",{class:"necto-detail-title-url"},[_((o==null?void 0:o.message)??"",200)]),t]),a("div",{class:"necto-detail-body event-detail-content"},n===null?[a("p",{class:"necto-caption"},[l("Loading…")])]:[a("section",{class:"event-detail-section"},[a("h3",{class:"necto-section-title"},[l("Message")]),Ae(n.message)]),a("section",{class:"event-detail-section"},[a("h3",{class:"necto-section-title"},[l("Metadata")]),a("dl",{class:"necto-pairs"},n.fields.map(([s,u])=>a("div",{},[a("dt",{},[Se(s)]),Ce(u)])))])])),(i=document.querySelector(".necto-app"))==null||i.append(e),O.mount(e)}function Se(e){switch(e){case"level":return l("Level");case"category":return l("Category");case"source":return l("Source");default:return e}}function Ae(e){const t=a("div"),n=e.length>T,o=n?`${e.slice(0,T-1)}…`:e,r=a("pre",{class:"necto-code event-detail-message"},[o]);if(t.append(r),n){const i=a("button",{type:"button",class:"necto-button necto-button-quiet event-detail-expand"},[l("Show full value")]);i.addEventListener("click",()=>{r.textContent=e,i.remove()}),t.append(i)}return t}function Ce(e){const t=a("dd",{},[_(e,T)]);if(e.length<=T)return t;const n=a("button",{type:"button",class:"necto-button necto-button-quiet"},[l("Show full value")]);return n.addEventListener("click",()=>t.replaceChildren(e)),t.append(" ",n),t}function Me(e){var o,r;const t=G(m,e,te),n=f;if(re(),M===null||n!==f){g();return}(o=p.get(e.id))==null||o.remove(),p.delete(e.id),K(e,q,P,f)&&M.prepend(oe(e));for(const i of t)(r=p.get(i))==null||r.remove(),p.delete(i),c===i&&(c=null,w=null,B());ne(p.size)}function R(e){return fe(e)?e.message:String(e)}N.addEventListener("input",()=>{q=N.value,g()});x.addEventListener("change",()=>{P=x.value,g()});y.addEventListener("change",()=>{f=y.value,g()});var X;(X=document.getElementById("clear"))==null||X.addEventListener("click",()=>{h.device.send("events.clear").then(()=>{m.clear(),c=null,g()}).catch(e=>{b=R(e),g()})});async function De(){if(!h.isAvailable()){b=l("This plugin only works inside Necto"),g();return}g();try{const e=await h.device.send("events.list",{limit:500});for(const n of e.events)G(m,n,te);g();const t=await h.device.subscribe("events.observe",{},({event:n})=>{Me(n)},n=>{b=n.message,g()})}catch(e){b=R(e),g()}await h.ready()}De(); diff --git a/SDK/Plugins/Files/Panel/assets/index.css b/SDK/Plugins/Files/Panel/assets/index.css index 6e8069d..20a8155 100644 --- a/SDK/Plugins/Files/Panel/assets/index.css +++ b/SDK/Plugins/Files/Panel/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,#root{height:100%}#root>.necto-app{height:100%}.detail-slot{display:contents}.file-edit-body{display:flex;flex-direction:column}.file-edit-body>:not(.necto-json-editor){flex-shrink:0}.file-actions{display:flex;flex-wrap:wrap;gap:var(--necto-space-2);margin-top:var(--necto-space-2);align-items:center}.file-image-frame{display:flex;justify-content:center;padding:var(--necto-space-2);border:1px solid var(--necto-border);border-radius:var(--necto-radius-panel);background:var(--necto-surface);overflow:auto}.file-image{max-width:100%;height:auto} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,#root{height:100%}#root>.necto-app{height:100%}.detail-slot{display:contents}.file-edit-body{display:flex;flex-direction:column}.file-edit-body>:not(.necto-json-editor){flex-shrink:0}.file-actions{display:flex;flex-wrap:wrap;gap:var(--necto-space-2);margin-top:var(--necto-space-2);align-items:center}.file-image-frame{display:flex;justify-content:center;padding:var(--necto-space-2);border:1px solid var(--necto-border);border-radius:var(--necto-radius-panel);background:var(--necto-surface);overflow:auto}.file-image{max-width:100%;height:auto} diff --git a/SDK/Plugins/Files/Panel/assets/index.js b/SDK/Plugins/Files/Panel/assets/index.js index 827a73b..ba60583 100644 --- a/SDK/Plugins/Files/Panel/assets/index.js +++ b/SDK/Plugins/Files/Panel/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var G="necto",te=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function K(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function ne(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[G])}async function k(e,t={}){var o,s,a;const n=(a=(s=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:s.messageHandlers)==null?void 0:a[G];if(!n)throw new te;const i=await n.postMessage({type:e,...t});if(!i.ok)throw K(i.error);return i.value}var C=new Map;function ie(e,t){C.set(e,t)}function oe(e){C.delete(e)}function re(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=C.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var i;const n=C.get(e);C.delete(e),(i=n==null?void 0:n.onError)==null||i.call(n,K(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{C.delete(e)})}function Q(){var n,i;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((i=globalThis.navigator)==null?void 0:i.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function F(e){return(t,n={})=>{var o;return(((o=e[Q()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(s,a)=>n[a]===void 0?s:String(n[a]))}}var ae=F({ko:{"Resize details":"상세 패널 크기 조절"}});function se(e){try{const t=JSON.parse(e??"null"),n=i=>typeof i=="number"&&Number.isFinite(i)&&i>0?i:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function ce(e){let t;try{t=se(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(i){n();const o=i.closest(".necto-app"),s=i.querySelector(".necto-detail-title");if(!o||!s)return;o.classList.add("necto-dock-layout");const a=document.createElement("div");a.className="necto-resize",a.tabIndex=0,a.setAttribute("role","separator"),a.setAttribute("aria-label",ae("Resize details")),i.prepend(a);let f="right",v=0,b=0,E=0;const H=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},I=()=>{const{width:d,height:A}=o.getBoundingClientRect();f=d<=640?"bottom":"right",b=f==="right"?280:Math.min(180,A/2),E=Math.max(b,f==="right"?d-240:A-160),v=Math.max(b,Math.min(E,f==="right"?t.width??d*.45:t.height??280)),o.dataset.detailPosition=f,o.style.setProperty("--necto-detail-size",`${v}px`),a.setAttribute("aria-orientation",f==="right"?"vertical":"horizontal"),a.setAttribute("aria-valuemin",String(b)),a.setAttribute("aria-valuemax",String(E)),a.setAttribute("aria-valuenow",String(Math.round(v)))},q=d=>{t[f==="right"?"width":"height"]=Math.max(b,Math.min(E,d)),I()};a.addEventListener("keydown",d=>{const A=f==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];A.includes(d.key)&&(d.preventDefault(),q(v+(d.key===A[0]?24:-24)),H())});let D;a.addEventListener("pointerdown",d=>{d.button===0&&(d.preventDefault(),a.setPointerCapture(d.pointerId),D={coordinate:f==="right"?d.clientX:d.clientY,size:v},a.dataset.dragging="true")}),a.addEventListener("pointermove",d=>{D&&q(D.size+D.coordinate-(f==="right"?d.clientX:d.clientY))});const U=()=>{D=void 0,delete a.dataset.dragging,H()};a.addEventListener("pointerup",U),a.addEventListener("lostpointercapture",U);const Y=new ResizeObserver(I);Y.observe(o),I(),n=()=>Y.disconnect()},unmount(){n()}}}re();function le(){return ne()}function de(e){return e instanceof Error&&"code"in e}function ue(){return k("context")}async function fe(){await k("ready")}function j(){return{send(e,t={}){return k("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,i){const o=await k("subscribe",{operationID:e,input:t});return ie(o,{onEvent:n,onError:i}),{id:o,async unsubscribe(){oe(o),await k("unsubscribe",{subscriptionID:o})}}}}}function pe(e,t){var n;return((n=e.operations.find(i=>i.id===t))==null?void 0:n.available)??!1}var m={isAvailable:le,context:ue,ready:fe,locale:Q,createTranslator:F,isOperationAvailable:pe,device:j(),desktop:j()};const c=F({ko:{"Nothing here":"표시할 파일이 없습니다","This directory is empty.":"이 디렉터리는 비어 있습니다.","{count} item":"{count}개 항목","{count} items":"{count}개 항목","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Loading…":"불러오는 중…","Copy path":"경로 복사",Copied:"복사됨",Failed:"실패",Delete:"삭제","Really delete?":"정말 삭제할까요?",Cancel:"취소",Edit:"편집",Save:"저장","File contents":"파일 내용",Size:"크기",Modified:"수정 시간",Created:"생성 시간","Binary — described rather than rendered":"바이너리 — 화면 대신 정보만 표시합니다","Preview · the head of the file":"미리보기 · 파일 앞부분",Image:"이미지","Preview of {name}":"{name} 미리보기",Contents:"내용",Saved:"저장됨","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작합니다."}});let M=[],p="";const N=new Map,S=new Set;let u=null,l=null,w=null,g=!1,L="",x="",y=null;const J=ce("necto.files.detail");function r(e,t={},n=[]){const i=document.createElement(e);for(const[o,s]of Object.entries(t))s!==void 0&&i.setAttribute(o,s);return i.append(...n),i}function O(e){return de(e)?e.message:String(e)}function V(e){return e>=1048576?`${(e/1048576).toFixed(1)} MB`:e>=1024?`${(e/1024).toFixed(1)} kB`:`${e} B`}function X(e){const t=new Date(e),n=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}const R=r("div",{class:"necto-segmented"}),W=r("span",{class:"necto-caption",style:"margin-left:auto"}),$=r("div",{class:"necto-body",tabindex:"0"}),_=r("div",{class:"detail-slot"});var Z;(Z=document.getElementById("root"))==null||Z.append(r("div",{class:"necto-app"},[r("div",{class:"necto-toolbar"},[R,W]),$,_]));function me(){R.replaceChildren();for(const e of M){const t=r("button",{type:"button","aria-selected":String(e.id===p)},[e.name]);t.addEventListener("click",()=>void ee(e.id)),R.append(t)}}function ge(){const e=[],t=(n,i)=>{for(const o of N.get(n)??[]){const s=n?`${n}/${o.name}`:o.name;e.push({entry:o,path:s,depth:i}),o.isDirectory&&S.has(s)&&t(s,i+1)}};return t("",0),e}function h(){$.replaceChildren();const e=ge();if(W.textContent=String(e.length),!e.length){$.append(r("div",{class:"necto-empty"},[r("p",{class:"necto-empty-title"},[y??c("Nothing here")]),r("p",{class:"necto-caption"},[c("This directory is empty.")])]));return}const t=r("div",{class:"necto-tree"});for(const{entry:n,path:i,depth:o}of e){const s=r("button",{type:"button",class:"necto-tree-row","aria-selected":i===u?"true":void 0,style:`padding-left: calc(${o} * 16px + var(--necto-space-3))`},[r("span",{class:"necto-tree-twist"},[n.isDirectory?S.has(i)?"▾":"▸":""]),(()=>{const a=r("span",{class:"necto-tree-name"},[n.name]);return n.isDirectory&&a.append(r("em",{},["/"])),a})(),r("span",{class:"necto-tree-meta"},[n.isDirectory?c(n.itemCount===1?"{count} item":"{count} items",{count:n.itemCount??0}):V(n.size??0)])]);s.addEventListener("click",()=>{n.isDirectory?ve(i):be(i)}),t.append(s)}$.append(t)}function T(){if(J.unmount(),_.replaceChildren(),!u)return;const e=r("aside",{class:"necto-detail"}),t=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":c("Close details")},["✕"]);t.addEventListener("click",z),e.append(r("div",{class:"necto-detail-title"},[r("span",{class:"necto-detail-title-url"},[u]),t]),r("div",{class:`necto-detail-body${g?" file-edit-body":""}`},he())),_.append(e),J.mount(e)}function he(){if(!l)return[r("p",{class:"necto-caption"},[c("Loading…")])];const e=r("span",{class:"necto-caption"},[x]),t=r("button",{type:"button",class:"necto-button"},[c("Copy path")]);t.addEventListener("click",()=>{var b;const a=M.find(E=>E.id===p),f=a!=null&&a.path?`${a.path}/${u??""}`:u??"",v=()=>setTimeout(()=>t.textContent=c("Copy path"),1400);(b=navigator.clipboard)==null||b.writeText(f).then(()=>{t.textContent=c("Copied"),v()},()=>{t.textContent=c("Failed"),v()})});const n=r("button",{type:"button",class:"necto-button necto-button-quiet necto-button-danger",style:"margin-left:auto"},[c("Delete")]);n.addEventListener("click",()=>{if(n.dataset.armed!=="true"){n.dataset.armed="true",n.textContent=c("Really delete?"),setTimeout(()=>{n.dataset.armed="false",n.textContent=c("Delete")},3e3);return}ye()});const i=r("button",{type:"button",class:"necto-button"},[c(g?"Cancel":"Edit")]);i.addEventListener("click",()=>{g=!g,L=(l==null?void 0:l.text)??"",x="",T()});const o=r("button",{type:"button",class:"necto-button necto-button-primary"},[c("Save")]);o.addEventListener("click",()=>void we());const s=[];if(l.kind==="image"&&l.base64){const a=r("img",{class:"file-image",alt:c("Preview of {name}",{name:l.name}),src:`data:${l.mediaType??"application/octet-stream"};base64,${l.base64}`});s.push(r("div",{class:"file-image-frame"},[a]))}else if(l.kind==="text")if(g){const a=r("textarea",{class:"necto-field necto-json-editor","aria-label":c("File contents"),spellcheck:"false"});a.value=L,a.addEventListener("input",()=>L=a.value),s.push(a)}else s.push(r("pre",{class:"necto-code",style:"overflow:auto"},[l.text??""]));return[r("dl",{class:"necto-pairs"},[r("div",{},[r("dt",{},[c("Size")]),r("dd",{},[V(l.size)])]),...l.modifiedAt!==void 0?[r("div",{},[r("dt",{},[c("Modified")]),r("dd",{},[X(l.modifiedAt)])])]:[],...(w==null?void 0:w.createdAt)!==void 0?[r("div",{},[r("dt",{},[c("Created")]),r("dd",{},[X(w.createdAt)])])]:[]]),r("p",{class:"necto-section-title"},[l.kind==="binary"?c("Binary — described rather than rendered"):l.kind==="image"?c("Image"):l.isTruncated?c("Preview · the head of the file"):c("Contents")]),...s,r("div",{class:"file-actions"},[t,...l.kind==="text"&&!l.isTruncated?[i]:[],...g?[o]:[],e,n])]}async function P(e){const t=p;try{const n=await m.device.send("files.list",{root:t,path:e});if(p!==t)return;N.set(e,n.entries),y=null}catch(n){if(p!==t)return;N.set(e,[]),y=O(n)}}async function ve(e){S.has(e)?S.delete(e):(S.add(e),N.has(e)||await P(e)),h()}async function be(e){if(u===e){z();return}const t=p;u=e,l=null,w=null,g=!1,x="",h(),T();try{const[n,i]=await Promise.all([m.device.send("files.preview",{root:t,path:e}),m.device.send("files.info",{root:t,path:e})]);if(!B(t,e))return;l=n.file,w=i.item}catch(n){if(!B(t,e))return;y=O(n)}T()}function B(e,t){return p===e&&u===t}function z(){u=null,l=null,w=null,g=!1,L="",x="",h(),T()}async function we(){if(!u||!l||l.kind!=="text"||l.isTruncated)return;const e=p,t=u,n=t.includes("/")?t.slice(0,t.lastIndexOf("/")):"";try{await m.device.send("files.write",{root:e,path:t,content:L});const[i,o]=await Promise.all([m.device.send("files.preview",{root:e,path:t}),m.device.send("files.info",{root:e,path:t})]);B(e,t)&&(l=i.file,w=o.item,g=!1,x=c("Saved")),p===e&&await P(n),h(),T()}catch(i){if(!B(e,t))return;x=O(i),T()}}async function ye(){if(!u)return;const e=p,t=u,n=t.includes("/")?t.slice(0,t.lastIndexOf("/")):"";try{await m.device.send("files.delete",{root:e,path:t}),B(e,t)&&z(),p===e&&await P(n),h()}catch(i){y=O(i),h()}}async function ee(e){p=e,N.clear(),S.clear(),z(),await P(""),me(),h()}async function Ee(){var e;if(!m.isAvailable()){y=c("This plugin only works inside Necto"),h();return}try{M=(await m.device.send("files.roots")).roots}catch(t){y=O(t),h(),await m.ready();return}await ee(((e=M[0])==null?void 0:e.id)??""),await m.ready()}Ee(); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var G="necto",te=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function K(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function ne(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[G])}async function k(e,t={}){var o,s,a;const n=(a=(s=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:s.messageHandlers)==null?void 0:a[G];if(!n)throw new te;const i=await n.postMessage({type:e,...t});if(!i.ok)throw K(i.error);return i.value}var C=new Map;function ie(e,t){C.set(e,t)}function oe(e){C.delete(e)}function re(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=C.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var i;const n=C.get(e);C.delete(e),(i=n==null?void 0:n.onError)==null||i.call(n,K(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{C.delete(e)})}function Q(){var n,i;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((i=globalThis.navigator)==null?void 0:i.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function F(e){return(t,n={})=>{var o;return(((o=e[Q()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(s,a)=>n[a]===void 0?s:String(n[a]))}}var ae=F({ko:{"Resize details":"상세 패널 크기 조절"}});function se(e){try{const t=JSON.parse(e??"null"),n=i=>typeof i=="number"&&Number.isFinite(i)&&i>0?i:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function ce(e){let t;try{t=se(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(i){n();const o=i.closest(".necto-app"),s=i.querySelector(".necto-detail-title");if(!o||!s)return;o.classList.add("necto-dock-layout");const a=document.createElement("div");a.className="necto-resize",a.tabIndex=0,a.setAttribute("role","separator"),a.setAttribute("aria-label",ae("Resize details")),i.prepend(a);let f="right",v=0,b=0,E=0;const H=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},I=()=>{const{width:d,height:A}=o.getBoundingClientRect();f=d<=640?"bottom":"right",b=f==="right"?280:Math.min(180,A/2),E=Math.max(b,f==="right"?d-240:A-160),v=Math.max(b,Math.min(E,f==="right"?t.width??d*.45:t.height??280)),o.dataset.detailPosition=f,o.style.setProperty("--necto-detail-size",`${v}px`),a.setAttribute("aria-orientation",f==="right"?"vertical":"horizontal"),a.setAttribute("aria-valuemin",String(b)),a.setAttribute("aria-valuemax",String(E)),a.setAttribute("aria-valuenow",String(Math.round(v)))},q=d=>{t[f==="right"?"width":"height"]=Math.max(b,Math.min(E,d)),I()};a.addEventListener("keydown",d=>{const A=f==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];A.includes(d.key)&&(d.preventDefault(),q(v+(d.key===A[0]?24:-24)),H())});let D;a.addEventListener("pointerdown",d=>{d.button===0&&(d.preventDefault(),a.setPointerCapture(d.pointerId),D={coordinate:f==="right"?d.clientX:d.clientY,size:v},a.dataset.dragging="true")}),a.addEventListener("pointermove",d=>{D&&q(D.size+D.coordinate-(f==="right"?d.clientX:d.clientY))});const U=()=>{D=void 0,delete a.dataset.dragging,H()};a.addEventListener("pointerup",U),a.addEventListener("lostpointercapture",U);const Y=new ResizeObserver(I);Y.observe(o),I(),n=()=>Y.disconnect()},unmount(){n()}}}re();function le(){return ne()}function de(e){return e instanceof Error&&"code"in e}function ue(){return k("context")}async function fe(){await k("ready")}function j(){return{send(e,t={}){return k("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,i){const o=await k("subscribe",{operationID:e,input:t});return ie(o,{onEvent:n,onError:i}),{id:o,async unsubscribe(){oe(o),await k("unsubscribe",{subscriptionID:o})}}}}}function pe(e,t){var n;return((n=e.operations.find(i=>i.id===t))==null?void 0:n.available)??!1}var m={isAvailable:le,context:ue,ready:fe,locale:Q,createTranslator:F,isOperationAvailable:pe,device:j(),desktop:j()};const c=F({ko:{"Nothing here":"표시할 파일이 없어요","This directory is empty.":"이 디렉터리는 비어 있어요.","{count} item":"{count}개 항목","{count} items":"{count}개 항목","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Loading…":"불러오는 중…","Copy path":"경로 복사",Copied:"복사됨",Failed:"실패",Delete:"삭제","Really delete?":"정말 삭제할까요?",Cancel:"취소",Edit:"편집",Save:"저장","File contents":"파일 내용",Size:"크기",Modified:"수정 시간",Created:"생성 시간","Binary — described rather than rendered":"바이너리 — 화면 대신 정보만 표시해요","Preview · the head of the file":"미리보기 · 파일 앞부분",Image:"이미지","Preview of {name}":"{name} 미리보기",Contents:"내용",Saved:"저장됨","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작해요."}});let M=[],p="";const N=new Map,S=new Set;let u=null,l=null,w=null,g=!1,L="",x="",y=null;const J=ce("necto.files.detail");function r(e,t={},n=[]){const i=document.createElement(e);for(const[o,s]of Object.entries(t))s!==void 0&&i.setAttribute(o,s);return i.append(...n),i}function O(e){return de(e)?e.message:String(e)}function V(e){return e>=1048576?`${(e/1048576).toFixed(1)} MB`:e>=1024?`${(e/1024).toFixed(1)} kB`:`${e} B`}function X(e){const t=new Date(e),n=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}const R=r("div",{class:"necto-segmented"}),W=r("span",{class:"necto-caption",style:"margin-left:auto"}),$=r("div",{class:"necto-body",tabindex:"0"}),_=r("div",{class:"detail-slot"});var Z;(Z=document.getElementById("root"))==null||Z.append(r("div",{class:"necto-app"},[r("div",{class:"necto-toolbar"},[R,W]),$,_]));function me(){R.replaceChildren();for(const e of M){const t=r("button",{type:"button","aria-selected":String(e.id===p)},[e.name]);t.addEventListener("click",()=>void ee(e.id)),R.append(t)}}function ge(){const e=[],t=(n,i)=>{for(const o of N.get(n)??[]){const s=n?`${n}/${o.name}`:o.name;e.push({entry:o,path:s,depth:i}),o.isDirectory&&S.has(s)&&t(s,i+1)}};return t("",0),e}function h(){$.replaceChildren();const e=ge();if(W.textContent=String(e.length),!e.length){$.append(r("div",{class:"necto-empty"},[r("p",{class:"necto-empty-title"},[y??c("Nothing here")]),r("p",{class:"necto-caption"},[c("This directory is empty.")])]));return}const t=r("div",{class:"necto-tree"});for(const{entry:n,path:i,depth:o}of e){const s=r("button",{type:"button",class:"necto-tree-row","aria-selected":i===u?"true":void 0,style:`padding-left: calc(${o} * 16px + var(--necto-space-3))`},[r("span",{class:"necto-tree-twist"},[n.isDirectory?S.has(i)?"▾":"▸":""]),(()=>{const a=r("span",{class:"necto-tree-name"},[n.name]);return n.isDirectory&&a.append(r("em",{},["/"])),a})(),r("span",{class:"necto-tree-meta"},[n.isDirectory?c(n.itemCount===1?"{count} item":"{count} items",{count:n.itemCount??0}):V(n.size??0)])]);s.addEventListener("click",()=>{n.isDirectory?ve(i):be(i)}),t.append(s)}$.append(t)}function T(){if(J.unmount(),_.replaceChildren(),!u)return;const e=r("aside",{class:"necto-detail"}),t=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":c("Close details")},["✕"]);t.addEventListener("click",z),e.append(r("div",{class:"necto-detail-title"},[r("span",{class:"necto-detail-title-url"},[u]),t]),r("div",{class:`necto-detail-body${g?" file-edit-body":""}`},he())),_.append(e),J.mount(e)}function he(){if(!l)return[r("p",{class:"necto-caption"},[c("Loading…")])];const e=r("span",{class:"necto-caption"},[x]),t=r("button",{type:"button",class:"necto-button"},[c("Copy path")]);t.addEventListener("click",()=>{var b;const a=M.find(E=>E.id===p),f=a!=null&&a.path?`${a.path}/${u??""}`:u??"",v=()=>setTimeout(()=>t.textContent=c("Copy path"),1400);(b=navigator.clipboard)==null||b.writeText(f).then(()=>{t.textContent=c("Copied"),v()},()=>{t.textContent=c("Failed"),v()})});const n=r("button",{type:"button",class:"necto-button necto-button-quiet necto-button-danger",style:"margin-left:auto"},[c("Delete")]);n.addEventListener("click",()=>{if(n.dataset.armed!=="true"){n.dataset.armed="true",n.textContent=c("Really delete?"),setTimeout(()=>{n.dataset.armed="false",n.textContent=c("Delete")},3e3);return}ye()});const i=r("button",{type:"button",class:"necto-button"},[c(g?"Cancel":"Edit")]);i.addEventListener("click",()=>{g=!g,L=(l==null?void 0:l.text)??"",x="",T()});const o=r("button",{type:"button",class:"necto-button necto-button-primary"},[c("Save")]);o.addEventListener("click",()=>void we());const s=[];if(l.kind==="image"&&l.base64){const a=r("img",{class:"file-image",alt:c("Preview of {name}",{name:l.name}),src:`data:${l.mediaType??"application/octet-stream"};base64,${l.base64}`});s.push(r("div",{class:"file-image-frame"},[a]))}else if(l.kind==="text")if(g){const a=r("textarea",{class:"necto-field necto-json-editor","aria-label":c("File contents"),spellcheck:"false"});a.value=L,a.addEventListener("input",()=>L=a.value),s.push(a)}else s.push(r("pre",{class:"necto-code",style:"overflow:auto"},[l.text??""]));return[r("dl",{class:"necto-pairs"},[r("div",{},[r("dt",{},[c("Size")]),r("dd",{},[V(l.size)])]),...l.modifiedAt!==void 0?[r("div",{},[r("dt",{},[c("Modified")]),r("dd",{},[X(l.modifiedAt)])])]:[],...(w==null?void 0:w.createdAt)!==void 0?[r("div",{},[r("dt",{},[c("Created")]),r("dd",{},[X(w.createdAt)])])]:[]]),r("p",{class:"necto-section-title"},[l.kind==="binary"?c("Binary — described rather than rendered"):l.kind==="image"?c("Image"):l.isTruncated?c("Preview · the head of the file"):c("Contents")]),...s,r("div",{class:"file-actions"},[t,...l.kind==="text"&&!l.isTruncated?[i]:[],...g?[o]:[],e,n])]}async function P(e){const t=p;try{const n=await m.device.send("files.list",{root:t,path:e});if(p!==t)return;N.set(e,n.entries),y=null}catch(n){if(p!==t)return;N.set(e,[]),y=O(n)}}async function ve(e){S.has(e)?S.delete(e):(S.add(e),N.has(e)||await P(e)),h()}async function be(e){if(u===e){z();return}const t=p;u=e,l=null,w=null,g=!1,x="",h(),T();try{const[n,i]=await Promise.all([m.device.send("files.preview",{root:t,path:e}),m.device.send("files.info",{root:t,path:e})]);if(!B(t,e))return;l=n.file,w=i.item}catch(n){if(!B(t,e))return;y=O(n)}T()}function B(e,t){return p===e&&u===t}function z(){u=null,l=null,w=null,g=!1,L="",x="",h(),T()}async function we(){if(!u||!l||l.kind!=="text"||l.isTruncated)return;const e=p,t=u,n=t.includes("/")?t.slice(0,t.lastIndexOf("/")):"";try{await m.device.send("files.write",{root:e,path:t,content:L});const[i,o]=await Promise.all([m.device.send("files.preview",{root:e,path:t}),m.device.send("files.info",{root:e,path:t})]);B(e,t)&&(l=i.file,w=o.item,g=!1,x=c("Saved")),p===e&&await P(n),h(),T()}catch(i){if(!B(e,t))return;x=O(i),T()}}async function ye(){if(!u)return;const e=p,t=u,n=t.includes("/")?t.slice(0,t.lastIndexOf("/")):"";try{await m.device.send("files.delete",{root:e,path:t}),B(e,t)&&z(),p===e&&await P(n),h()}catch(i){y=O(i),h()}}async function ee(e){p=e,N.clear(),S.clear(),z(),await P(""),me(),h()}async function Ee(){var e;if(!m.isAvailable()){y=c("This plugin only works inside Necto"),h();return}try{M=(await m.device.send("files.roots")).roots}catch(t){y=O(t),h(),await m.ready();return}await ee(((e=M[0])==null?void 0:e.id)??""),await m.ready()}Ee(); diff --git a/SDK/Plugins/Network/Panel/assets/index.css b/SDK/Plugins/Network/Panel/assets/index.css index e16bc7d..2c44e4c 100644 --- a/SDK/Plugins/Network/Panel/assets/index.css +++ b/SDK/Plugins/Network/Panel/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,#root{height:100%}.col-status{width:88px}.col-method{width:72px}.col-started{width:112px}.col-duration{width:84px}.col-size{width:80px}.req-host{margin-left:var(--necto-space-2);color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}tr[data-failed=true] .req-name{color:var(--necto-danger)}.cell-method{color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.cell-numeric{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.count{color:var(--necto-text-tertiary);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums}@media(max-width:640px){.col-started,.col-duration,.col-size,.cell-started,.cell-duration,.cell-size{display:none}}@container (max-width: 640px){.col-started,.col-duration,.col-size,.cell-started,.cell-duration,.cell-size{display:none}} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,#root{height:100%}.col-status{width:88px}.col-method{width:72px}.col-started{width:112px}.col-duration{width:84px}.col-size{width:80px}.req-host{margin-left:var(--necto-space-2);color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}tr[data-failed=true] .req-name{color:var(--necto-danger)}.cell-method{color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.cell-numeric{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.count{color:var(--necto-text-tertiary);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums}@media(max-width:640px){.col-started,.col-duration,.col-size,.cell-started,.cell-duration,.cell-size{display:none}}@container (max-width: 640px){.col-started,.col-duration,.col-size,.cell-started,.cell-duration,.cell-size{display:none}} diff --git a/SDK/Plugins/Network/Panel/assets/index.js b/SDK/Plugins/Network/Panel/assets/index.js index 8a37302..51b5a9c 100644 --- a/SDK/Plugins/Network/Panel/assets/index.js +++ b/SDK/Plugins/Network/Panel/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const a of c.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=n(s);fetch(s.href,c)}})();var I="necto",Q=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function P(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function W(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[I])}async function w(e,t={}){var s,c,a;const n=(a=(c=(s=globalThis.window)==null?void 0:s.webkit)==null?void 0:c.messageHandlers)==null?void 0:a[I];if(!n)throw new Q;const o=await n.postMessage({type:e,...t});if(!o.ok)throw P(o.error);return o.value}var h=new Map;function ee(e,t){h.set(e,t)}function te(e){h.delete(e)}function ne(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=h.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var o;const n=h.get(e);h.delete(e),(o=n==null?void 0:n.onError)==null||o.call(n,P(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{h.delete(e)})}function F(){var n,o;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((o=globalThis.navigator)==null?void 0:o.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function D(e){return(t,n={})=>{var s;return(((s=e[F()])==null?void 0:s[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(c,a)=>n[a]===void 0?c:String(n[a]))}}var oe=D({ko:{"Resize details":"상세 패널 크기 조절"}});function re(e){try{const t=JSON.parse(e??"null"),n=o=>typeof o=="number"&&Number.isFinite(o)&&o>0?o:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function se(e){let t;try{t=re(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(o){n();const s=o.closest(".necto-app"),c=o.querySelector(".necto-detail-title");if(!s||!c)return;s.classList.add("necto-dock-layout");const a=document.createElement("div");a.className="necto-resize",a.tabIndex=0,a.setAttribute("role","separator"),a.setAttribute("aria-label",oe("Resize details")),o.prepend(a);let u="right",g=0,b=0,C=0;const T=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},L=()=>{const{width:l,height:v}=s.getBoundingClientRect();u=l<=640?"bottom":"right",b=u==="right"?280:Math.min(180,v/2),C=Math.max(b,u==="right"?l-240:v-160),g=Math.max(b,Math.min(C,u==="right"?t.width??l*.45:t.height??280)),s.dataset.detailPosition=u,s.style.setProperty("--necto-detail-size",`${g}px`),a.setAttribute("aria-orientation",u==="right"?"vertical":"horizontal"),a.setAttribute("aria-valuemin",String(b)),a.setAttribute("aria-valuemax",String(C)),a.setAttribute("aria-valuenow",String(Math.round(g)))},R=l=>{t[u==="right"?"width":"height"]=Math.max(b,Math.min(C,l)),L()};a.addEventListener("keydown",l=>{const v=u==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];v.includes(l.key)&&(l.preventDefault(),R(g+(l.key===v[0]?24:-24)),T())});let y;a.addEventListener("pointerdown",l=>{l.button===0&&(l.preventDefault(),a.setPointerCapture(l.pointerId),y={coordinate:u==="right"?l.clientX:l.clientY,size:g},a.dataset.dragging="true")}),a.addEventListener("pointermove",l=>{y&&R(y.size+y.coordinate-(u==="right"?l.clientX:l.clientY))});const z=()=>{y=void 0,delete a.dataset.dragging,T()};a.addEventListener("pointerup",z),a.addEventListener("lostpointercapture",z);const O=new ResizeObserver(L);O.observe(s),L(),n=()=>O.disconnect()},unmount(){n()}}}ne();function ie(){return W()}function U(e){return e instanceof Error&&"code"in e}function ae(e,t){return U(e)&&e.code===t}function ce(){return w("context")}async function le(){await w("ready")}function $(){return{send(e,t={}){return w("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,o){const s=await w("subscribe",{operationID:e,input:t});return ee(s,{onEvent:n,onError:o}),{id:s,async unsubscribe(){te(s),await w("unsubscribe",{subscriptionID:s})}}}}}function ue(e,t){var n;return((n=e.operations.find(o=>o.id===t))==null?void 0:n.available)??!1}var p={isAvailable:ie,context:ce,ready:le,locale:F,createTranslator:D,isOperationAvailable:ue,device:$(),desktop:$()};function de(e){return U(e)?e.message:String(e)}async function pe({onRecord:e,onError:t}){if(!p.isAvailable()){t("This plugin only works inside Necto.");return}(await p.context()).target||t("Select a connected app to see its requests.");try{await p.device.subscribe("records.observe",{},s=>e(s.record),s=>t(s.message));const o=await p.device.send("records.list",{limit:500});for(const s of o.records)e(s)}catch(o){t(ae(o,"TARGET_DISCONNECTED")?"Select a connected app to see its requests.":de(o))}await p.ready()}async function fe(e){return(await p.device.send("records.detail",{recordID:e})).record}async function me(){await p.device.send("records.clear")}const i=D({ko:{Summary:"요약",Request:"요청",Response:"응답",copy:"복사",copied:"복사됨",failed:"실패",fail:"실패","Nothing recorded.":"기록된 내용이 없습니다.","No {side} body.":"{side} 본문이 없습니다.",request:"요청",response:"응답","Binary body.":"바이너리 본문입니다.",truncated:"일부만 표시",Method:"메서드",State:"상태",Status:"상태 코드",Duration:"소요 시간",Size:"크기",Started:"시작 시간",Error:"오류",Headers:"헤더",Body:"본문","Filter by method, host or path":"메서드, 호스트 또는 경로 필터","Filter requests":"요청 필터",Clear:"비우기","No requests yet":"아직 요청이 없습니다","Make a request in the connected app and it appears here.":"연결된 앱에서 요청을 보내면 여기에 표시됩니다.","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Loading…":"불러오는 중…","No command available.":"사용 가능한 명령이 없습니다."}}),he=[{id:"summary",label:i("Summary")},{id:"request",label:i("Request")},{id:"response",label:i("Response")},{id:"curl",label:"cURL"}];function r(e,t={},n=[]){const o=document.createElement(e);for(const[s,c]of Object.entries(t))c!==void 0&&o.setAttribute(s,c);return o.append(...n),o}function ge(e){return e.state==="failed"||(e.statusCode??0)>=400}function k(e){return e===void 0?"":e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`}function be(e){if(e.state==="pending")return"…";if(e.durationMilliseconds===void 0)return"";const t=e.durationMilliseconds;return t>=1e3?`${(t/1e3).toFixed(1)} s`:`${Math.round(t)} ms`}function ye(e){const t=new Date(e.startedAtMilliseconds),n=(o,s=2)=>String(o).padStart(s,"0");return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function ve(e,t){if(!(t!=null&&t.includes("json")))return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}async function we(e){try{return await navigator.clipboard.writeText(e),!0}catch{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.append(t),t.select();const n=document.execCommand("copy");return t.remove(),n}}function j(e){const t=r("button",{type:"button",class:"necto-code-copy"},[i("copy")]);return t.addEventListener("click",()=>{we(e).then(n=>{t.textContent=i(n?"copied":"failed"),n&&(t.dataset.copied="true"),setTimeout(()=>{t.textContent=i("copy"),delete t.dataset.copied},1400)})}),r("div",{class:"necto-code-block"},[r("pre",{class:"necto-code"},[e]),t])}function J(e){if(e.state==="pending")return r("span",{class:"necto-status necto-status-idle"},["—"]);if(e.state==="failed")return r("span",{class:"necto-status necto-status-danger"},[i("fail")]);const t=e.statusCode??0,n=t>=500?"danger":t>=400?"warning":t>=300?"info":"ok";return r("span",{class:`necto-status necto-status-${n}`},[String(t)])}function X(e){return e.length?r("dl",{class:"necto-pairs"},e.map(([t,n])=>r("div",{},[r("dt",{},[t]),r("dd",{},[n])]))):r("p",{class:"necto-caption"},[i("Nothing recorded.")])}function Se(e,t){if(!e)return[r("p",{class:"necto-caption"},[i("No {side} body.",{side:i(t)})])];const n=[k(e.byteCount),e.contentType].filter(Boolean).join(" · ");return e.text===void 0?[r("p",{class:"necto-caption"},[n]),r("p",{class:"necto-caption"},[i("Binary body.")])]:[r("p",{class:"necto-caption"},[n+(e.isTruncated?` · ${i("truncated")}`:"")]),j(ve(e.text,e.contentType))]}function Ee(e){const t=[[i("Method"),e.method],[i("State"),e.state]];return e.statusCode!==void 0&&t.push([i("Status"),String(e.statusCode)]),e.durationMilliseconds!==void 0&&t.push([i("Duration"),`${Math.round(e.durationMilliseconds)} ms`]),e.responseByteCount!==void 0&&t.push([i("Size"),k(e.responseByteCount)]),t.push([i("Started"),new Date(e.startedAtMilliseconds).toLocaleString()]),e.errorSummary&&t.push([i("Error"),e.errorSummary]),X(t)}function Ce(e,t){const n=t==="request"?e.requestHeaders:e.responseHeaders,o=t==="request"?e.requestBody:e.responseBody,s=Object.entries(n??{}).sort(([c],[a])=>c.localeCompare(a));return[r("h3",{class:"necto-section-title"},[i("Headers")]),X(s),r("h3",{class:"necto-section-title"},[i("Body")]),...Se(o,t)]}const A=new Map;let Y="",d=null,f=null,S="summary",B=null;const _=se("necto.network-logger.detail");function G(){const e=Y.trim().toLowerCase();return[...A.values()].filter(t=>!e||`${t.method} ${t.url}`.toLowerCase().includes(e)).sort((t,n)=>n.startedAtMilliseconds-t.startedAtMilliseconds)}const N=r("input",{class:"necto-field",type:"search",placeholder:i("Filter by method, host or path"),"aria-label":i("Filter requests")}),V=r("span",{class:"count"}),Z=r("button",{type:"button",class:"necto-button necto-button-quiet necto-button-danger"},[i("Clear")]),E=r("div",{class:"necto-body",tabindex:"0"}),x=r("div",{class:"detail-slot"});var H;(H=document.getElementById("root"))==null||H.append(r("div",{class:"necto-app"},[r("div",{class:"necto-toolbar"},[N,V,Z]),E,x]));function m(){const e=G();if(V.textContent=e.length?String(e.length):"",E.replaceChildren(),!e.length){E.append(r("div",{class:"necto-empty"},[r("p",{class:"necto-empty-title"},[B??i("No requests yet")]),r("p",{class:"necto-caption"},[i("Make a request in the connected app and it appears here.")])]));return}const t=r("tr",{},[r("th",{class:"col-status"},[i("Status")]),r("th",{class:"col-method"},[i("Method")]),r("th",{},["URL"]),r("th",{class:"col-started necto-numeric"},[i("Started")]),r("th",{class:"col-duration necto-numeric"},[i("Duration")]),r("th",{class:"col-size necto-numeric"},[i("Size")])]),n=e.map(o=>{const s=r("tr",{"aria-selected":o.id===d?"true":void 0,"data-failed":ge(o)?"true":void 0},[r("td",{},[J(o)]),r("td",{class:"cell-method"},[o.method]),r("td",{},[r("span",{class:"req-name"},[o.name]),r("span",{class:"req-host"},[o.host])]),r("td",{class:"cell-started cell-numeric necto-numeric"},[ye(o)]),r("td",{class:"cell-duration cell-numeric necto-numeric"},[be(o)]),r("td",{class:"cell-size cell-numeric necto-numeric"},[k(o.responseByteCount)])]);return s.addEventListener("click",()=>void K(o.id)),s});E.append(r("table",{class:"necto-table"},[r("thead",{},[t]),r("tbody",{},n)]))}function M(){if(_.unmount(),x.replaceChildren(),!d)return;const e=A.get(d),t=r("aside",{class:"necto-detail"}),n=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":i("Close details")},["✕"]);n.addEventListener("click",q),t.append(r("div",{class:"necto-detail-title necto-detail-title-wrap"},[...e?[J(e)]:[],r("span",{class:"cell-method"},[(e==null?void 0:e.method)??""]),r("span",{class:"necto-detail-title-url"},[(e==null?void 0:e.url)??""]),n]),r("div",{class:"necto-tabs"},he.map(({id:o,label:s})=>{const c=r("button",{type:"button",class:"necto-tab","aria-selected":S===o?"true":"false"},[s]);return c.addEventListener("click",()=>{S=o,M()}),c})),r("div",{class:"necto-detail-body"},Me())),x.append(t),_.mount(t)}function Me(){return f?S==="summary"?[Ee(f)]:S==="curl"?[j(f.curl??i("No command available."))]:Ce(f,S):[r("p",{class:"necto-caption"},[i("Loading…")])]}async function K(e){d=e,f=null,m(),M();try{const t=await fe(e);if(d!==e)return;f=t}catch(t){if(d!==e)return;B=String(t)}M()}function q(){d=null,f=null,m(),M()}N.addEventListener("input",()=>{Y=N.value,m()});Z.addEventListener("click",()=>{me().then(()=>{A.clear(),q()}).catch(e=>{B=String(e),m()})});E.addEventListener("keydown",e=>{if(e.key==="Escape"){q();return}if(e.key!=="ArrowDown"&&e.key!=="ArrowUp")return;e.preventDefault();const t=G(),n=t.findIndex(c=>c.id===d),o=e.key==="ArrowDown"?n+1:n-1,s=t[Math.max(0,Math.min(t.length-1,o))];s&&K(s.id)});m();pe({onRecord:e=>{A.set(e.id,e),m()},onError:e=>{B=e,m()}}); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const a of c.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=n(s);fetch(s.href,c)}})();var I="necto",Q=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function P(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function W(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[I])}async function w(e,t={}){var s,c,a;const n=(a=(c=(s=globalThis.window)==null?void 0:s.webkit)==null?void 0:c.messageHandlers)==null?void 0:a[I];if(!n)throw new Q;const o=await n.postMessage({type:e,...t});if(!o.ok)throw P(o.error);return o.value}var h=new Map;function ee(e,t){h.set(e,t)}function te(e){h.delete(e)}function ne(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=h.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var o;const n=h.get(e);h.delete(e),(o=n==null?void 0:n.onError)==null||o.call(n,P(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{h.delete(e)})}function F(){var n,o;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((o=globalThis.navigator)==null?void 0:o.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function D(e){return(t,n={})=>{var s;return(((s=e[F()])==null?void 0:s[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(c,a)=>n[a]===void 0?c:String(n[a]))}}var oe=D({ko:{"Resize details":"상세 패널 크기 조절"}});function re(e){try{const t=JSON.parse(e??"null"),n=o=>typeof o=="number"&&Number.isFinite(o)&&o>0?o:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function se(e){let t;try{t=re(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(o){n();const s=o.closest(".necto-app"),c=o.querySelector(".necto-detail-title");if(!s||!c)return;s.classList.add("necto-dock-layout");const a=document.createElement("div");a.className="necto-resize",a.tabIndex=0,a.setAttribute("role","separator"),a.setAttribute("aria-label",oe("Resize details")),o.prepend(a);let u="right",g=0,b=0,C=0;const T=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},L=()=>{const{width:l,height:v}=s.getBoundingClientRect();u=l<=640?"bottom":"right",b=u==="right"?280:Math.min(180,v/2),C=Math.max(b,u==="right"?l-240:v-160),g=Math.max(b,Math.min(C,u==="right"?t.width??l*.45:t.height??280)),s.dataset.detailPosition=u,s.style.setProperty("--necto-detail-size",`${g}px`),a.setAttribute("aria-orientation",u==="right"?"vertical":"horizontal"),a.setAttribute("aria-valuemin",String(b)),a.setAttribute("aria-valuemax",String(C)),a.setAttribute("aria-valuenow",String(Math.round(g)))},R=l=>{t[u==="right"?"width":"height"]=Math.max(b,Math.min(C,l)),L()};a.addEventListener("keydown",l=>{const v=u==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];v.includes(l.key)&&(l.preventDefault(),R(g+(l.key===v[0]?24:-24)),T())});let y;a.addEventListener("pointerdown",l=>{l.button===0&&(l.preventDefault(),a.setPointerCapture(l.pointerId),y={coordinate:u==="right"?l.clientX:l.clientY,size:g},a.dataset.dragging="true")}),a.addEventListener("pointermove",l=>{y&&R(y.size+y.coordinate-(u==="right"?l.clientX:l.clientY))});const z=()=>{y=void 0,delete a.dataset.dragging,T()};a.addEventListener("pointerup",z),a.addEventListener("lostpointercapture",z);const O=new ResizeObserver(L);O.observe(s),L(),n=()=>O.disconnect()},unmount(){n()}}}ne();function ie(){return W()}function U(e){return e instanceof Error&&"code"in e}function ae(e,t){return U(e)&&e.code===t}function ce(){return w("context")}async function le(){await w("ready")}function $(){return{send(e,t={}){return w("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,o){const s=await w("subscribe",{operationID:e,input:t});return ee(s,{onEvent:n,onError:o}),{id:s,async unsubscribe(){te(s),await w("unsubscribe",{subscriptionID:s})}}}}}function ue(e,t){var n;return((n=e.operations.find(o=>o.id===t))==null?void 0:n.available)??!1}var p={isAvailable:ie,context:ce,ready:le,locale:F,createTranslator:D,isOperationAvailable:ue,device:$(),desktop:$()};function de(e){return U(e)?e.message:String(e)}async function pe({onRecord:e,onError:t}){if(!p.isAvailable()){t("This plugin only works inside Necto.");return}(await p.context()).target||t("Select a connected app to see its requests.");try{await p.device.subscribe("records.observe",{},s=>e(s.record),s=>t(s.message));const o=await p.device.send("records.list",{limit:500});for(const s of o.records)e(s)}catch(o){t(ae(o,"TARGET_DISCONNECTED")?"Select a connected app to see its requests.":de(o))}await p.ready()}async function fe(e){return(await p.device.send("records.detail",{recordID:e})).record}async function me(){await p.device.send("records.clear")}const i=D({ko:{Summary:"요약",Request:"요청",Response:"응답",copy:"복사",copied:"복사됨",failed:"실패",fail:"실패","Nothing recorded.":"기록된 내용이 없어요.","No {side} body.":"{side} 본문이 없어요.",request:"요청",response:"응답","Binary body.":"바이너리 본문이에요.",truncated:"일부만 표시",Method:"메서드",State:"상태",Status:"상태 코드",Duration:"소요 시간",Size:"크기",Started:"시작 시간",Error:"오류",Headers:"헤더",Body:"본문","Filter by method, host or path":"메서드, 호스트 또는 경로 필터","Filter requests":"요청 필터",Clear:"비우기","No requests yet":"아직 요청이 없어요","Make a request in the connected app and it appears here.":"연결된 앱에서 요청을 보내면 여기에 표시돼요.","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Loading…":"불러오는 중…","No command available.":"사용 가능한 명령어가 없어요."}}),he=[{id:"summary",label:i("Summary")},{id:"request",label:i("Request")},{id:"response",label:i("Response")},{id:"curl",label:"cURL"}];function r(e,t={},n=[]){const o=document.createElement(e);for(const[s,c]of Object.entries(t))c!==void 0&&o.setAttribute(s,c);return o.append(...n),o}function ge(e){return e.state==="failed"||(e.statusCode??0)>=400}function k(e){return e===void 0?"":e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`}function be(e){if(e.state==="pending")return"…";if(e.durationMilliseconds===void 0)return"";const t=e.durationMilliseconds;return t>=1e3?`${(t/1e3).toFixed(1)} s`:`${Math.round(t)} ms`}function ye(e){const t=new Date(e.startedAtMilliseconds),n=(o,s=2)=>String(o).padStart(s,"0");return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}.${n(t.getMilliseconds(),3)}`}function ve(e,t){if(!(t!=null&&t.includes("json")))return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}async function we(e){try{return await navigator.clipboard.writeText(e),!0}catch{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.append(t),t.select();const n=document.execCommand("copy");return t.remove(),n}}function j(e){const t=r("button",{type:"button",class:"necto-code-copy"},[i("copy")]);return t.addEventListener("click",()=>{we(e).then(n=>{t.textContent=i(n?"copied":"failed"),n&&(t.dataset.copied="true"),setTimeout(()=>{t.textContent=i("copy"),delete t.dataset.copied},1400)})}),r("div",{class:"necto-code-block"},[r("pre",{class:"necto-code"},[e]),t])}function J(e){if(e.state==="pending")return r("span",{class:"necto-status necto-status-idle"},["—"]);if(e.state==="failed")return r("span",{class:"necto-status necto-status-danger"},[i("fail")]);const t=e.statusCode??0,n=t>=500?"danger":t>=400?"warning":t>=300?"info":"ok";return r("span",{class:`necto-status necto-status-${n}`},[String(t)])}function X(e){return e.length?r("dl",{class:"necto-pairs"},e.map(([t,n])=>r("div",{},[r("dt",{},[t]),r("dd",{},[n])]))):r("p",{class:"necto-caption"},[i("Nothing recorded.")])}function Se(e,t){if(!e)return[r("p",{class:"necto-caption"},[i("No {side} body.",{side:i(t)})])];const n=[k(e.byteCount),e.contentType].filter(Boolean).join(" · ");return e.text===void 0?[r("p",{class:"necto-caption"},[n]),r("p",{class:"necto-caption"},[i("Binary body.")])]:[r("p",{class:"necto-caption"},[n+(e.isTruncated?` · ${i("truncated")}`:"")]),j(ve(e.text,e.contentType))]}function Ee(e){const t=[[i("Method"),e.method],[i("State"),e.state]];return e.statusCode!==void 0&&t.push([i("Status"),String(e.statusCode)]),e.durationMilliseconds!==void 0&&t.push([i("Duration"),`${Math.round(e.durationMilliseconds)} ms`]),e.responseByteCount!==void 0&&t.push([i("Size"),k(e.responseByteCount)]),t.push([i("Started"),new Date(e.startedAtMilliseconds).toLocaleString()]),e.errorSummary&&t.push([i("Error"),e.errorSummary]),X(t)}function Ce(e,t){const n=t==="request"?e.requestHeaders:e.responseHeaders,o=t==="request"?e.requestBody:e.responseBody,s=Object.entries(n??{}).sort(([c],[a])=>c.localeCompare(a));return[r("h3",{class:"necto-section-title"},[i("Headers")]),X(s),r("h3",{class:"necto-section-title"},[i("Body")]),...Se(o,t)]}const A=new Map;let Y="",d=null,f=null,S="summary",B=null;const _=se("necto.network-logger.detail");function G(){const e=Y.trim().toLowerCase();return[...A.values()].filter(t=>!e||`${t.method} ${t.url}`.toLowerCase().includes(e)).sort((t,n)=>n.startedAtMilliseconds-t.startedAtMilliseconds)}const N=r("input",{class:"necto-field",type:"search",placeholder:i("Filter by method, host or path"),"aria-label":i("Filter requests")}),V=r("span",{class:"count"}),Z=r("button",{type:"button",class:"necto-button necto-button-quiet necto-button-danger"},[i("Clear")]),E=r("div",{class:"necto-body",tabindex:"0"}),x=r("div",{class:"detail-slot"});var H;(H=document.getElementById("root"))==null||H.append(r("div",{class:"necto-app"},[r("div",{class:"necto-toolbar"},[N,V,Z]),E,x]));function m(){const e=G();if(V.textContent=e.length?String(e.length):"",E.replaceChildren(),!e.length){E.append(r("div",{class:"necto-empty"},[r("p",{class:"necto-empty-title"},[B??i("No requests yet")]),r("p",{class:"necto-caption"},[i("Make a request in the connected app and it appears here.")])]));return}const t=r("tr",{},[r("th",{class:"col-status"},[i("Status")]),r("th",{class:"col-method"},[i("Method")]),r("th",{},["URL"]),r("th",{class:"col-started necto-numeric"},[i("Started")]),r("th",{class:"col-duration necto-numeric"},[i("Duration")]),r("th",{class:"col-size necto-numeric"},[i("Size")])]),n=e.map(o=>{const s=r("tr",{"aria-selected":o.id===d?"true":void 0,"data-failed":ge(o)?"true":void 0},[r("td",{},[J(o)]),r("td",{class:"cell-method"},[o.method]),r("td",{},[r("span",{class:"req-name"},[o.name]),r("span",{class:"req-host"},[o.host])]),r("td",{class:"cell-started cell-numeric necto-numeric"},[ye(o)]),r("td",{class:"cell-duration cell-numeric necto-numeric"},[be(o)]),r("td",{class:"cell-size cell-numeric necto-numeric"},[k(o.responseByteCount)])]);return s.addEventListener("click",()=>void K(o.id)),s});E.append(r("table",{class:"necto-table"},[r("thead",{},[t]),r("tbody",{},n)]))}function M(){if(_.unmount(),x.replaceChildren(),!d)return;const e=A.get(d),t=r("aside",{class:"necto-detail"}),n=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":i("Close details")},["✕"]);n.addEventListener("click",q),t.append(r("div",{class:"necto-detail-title necto-detail-title-wrap"},[...e?[J(e)]:[],r("span",{class:"cell-method"},[(e==null?void 0:e.method)??""]),r("span",{class:"necto-detail-title-url"},[(e==null?void 0:e.url)??""]),n]),r("div",{class:"necto-tabs"},he.map(({id:o,label:s})=>{const c=r("button",{type:"button",class:"necto-tab","aria-selected":S===o?"true":"false"},[s]);return c.addEventListener("click",()=>{S=o,M()}),c})),r("div",{class:"necto-detail-body"},Me())),x.append(t),_.mount(t)}function Me(){return f?S==="summary"?[Ee(f)]:S==="curl"?[j(f.curl??i("No command available."))]:Ce(f,S):[r("p",{class:"necto-caption"},[i("Loading…")])]}async function K(e){d=e,f=null,m(),M();try{const t=await fe(e);if(d!==e)return;f=t}catch(t){if(d!==e)return;B=String(t)}M()}function q(){d=null,f=null,m(),M()}N.addEventListener("input",()=>{Y=N.value,m()});Z.addEventListener("click",()=>{me().then(()=>{A.clear(),q()}).catch(e=>{B=String(e),m()})});E.addEventListener("keydown",e=>{if(e.key==="Escape"){q();return}if(e.key!=="ArrowDown"&&e.key!=="ArrowUp")return;e.preventDefault();const t=G(),n=t.findIndex(c=>c.id===d),o=e.key==="ArrowDown"?n+1:n-1,s=t[Math.max(0,Math.min(t.length-1,o))];s&&K(s.id)});m();pe({onRecord:e=>{A.set(e.id,e),m()},onError:e=>{B=e,m()}}); diff --git a/SDK/Plugins/Performance/Panel/assets/index.css b/SDK/Plugins/Performance/Panel/assets/index.css index 84e63fd..0208da7 100644 --- a/SDK/Plugins/Performance/Panel/assets/index.css +++ b/SDK/Plugins/Performance/Panel/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.necto-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:720px){.necto-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:440px){.necto-metrics{grid-template-columns:1fr}} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.necto-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:720px){.necto-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:440px){.necto-metrics{grid-template-columns:1fr}} diff --git a/SDK/Plugins/Performance/Panel/assets/index.js b/SDK/Plugins/Performance/Panel/assets/index.js index dd723c7..f1f8c65 100644 --- a/SDK/Plugins/Performance/Panel/assets/index.js +++ b/SDK/Plugins/Performance/Panel/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var T="necto",q=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function x(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function I(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[T])}async function g(e,t={}){var o,i,c;const n=(c=(i=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:i.messageHandlers)==null?void 0:c[T];if(!n)throw new q;const r=await n.postMessage({type:e,...t});if(!r.ok)throw x(r.error);return r.value}var f=new Map;function U(e,t){f.set(e,t)}function R(e){f.delete(e)}function $(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=f.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var r;const n=f.get(e);f.delete(e),(r=n==null?void 0:n.onError)==null||r.call(n,x(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{f.delete(e)})}function L(){var n,r;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((r=globalThis.navigator)==null?void 0:r.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function O(e){return(t,n={})=>{var o;return(((o=e[L()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(i,c)=>n[c]===void 0?i:String(n[c]))}}$();function j(){return I()}function z(e){return e instanceof Error&&"code"in e}function K(){return g("context")}async function V(){await g("ready")}function E(){return{send(e,t={}){return g("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,r){const o=await g("subscribe",{operationID:e,input:t});return U(o,{onEvent:n,onError:r}),{id:o,async unsubscribe(){R(o),await g("unsubscribe",{subscriptionID:o})}}}}}function Z(e,t){var n;return((n=e.operations.find(r=>r.id===t))==null?void 0:n.available)??!1}var d={isAvailable:j,context:K,ready:V,locale:L,createTranslator:O,isOperationAvailable:Z,device:E(),desktop:E()};const s=O({ko:{"1 m":"1분","5 m":"5분","1 h":"1시간","Live while this panel is open":"패널이 열려 있는 동안 실시간으로 측정합니다","not enough readings yet":"아직 측정값이 부족합니다",steady:"변화 없음","{direction} {value} {unit} in {minutes} m":"{minutes}분 동안 {direction} {value} {unit}","Nothing measured yet":"아직 측정된 항목이 없습니다","The connected app decides which metrics and sampler to provide.":"연결된 앱이 제공할 측정 항목과 수집 방식을 결정합니다.","▼ under {budget} {unit}":"▼ {budget} {unit} 미만","▲ over {budget} {unit}":"▲ {budget} {unit} 초과",Memory:"메모리","{footprint} MB footprint · {resident} MB resident":"footprint {footprint} MB · 상주 {resident} MB","Memory detail unavailable":"메모리 상세 정보를 사용할 수 없습니다","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작합니다.",CPU:"CPU","Frame rate":"프레임률","Frame time":"프레임 시간","App hangs":"앱 멈춤"}});let l=[];const v=new Map,b=new Set;let A=300,h=null,M=s("Live while this panel is open");const B=["var(--necto-info)","var(--necto-brand)","var(--necto-success)","var(--necto-warning)","color-mix(in srgb, var(--necto-info) 55%, var(--necto-success))","color-mix(in srgb, var(--necto-brand) 55%, var(--necto-info))"],y=document.getElementById("body"),N=document.getElementById("process-controls");function a(e,t={},n=[]){const r=document.createElement(e);for(const[o,i]of Object.entries(t))i!==void 0&&r.setAttribute(o,i);return r.append(...n),r}function G(e){const t=Date.now()-A*1e3;return(v.get(e)??[]).filter(n=>n.at>=t)}function m(e){return Math.abs(e)>=100?String(Math.round(e)):Math.abs(e)>=10?e.toFixed(1):e.toFixed(2)}function J(e,t){if(e.length<2)return s("not enough readings yet");const n=e[e.length-1].value-e[0].value,r=Math.round(A/60);return Math.abs(n)<.05?s("steady"):s("{direction} {value} {unit} in {minutes} m",{direction:n>0?"▲":"▼",value:m(Math.abs(n)),unit:t,minutes:r})}function Q(e,t,n){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("class","necto-spark"),r.setAttribute("viewBox","0 0 100 26"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("aria-hidden","true"),e.length<2)return r;const o=e.map(w=>w.value),i=Math.min(...o),k=Math.max(...o)-i||1,P=e.map((w,F)=>{const H=F/(e.length-1)*100,D=24-(w.value-i)/k*22;return`${H.toFixed(1)},${D.toFixed(1)}`}).join(" "),p=document.createElementNS("http://www.w3.org/2000/svg","polyline");return p.setAttribute("points",P),p.setAttribute("fill","none"),p.setAttribute("stroke",t?"var(--necto-danger)":n),p.setAttribute("stroke-width","1.5"),p.setAttribute("vector-effect","non-scaling-stroke"),r.append(p),r}function u(){if(_(),y.replaceChildren(),!l.length){y.append(a("div",{class:"necto-empty"},[a("p",{class:"necto-empty-title"},[h??s("Nothing measured yet")]),a("p",{class:"necto-caption"},[s("The connected app decides which metrics and sampler to provide.")])]));return}y.append(a("div",{class:"necto-metrics"},l.map((e,t)=>{var i;const n=G(e.id),r=(i=n[n.length-1])==null?void 0:i.value,o=b.has(e.id);return a("div",{class:"necto-metric","data-over":o?"true":void 0},[a("div",{class:"necto-metric-title"},[s(e.title)]),a("div",{class:"necto-metric-value"},[r===void 0?"—":m(r),a("span",{class:"necto-metric-unit"},[` ${e.unit}`])]),a("div",{class:"necto-metric-note"},[o&&e.budget!==void 0?e.budgetKind==="atLeast"?s("▼ under {budget} {unit}",{budget:m(e.budget),unit:e.unit}):s("▲ over {budget} {unit}",{budget:m(e.budget),unit:e.unit}):J(n,e.unit)]),Q(n,o,B[t%B.length])])})))}function _(){if(N.replaceChildren(),!(l.some(n=>n.id==="cpu")&&l.some(n=>n.id==="memory")&&l.some(n=>n.id==="fps")))return;const t=a("button",{type:"button",class:"necto-button necto-button-quiet"},[s("Memory")]);t.addEventListener("click",()=>void W()),N.append(a("span",{class:"necto-caption"},[M]),t)}function C(e){return z(e)?e.message:String(e)}async function W(){try{const e=await d.device.send("performance.memory");M=e.memory.available?s("{footprint} MB footprint · {resident} MB resident",{footprint:m(e.memory.physicalFootprintMB??0),resident:m(e.memory.residentSizeMB??0)}):s("Memory detail unavailable")}catch(e){M=C(e)}_()}var S;for(const e of document.querySelectorAll("[data-window]"))e.textContent=s(((S=e.textContent)==null?void 0:S.trim())??""),e.addEventListener("click",()=>{A=Number(e.dataset.window??300);for(const t of document.querySelectorAll("[data-window]"))t.setAttribute("aria-selected",String(t===e));u()});async function X(){if(!d.isAvailable()){h=s("This plugin only works inside Necto"),u();return}u();try{l=(await d.device.send("performance.metrics")).metrics,l.some(t=>t.id==="cpu")&&await d.device.send("performance.snapshot");const e=await d.device.send("performance.series",{limit:600});for(const t of e.series)v.set(t.metricID,t.samples),t.isOverBudget&&b.add(t.metricID);u(),await d.device.subscribe("performance.observe",{},({metricID:t,sample:n,isOverBudget:r})=>{v.set(t,[...v.get(t)??[],n]),r?b.add(t):b.delete(t),u()},t=>{h=t.message,u()})}catch(e){h=C(e),u()}await d.ready()}X(); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var T="necto",q=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function x(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function I(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[T])}async function g(e,t={}){var o,i,c;const n=(c=(i=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:i.messageHandlers)==null?void 0:c[T];if(!n)throw new q;const r=await n.postMessage({type:e,...t});if(!r.ok)throw x(r.error);return r.value}var f=new Map;function U(e,t){f.set(e,t)}function R(e){f.delete(e)}function $(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=f.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var r;const n=f.get(e);f.delete(e),(r=n==null?void 0:n.onError)==null||r.call(n,x(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{f.delete(e)})}function L(){var n,r;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((r=globalThis.navigator)==null?void 0:r.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function O(e){return(t,n={})=>{var o;return(((o=e[L()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(i,c)=>n[c]===void 0?i:String(n[c]))}}$();function j(){return I()}function z(e){return e instanceof Error&&"code"in e}function K(){return g("context")}async function V(){await g("ready")}function E(){return{send(e,t={}){return g("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,r){const o=await g("subscribe",{operationID:e,input:t});return U(o,{onEvent:n,onError:r}),{id:o,async unsubscribe(){R(o),await g("unsubscribe",{subscriptionID:o})}}}}}function Z(e,t){var n;return((n=e.operations.find(r=>r.id===t))==null?void 0:n.available)??!1}var d={isAvailable:j,context:K,ready:V,locale:L,createTranslator:O,isOperationAvailable:Z,device:E(),desktop:E()};const s=O({ko:{"1 m":"1분","5 m":"5분","1 h":"1시간","Live while this panel is open":"패널이 열려 있는 동안 실시간으로 측정해요","not enough readings yet":"아직 측정값이 부족해요",steady:"변화 없음","{direction} {value} {unit} in {minutes} m":"{minutes}분 동안 {direction} {value} {unit}","Nothing measured yet":"아직 측정된 항목이 없어요","The connected app decides which metrics and sampler to provide.":"연결된 앱이 제공할 측정 항목과 수집 방식을 결정해요.","▼ under {budget} {unit}":"▼ {budget} {unit} 미만","▲ over {budget} {unit}":"▲ {budget} {unit} 초과",Memory:"메모리","{footprint} MB footprint · {resident} MB resident":"footprint {footprint} MB · 상주 {resident} MB","Memory detail unavailable":"메모리 상세 정보를 사용할 수 없어요","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작해요.",CPU:"CPU","Frame rate":"프레임률","Frame time":"프레임 시간","App hangs":"앱 멈춤"}});let l=[];const v=new Map,b=new Set;let A=300,h=null,M=s("Live while this panel is open");const B=["var(--necto-info)","var(--necto-brand)","var(--necto-success)","var(--necto-warning)","color-mix(in srgb, var(--necto-info) 55%, var(--necto-success))","color-mix(in srgb, var(--necto-brand) 55%, var(--necto-info))"],y=document.getElementById("body"),N=document.getElementById("process-controls");function a(e,t={},n=[]){const r=document.createElement(e);for(const[o,i]of Object.entries(t))i!==void 0&&r.setAttribute(o,i);return r.append(...n),r}function G(e){const t=Date.now()-A*1e3;return(v.get(e)??[]).filter(n=>n.at>=t)}function m(e){return Math.abs(e)>=100?String(Math.round(e)):Math.abs(e)>=10?e.toFixed(1):e.toFixed(2)}function J(e,t){if(e.length<2)return s("not enough readings yet");const n=e[e.length-1].value-e[0].value,r=Math.round(A/60);return Math.abs(n)<.05?s("steady"):s("{direction} {value} {unit} in {minutes} m",{direction:n>0?"▲":"▼",value:m(Math.abs(n)),unit:t,minutes:r})}function Q(e,t,n){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("class","necto-spark"),r.setAttribute("viewBox","0 0 100 26"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("aria-hidden","true"),e.length<2)return r;const o=e.map(w=>w.value),i=Math.min(...o),k=Math.max(...o)-i||1,P=e.map((w,F)=>{const H=F/(e.length-1)*100,D=24-(w.value-i)/k*22;return`${H.toFixed(1)},${D.toFixed(1)}`}).join(" "),p=document.createElementNS("http://www.w3.org/2000/svg","polyline");return p.setAttribute("points",P),p.setAttribute("fill","none"),p.setAttribute("stroke",t?"var(--necto-danger)":n),p.setAttribute("stroke-width","1.5"),p.setAttribute("vector-effect","non-scaling-stroke"),r.append(p),r}function u(){if(_(),y.replaceChildren(),!l.length){y.append(a("div",{class:"necto-empty"},[a("p",{class:"necto-empty-title"},[h??s("Nothing measured yet")]),a("p",{class:"necto-caption"},[s("The connected app decides which metrics and sampler to provide.")])]));return}y.append(a("div",{class:"necto-metrics"},l.map((e,t)=>{var i;const n=G(e.id),r=(i=n[n.length-1])==null?void 0:i.value,o=b.has(e.id);return a("div",{class:"necto-metric","data-over":o?"true":void 0},[a("div",{class:"necto-metric-title"},[s(e.title)]),a("div",{class:"necto-metric-value"},[r===void 0?"—":m(r),a("span",{class:"necto-metric-unit"},[` ${e.unit}`])]),a("div",{class:"necto-metric-note"},[o&&e.budget!==void 0?e.budgetKind==="atLeast"?s("▼ under {budget} {unit}",{budget:m(e.budget),unit:e.unit}):s("▲ over {budget} {unit}",{budget:m(e.budget),unit:e.unit}):J(n,e.unit)]),Q(n,o,B[t%B.length])])})))}function _(){if(N.replaceChildren(),!(l.some(n=>n.id==="cpu")&&l.some(n=>n.id==="memory")&&l.some(n=>n.id==="fps")))return;const t=a("button",{type:"button",class:"necto-button necto-button-quiet"},[s("Memory")]);t.addEventListener("click",()=>void W()),N.append(a("span",{class:"necto-caption"},[M]),t)}function C(e){return z(e)?e.message:String(e)}async function W(){try{const e=await d.device.send("performance.memory");M=e.memory.available?s("{footprint} MB footprint · {resident} MB resident",{footprint:m(e.memory.physicalFootprintMB??0),resident:m(e.memory.residentSizeMB??0)}):s("Memory detail unavailable")}catch(e){M=C(e)}_()}var S;for(const e of document.querySelectorAll("[data-window]"))e.textContent=s(((S=e.textContent)==null?void 0:S.trim())??""),e.addEventListener("click",()=>{A=Number(e.dataset.window??300);for(const t of document.querySelectorAll("[data-window]"))t.setAttribute("aria-selected",String(t===e));u()});async function X(){if(!d.isAvailable()){h=s("This plugin only works inside Necto"),u();return}u();try{l=(await d.device.send("performance.metrics")).metrics,l.some(t=>t.id==="cpu")&&await d.device.send("performance.snapshot");const e=await d.device.send("performance.series",{limit:600});for(const t of e.series)v.set(t.metricID,t.samples),t.isOverBudget&&b.add(t.metricID);u(),await d.device.subscribe("performance.observe",{},({metricID:t,sample:n,isOverBudget:r})=>{v.set(t,[...v.get(t)??[],n]),r?b.add(t):b.delete(t),u()},t=>{h=t.message,u()})}catch(e){h=C(e),u()}await d.ready()}X(); diff --git a/SDK/Plugins/Preferences/Panel/assets/index.css b/SDK/Plugins/Preferences/Panel/assets/index.css index 6e7d1ab..8b6d086 100644 --- a/SDK/Plugins/Preferences/Panel/assets/index.css +++ b/SDK/Plugins/Preferences/Panel/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,#root{height:100%}#root>.necto-app{height:100%}.detail-slot{display:contents} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,#root{height:100%}#root>.necto-app{height:100%}.detail-slot{display:contents} diff --git a/SDK/Plugins/Preferences/Panel/assets/index.js b/SDK/Plugins/Preferences/Panel/assets/index.js index f44b842..e4ce7f4 100644 --- a/SDK/Plugins/Preferences/Panel/assets/index.js +++ b/SDK/Plugins/Preferences/Panel/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const p of o)if(p.type==="childList")for(const l of p.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const p={};return o.integrity&&(p.integrity=o.integrity),o.referrerPolicy&&(p.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?p.credentials="include":o.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function i(o){if(o.ep)return;o.ep=!0;const p=n(o);fetch(o.href,p)}})();var G="necto",ie=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function Q(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function oe(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[G])}async function O(e,t={}){var o,p,l;const n=(l=(p=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:p.messageHandlers)==null?void 0:l[G];if(!n)throw new ie;const i=await n.postMessage({type:e,...t});if(!i.ok)throw Q(i.error);return i.value}var A=new Map;function ae(e,t){A.set(e,t)}function se(e){A.delete(e)}function ce(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=A.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var i;const n=A.get(e);A.delete(e),(i=n==null?void 0:n.onError)==null||i.call(n,Q(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{A.delete(e)})}function W(){var n,i;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((i=globalThis.navigator)==null?void 0:i.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function U(e){return(t,n={})=>{var o;return(((o=e[W()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(p,l)=>n[l]===void 0?p:String(n[l]))}}var le=U({ko:{"Resize details":"상세 패널 크기 조절"}});function ue(e){try{const t=JSON.parse(e??"null"),n=i=>typeof i=="number"&&Number.isFinite(i)&&i>0?i:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function de(e){let t;try{t=ue(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(i){n();const o=i.closest(".necto-app"),p=i.querySelector(".necto-detail-title");if(!o||!p)return;o.classList.add("necto-dock-layout");const l=document.createElement("div");l.className="necto-resize",l.tabIndex=0,l.setAttribute("role","separator"),l.setAttribute("aria-label",le("Resize details")),i.prepend(l);let f="right",E=0,w=0,L=0;const u=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},d=()=>{const{width:c,height:v}=o.getBoundingClientRect();f=c<=640?"bottom":"right",w=f==="right"?280:Math.min(180,v/2),L=Math.max(w,f==="right"?c-240:v-160),E=Math.max(w,Math.min(L,f==="right"?t.width??c*.45:t.height??280)),o.dataset.detailPosition=f,o.style.setProperty("--necto-detail-size",`${E}px`),l.setAttribute("aria-orientation",f==="right"?"vertical":"horizontal"),l.setAttribute("aria-valuemin",String(w)),l.setAttribute("aria-valuemax",String(L)),l.setAttribute("aria-valuenow",String(Math.round(E)))},y=c=>{t[f==="right"?"width":"height"]=Math.max(w,Math.min(L,c)),d()};l.addEventListener("keydown",c=>{const v=f==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];v.includes(c.key)&&(c.preventDefault(),y(E+(c.key===v[0]?24:-24)),u())});let h;l.addEventListener("pointerdown",c=>{c.button===0&&(c.preventDefault(),l.setPointerCapture(c.pointerId),h={coordinate:f==="right"?c.clientX:c.clientY,size:E},l.dataset.dragging="true")}),l.addEventListener("pointermove",c=>{h&&y(h.size+h.coordinate-(f==="right"?c.clientX:c.clientY))});const k=()=>{h=void 0,delete l.dataset.dragging,u()};l.addEventListener("pointerup",k),l.addEventListener("lostpointercapture",k);const m=new ResizeObserver(d);m.observe(o),d(),n=()=>m.disconnect()},unmount(){n()}}}ce();function pe(){return oe()}function fe(e){return e instanceof Error&&"code"in e}function ye(){return O("context")}async function me(){await O("ready")}function X(){return{send(e,t={}){return O("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,i){const o=await O("subscribe",{operationID:e,input:t});return ae(o,{onEvent:n,onError:i}),{id:o,async unsubscribe(){se(o),await O("unsubscribe",{subscriptionID:o})}}}}}function ve(e,t){var n;return((n=e.operations.find(i=>i.id===t))==null?void 0:n.available)??!1}var S={isAvailable:pe,context:ye,ready:me,locale:W,createTranslator:U,isOperationAvailable:ve,device:X(),desktop:X()};const s=U({ko:{"Filter keys":"키 필터","{shown} of {total}":"{total}개 중 {shown}개","Nothing matches":"일치하는 항목이 없습니다","Nothing stored":"저장된 값이 없습니다","No key contains that text.":"해당 텍스트를 포함하는 키가 없습니다.","Keys the app stores appear here.":"앱이 저장한 키가 여기에 표시됩니다.",Key:"키",Type:"타입",Value:"값","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Loading…":"불러오는 중…",Delete:"삭제","Really delete?":"정말 삭제할까요?",Copy:"복사",Copied:"복사됨",Failed:"실패","Not a valid {type}":"올바른 {type} 값이 아닙니다","Item {index}":"항목 {index}","Remove item":"항목 삭제","+ Add item":"+ 항목 추가","Remove pair":"키-값 삭제","+ Add pair":"+ 키-값 추가","A pair is missing its key":"키가 비어 있는 항목이 있습니다","Duplicate key '{key}'":"중복된 키 '{key}'","{value} — not editable from here":"{value} — 여기서는 편집할 수 없습니다",Suite:"저장소",Save:"저장","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작합니다."}});function K(e){try{return JSON.parse(e)}catch{return e}}function Y(e,t=!1){return typeof e=="string"&&(t||K(e)===e)?e:JSON.stringify(e)}function he(e){const t=ee(e);return Array.isArray(t)?t:null}function be(e){const t=ee(e);return t===null||typeof t!="object"||Array.isArray(t)?null:Object.entries(t)}function ge(e,t){const n=e.trim();if(!n)return null;const i=Number(n);return!Number.isFinite(i)||t==="Int"&&!Number.isSafeInteger(i)?null:i}function ee(e){try{return JSON.parse(e)}catch{return}}let z=["standard"],b="standard",M=[],_=0,R="",g=null,a=null,C=null;const $=de("necto.preferences.detail");function r(e,t={},n=[]){const i=document.createElement(e);for(const[o,p]of Object.entries(t))p!==void 0&&i.setAttribute(o,p);return i.append(...n),i}function q(e){return fe(e)?e.message:String(e)}function te(){const e=R.trim().toLowerCase();return M.filter(t=>!e||t.key.toLowerCase().includes(e))}const H=r("div",{class:"necto-segmented"}),J=r("input",{class:"necto-field",type:"search",placeholder:s("Filter keys"),"aria-label":s("Filter keys")}),ne=r("span",{class:"necto-caption"}),B=r("div",{class:"necto-body",tabindex:"0"}),j=r("div",{class:"detail-slot"});var Z;(Z=document.getElementById("root"))==null||Z.append(r("div",{class:"necto-app"},[r("div",{class:"necto-toolbar"},[H,J,ne]),B,j]));function we(){if(H.replaceChildren(),!(z.length<2))for(const e of z){const t=r("button",{type:"button","aria-selected":String(e===b)},[e]);t.addEventListener("click",()=>{b=e,I(),V()}),H.append(t)}}function N(){const e=te();if(ne.textContent=R?s("{shown} of {total}",{shown:e.length,total:_}):String(_),B.replaceChildren(),!e.length){B.append(r("div",{class:"necto-empty"},[r("p",{class:"necto-empty-title"},[C??s(R?"Nothing matches":"Nothing stored")]),r("p",{class:"necto-caption"},[s(R?"No key contains that text.":"Keys the app stores appear here.")])]));return}const t=r("table",{class:"necto-table"},[r("thead",{},[r("tr",{},[r("th",{},[s("Key")]),r("th",{style:"width:96px"},[s("Type")]),r("th",{style:"width:260px"},[s("Value")])])]),r("tbody",{},e.map(n=>{const i=r("tr",{"aria-selected":n.key===g?"true":void 0},[r("td",{},[n.key]),r("td",{},[r("span",{class:"necto-badge"},[n.type])]),r("td",{},[n.preview+(n.isTruncated?"…":"")])]);return i.addEventListener("click",()=>void re(n.key)),i}))]);B.append(t)}function P(){if($.unmount(),j.replaceChildren(),!g)return;const e=r("aside",{class:"necto-detail"}),t=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":s("Close details")},["✕"]);t.addEventListener("click",I),e.append(r("div",{class:"necto-detail-title"},[...a?[r("span",{class:"necto-badge"},[a.type])]:[],r("span",{class:"necto-detail-title-url"},[g]),t]),r("div",{class:"necto-detail-body"},xe())),j.append(e),$.mount(e)}function xe(){if(!a)return[r("p",{class:"necto-caption"},[s("Loading…")])];const e=r("span",{class:"necto-caption"},[""]),t=u=>{e.textContent=q(u)},n=r("button",{type:"button",class:"necto-button necto-button-quiet necto-button-danger",style:"margin-left:auto"},[s("Delete")]);n.addEventListener("click",()=>{if(n.dataset.armed!=="true"){n.dataset.armed="true",n.textContent=s("Really delete?"),setTimeout(()=>{n.dataset.armed="false",n.textContent=s("Delete")},3e3);return}ke()});const i=r("button",{type:"button",class:"necto-button"},[s("Copy")]);i.addEventListener("click",()=>{var d;const u=()=>setTimeout(()=>i.textContent=s("Copy"),1400);(d=navigator.clipboard)==null||d.writeText((a==null?void 0:a.value)??"").then(()=>{i.textContent=s("Copied"),u()},()=>{i.textContent=s("Failed"),u()})});const o=u=>r("div",{style:"display:flex; gap:8px; margin-top:var(--necto-space-2); align-items:center"},[...u,i,e,n]);switch(a.type){case"Bool":{const u=r("button",{type:"button",class:"necto-switch",role:"switch","aria-checked":a.value==="true"?"true":"false","aria-label":s("Value")});return u.addEventListener("click",()=>{T((a==null?void 0:a.value)!=="true").catch(t)}),[l(),f(),u,o([])]}case"Int":case"Double":{const u=E(a.value),d=w(()=>{const y=ge(u.value,(a==null?void 0:a.type)??"");if(y===null){e.textContent=s("Not a valid {type}",{type:(a==null?void 0:a.type)??"number"});return}T(y,a==null?void 0:a.type).catch(t)});return L(u,d),[l(),f(),u,o([d])]}case"String":case"Date":{const u=r("input",{class:"necto-field",style:"width:100%; font-family:var(--necto-font-mono)","aria-label":s("Value")});u.value=a.value;const d=w(()=>{T(u.value,(a==null?void 0:a.type)==="Date"?"Date":void 0).catch(t)});return L(u,d),[l(),f(),u,o([d])]}case"Array":case"StringSet":{const u=a.type==="StringSet",d=he(a.value);if(!d)return p();const y=d.map(c=>Y(c,u)),h=r("div",{style:"display:flex; flex-direction:column; gap:6px; max-width:560px"}),k=()=>{h.replaceChildren(...y.map((c,v)=>{const x=r("input",{class:"necto-field",style:"flex:1; font-family:var(--necto-font-mono)","aria-label":s("Item {index}",{index:v+1})});x.value=c,x.addEventListener("input",()=>{y[v]=x.value});const D=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":s("Remove item")},["✕"]);return D.addEventListener("click",()=>{y.splice(v,1),k()}),r("div",{style:"display:flex; gap:6px"},[x,D])}),(()=>{const c=r("button",{type:"button",class:"necto-button necto-button-quiet",style:"align-self:flex-start"},[s("+ Add item")]);return c.addEventListener("click",()=>{y.push(""),k()}),c})())};k();const m=w(()=>{T(u?y:y.map(K)).catch(t)});return[l(),f(),h,o([m])]}case"Dictionary":{const u=be(a.value);if(!u)return p();const d=u.map(([m,c])=>[m,Y(c)]),y=r("div",{style:"display:flex; flex-direction:column; gap:6px; max-width:560px"}),h=()=>{y.replaceChildren(...d.map((m,c)=>{const v=r("input",{class:"necto-field",style:"flex:none; width:180px; font-family:var(--necto-font-mono)","aria-label":s("Key")});v.value=m[0],v.addEventListener("input",()=>{m[0]=v.value});const x=r("input",{class:"necto-field",style:"flex:1; font-family:var(--necto-font-mono)","aria-label":s("Value")});x.value=m[1],x.addEventListener("input",()=>{m[1]=x.value});const D=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":s("Remove pair")},["✕"]);return D.addEventListener("click",()=>{d.splice(c,1),h()}),r("div",{style:"display:flex; gap:6px"},[v,x,D])}),(()=>{const m=r("button",{type:"button",class:"necto-button necto-button-quiet",style:"align-self:flex-start"},[s("+ Add pair")]);return m.addEventListener("click",()=>{d.push(["",""]),h()}),m})())};h();const k=w(()=>{const m=new Set;for(const[c]of d){if(!c.trim()){e.textContent=s("A pair is missing its key");return}if(!m.add(c)){e.textContent=s("Duplicate key '{key}'",{key:c});return}}T(Object.fromEntries(d.map(([c,v])=>[c,K(v)]))).catch(t)});return[l(),f(),y,o([k])]}default:return p()}function p(){return[l(),f(),r("p",{class:"necto-caption"},[s("{value} — not editable from here",{value:(a==null?void 0:a.value)??""})]),o([])]}function l(){return r("dl",{class:"necto-pairs"},[r("div",{},[r("dt",{},[s("Suite")]),r("dd",{},[b])]),r("div",{},[r("dt",{},[s("Type")]),r("dd",{},[(a==null?void 0:a.type)??""])])])}function f(){return r("p",{class:"necto-section-title"},[s("Value")])}function E(u){const d=r("input",{class:"necto-field",style:"width:180px; text-align:right; font-family:var(--necto-font-mono)",inputmode:"decimal","aria-label":s("Value")});return d.value=u,d}function w(u){const d=r("button",{type:"button",class:"necto-button necto-button-primary"},[s("Save")]);return d.addEventListener("click",u),d}function L(u,d){u.addEventListener("keydown",y=>{y.key==="Enter"&&d.click()})}}async function re(e){if(g===e){I();return}const t=b;g=e,a=null,N(),P();try{const n=await S.device.send("preferences.detail",{suite:t,key:e});if(!F(t,e))return;a=n.entry}catch(n){if(!F(t,e))return;C=q(n)}P()}function F(e,t){return b===e&&g===t}function I(){g=null,a=null,N(),P()}async function T(e,t){const n=b,i=g;if(!i)return;const o=await S.device.send("preferences.set",{suite:n,key:i,value:e,...t?{type:t}:{}});F(n,i)&&(a=o.entry),b===n&&await V(),P()}async function ke(){const e=b,t=g;if(t)try{await S.device.send("preferences.remove",{suite:e,key:t}),F(e,t)&&I(),b===e&&await V()}catch(n){C=q(n),N()}}async function V(){try{const e=await S.device.send("preferences.list",{suite:b});M=e.entries,_=e.total??M.length,C=null}catch(e){M=[],_=0,C=q(e)}we(),N()}J.addEventListener("input",()=>{R=J.value,N()});B.addEventListener("keydown",e=>{if(e.key==="Escape"){I();return}if(e.key!=="ArrowDown"&&e.key!=="ArrowUp")return;e.preventDefault();const t=te(),n=t.findIndex(p=>p.key===g),i=e.key==="ArrowDown"?n+1:n-1,o=t[Math.max(0,Math.min(t.length-1,i))];o&&o.key!==g&&re(o.key)});async function Ee(){if(!S.isAvailable()){C=s("This plugin only works inside Necto"),N();return}try{z=(await S.device.send("preferences.suites")).suites,b=z[0]??"standard"}catch{}await V(),await S.ready()}Ee(); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const p of o)if(p.type==="childList")for(const l of p.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const p={};return o.integrity&&(p.integrity=o.integrity),o.referrerPolicy&&(p.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?p.credentials="include":o.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function i(o){if(o.ep)return;o.ep=!0;const p=n(o);fetch(o.href,p)}})();var G="necto",ie=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function Q(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function oe(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[G])}async function O(e,t={}){var o,p,l;const n=(l=(p=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:p.messageHandlers)==null?void 0:l[G];if(!n)throw new ie;const i=await n.postMessage({type:e,...t});if(!i.ok)throw Q(i.error);return i.value}var A=new Map;function ae(e,t){A.set(e,t)}function se(e){A.delete(e)}function ce(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=A.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var i;const n=A.get(e);A.delete(e),(i=n==null?void 0:n.onError)==null||i.call(n,Q(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{A.delete(e)})}function W(){var n,i;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((i=globalThis.navigator)==null?void 0:i.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function U(e){return(t,n={})=>{var o;return(((o=e[W()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(p,l)=>n[l]===void 0?p:String(n[l]))}}var le=U({ko:{"Resize details":"상세 패널 크기 조절"}});function ue(e){try{const t=JSON.parse(e??"null"),n=i=>typeof i=="number"&&Number.isFinite(i)&&i>0?i:void 0;return{width:n(t==null?void 0:t.width),height:n(t==null?void 0:t.height)}}catch{return{}}}function de(e){let t;try{t=ue(localStorage.getItem(e))}catch{t={}}let n=()=>{};return{mount(i){n();const o=i.closest(".necto-app"),p=i.querySelector(".necto-detail-title");if(!o||!p)return;o.classList.add("necto-dock-layout");const l=document.createElement("div");l.className="necto-resize",l.tabIndex=0,l.setAttribute("role","separator"),l.setAttribute("aria-label",le("Resize details")),i.prepend(l);let f="right",E=0,w=0,L=0;const u=()=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},d=()=>{const{width:c,height:v}=o.getBoundingClientRect();f=c<=640?"bottom":"right",w=f==="right"?280:Math.min(180,v/2),L=Math.max(w,f==="right"?c-240:v-160),E=Math.max(w,Math.min(L,f==="right"?t.width??c*.45:t.height??280)),o.dataset.detailPosition=f,o.style.setProperty("--necto-detail-size",`${E}px`),l.setAttribute("aria-orientation",f==="right"?"vertical":"horizontal"),l.setAttribute("aria-valuemin",String(w)),l.setAttribute("aria-valuemax",String(L)),l.setAttribute("aria-valuenow",String(Math.round(E)))},y=c=>{t[f==="right"?"width":"height"]=Math.max(w,Math.min(L,c)),d()};l.addEventListener("keydown",c=>{const v=f==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];v.includes(c.key)&&(c.preventDefault(),y(E+(c.key===v[0]?24:-24)),u())});let h;l.addEventListener("pointerdown",c=>{c.button===0&&(c.preventDefault(),l.setPointerCapture(c.pointerId),h={coordinate:f==="right"?c.clientX:c.clientY,size:E},l.dataset.dragging="true")}),l.addEventListener("pointermove",c=>{h&&y(h.size+h.coordinate-(f==="right"?c.clientX:c.clientY))});const k=()=>{h=void 0,delete l.dataset.dragging,u()};l.addEventListener("pointerup",k),l.addEventListener("lostpointercapture",k);const m=new ResizeObserver(d);m.observe(o),d(),n=()=>m.disconnect()},unmount(){n()}}}ce();function pe(){return oe()}function fe(e){return e instanceof Error&&"code"in e}function ye(){return O("context")}async function me(){await O("ready")}function X(){return{send(e,t={}){return O("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,i){const o=await O("subscribe",{operationID:e,input:t});return ae(o,{onEvent:n,onError:i}),{id:o,async unsubscribe(){se(o),await O("unsubscribe",{subscriptionID:o})}}}}}function ve(e,t){var n;return((n=e.operations.find(i=>i.id===t))==null?void 0:n.available)??!1}var S={isAvailable:pe,context:ye,ready:me,locale:W,createTranslator:U,isOperationAvailable:ve,device:X(),desktop:X()};const s=U({ko:{"Filter keys":"키 필터","{shown} of {total}":"{total}개 중 {shown}개","Nothing matches":"일치하는 항목이 없어요","Nothing stored":"저장된 값이 없어요","No key contains that text.":"해당 텍스트를 포함하는 키가 없어요.","Keys the app stores appear here.":"앱이 저장한 키가 여기에 표시돼요.",Key:"키",Type:"타입",Value:"값","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Loading…":"불러오는 중…",Delete:"삭제","Really delete?":"정말 삭제할까요?",Copy:"복사",Copied:"복사됨",Failed:"실패","Not a valid {type}":"올바른 {type} 값이 아니에요","Item {index}":"항목 {index}","Remove item":"항목 삭제","+ Add item":"+ 항목 추가","Remove pair":"키-값 삭제","+ Add pair":"+ 키-값 추가","A pair is missing its key":"키가 비어 있는 항목이 있어요","Duplicate key '{key}'":"중복된 키 '{key}'","{value} — not editable from here":"{value} — 여기서는 편집할 수 없어요",Suite:"저장소",Save:"저장","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작해요."}});function K(e){try{return JSON.parse(e)}catch{return e}}function Y(e,t=!1){return typeof e=="string"&&(t||K(e)===e)?e:JSON.stringify(e)}function he(e){const t=ee(e);return Array.isArray(t)?t:null}function be(e){const t=ee(e);return t===null||typeof t!="object"||Array.isArray(t)?null:Object.entries(t)}function ge(e,t){const n=e.trim();if(!n)return null;const i=Number(n);return!Number.isFinite(i)||t==="Int"&&!Number.isSafeInteger(i)?null:i}function ee(e){try{return JSON.parse(e)}catch{return}}let z=["standard"],b="standard",M=[],_=0,R="",g=null,a=null,C=null;const $=de("necto.preferences.detail");function r(e,t={},n=[]){const i=document.createElement(e);for(const[o,p]of Object.entries(t))p!==void 0&&i.setAttribute(o,p);return i.append(...n),i}function q(e){return fe(e)?e.message:String(e)}function te(){const e=R.trim().toLowerCase();return M.filter(t=>!e||t.key.toLowerCase().includes(e))}const H=r("div",{class:"necto-segmented"}),J=r("input",{class:"necto-field",type:"search",placeholder:s("Filter keys"),"aria-label":s("Filter keys")}),ne=r("span",{class:"necto-caption"}),B=r("div",{class:"necto-body",tabindex:"0"}),j=r("div",{class:"detail-slot"});var Z;(Z=document.getElementById("root"))==null||Z.append(r("div",{class:"necto-app"},[r("div",{class:"necto-toolbar"},[H,J,ne]),B,j]));function we(){if(H.replaceChildren(),!(z.length<2))for(const e of z){const t=r("button",{type:"button","aria-selected":String(e===b)},[e]);t.addEventListener("click",()=>{b=e,I(),V()}),H.append(t)}}function N(){const e=te();if(ne.textContent=R?s("{shown} of {total}",{shown:e.length,total:_}):String(_),B.replaceChildren(),!e.length){B.append(r("div",{class:"necto-empty"},[r("p",{class:"necto-empty-title"},[C??s(R?"Nothing matches":"Nothing stored")]),r("p",{class:"necto-caption"},[s(R?"No key contains that text.":"Keys the app stores appear here.")])]));return}const t=r("table",{class:"necto-table"},[r("thead",{},[r("tr",{},[r("th",{},[s("Key")]),r("th",{style:"width:96px"},[s("Type")]),r("th",{style:"width:260px"},[s("Value")])])]),r("tbody",{},e.map(n=>{const i=r("tr",{"aria-selected":n.key===g?"true":void 0},[r("td",{},[n.key]),r("td",{},[r("span",{class:"necto-badge"},[n.type])]),r("td",{},[n.preview+(n.isTruncated?"…":"")])]);return i.addEventListener("click",()=>void re(n.key)),i}))]);B.append(t)}function P(){if($.unmount(),j.replaceChildren(),!g)return;const e=r("aside",{class:"necto-detail"}),t=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":s("Close details")},["✕"]);t.addEventListener("click",I),e.append(r("div",{class:"necto-detail-title"},[...a?[r("span",{class:"necto-badge"},[a.type])]:[],r("span",{class:"necto-detail-title-url"},[g]),t]),r("div",{class:"necto-detail-body"},xe())),j.append(e),$.mount(e)}function xe(){if(!a)return[r("p",{class:"necto-caption"},[s("Loading…")])];const e=r("span",{class:"necto-caption"},[""]),t=u=>{e.textContent=q(u)},n=r("button",{type:"button",class:"necto-button necto-button-quiet necto-button-danger",style:"margin-left:auto"},[s("Delete")]);n.addEventListener("click",()=>{if(n.dataset.armed!=="true"){n.dataset.armed="true",n.textContent=s("Really delete?"),setTimeout(()=>{n.dataset.armed="false",n.textContent=s("Delete")},3e3);return}ke()});const i=r("button",{type:"button",class:"necto-button"},[s("Copy")]);i.addEventListener("click",()=>{var d;const u=()=>setTimeout(()=>i.textContent=s("Copy"),1400);(d=navigator.clipboard)==null||d.writeText((a==null?void 0:a.value)??"").then(()=>{i.textContent=s("Copied"),u()},()=>{i.textContent=s("Failed"),u()})});const o=u=>r("div",{style:"display:flex; gap:8px; margin-top:var(--necto-space-2); align-items:center"},[...u,i,e,n]);switch(a.type){case"Bool":{const u=r("button",{type:"button",class:"necto-switch",role:"switch","aria-checked":a.value==="true"?"true":"false","aria-label":s("Value")});return u.addEventListener("click",()=>{T((a==null?void 0:a.value)!=="true").catch(t)}),[l(),f(),u,o([])]}case"Int":case"Double":{const u=E(a.value),d=w(()=>{const y=ge(u.value,(a==null?void 0:a.type)??"");if(y===null){e.textContent=s("Not a valid {type}",{type:(a==null?void 0:a.type)??"number"});return}T(y,a==null?void 0:a.type).catch(t)});return L(u,d),[l(),f(),u,o([d])]}case"String":case"Date":{const u=r("input",{class:"necto-field",style:"width:100%; font-family:var(--necto-font-mono)","aria-label":s("Value")});u.value=a.value;const d=w(()=>{T(u.value,(a==null?void 0:a.type)==="Date"?"Date":void 0).catch(t)});return L(u,d),[l(),f(),u,o([d])]}case"Array":case"StringSet":{const u=a.type==="StringSet",d=he(a.value);if(!d)return p();const y=d.map(c=>Y(c,u)),h=r("div",{style:"display:flex; flex-direction:column; gap:6px; max-width:560px"}),k=()=>{h.replaceChildren(...y.map((c,v)=>{const x=r("input",{class:"necto-field",style:"flex:1; font-family:var(--necto-font-mono)","aria-label":s("Item {index}",{index:v+1})});x.value=c,x.addEventListener("input",()=>{y[v]=x.value});const D=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":s("Remove item")},["✕"]);return D.addEventListener("click",()=>{y.splice(v,1),k()}),r("div",{style:"display:flex; gap:6px"},[x,D])}),(()=>{const c=r("button",{type:"button",class:"necto-button necto-button-quiet",style:"align-self:flex-start"},[s("+ Add item")]);return c.addEventListener("click",()=>{y.push(""),k()}),c})())};k();const m=w(()=>{T(u?y:y.map(K)).catch(t)});return[l(),f(),h,o([m])]}case"Dictionary":{const u=be(a.value);if(!u)return p();const d=u.map(([m,c])=>[m,Y(c)]),y=r("div",{style:"display:flex; flex-direction:column; gap:6px; max-width:560px"}),h=()=>{y.replaceChildren(...d.map((m,c)=>{const v=r("input",{class:"necto-field",style:"flex:none; width:180px; font-family:var(--necto-font-mono)","aria-label":s("Key")});v.value=m[0],v.addEventListener("input",()=>{m[0]=v.value});const x=r("input",{class:"necto-field",style:"flex:1; font-family:var(--necto-font-mono)","aria-label":s("Value")});x.value=m[1],x.addEventListener("input",()=>{m[1]=x.value});const D=r("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":s("Remove pair")},["✕"]);return D.addEventListener("click",()=>{d.splice(c,1),h()}),r("div",{style:"display:flex; gap:6px"},[v,x,D])}),(()=>{const m=r("button",{type:"button",class:"necto-button necto-button-quiet",style:"align-self:flex-start"},[s("+ Add pair")]);return m.addEventListener("click",()=>{d.push(["",""]),h()}),m})())};h();const k=w(()=>{const m=new Set;for(const[c]of d){if(!c.trim()){e.textContent=s("A pair is missing its key");return}if(!m.add(c)){e.textContent=s("Duplicate key '{key}'",{key:c});return}}T(Object.fromEntries(d.map(([c,v])=>[c,K(v)]))).catch(t)});return[l(),f(),y,o([k])]}default:return p()}function p(){return[l(),f(),r("p",{class:"necto-caption"},[s("{value} — not editable from here",{value:(a==null?void 0:a.value)??""})]),o([])]}function l(){return r("dl",{class:"necto-pairs"},[r("div",{},[r("dt",{},[s("Suite")]),r("dd",{},[b])]),r("div",{},[r("dt",{},[s("Type")]),r("dd",{},[(a==null?void 0:a.type)??""])])])}function f(){return r("p",{class:"necto-section-title"},[s("Value")])}function E(u){const d=r("input",{class:"necto-field",style:"width:180px; text-align:right; font-family:var(--necto-font-mono)",inputmode:"decimal","aria-label":s("Value")});return d.value=u,d}function w(u){const d=r("button",{type:"button",class:"necto-button necto-button-primary"},[s("Save")]);return d.addEventListener("click",u),d}function L(u,d){u.addEventListener("keydown",y=>{y.key==="Enter"&&d.click()})}}async function re(e){if(g===e){I();return}const t=b;g=e,a=null,N(),P();try{const n=await S.device.send("preferences.detail",{suite:t,key:e});if(!F(t,e))return;a=n.entry}catch(n){if(!F(t,e))return;C=q(n)}P()}function F(e,t){return b===e&&g===t}function I(){g=null,a=null,N(),P()}async function T(e,t){const n=b,i=g;if(!i)return;const o=await S.device.send("preferences.set",{suite:n,key:i,value:e,...t?{type:t}:{}});F(n,i)&&(a=o.entry),b===n&&await V(),P()}async function ke(){const e=b,t=g;if(t)try{await S.device.send("preferences.remove",{suite:e,key:t}),F(e,t)&&I(),b===e&&await V()}catch(n){C=q(n),N()}}async function V(){try{const e=await S.device.send("preferences.list",{suite:b});M=e.entries,_=e.total??M.length,C=null}catch(e){M=[],_=0,C=q(e)}we(),N()}J.addEventListener("input",()=>{R=J.value,N()});B.addEventListener("keydown",e=>{if(e.key==="Escape"){I();return}if(e.key!=="ArrowDown"&&e.key!=="ArrowUp")return;e.preventDefault();const t=te(),n=t.findIndex(p=>p.key===g),i=e.key==="ArrowDown"?n+1:n-1,o=t[Math.max(0,Math.min(t.length-1,i))];o&&o.key!==g&&re(o.key)});async function Ee(){if(!S.isAvailable()){C=s("This plugin only works inside Necto"),N();return}try{z=(await S.device.send("preferences.suites")).suites,b=z[0]??"standard"}catch{}await V(),await S.ready()}Ee(); diff --git a/SDK/Plugins/UIControl/Android/src/test/kotlin/im/toss/necto/android/NectoAndroidControlRuntimeTest.kt b/SDK/Plugins/UIControl/Android/src/test/kotlin/im/toss/necto/android/NectoAndroidControlRuntimeTest.kt index 3630d20..74c6f3b 100644 --- a/SDK/Plugins/UIControl/Android/src/test/kotlin/im/toss/necto/android/NectoAndroidControlRuntimeTest.kt +++ b/SDK/Plugins/UIControl/Android/src/test/kotlin/im/toss/necto/android/NectoAndroidControlRuntimeTest.kt @@ -79,8 +79,15 @@ class NectoAndroidControlRuntimeTest { Dispatchers.setMain(UnconfinedTestDispatcher()) } + /** + * Compose keeps one UI dispatcher for the whole process, while Robolectric empties the + * main looper between tests. Ending the activity and letting the looper finish keeps a + * composition from one test from leaving work queued there for the next. + */ @After fun tearDown() { + controller?.close() + shadowOf(Looper.getMainLooper()).idleFor(java.time.Duration.ofMillis(100)) Dispatchers.resetMain() } diff --git a/SDK/Plugins/UIControl/Panel/assets/index.css b/SDK/Plugins/UIControl/Panel/assets/index.css index ff69aed..73b2d19 100644 --- a/SDK/Plugins/UIControl/Panel/assets/index.css +++ b/SDK/Plugins/UIControl/Panel/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.control-status{display:inline-flex;align-items:center;gap:var(--necto-space-2);min-width:0}.control-spinner{display:inline-block;flex:none;box-sizing:border-box;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:control-spin .8s linear infinite}.control-spinner[hidden]{display:none}@keyframes control-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.control-spinner{animation:none}}html,body,#root{height:100%}#root>.necto-app{height:100%}.control-workspace{flex:1;min-height:0}.detail-slot{display:contents}.control-detail-body{display:flex;flex-direction:column;gap:var(--necto-space-4)}.control-action-buttons{display:flex;flex-wrap:wrap;gap:var(--necto-space-1)}.control-accessibility-actions{flex:none;display:flex;flex-direction:column;gap:var(--necto-space-2)}.control-accessibility-actions>h3,.control-accessibility-actions>p{margin:0}.control-scroll-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.control-scroll-buttons>button{min-width:0;height:auto;min-height:max(var(--necto-button-height),calc(2lh + 2 * var(--necto-space-1) + 2px));padding-block:var(--necto-space-1);white-space:normal;word-break:keep-all}.control-reading td{white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;padding-block:var(--necto-space-2)} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.control-status{display:inline-flex;align-items:center;gap:var(--necto-space-2);min-width:0}.control-spinner{display:inline-block;flex:none;box-sizing:border-box;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:control-spin .8s linear infinite}.control-spinner[hidden]{display:none}@keyframes control-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.control-spinner{animation:none}}html,body,#root{height:100%}#root>.necto-app{height:100%}.control-workspace{flex:1;min-height:0}.detail-slot{display:contents}.control-detail-body{display:flex;flex-direction:column;gap:var(--necto-space-4)}.control-action-buttons{display:flex;flex-wrap:wrap;gap:var(--necto-space-1)}.control-accessibility-actions{flex:none;display:flex;flex-direction:column;gap:var(--necto-space-2)}.control-accessibility-actions>h3,.control-accessibility-actions>p{margin:0}.control-scroll-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.control-scroll-buttons>button{min-width:0;height:auto;min-height:max(var(--necto-button-height),calc(2lh + 2 * var(--necto-space-1) + 2px));padding-block:var(--necto-space-1);white-space:normal;word-break:keep-all}.control-reading td{white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;padding-block:var(--necto-space-2)} diff --git a/SDK/Plugins/UIControl/Panel/assets/index.js b/SDK/Plugins/UIControl/Panel/assets/index.js index ad75fe4..22c4cfc 100644 --- a/SDK/Plugins/UIControl/Panel/assets/index.js +++ b/SDK/Plugins/UIControl/Panel/assets/index.js @@ -1 +1 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const r of c.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();var et="necto",at=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function nt(t){const e=new Error(t.message);return e.name="NectoBridgeError",e.code=t.code,e.operationID=t.operationID,e.details=t.details,e}function rt(){var t,e,s;return!!((s=(e=(t=globalThis.window)==null?void 0:t.webkit)==null?void 0:e.messageHandlers)!=null&&s[et])}async function B(t,e={}){var o,c,r;const s=(r=(c=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:c.messageHandlers)==null?void 0:r[et];if(!s)throw new at;const i=await s.postMessage({type:t,...e});if(!i.ok)throw nt(i.error);return i.value}var R=new Map;function ct(t,e){R.set(t,e)}function lt(t){R.delete(t)}function dt(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(t,e)=>{var s;(s=R.get(t))==null||s.onEvent(e)},globalThis.window.__nectoBridgeStreamError=(t,e)=>{var i;const s=R.get(t);R.delete(t),(i=s==null?void 0:s.onError)==null||i.call(s,nt(e))},globalThis.window.__nectoBridgeStreamEnd=t=>{R.delete(t)})}function it(){var s,i;return(((s=globalThis.document)==null?void 0:s.documentElement.lang)||((i=globalThis.navigator)==null?void 0:i.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function j(t){return(e,s={})=>{var o;return(((o=t[it()])==null?void 0:o[e])??e).replace(/\{([A-Za-z0-9_]+)\}/g,(c,r)=>s[r]===void 0?c:String(s[r]))}}var ut=j({ko:{"Resize details":"상세 패널 크기 조절"}});function pt(t){try{const e=JSON.parse(t??"null"),s=i=>typeof i=="number"&&Number.isFinite(i)&&i>0?i:void 0;return{width:s(e==null?void 0:e.width),height:s(e==null?void 0:e.height)}}catch{return{}}}function bt(t){let e;try{e=pt(localStorage.getItem(t))}catch{e={}}let s=()=>{};return{mount(i){s();const o=i.closest(".necto-app"),c=i.querySelector(".necto-detail-title");if(!o||!c)return;o.classList.add("necto-dock-layout");const r=document.createElement("div");r.className="necto-resize",r.tabIndex=0,r.setAttribute("role","separator"),r.setAttribute("aria-label",ut("Resize details")),i.prepend(r);let p="right",S=0,x=0,E=0;const M=()=>{try{localStorage.setItem(t,JSON.stringify(e))}catch{}},N=()=>{const{width:u,height:m}=o.getBoundingClientRect();p=u<=640?"bottom":"right",x=p==="right"?280:Math.min(180,m/2),E=Math.max(x,p==="right"?u-240:m-160),S=Math.max(x,Math.min(E,p==="right"?e.width??u*.45:e.height??280)),o.dataset.detailPosition=p,o.style.setProperty("--necto-detail-size",`${S}px`),r.setAttribute("aria-orientation",p==="right"?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(x)),r.setAttribute("aria-valuemax",String(E)),r.setAttribute("aria-valuenow",String(Math.round(S)))},d=u=>{e[p==="right"?"width":"height"]=Math.max(x,Math.min(E,u)),N()};r.addEventListener("keydown",u=>{const m=p==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];m.includes(u.key)&&(u.preventDefault(),d(S+(u.key===m[0]?24:-24)),M())});let l;r.addEventListener("pointerdown",u=>{u.button===0&&(u.preventDefault(),r.setPointerCapture(u.pointerId),l={coordinate:p==="right"?u.clientX:u.clientY,size:S},r.dataset.dragging="true")}),r.addEventListener("pointermove",u=>{l&&d(l.size+l.coordinate-(p==="right"?u.clientX:u.clientY))});const h=()=>{l=void 0,delete r.dataset.dragging,M()};r.addEventListener("pointerup",h),r.addEventListener("lostpointercapture",h);const b=new ResizeObserver(N);b.observe(o),N(),s=()=>b.disconnect()},unmount(){s()}}}dt();function ft(){return rt()}function gt(t){return t instanceof Error&&"code"in t}function ht(){return B("context")}async function mt(){await B("ready")}function Q(){return{send(t,e={}){return B("invoke",{operationID:t,input:e})},async subscribe(t,e={},s,i){const o=await B("subscribe",{operationID:t,input:e});return ct(o,{onEvent:s,onError:i}),{id:o,async unsubscribe(){lt(o),await B("unsubscribe",{subscriptionID:o})}}}}}function vt(t,e){var s;return((s=t.operations.find(i=>i.id===e))==null?void 0:s.available)??!1}var z={isAvailable:ft,context:ht,ready:mt,locale:it,createTranslator:j,isOperationAvailable:vt,device:Q(),desktop:Q()};const a=j({ko:{Control:"Control",Gestures:"제스처",Tap:"탭",Position:"위치","Default position":"기본 위치","Custom position":"직접 지정","X (left to right)":"X (왼쪽 → 오른쪽)","Y (top to bottom)":"Y (위 → 아래)","Use 0–1 within the visible target. Swipe starts here and stops at its edge.":"보이는 요소 안의 위치를 0~1로 입력하세요. 스와이프는 이 위치에서 시작하며 요소 경계를 넘지 않습니다.","Use position.x and position.y between 0 and 1":"X와 Y를 0~1 사이로 입력해 주세요.","There is no room to swipe in that direction":"해당 방향으로 스와이프할 공간이 없습니다.","There is not enough room for these fingers at this position":"이 위치에는 지정한 손가락 수만큼 터치할 공간이 없습니다.",Fingers:"손가락 수","Tap count":"탭 횟수","Use 1–5 fingers and 1–3 taps":"손가락 수는 1~5개, 탭 횟수는 1~3회로 입력해 주세요.","Swipe back":"스와이프로 뒤로 가기","Text to enter":"입력할 텍스트","Input mode":"입력 방식","Replace text":"전체 바꾸기","Append text":"끝에 추가","Enter text":"입력","↑ Swipe up":"↑ 위로 스와이프","↓ Swipe down":"↓ 아래로 스와이프","← Swipe left":"← 왼쪽으로 스와이프","→ Swipe right":"→ 오른쪽으로 스와이프","Arrows show finger movement. Swipe up to reveal content below.":"화살표는 손가락을 움직이는 방향입니다. 위로 밀면 아래쪽 내용이 보입니다.","Distance ratio":"이동 거리 비율","Duration (ms)":"동작 시간 (ms)","Sending input…":"입력 전달 중…","Input sent · accessibility content changed":"입력 전달됨 · 접근성 내용이 바뀌었습니다","Input sent · no accessibility change observed":"입력 전달됨 · 접근성 내용의 변화는 확인되지 않았습니다","Another action is in progress":"다른 동작이 실행 중입니다.","The target changed. Refresh Control before acting.":"요소가 바뀌었습니다. 새로고침한 뒤 다시 선택해 주세요.","The target is covered by another view. Refresh Control before acting.":"다른 화면이 요소를 가리고 있습니다. 새로고침한 뒤 다시 선택해 주세요.","The text field did not receive focus. Refresh Control before acting.":"입력란에 포커스가 이동하지 않았습니다. 새로고침한 뒤 다시 선택해 주세요.",Actions:"조작","Read accessibility":"접근성 읽기",Read:"조회","Filter accessibility content":"접근성 내용 검색","No accessibility content":"읽을 수 있는 접근성 정보가 없습니다","Read the current screen to check text and values.":"현재 화면을 조회해 텍스트와 값을 확인하세요.",Role:"역할",Label:"레이블",Value:"값",Heading:"제목",Text:"텍스트",Link:"링크",Image:"이미지",Adjustable:"값 조절",Element:"요소","Loading…":"조회 중…","Filter elements":"요소 검색","No actionable elements":"조작할 수 있는 요소가 없습니다","Refresh to find controls on the current screen.":"새로고침해 현재 화면의 요소를 확인하세요.",Elements:"요소",Button:"버튼","Scroll area":"스크롤 영역",Screen:"화면",Refresh:"새로고침","Nothing matches":"일치하는 요소가 없습니다","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Text input":"텍스트 입력","Secure value is hidden":"비밀번호 값은 표시하지 않습니다","The element moved. Refresh Control before acting.":"요소 위치가 바뀌었습니다. 새로고침한 뒤 다시 선택해 주세요.","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작합니다."}});let T=[],Y=[],g="actions",v=null,I="",D=null,y=!1,w=!1;const q=new Map,W=bt("necto.control.detail");function n(t,e={},s=[]){const i=document.createElement(t);for(const[o,c]of Object.entries(e))c!==void 0&&i.setAttribute(o,c);return i.append(...s),i}function ot(t){return gt(t)?a(t.message):String(t)}const V=n("button",{type:"button",class:"necto-button"},[a("Refresh")]),C=n("input",{class:"necto-field",type:"search",placeholder:a("Filter elements"),"aria-label":a("Filter elements")}),J=n("span",{class:"necto-caption"}),L=n("span"),st=n("span",{class:"control-spinner","aria-hidden":"true",hidden:""}),yt=n("span",{class:"necto-caption control-status",role:"status"},[st,L]),f=n("div",{class:"necto-body",tabindex:"0"}),_=n("div",{class:"detail-slot"}),$=n("div",{class:"necto-tabs",role:"tablist","aria-label":a("Control")}),A=n("button",{type:"button",class:"necto-tab",role:"tab",id:"actions-tab","aria-selected":"true","aria-controls":"control-content"},[a("Actions")]),k=n("button",{type:"button",class:"necto-tab",role:"tab",id:"reading-tab","aria-selected":"false","aria-controls":"control-content",tabindex:"-1"},[a("Read accessibility")]);$.append(A,k);f.id="control-content";f.setAttribute("role","tabpanel");f.setAttribute("aria-labelledby",A.id);function Z(t){y||w||g===t||(g=t,I="",C.value="",C.placeholder=a(g==="actions"?"Filter elements":"Filter accessibility content"),C.setAttribute("aria-label",C.placeholder),A.setAttribute("aria-selected",String(g==="actions")),k.setAttribute("aria-selected",String(g==="reading")),A.tabIndex=g==="actions"?0:-1,k.tabIndex=g==="reading"?0:-1,f.setAttribute("aria-labelledby",g==="actions"?A.id:k.id),V.textContent=a(g==="actions"?"Refresh":"Read"),X(),H())}A.addEventListener("click",()=>Z("actions"));k.addEventListener("click",()=>Z("reading"));$.addEventListener("keydown",t=>{if(!(y||w)&&["ArrowLeft","ArrowRight","Home","End"].includes(t.key)){t.preventDefault();const e=t.key==="Home"?"actions":t.key==="End"||g==="actions"?"reading":"actions";Z(e),(e==="actions"?A:k).focus()}});var tt;(tt=document.getElementById("root"))==null||tt.append(n("div",{class:"necto-app"},[$,n("div",{class:"necto-app control-workspace"},[n("div",{class:"necto-toolbar"},[V,C,J,yt]),f,_])]));function G(t){return t.label||t.identifier||F(t.role)}function F(t){return a({button:"Button",textInput:"Text input",scrollArea:"Scroll area",screen:"Screen",heading:"Heading",text:"Text",link:"Link",image:"Image",adjustable:"Adjustable",element:"Element"}[t]??t)}function P(){if(f.replaceChildren(),g==="reading"){wt();return}const t=I.trim().toLowerCase(),e=T.filter(i=>!t||[i.label,i.identifier,i.role,F(i.role)].some(o=>o==null?void 0:o.toLowerCase().includes(t)));if(J.textContent=String(e.length),!e.length){f.append(n("div",{class:"necto-empty"},[n("p",{class:"necto-empty-title"},[D??a(I?"Nothing matches":"No actionable elements")]),n("p",{class:"necto-caption"},[a("Refresh to find controls on the current screen.")])]));return}const s=n("div",{class:"necto-tree","aria-label":a("Elements")});for(const i of e){const o=n("button",{type:"button",class:"necto-tree-row","aria-pressed":String(i.id===v),"aria-selected":i.id===v?"true":void 0,disabled:y||w?"":void 0},[n("span",{class:"necto-tree-name",title:G(i)},[G(i)]),n("span",{class:"necto-tree-meta"},[F(i.role)])]);o.addEventListener("click",()=>K(i.id)),s.append(o)}f.append(s)}function wt(){const t=I.trim().toLowerCase(),e=Y.filter(i=>!t||[i.label,i.identifier,i.role,F(i.role),i.isSecure?void 0:i.value].some(o=>o==null?void 0:o.toLowerCase().includes(t)));if(J.textContent=String(e.length),!e.length){f.append(n("div",{class:"necto-empty"},[n("p",{class:"necto-empty-title"},[D??a(I?"Nothing matches":"No accessibility content")]),n("p",{class:"necto-caption"},[a("Read the current screen to check text and values.")])]));return}const s=e.map(i=>n("tr",{},[n("td",{},[F(i.role)]),n("td",{},[n("div",{},[i.label??"—"]),...i.identifier?[n("div",{class:"necto-caption"},[i.identifier])]:[]]),n("td",{},[i.isSecure?a("Secure value is hidden"):i.value??"—"])]));f.append(n("table",{class:"necto-table control-reading","aria-label":a("Read accessibility")},[n("thead",{},[n("tr",{},["Role","Label","Value"].map(i=>n("th",{scope:"col"},[a(i)])))]),n("tbody",{},s)]))}function X(){if(W.unmount(),_.replaceChildren(),g!=="actions")return;const t=T.find(i=>i.id===v);if(!t)return;const e=n("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":a("Close details")},["✕"]);e.addEventListener("click",()=>K(t.id));const s=n("aside",{class:"necto-detail"},[n("div",{class:"necto-detail-title"},[n("span",{class:"necto-detail-title-url"},[G(t)]),e]),n("div",{class:"necto-detail-body control-detail-body"},[St(t)])]);_.append(s),W.mount(s)}function St(t){var M,N;const e=n("section",{class:"control-accessibility-actions","aria-label":a("Gestures")},[n("h3",{class:"necto-section-title"},[a("Gestures")])]),s=n("div",{class:"control-action-buttons"}),i=((M=t.tapGestures)==null?void 0:M.find(({touchCount:d,tapCount:l})=>d===1&&l===1))??((N=t.tapGestures)==null?void 0:N[0]),o=q.get(t.id)??{touchCount:(i==null?void 0:i.touchCount)??1,tapCount:(i==null?void 0:i.tapCount)??1,distanceRatio:.6,durationMs:400,customPosition:!1,x:.5,y:.5};q.set(t.id,o);const c=n("select",{class:"necto-field"},[n("option",{value:"default"},[a("Default position")]),n("option",{value:"custom"},[a("Custom position")])]);c.value=o.customPosition?"custom":"default";const r=n("input",{type:"number",class:"necto-field",min:"0",max:"1",step:"any",value:String(o.x)}),p=n("input",{type:"number",class:"necto-field",min:"0",max:"1",step:"any",value:String(o.y)}),S=n("div",{},[n("div",{class:"control-accessibility-actions"},[n("label",{class:"control-accessibility-actions"},[a("X (left to right)"),r]),n("label",{class:"control-accessibility-actions"},[a("Y (top to bottom)"),p]),n("p",{class:"necto-caption"},[a("Use 0–1 within the visible target. Swipe starts here and stops at its edge.")])])]);S.hidden=!o.customPosition,c.addEventListener("change",()=>{o.customPosition=c.value==="custom",S.hidden=!o.customPosition}),r.addEventListener("input",()=>{r.value&&r.validity.valid&&(o.x=r.valueAsNumber)}),p.addEventListener("input",()=>{p.value&&p.validity.valid&&(o.y=p.valueAsNumber)});const x=()=>!o.customPosition||r.reportValidity()&&p.reportValidity()&&!!r.value&&!!p.value,E=()=>o.customPosition?{position:{x:o.x,y:o.y}}:{};if((t.actions.includes("tap")||t.actions.includes("swipe"))&&e.append(n("label",{class:"control-accessibility-actions"},[a("Position"),c]),S),t.actions.includes("tap")){const d=n("select",{class:"necto-field"}),l=n("select",{class:"necto-field"});for(let b=1;b<=5;b++)d.append(n("option",{value:String(b)},[String(b)]));for(let b=1;b<=3;b++)l.append(n("option",{value:String(b)},[String(b)]));d.value=String(o.touchCount),l.value=String(o.tapCount),d.addEventListener("change",()=>{o.touchCount=Number(d.value)}),l.addEventListener("change",()=>{o.tapCount=Number(l.value)});const h=n("button",{type:"button",class:"necto-button"},[a("Tap")]);h.addEventListener("click",()=>{x()&&U("control.tap",{targetID:t.id,touchCount:o.touchCount,tapCount:o.tapCount,...E()})}),e.append(n("label",{class:"control-accessibility-actions"},[a("Fingers"),d]),n("label",{class:"control-accessibility-actions"},[a("Tap count"),l])),s.append(h)}if(t.actions.includes("back")&&s.append(xt(a("Swipe back"),"control.back",{targetID:t.id})),e.append(s),t.actions.includes("input")){const d=n("input",{type:t.isSecure?"password":"text",class:"necto-field","aria-label":a("Text to enter"),placeholder:a("Text to enter"),maxlength:"10000",autocomplete:"off"}),l=n("select",{class:"necto-field","aria-label":a("Input mode")},[n("option",{value:"replace"},[a("Replace text")]),n("option",{value:"append"},[a("Append text")])]),h=n("button",{type:"submit",class:"necto-button"},[a("Enter text")]),b=n("form",{class:"control-accessibility-actions"},[d,l,h]);b.addEventListener("submit",u=>{if(u.preventDefault(),y||w)return;const m=d.value;d.value="",U("control.input",{targetID:t.id,text:m,mode:l.value})}),e.append(b)}if(t.actions.includes("swipe")){const d=n("input",{type:"number",class:"necto-field",min:"0.1",max:"0.9",step:"0.1",value:String(o.distanceRatio)}),l=n("input",{type:"number",class:"necto-field",min:"100",max:"2000",step:"any",value:String(o.durationMs)});d.addEventListener("input",()=>{d.value&&d.validity.valid&&(o.distanceRatio=d.valueAsNumber)}),l.addEventListener("input",()=>{l.value&&l.validity.valid&&(o.durationMs=l.valueAsNumber)});const h=n("div",{class:"control-action-buttons control-scroll-buttons"});for(const[b,u]of[["up","↑ Swipe up"],["down","↓ Swipe down"],["left","← Swipe left"],["right","→ Swipe right"]]){const m=n("button",{type:"button",class:"necto-button"},[a(u)]);m.addEventListener("click",()=>{!x()||!d.reportValidity()||!l.reportValidity()||!d.value||!l.value||U("control.swipe",{targetID:t.id,direction:b,distanceRatio:d.valueAsNumber,durationMs:l.valueAsNumber,...E()})}),h.append(m)}e.append(n("p",{class:"necto-caption"},[a("Arrows show finger movement. Swipe up to reveal content below.")]),n("label",{class:"control-accessibility-actions"},[a("Distance ratio"),d]),n("label",{class:"control-accessibility-actions"},[a("Duration (ms)"),l]),h)}return e}function K(t){y||w||(v=v===t?null:t,P(),X())}function O(){const t=y||w;st.hidden=!t,V.disabled=t,A.disabled=t,k.disabled=t,f.setAttribute("aria-busy",String(t)),_.setAttribute("aria-busy",String(t));for(const e of _.querySelectorAll("button, input, select"))e.disabled=t;for(const e of f.querySelectorAll(".necto-tree-row"))e.disabled=t}async function U(t,e){if(!(y||w)){y=!0,O(),P(),L.textContent=a("Sending input…");try{const s=await z.device.send(t,e);await H()&&(L.textContent=a(s.contentChanged?"Input sent · accessibility content changed":"Input sent · no accessibility change observed"))}catch(s){await H(),L.textContent=ot(s)}finally{y=!1,P(),X(),O()}}}function xt(t,e,s){const i=n("button",{type:"button",class:"necto-button"},[t]);return i.addEventListener("click",()=>void U(e,s)),i}async function H(){if(w)return!1;w=!0,L.textContent=a("Loading…"),O();let t=!1;try{if(g==="actions"){T=(await z.device.send("control.actionTargets")).targets,T.some(s=>s.id===v)||(v=null);const e=new Set(T.map(s=>s.id));for(const s of q.keys())e.has(s)||q.delete(s)}else Y=(await z.device.send("control.readAccessibility")).items;D=null,L.textContent="",t=!0}catch(e){T=[],Y=[],v=null,D=ot(e),L.textContent=D}finally{w=!1,O()}return P(),X(),O(),t}V.addEventListener("click",()=>{y||H()});C.addEventListener("input",()=>{I=C.value,P()});f.addEventListener("keydown",t=>{if(t.key==="Escape"&&v&&K(v),t.key==="ArrowDown"||t.key==="ArrowUp"){const e=[...f.querySelectorAll(".necto-tree-row")],i=e.indexOf(document.activeElement)+(t.key==="ArrowDown"?1:-1);e[i]&&(t.preventDefault(),e[i].focus())}});async function At(){if(!z.isAvailable()){D=a("This plugin only works inside Necto"),P();return}await H(),await z.ready()}At(); +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const r of c.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();var et="necto",at=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function nt(t){const e=new Error(t.message);return e.name="NectoBridgeError",e.code=t.code,e.operationID=t.operationID,e.details=t.details,e}function rt(){var t,e,s;return!!((s=(e=(t=globalThis.window)==null?void 0:t.webkit)==null?void 0:e.messageHandlers)!=null&&s[et])}async function B(t,e={}){var o,c,r;const s=(r=(c=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:c.messageHandlers)==null?void 0:r[et];if(!s)throw new at;const i=await s.postMessage({type:t,...e});if(!i.ok)throw nt(i.error);return i.value}var R=new Map;function ct(t,e){R.set(t,e)}function lt(t){R.delete(t)}function dt(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(t,e)=>{var s;(s=R.get(t))==null||s.onEvent(e)},globalThis.window.__nectoBridgeStreamError=(t,e)=>{var i;const s=R.get(t);R.delete(t),(i=s==null?void 0:s.onError)==null||i.call(s,nt(e))},globalThis.window.__nectoBridgeStreamEnd=t=>{R.delete(t)})}function it(){var s,i;return(((s=globalThis.document)==null?void 0:s.documentElement.lang)||((i=globalThis.navigator)==null?void 0:i.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function j(t){return(e,s={})=>{var o;return(((o=t[it()])==null?void 0:o[e])??e).replace(/\{([A-Za-z0-9_]+)\}/g,(c,r)=>s[r]===void 0?c:String(s[r]))}}var ut=j({ko:{"Resize details":"상세 패널 크기 조절"}});function pt(t){try{const e=JSON.parse(t??"null"),s=i=>typeof i=="number"&&Number.isFinite(i)&&i>0?i:void 0;return{width:s(e==null?void 0:e.width),height:s(e==null?void 0:e.height)}}catch{return{}}}function bt(t){let e;try{e=pt(localStorage.getItem(t))}catch{e={}}let s=()=>{};return{mount(i){s();const o=i.closest(".necto-app"),c=i.querySelector(".necto-detail-title");if(!o||!c)return;o.classList.add("necto-dock-layout");const r=document.createElement("div");r.className="necto-resize",r.tabIndex=0,r.setAttribute("role","separator"),r.setAttribute("aria-label",ut("Resize details")),i.prepend(r);let p="right",S=0,x=0,E=0;const M=()=>{try{localStorage.setItem(t,JSON.stringify(e))}catch{}},N=()=>{const{width:u,height:m}=o.getBoundingClientRect();p=u<=640?"bottom":"right",x=p==="right"?280:Math.min(180,m/2),E=Math.max(x,p==="right"?u-240:m-160),S=Math.max(x,Math.min(E,p==="right"?e.width??u*.45:e.height??280)),o.dataset.detailPosition=p,o.style.setProperty("--necto-detail-size",`${S}px`),r.setAttribute("aria-orientation",p==="right"?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(x)),r.setAttribute("aria-valuemax",String(E)),r.setAttribute("aria-valuenow",String(Math.round(S)))},d=u=>{e[p==="right"?"width":"height"]=Math.max(x,Math.min(E,u)),N()};r.addEventListener("keydown",u=>{const m=p==="right"?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"];m.includes(u.key)&&(u.preventDefault(),d(S+(u.key===m[0]?24:-24)),M())});let l;r.addEventListener("pointerdown",u=>{u.button===0&&(u.preventDefault(),r.setPointerCapture(u.pointerId),l={coordinate:p==="right"?u.clientX:u.clientY,size:S},r.dataset.dragging="true")}),r.addEventListener("pointermove",u=>{l&&d(l.size+l.coordinate-(p==="right"?u.clientX:u.clientY))});const h=()=>{l=void 0,delete r.dataset.dragging,M()};r.addEventListener("pointerup",h),r.addEventListener("lostpointercapture",h);const b=new ResizeObserver(N);b.observe(o),N(),s=()=>b.disconnect()},unmount(){s()}}}dt();function ft(){return rt()}function gt(t){return t instanceof Error&&"code"in t}function ht(){return B("context")}async function mt(){await B("ready")}function Q(){return{send(t,e={}){return B("invoke",{operationID:t,input:e})},async subscribe(t,e={},s,i){const o=await B("subscribe",{operationID:t,input:e});return ct(o,{onEvent:s,onError:i}),{id:o,async unsubscribe(){lt(o),await B("unsubscribe",{subscriptionID:o})}}}}}function vt(t,e){var s;return((s=t.operations.find(i=>i.id===e))==null?void 0:s.available)??!1}var z={isAvailable:ft,context:ht,ready:mt,locale:it,createTranslator:j,isOperationAvailable:vt,device:Q(),desktop:Q()};const a=j({ko:{Control:"Control",Gestures:"제스처",Tap:"탭",Position:"위치","Default position":"기본 위치","Custom position":"직접 지정","X (left to right)":"X (왼쪽 → 오른쪽)","Y (top to bottom)":"Y (위 → 아래)","Use 0–1 within the visible target. Swipe starts here and stops at its edge.":"요소 안의 위치를 0~1로 입력해 주세요. 스와이프는 이 위치에서 시작해 요소 경계에서 멈춰요.","Use position.x and position.y between 0 and 1":"X와 Y를 0~1 사이로 입력해 주세요.","There is no room to swipe in that direction":"이 방향으로 스와이프할 공간이 없어요.","There is not enough room for these fingers at this position":"이 위치에는 지정한 손가락 수만큼 터치할 공간이 없어요.",Fingers:"손가락 수","Tap count":"탭 횟수","Use 1–5 fingers and 1–3 taps":"손가락 수는 1~5개, 탭 횟수는 1~3회로 입력해 주세요.","Swipe back":"스와이프로 뒤로 가기","Text to enter":"입력할 텍스트","Input mode":"입력 방식","Replace text":"전체 바꾸기","Append text":"끝에 추가","Enter text":"입력","↑ Swipe up":"↑ 위로 스와이프","↓ Swipe down":"↓ 아래로 스와이프","← Swipe left":"← 왼쪽으로 스와이프","→ Swipe right":"→ 오른쪽으로 스와이프","Arrows show finger movement. Swipe up to reveal content below.":"화살표는 손가락을 움직이는 방향이에요. 위로 밀면 아래쪽 내용이 보여요.","Distance ratio":"이동 거리 비율","Duration (ms)":"동작 시간 (ms)","Sending input…":"입력 전달 중…","Input sent · accessibility content changed":"입력 전달됨 · 접근성 내용 변경됨","Input sent · no accessibility change observed":"입력 전달됨 · 접근성 변화 확인 안 됨","Another action is in progress":"다른 동작이 실행 중이에요.","The target changed. Refresh Control before acting.":"요소가 바뀌었어요. 새로고침한 뒤 다시 선택해 주세요.","The target is covered by another view. Refresh Control before acting.":"다른 화면이 요소를 가리고 있어요. 새로고침한 뒤 다시 선택해 주세요.","The text field did not receive focus. Refresh Control before acting.":"입력란에 포커스가 이동하지 않았어요. 새로고침한 뒤 다시 선택해 주세요.",Actions:"조작","Read accessibility":"접근성 읽기",Read:"조회","Filter accessibility content":"접근성 내용 검색","No accessibility content":"읽을 수 있는 접근성 정보가 없어요","Read the current screen to check text and values.":"현재 화면을 조회해 텍스트와 값을 확인해 주세요.",Role:"역할",Label:"레이블",Value:"값",Heading:"제목",Text:"텍스트",Link:"링크",Image:"이미지",Adjustable:"값 조절",Element:"요소","Loading…":"조회 중…","Filter elements":"요소 검색","No actionable elements":"조작할 수 있는 요소가 없어요","Refresh to find controls on the current screen.":"새로고침해 현재 화면의 요소를 확인해 주세요.",Elements:"요소",Button:"버튼","Scroll area":"스크롤 영역",Screen:"화면",Refresh:"새로고침","Nothing matches":"일치하는 요소가 없어요","Resize the detail pane":"상세 패널 크기 조절","Close details":"상세 닫기","Text input":"텍스트 입력","Secure value is hidden":"비밀번호 값은 표시하지 않아요","The element moved. Refresh Control before acting.":"요소 위치가 바뀌었어요. 새로고침한 뒤 다시 선택해 주세요.","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작해요."}});let T=[],Y=[],g="actions",v=null,I="",D=null,y=!1,w=!1;const q=new Map,W=bt("necto.control.detail");function n(t,e={},s=[]){const i=document.createElement(t);for(const[o,c]of Object.entries(e))c!==void 0&&i.setAttribute(o,c);return i.append(...s),i}function ot(t){return gt(t)?a(t.message):String(t)}const V=n("button",{type:"button",class:"necto-button"},[a("Refresh")]),C=n("input",{class:"necto-field",type:"search",placeholder:a("Filter elements"),"aria-label":a("Filter elements")}),J=n("span",{class:"necto-caption"}),L=n("span"),st=n("span",{class:"control-spinner","aria-hidden":"true",hidden:""}),yt=n("span",{class:"necto-caption control-status",role:"status"},[st,L]),f=n("div",{class:"necto-body",tabindex:"0"}),_=n("div",{class:"detail-slot"}),$=n("div",{class:"necto-tabs",role:"tablist","aria-label":a("Control")}),A=n("button",{type:"button",class:"necto-tab",role:"tab",id:"actions-tab","aria-selected":"true","aria-controls":"control-content"},[a("Actions")]),k=n("button",{type:"button",class:"necto-tab",role:"tab",id:"reading-tab","aria-selected":"false","aria-controls":"control-content",tabindex:"-1"},[a("Read accessibility")]);$.append(A,k);f.id="control-content";f.setAttribute("role","tabpanel");f.setAttribute("aria-labelledby",A.id);function Z(t){y||w||g===t||(g=t,I="",C.value="",C.placeholder=a(g==="actions"?"Filter elements":"Filter accessibility content"),C.setAttribute("aria-label",C.placeholder),A.setAttribute("aria-selected",String(g==="actions")),k.setAttribute("aria-selected",String(g==="reading")),A.tabIndex=g==="actions"?0:-1,k.tabIndex=g==="reading"?0:-1,f.setAttribute("aria-labelledby",g==="actions"?A.id:k.id),V.textContent=a(g==="actions"?"Refresh":"Read"),X(),H())}A.addEventListener("click",()=>Z("actions"));k.addEventListener("click",()=>Z("reading"));$.addEventListener("keydown",t=>{if(!(y||w)&&["ArrowLeft","ArrowRight","Home","End"].includes(t.key)){t.preventDefault();const e=t.key==="Home"?"actions":t.key==="End"||g==="actions"?"reading":"actions";Z(e),(e==="actions"?A:k).focus()}});var tt;(tt=document.getElementById("root"))==null||tt.append(n("div",{class:"necto-app"},[$,n("div",{class:"necto-app control-workspace"},[n("div",{class:"necto-toolbar"},[V,C,J,yt]),f,_])]));function G(t){return t.label||t.identifier||F(t.role)}function F(t){return a({button:"Button",textInput:"Text input",scrollArea:"Scroll area",screen:"Screen",heading:"Heading",text:"Text",link:"Link",image:"Image",adjustable:"Adjustable",element:"Element"}[t]??t)}function P(){if(f.replaceChildren(),g==="reading"){wt();return}const t=I.trim().toLowerCase(),e=T.filter(i=>!t||[i.label,i.identifier,i.role,F(i.role)].some(o=>o==null?void 0:o.toLowerCase().includes(t)));if(J.textContent=String(e.length),!e.length){f.append(n("div",{class:"necto-empty"},[n("p",{class:"necto-empty-title"},[D??a(I?"Nothing matches":"No actionable elements")]),n("p",{class:"necto-caption"},[a("Refresh to find controls on the current screen.")])]));return}const s=n("div",{class:"necto-tree","aria-label":a("Elements")});for(const i of e){const o=n("button",{type:"button",class:"necto-tree-row","aria-pressed":String(i.id===v),"aria-selected":i.id===v?"true":void 0,disabled:y||w?"":void 0},[n("span",{class:"necto-tree-name",title:G(i)},[G(i)]),n("span",{class:"necto-tree-meta"},[F(i.role)])]);o.addEventListener("click",()=>K(i.id)),s.append(o)}f.append(s)}function wt(){const t=I.trim().toLowerCase(),e=Y.filter(i=>!t||[i.label,i.identifier,i.role,F(i.role),i.isSecure?void 0:i.value].some(o=>o==null?void 0:o.toLowerCase().includes(t)));if(J.textContent=String(e.length),!e.length){f.append(n("div",{class:"necto-empty"},[n("p",{class:"necto-empty-title"},[D??a(I?"Nothing matches":"No accessibility content")]),n("p",{class:"necto-caption"},[a("Read the current screen to check text and values.")])]));return}const s=e.map(i=>n("tr",{},[n("td",{},[F(i.role)]),n("td",{},[n("div",{},[i.label??"—"]),...i.identifier?[n("div",{class:"necto-caption"},[i.identifier])]:[]]),n("td",{},[i.isSecure?a("Secure value is hidden"):i.value??"—"])]));f.append(n("table",{class:"necto-table control-reading","aria-label":a("Read accessibility")},[n("thead",{},[n("tr",{},["Role","Label","Value"].map(i=>n("th",{scope:"col"},[a(i)])))]),n("tbody",{},s)]))}function X(){if(W.unmount(),_.replaceChildren(),g!=="actions")return;const t=T.find(i=>i.id===v);if(!t)return;const e=n("button",{type:"button",class:"necto-button necto-button-quiet","aria-label":a("Close details")},["✕"]);e.addEventListener("click",()=>K(t.id));const s=n("aside",{class:"necto-detail"},[n("div",{class:"necto-detail-title"},[n("span",{class:"necto-detail-title-url"},[G(t)]),e]),n("div",{class:"necto-detail-body control-detail-body"},[St(t)])]);_.append(s),W.mount(s)}function St(t){var M,N;const e=n("section",{class:"control-accessibility-actions","aria-label":a("Gestures")},[n("h3",{class:"necto-section-title"},[a("Gestures")])]),s=n("div",{class:"control-action-buttons"}),i=((M=t.tapGestures)==null?void 0:M.find(({touchCount:d,tapCount:l})=>d===1&&l===1))??((N=t.tapGestures)==null?void 0:N[0]),o=q.get(t.id)??{touchCount:(i==null?void 0:i.touchCount)??1,tapCount:(i==null?void 0:i.tapCount)??1,distanceRatio:.6,durationMs:400,customPosition:!1,x:.5,y:.5};q.set(t.id,o);const c=n("select",{class:"necto-field"},[n("option",{value:"default"},[a("Default position")]),n("option",{value:"custom"},[a("Custom position")])]);c.value=o.customPosition?"custom":"default";const r=n("input",{type:"number",class:"necto-field",min:"0",max:"1",step:"any",value:String(o.x)}),p=n("input",{type:"number",class:"necto-field",min:"0",max:"1",step:"any",value:String(o.y)}),S=n("div",{},[n("div",{class:"control-accessibility-actions"},[n("label",{class:"control-accessibility-actions"},[a("X (left to right)"),r]),n("label",{class:"control-accessibility-actions"},[a("Y (top to bottom)"),p]),n("p",{class:"necto-caption"},[a("Use 0–1 within the visible target. Swipe starts here and stops at its edge.")])])]);S.hidden=!o.customPosition,c.addEventListener("change",()=>{o.customPosition=c.value==="custom",S.hidden=!o.customPosition}),r.addEventListener("input",()=>{r.value&&r.validity.valid&&(o.x=r.valueAsNumber)}),p.addEventListener("input",()=>{p.value&&p.validity.valid&&(o.y=p.valueAsNumber)});const x=()=>!o.customPosition||r.reportValidity()&&p.reportValidity()&&!!r.value&&!!p.value,E=()=>o.customPosition?{position:{x:o.x,y:o.y}}:{};if((t.actions.includes("tap")||t.actions.includes("swipe"))&&e.append(n("label",{class:"control-accessibility-actions"},[a("Position"),c]),S),t.actions.includes("tap")){const d=n("select",{class:"necto-field"}),l=n("select",{class:"necto-field"});for(let b=1;b<=5;b++)d.append(n("option",{value:String(b)},[String(b)]));for(let b=1;b<=3;b++)l.append(n("option",{value:String(b)},[String(b)]));d.value=String(o.touchCount),l.value=String(o.tapCount),d.addEventListener("change",()=>{o.touchCount=Number(d.value)}),l.addEventListener("change",()=>{o.tapCount=Number(l.value)});const h=n("button",{type:"button",class:"necto-button"},[a("Tap")]);h.addEventListener("click",()=>{x()&&U("control.tap",{targetID:t.id,touchCount:o.touchCount,tapCount:o.tapCount,...E()})}),e.append(n("label",{class:"control-accessibility-actions"},[a("Fingers"),d]),n("label",{class:"control-accessibility-actions"},[a("Tap count"),l])),s.append(h)}if(t.actions.includes("back")&&s.append(xt(a("Swipe back"),"control.back",{targetID:t.id})),e.append(s),t.actions.includes("input")){const d=n("input",{type:t.isSecure?"password":"text",class:"necto-field","aria-label":a("Text to enter"),placeholder:a("Text to enter"),maxlength:"10000",autocomplete:"off"}),l=n("select",{class:"necto-field","aria-label":a("Input mode")},[n("option",{value:"replace"},[a("Replace text")]),n("option",{value:"append"},[a("Append text")])]),h=n("button",{type:"submit",class:"necto-button"},[a("Enter text")]),b=n("form",{class:"control-accessibility-actions"},[d,l,h]);b.addEventListener("submit",u=>{if(u.preventDefault(),y||w)return;const m=d.value;d.value="",U("control.input",{targetID:t.id,text:m,mode:l.value})}),e.append(b)}if(t.actions.includes("swipe")){const d=n("input",{type:"number",class:"necto-field",min:"0.1",max:"0.9",step:"0.1",value:String(o.distanceRatio)}),l=n("input",{type:"number",class:"necto-field",min:"100",max:"2000",step:"any",value:String(o.durationMs)});d.addEventListener("input",()=>{d.value&&d.validity.valid&&(o.distanceRatio=d.valueAsNumber)}),l.addEventListener("input",()=>{l.value&&l.validity.valid&&(o.durationMs=l.valueAsNumber)});const h=n("div",{class:"control-action-buttons control-scroll-buttons"});for(const[b,u]of[["up","↑ Swipe up"],["down","↓ Swipe down"],["left","← Swipe left"],["right","→ Swipe right"]]){const m=n("button",{type:"button",class:"necto-button"},[a(u)]);m.addEventListener("click",()=>{!x()||!d.reportValidity()||!l.reportValidity()||!d.value||!l.value||U("control.swipe",{targetID:t.id,direction:b,distanceRatio:d.valueAsNumber,durationMs:l.valueAsNumber,...E()})}),h.append(m)}e.append(n("p",{class:"necto-caption"},[a("Arrows show finger movement. Swipe up to reveal content below.")]),n("label",{class:"control-accessibility-actions"},[a("Distance ratio"),d]),n("label",{class:"control-accessibility-actions"},[a("Duration (ms)"),l]),h)}return e}function K(t){y||w||(v=v===t?null:t,P(),X())}function O(){const t=y||w;st.hidden=!t,V.disabled=t,A.disabled=t,k.disabled=t,f.setAttribute("aria-busy",String(t)),_.setAttribute("aria-busy",String(t));for(const e of _.querySelectorAll("button, input, select"))e.disabled=t;for(const e of f.querySelectorAll(".necto-tree-row"))e.disabled=t}async function U(t,e){if(!(y||w)){y=!0,O(),P(),L.textContent=a("Sending input…");try{const s=await z.device.send(t,e);await H()&&(L.textContent=a(s.contentChanged?"Input sent · accessibility content changed":"Input sent · no accessibility change observed"))}catch(s){await H(),L.textContent=ot(s)}finally{y=!1,P(),X(),O()}}}function xt(t,e,s){const i=n("button",{type:"button",class:"necto-button"},[t]);return i.addEventListener("click",()=>void U(e,s)),i}async function H(){if(w)return!1;w=!0,L.textContent=a("Loading…"),O();let t=!1;try{if(g==="actions"){T=(await z.device.send("control.actionTargets")).targets,T.some(s=>s.id===v)||(v=null);const e=new Set(T.map(s=>s.id));for(const s of q.keys())e.has(s)||q.delete(s)}else Y=(await z.device.send("control.readAccessibility")).items;D=null,L.textContent="",t=!0}catch(e){T=[],Y=[],v=null,D=ot(e),L.textContent=D}finally{w=!1,O()}return P(),X(),O(),t}V.addEventListener("click",()=>{y||H()});C.addEventListener("input",()=>{I=C.value,P()});f.addEventListener("keydown",t=>{if(t.key==="Escape"&&v&&K(v),t.key==="ArrowDown"||t.key==="ArrowUp"){const e=[...f.querySelectorAll(".necto-tree-row")],i=e.indexOf(document.activeElement)+(t.key==="ArrowDown"?1:-1);e[i]&&(t.preventDefault(),e[i].focus())}});async function At(){if(!z.isAvailable()){D=a("This plugin only works inside Necto"),P();return}await H(),await z.ready()}At(); diff --git a/SECURITY.md b/SECURITY.md index 8256d40..009e279 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,7 +8,7 @@ channel, without exploit steps, credentials, captured traffic or other sensitive Wait for a maintainer to provide a private channel before sharing those details. Include the affected Necto/SDK versions, operating systems and whether the connection -uses USB or a simulator. Check the latest release when it is safe to do so; support +uses USB, a simulator or an emulator. Check the latest release when it is safe to do so; support for older releases is not guaranteed. Necto is a development tool, not a sandbox for untrusted plugins. Keep it out of diff --git a/WebPackages/Bridge/components.css b/WebPackages/Bridge/components.css index 2393591..80535d4 100644 --- a/WebPackages/Bridge/components.css +++ b/WebPackages/Bridge/components.css @@ -302,7 +302,7 @@ th.necto-numeric { text-align: right; } align-items: center; gap: var(--necto-space-2); margin: 0 var(--necto-space-2); - padding: 5px var(--necto-space-2); + padding: 5px var(--necto-space-4) 5px var(--necto-space-2); border: none; border-radius: var(--necto-radius-control); background: none; @@ -563,7 +563,7 @@ th.necto-numeric { text-align: right; } display: flex; min-height: 38px; align-items: center; - padding: var(--necto-space-2) 0; + padding: var(--necto-space-2); gap: var(--necto-space-4); } diff --git a/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.css b/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.css index 8b08e6f..277391f 100644 --- a/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.css +++ b/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.necto-body{padding:var(--necto-space-3)} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.necto-body{padding:var(--necto-space-3)} diff --git a/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.js b/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.js index fb559e9..aa3e341 100644 --- a/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.js +++ b/WebPackages/BuiltInPlugins/Plugins/plugin-sample/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var E="necto",B=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function N(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function x(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[E])}async function m(e,t={}){var o,i,s;const n=(s=(i=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:i.messageHandlers)==null?void 0:s[E];if(!n)throw new B;const r=await n.postMessage({type:e,...t});if(!r.ok)throw N(r.error);return r.value}var l=new Map;function A(e,t){l.set(e,t)}function I(e){l.delete(e)}function C(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=l.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var r;const n=l.get(e);l.delete(e),(r=n==null?void 0:n.onError)==null||r.call(n,N(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{l.delete(e)})}function k(){var n,r;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((r=globalThis.navigator)==null?void 0:r.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function S(e){return(t,n={})=>{var o;return(((o=e[k()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(i,s)=>n[s]===void 0?i:String(n[s]))}}C();function L(){return x()}function T(e){return e instanceof Error&&"code"in e}function _(){return m("context")}async function O(){await m("ready")}function v(){return{send(e,t={}){return m("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,r){const o=await m("subscribe",{operationID:e,input:t});return A(o,{onEvent:n,onError:r}),{id:o,async unsubscribe(){I(o),await m("unsubscribe",{subscriptionID:o})}}}}}function D(e,t){var n;return((n=e.operations.find(r=>r.id===t))==null?void 0:n.available)??!1}var c={isAvailable:L,context:_,ready:O,locale:k,createTranslator:S,isOperationAvailable:D,device:v(),desktop:v()};const a=S({ko:{Bridge:"브릿지",States:"상태",Context:"컨텍스트","Loading…":"불러오는 중…","Query · host.info":"쿼리 · host.info",Run:"실행","Not run yet":"아직 실행하지 않았습니다","Stream · host.ticks":"스트림 · host.ticks",Start:"시작",Stop:"중지","0 events":"이벤트 0개","Not started":"시작하지 않았습니다","Make it fail":"실패 상태 만들기","Every refusal below is real: the call is made and Necto turns it down. This is what a plugin's error handling has to survive.":"아래 거절은 모두 실제 호출 결과입니다. Necto가 요청을 거절할 때 플러그인의 오류 처리가 견뎌야 하는 상태를 보여줍니다.","Unknown operation":"알 수 없는 오퍼레이션","Bad input":"잘못된 입력",Empty:"비어 있음","Nothing to show":"표시할 내용이 없습니다","What a plugin looks like before its first result.":"플러그인이 첫 결과를 받기 전의 모습입니다.",failed:"실패","{count} event":"이벤트 {count}개","{count} events":"이벤트 {count}개","Necto allowed it. That is itself worth knowing.":"Necto가 요청을 허용했습니다. 이것도 확인할 가치가 있습니다.",Notice:"알림","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작합니다.","none selected":"선택되지 않음"}});for(const e of document.querySelectorAll("[data-i18n]"))e.textContent=a(e.dataset.i18n??"");function u(e,t){const n=document.getElementById(e);n&&n.replaceChildren(...t.map(([r,o])=>{const i=document.createElement("div"),s=document.createElement("dt"),f=document.createElement("dd");return s.textContent=r,f.textContent=String(o),i.append(s,f),i}))}function M(e){const t=new Date(e),n=r=>String(r).padStart(2,"0");return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function b(e,t,n){const r=document.getElementById(e);if(!r)return;const o=document.createElement("span");o.className=`necto-status necto-status-${t}`,o.textContent=n,r.replaceChildren(o)}function w(e,t){var f;const n=document.getElementById("failures");if(!n)return;const r=document.createElement("div");r.className="necto-notice necto-notice-danger";const o=document.createElement("div"),i=document.createElement("span");i.className="necto-notice-title",i.textContent=e;const s=document.createElement("p");for(s.textContent=t,o.append(i,s),r.append(o),n.prepend(r);n.children.length>4;)(f=n.lastElementChild)==null||f.remove()}for(const e of document.querySelectorAll("[data-tab]"))e.addEventListener("click",()=>{for(const t of document.querySelectorAll("[data-tab]"))t.setAttribute("aria-selected",String(t===e));for(const t of document.querySelectorAll("[data-panel]"))t.hidden=t.dataset.panel!==e.dataset.tab});async function y(){const e=performance.now();try{const t=await c.desktop.send("host.info");b("info-status","ok",`${Math.round(performance.now()-e)} ms`),u("info",[["nectoVersion",t.nectoVersion],["protocolVersion",t.protocolVersion]])}catch(t){b("info-status","danger",a("failed")),u("info",[[p(t),g(t)]])}}let h=0,d;async function q(){if(!d){h=0;try{d=await c.desktop.subscribe("host.ticks",{intervalMs:1e3},e=>{h+=1;const t=document.getElementById("tick-count");t&&(t.textContent=a(h===1?"{count} event":"{count} events",{count:h})),u("ticks",[["sequence",e.sequence],["timestamp",M(e.timestamp)]])},e=>w(p(e),g(e)))}catch(e){w(p(e),g(e))}}}async function H(){await(d==null?void 0:d.unsubscribe()),d=void 0}const V={missing:()=>c.desktop.send("nothing.declared.this"),input:()=>c.desktop.send("host.ticks",{intervalMs:"fast"})};for(const e of document.querySelectorAll("[data-fail]"))e.addEventListener("click",()=>{const t=V[e.dataset.fail??""];t&&t().then(()=>w("no error",a("Necto allowed it. That is itself worth knowing."))).catch(n=>w(p(n),g(n)))});function p(e){return T(e)?e.code:"UNKNOWN"}function g(e){return T(e)?e.message:String(e)}async function $(){var e,t,n,r;if(!c.isAvailable()){u("context",[[a("Notice"),a("This plugin only works inside Necto")]]);return}(e=document.getElementById("run-info"))==null||e.addEventListener("click",()=>void y()),(t=document.getElementById("start-ticks"))==null||t.addEventListener("click",()=>void q()),(n=document.getElementById("stop-ticks"))==null||n.addEventListener("click",()=>void H());try{const o=await c.context();u("context",[["pluginID",o.pluginID],["protocolVersion",o.protocolVersion],["target",((r=o.target)==null?void 0:r.appBundleID)??a("none selected")],["operations",o.operations.map(i=>i.id).join(", ")]])}catch(o){u("context",[[p(o),g(o)]])}await y(),await c.ready()}$(); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var E="necto",B=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function N(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function x(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[E])}async function m(e,t={}){var o,i,s;const n=(s=(i=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:i.messageHandlers)==null?void 0:s[E];if(!n)throw new B;const r=await n.postMessage({type:e,...t});if(!r.ok)throw N(r.error);return r.value}var l=new Map;function A(e,t){l.set(e,t)}function I(e){l.delete(e)}function C(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=l.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var r;const n=l.get(e);l.delete(e),(r=n==null?void 0:n.onError)==null||r.call(n,N(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{l.delete(e)})}function k(){var n,r;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((r=globalThis.navigator)==null?void 0:r.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function S(e){return(t,n={})=>{var o;return(((o=e[k()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(i,s)=>n[s]===void 0?i:String(n[s]))}}C();function L(){return x()}function T(e){return e instanceof Error&&"code"in e}function _(){return m("context")}async function O(){await m("ready")}function v(){return{send(e,t={}){return m("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,r){const o=await m("subscribe",{operationID:e,input:t});return A(o,{onEvent:n,onError:r}),{id:o,async unsubscribe(){I(o),await m("unsubscribe",{subscriptionID:o})}}}}}function D(e,t){var n;return((n=e.operations.find(r=>r.id===t))==null?void 0:n.available)??!1}var c={isAvailable:L,context:_,ready:O,locale:k,createTranslator:S,isOperationAvailable:D,device:v(),desktop:v()};const a=S({ko:{Bridge:"브리지",States:"상태",Context:"컨텍스트","Loading…":"불러오는 중…","Query · host.info":"쿼리 · host.info",Run:"실행","Not run yet":"아직 실행하지 않았어요","Stream · host.ticks":"스트림 · host.ticks",Start:"시작",Stop:"중지","0 events":"이벤트 0개","Not started":"시작하지 않았어요","Make it fail":"실패 상태 만들기","Every refusal below is real: the call is made and Necto turns it down. This is what a plugin's error handling has to survive.":"실제로 요청을 보내고 거절된 결과를 표시해요. 플러그인의 오류 처리를 확인해 주세요.","Unknown operation":"알 수 없는 오퍼레이션","Bad input":"잘못된 입력",Empty:"비어 있음","Nothing to show":"표시할 내용이 없어요","What a plugin looks like before its first result.":"플러그인이 첫 결과를 받기 전의 모습이에요.",failed:"실패","{count} event":"이벤트 {count}개","{count} events":"이벤트 {count}개","Necto allowed it. That is itself worth knowing.":"Necto가 요청을 허용했어요.",Notice:"알림","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작해요.","none selected":"선택되지 않음"}});for(const e of document.querySelectorAll("[data-i18n]"))e.textContent=a(e.dataset.i18n??"");function u(e,t){const n=document.getElementById(e);n&&n.replaceChildren(...t.map(([r,o])=>{const i=document.createElement("div"),s=document.createElement("dt"),f=document.createElement("dd");return s.textContent=r,f.textContent=String(o),i.append(s,f),i}))}function M(e){const t=new Date(e),n=r=>String(r).padStart(2,"0");return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function b(e,t,n){const r=document.getElementById(e);if(!r)return;const o=document.createElement("span");o.className=`necto-status necto-status-${t}`,o.textContent=n,r.replaceChildren(o)}function w(e,t){var f;const n=document.getElementById("failures");if(!n)return;const r=document.createElement("div");r.className="necto-notice necto-notice-danger";const o=document.createElement("div"),i=document.createElement("span");i.className="necto-notice-title",i.textContent=e;const s=document.createElement("p");for(s.textContent=t,o.append(i,s),r.append(o),n.prepend(r);n.children.length>4;)(f=n.lastElementChild)==null||f.remove()}for(const e of document.querySelectorAll("[data-tab]"))e.addEventListener("click",()=>{for(const t of document.querySelectorAll("[data-tab]"))t.setAttribute("aria-selected",String(t===e));for(const t of document.querySelectorAll("[data-panel]"))t.hidden=t.dataset.panel!==e.dataset.tab});async function y(){const e=performance.now();try{const t=await c.desktop.send("host.info");b("info-status","ok",`${Math.round(performance.now()-e)} ms`),u("info",[["nectoVersion",t.nectoVersion],["protocolVersion",t.protocolVersion]])}catch(t){b("info-status","danger",a("failed")),u("info",[[p(t),g(t)]])}}let h=0,d;async function q(){if(!d){h=0;try{d=await c.desktop.subscribe("host.ticks",{intervalMs:1e3},e=>{h+=1;const t=document.getElementById("tick-count");t&&(t.textContent=a(h===1?"{count} event":"{count} events",{count:h})),u("ticks",[["sequence",e.sequence],["timestamp",M(e.timestamp)]])},e=>w(p(e),g(e)))}catch(e){w(p(e),g(e))}}}async function H(){await(d==null?void 0:d.unsubscribe()),d=void 0}const V={missing:()=>c.desktop.send("nothing.declared.this"),input:()=>c.desktop.send("host.ticks",{intervalMs:"fast"})};for(const e of document.querySelectorAll("[data-fail]"))e.addEventListener("click",()=>{const t=V[e.dataset.fail??""];t&&t().then(()=>w("no error",a("Necto allowed it. That is itself worth knowing."))).catch(n=>w(p(n),g(n)))});function p(e){return T(e)?e.code:"UNKNOWN"}function g(e){return T(e)?e.message:String(e)}async function $(){var e,t,n,r;if(!c.isAvailable()){u("context",[[a("Notice"),a("This plugin only works inside Necto")]]);return}(e=document.getElementById("run-info"))==null||e.addEventListener("click",()=>void y()),(t=document.getElementById("start-ticks"))==null||t.addEventListener("click",()=>void q()),(n=document.getElementById("stop-ticks"))==null||n.addEventListener("click",()=>void H());try{const o=await c.context();u("context",[["pluginID",o.pluginID],["protocolVersion",o.protocolVersion],["target",((r=o.target)==null?void 0:r.appBundleID)??a("none selected")],["operations",o.operations.map(i=>i.id).join(", ")]])}catch(o){u("context",[[p(o),g(o)]])}await y(),await c.ready()}$(); diff --git a/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.css b/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.css index 76b5402..7c920fa 100644 --- a/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.css +++ b/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.css @@ -1 +1 @@ -:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2) 0;gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.necto-body{padding:var(--necto-space-3)}#failure{margin-top:var(--necto-space-3)}.verification{margin:0;padding-left:var(--necto-space-5)}.verification li+li{margin-top:var(--necto-space-1)} +:root{--light-00: #ffffff;--light-05: #fcfcfc;--light-10: #f6f7f6;--light-20: #eff1f0;--light-30: #e5e5e5;--light-40: #cfcfc9;--light-50: #adada7;--light-60: #666662;--light-70: #4f4f4b;--light-80: #343432;--light-100: #141413;--light-brand: #ac5635;--light-success: #1a6f3e;--light-warning: #8a5a00;--light-danger: #b3261e;--light-info: #2b5fd9;--dark-00: #1c1c1b;--dark-05: #161615;--dark-10: #232322;--dark-20: #2b2b29;--dark-30: #333331;--dark-40: #43433f;--dark-50: #5c5c57;--dark-60: #94948e;--dark-70: #b4b4ad;--dark-80: #d3d3cc;--dark-100: #eeeeea;--dark-brand: #d1886b;--dark-success: #4ac26b;--dark-warning: #e0a52e;--dark-danger: #ff6b60;--dark-info: #6cb0ff}:root{--necto-base-00: var(--light-00);--necto-base-05: var(--light-05);--necto-base-10: var(--light-10);--necto-base-20: var(--light-20);--necto-base-30: var(--light-30);--necto-base-40: var(--light-40);--necto-base-50: var(--light-50);--necto-base-60: var(--light-60);--necto-base-70: var(--light-70);--necto-base-80: var(--light-80);--necto-base-100: var(--light-100);--necto-brand: var(--light-brand);--necto-surface: var(--necto-base-05);color-scheme:light;--necto-success: var(--light-success);--necto-warning: var(--light-warning);--necto-danger: var(--light-danger);--necto-info: var(--light-info)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}}:root[data-theme=dark]{--necto-base-00: var(--dark-00);--necto-base-05: var(--dark-05);--necto-base-10: var(--dark-10);--necto-base-20: var(--dark-20);--necto-base-30: var(--dark-30);--necto-base-40: var(--dark-40);--necto-base-50: var(--dark-50);--necto-base-60: var(--dark-60);--necto-base-70: var(--dark-70);--necto-base-80: var(--dark-80);--necto-base-100: var(--dark-100);--necto-brand: var(--dark-brand);--necto-surface: var(--necto-base-10);color-scheme:dark;--necto-success: var(--dark-success);--necto-warning: var(--dark-warning);--necto-danger: var(--dark-danger);--necto-info: var(--dark-info)}:root{--necto-bg: var(--necto-base-00);--necto-sidebar: var(--necto-base-05);--necto-hover: var(--necto-base-10);--necto-selected: var(--necto-base-20);--necto-border: var(--necto-base-30);--necto-border-strong: var(--necto-base-40);--necto-text: var(--necto-base-100);--necto-text-secondary: var(--necto-base-70);--necto-text-tertiary: var(--necto-base-60);--necto-accent: var(--necto-base-100);--necto-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--necto-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;--necto-font-ui: var(--necto-font);--necto-font-scale: 1;--necto-size-title: calc(17px * var(--necto-font-scale));--necto-size-body: calc(13px * var(--necto-font-scale));--necto-size-label: calc(12px * var(--necto-font-scale));--necto-size-caption: calc(11px * var(--necto-font-scale));--necto-space-1: 4px;--necto-space-2: 8px;--necto-space-3: 12px;--necto-space-4: 16px;--necto-space-5: 24px;--necto-row-height: calc(26px * var(--necto-font-scale));--necto-header-height: calc(26px * var(--necto-font-scale));--necto-toolbar-height: calc(38px * var(--necto-font-scale));--necto-field-height: calc(24px * var(--necto-font-scale));--necto-button-height: calc(24px * var(--necto-font-scale));--necto-radius-control: 4px;--necto-radius-panel: 10px;--necto-focus-ring: 0 0 0 3px color-mix(in srgb, var(--necto-accent) 18%, transparent);--necto-disabled-opacity: .45}body{margin:0;background:var(--necto-bg);color:var(--necto-text);font-family:var(--necto-font);font-size:var(--necto-size-body);line-height:1.5}code,kbd,samp,pre{font-family:var(--necto-font-mono)}.necto-app{display:flex;height:100%;flex-direction:column;overflow:hidden}.necto-toolbar{display:flex;min-height:var(--necto-toolbar-height);align-items:center;padding:var(--necto-space-2) var(--necto-space-3);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-2)}.necto-body{flex:1;min-height:0;overflow:auto}.necto-table{width:100%;border-collapse:collapse;table-layout:fixed}.necto-table th{position:sticky;top:0;z-index:1;height:var(--necto-header-height);padding:0 var(--necto-space-3);background:var(--necto-bg);box-shadow:inset 0 -1px 0 var(--necto-border);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400;text-align:left;white-space:nowrap}.necto-table td{height:var(--necto-row-height);padding:0 var(--necto-space-3);overflow:hidden;font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.necto-table tbody tr:hover>td{background:var(--necto-hover)}.necto-table tbody tr[aria-selected=true]>td{background:var(--necto-selected)}.necto-table tbody tr[aria-selected=true]>td:first-child{box-shadow:inset 2px 0 0 var(--necto-accent)}.necto-numeric{font-family:var(--necto-font-mono);font-variant-numeric:tabular-nums;text-align:right}th.necto-numeric{text-align:right}.necto-field{min-width:0;height:var(--necto-field-height);flex:1;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-field::placeholder{color:var(--necto-text-tertiary)}.necto-field:focus{border-color:var(--necto-accent);box-shadow:var(--necto-focus-ring);outline:none}.necto-json-editor{box-sizing:border-box;width:100%;min-width:0;min-height:calc(var(--necto-row-height) * 6);height:auto;flex:1;padding:var(--necto-space-3);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;resize:vertical;-moz-tab-size:2;tab-size:2;white-space:pre}.necto-button{height:var(--necto-button-height);padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface);color:var(--necto-text);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);white-space:nowrap}.necto-button:hover{background:var(--necto-hover)}.necto-button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-button:disabled{opacity:var(--necto-disabled-opacity)}.necto-button-quiet{border-color:transparent;background:none;color:var(--necto-text-secondary)}.necto-button-danger:hover{background:color-mix(in srgb,var(--necto-danger) 12%,transparent);color:var(--necto-danger)}.necto-toolbar-group{display:flex;align-items:center;padding:var(--necto-space-1) 0 var(--necto-space-2);gap:var(--necto-space-2);flex-wrap:wrap}.necto-tabs{display:flex;align-items:center;padding:0 var(--necto-space-2);border-bottom:1px solid var(--necto-border);gap:var(--necto-space-1)}.necto-tab{padding:var(--necto-space-2);border:none;background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-tab:hover{color:var(--necto-text)}.necto-tab[aria-selected=true]{box-shadow:inset 0 -1px 0 var(--necto-accent);color:var(--necto-text)}.necto-status{display:inline-flex;align-items:center;gap:6px;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-status:before{width:5px;height:5px;border-radius:1px;background:currentcolor;content:""}.necto-status-ok{color:var(--necto-success)}.necto-status-info{color:var(--necto-info)}.necto-status-warning{color:var(--necto-warning)}.necto-status-danger{color:var(--necto-danger)}.necto-status-idle{color:var(--necto-text-tertiary)}.necto-status-idle:before{background:none;box-shadow:inset 0 0 0 1px currentcolor}.necto-badge{display:inline-block;padding:1px 6px;border-radius:var(--necto-radius-control);background:var(--necto-selected);color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-pairs{display:grid;margin:0;gap:6px 0;grid-template-columns:minmax(120px,max-content) 1fr}.necto-pairs>div{display:grid;align-items:baseline;gap:var(--necto-space-3);grid-column:span 2;grid-template-columns:subgrid}.necto-pairs dt{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-pairs dd{margin:0;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-section-title{margin:var(--necto-space-5) 0 var(--necto-space-2);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);font-weight:400}.necto-section-title:first-child{margin-top:0}.necto-code{margin:0;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-radius:var(--necto-radius-control);background:var(--necto-base-05);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.necto-caption{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}:focus-visible{outline:2px solid var(--necto-accent);outline-offset:1px}.necto-empty{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:var(--necto-space-1);padding:var(--necto-space-5);text-align:center}.necto-empty-title{color:var(--necto-text-secondary);font-size:var(--necto-size-body)}.necto-empty p{margin:0}.necto-code-block{position:relative}.necto-code-copy{position:absolute;top:var(--necto-space-1);right:var(--necto-space-1);height:22px;padding:0 var(--necto-space-2);border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-bg);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption);opacity:0;transition:opacity .12s ease}.necto-code-block:hover .necto-code-copy,.necto-code-copy:focus-visible{opacity:1}.necto-code-copy:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-code-copy[data-copied=true]{border-color:var(--necto-success);color:var(--necto-success)}@media(prefers-reduced-motion:reduce){.necto-code-copy{transition:none}}.necto-sidebar{display:flex;flex-direction:column;padding:var(--necto-space-2) 0;border-right:1px solid var(--necto-border);background:var(--necto-sidebar);overflow-y:auto}.necto-app-head{display:flex;align-items:center;gap:var(--necto-space-2);padding:var(--necto-space-1) var(--necto-space-3) var(--necto-space-2)}.necto-app-icon{width:26px;height:26px;flex:none;border-radius:var(--necto-radius-control)}.necto-app-name{font-family:var(--necto-font-ui);font-size:var(--necto-size-label);font-weight:500}.necto-app-id{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-sidebar-group{padding:var(--necto-space-3) var(--necto-space-3) var(--necto-space-1);color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-sidebar-item{display:flex;align-items:center;gap:var(--necto-space-2);margin:0 var(--necto-space-2);padding:5px var(--necto-space-4) 5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);text-align:left;width:calc(100% - var(--necto-space-4))}.necto-sidebar-item>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-sidebar-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-sidebar-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-sidebar-item .necto-trailing{flex:none;margin-left:auto;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption);white-space:nowrap}.necto-icon{display:block;width:15px;height:15px;flex:none;fill:none;stroke:currentcolor;stroke-width:1.2;stroke-linecap:round;color:var(--necto-text-tertiary)}.necto-conn{width:6px;height:6px;flex:none;border-radius:50%}.necto-conn-on{background:var(--necto-success)}.necto-conn-off{background:none;box-shadow:inset 0 0 0 1px var(--necto-text-tertiary)}.necto-detail{display:flex;height:var(--necto-detail-height, 280px);flex-direction:column;border-top:1px solid var(--necto-border);background:var(--necto-surface)}.necto-dock-layout:has(.necto-detail){display:grid;grid-template:auto minmax(0,1fr) / minmax(0,1fr) var(--necto-detail-size, 45%)}.necto-dock-layout>.necto-toolbar{grid-column:1 / -1;min-width:0}.necto-dock-layout>.necto-body{min-width:0;container-type:inline-size}.necto-dock-layout>.detail-slot{display:contents}.necto-dock-layout:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr)}.necto-dock-layout:not(:has(>.necto-toolbar)) .necto-detail{grid-row:1}.necto-dock-layout .necto-detail{position:relative;grid-column:2;grid-row:2;min-width:0;min-height:0;height:auto;border-top:0;border-left:1px solid var(--necto-border)}.necto-dock-layout .necto-resize{position:absolute;z-index:2;left:-4px;top:0;width:7px;height:100%;margin:0;cursor:ew-resize;touch-action:none}.necto-dock-layout[data-detail-position=bottom]:has(.necto-detail){grid-template:auto minmax(0,1fr) var(--necto-detail-size, 280px) / minmax(0,1fr)}.necto-dock-layout[data-detail-position=bottom] .necto-detail{grid-column:1;grid-row:3;border-left:0;border-top:1px solid var(--necto-border)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)):has(.necto-detail){grid-template-rows:minmax(0,1fr) var(--necto-detail-size, 280px)}.necto-dock-layout[data-detail-position=bottom]:not(:has(>.necto-toolbar)) .necto-detail{grid-row:2}.necto-dock-layout[data-detail-position=bottom] .necto-resize{top:-4px;left:0;width:100%;height:7px;cursor:ns-resize}.necto-detail-title{flex-shrink:0;min-width:0}.necto-detail-title-url{flex:1;min-width:0}.necto-detail-title>.necto-button{flex-shrink:0}.necto-detail>.necto-tabs{flex-shrink:0;overflow-x:auto}.necto-resize{height:7px;flex:none;margin-top:-4px;cursor:ns-resize}.necto-resize:hover,.necto-resize[data-dragging=true]{background:var(--necto-accent);opacity:.12}.necto-detail-title{display:flex;height:var(--necto-toolbar-height);align-items:center;padding:0 var(--necto-space-2) 0 var(--necto-space-3);gap:var(--necto-space-2)}.necto-detail-title-url{overflow:hidden;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);text-overflow:ellipsis;white-space:nowrap}.necto-detail-title .necto-button-quiet{margin-left:auto}.necto-detail-title-wrap{box-sizing:border-box;height:auto;min-height:var(--necto-toolbar-height);padding-top:var(--necto-space-1);padding-bottom:var(--necto-space-1)}.necto-detail-title-wrap .necto-detail-title-url{overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}.necto-detail-body{flex:1;min-height:0;overflow:auto;padding:var(--necto-space-3)}.necto-body,.necto-detail-body,.necto-sidebar{scrollbar-width:thin;scrollbar-color:var(--necto-base-40) transparent}.necto-switch{position:relative;width:30px;height:18px;flex:none;padding:0;border:1px solid var(--necto-border-strong);border-radius:9px;background:var(--necto-bg)}.necto-switch:after{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--necto-text-tertiary);content:"";transition:transform .12s ease,background .12s ease}.necto-switch[aria-checked=true]{border-color:var(--necto-success);background:color-mix(in srgb,var(--necto-success) 18%,transparent)}.necto-switch[aria-checked=true]:after{background:var(--necto-success);transform:translate(12px)}@media(prefers-reduced-motion:reduce){.necto-switch:after{transition:none}}.necto-notice{display:flex;align-items:flex-start;padding:var(--necto-space-2) var(--necto-space-3);border:1px solid var(--necto-border);border-left:2px solid var(--necto-text-tertiary);border-radius:var(--necto-radius-control);background:var(--necto-surface);gap:var(--necto-space-2);font-size:var(--necto-size-label)}.necto-notice-danger{border-left-color:var(--necto-danger)}.necto-notice-title{font-family:var(--necto-font-ui)}.necto-notice p{margin:2px 0 0;color:var(--necto-text-secondary)}.necto-dialog-scrim{display:grid;height:100%;padding:var(--necto-space-5);background:color-mix(in srgb,var(--necto-base-100) 22%,transparent);place-items:center}.necto-dialog{display:flex;width:100%;max-width:460px;max-height:100%;flex-direction:column;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-panel);background:var(--necto-bg);box-shadow:0 12px 32px color-mix(in srgb,var(--necto-base-100) 20%,transparent)}.necto-dialog-head{padding:var(--necto-space-4) var(--necto-space-4) var(--necto-space-2)}.necto-dialog-title{font-size:var(--necto-size-body);font-weight:500}.necto-dialog-body{min-height:0;overflow:auto;padding:0 var(--necto-space-4)}.necto-dialog-actions{display:flex;justify-content:flex-end;padding:var(--necto-space-3) var(--necto-space-4);gap:var(--necto-space-2)}.necto-button-primary{border-color:var(--necto-accent);background:var(--necto-accent);color:var(--necto-bg)}.necto-button-primary:hover{background:var(--necto-base-80)}.necto-grant{display:flex;align-items:baseline;padding:var(--necto-space-2) 0;gap:var(--necto-space-3)}.necto-grant+.necto-grant{border-top:1px solid var(--necto-border)}.necto-grant-key{min-width:0;flex:1;font-family:var(--necto-font-mono);font-size:var(--necto-size-label);overflow-wrap:anywhere}.necto-grant-what{margin:2px 0 0;color:var(--necto-text-secondary);font-family:var(--necto-font);font-size:var(--necto-size-caption)}.necto-row{display:flex;min-height:38px;align-items:center;padding:var(--necto-space-2);gap:var(--necto-space-4)}.necto-row+.necto-row{border-top:1px solid var(--necto-border)}.necto-row-label{flex:1;font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-row-hint{margin:2px 0 0;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption)}.necto-row-value{flex:none;color:var(--necto-text-secondary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label)}.necto-segmented{display:flex;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control)}.necto-segmented button{height:calc(var(--necto-button-height) - 2px);padding:0 10px;border:none;background:var(--necto-surface);color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label)}.necto-segmented button+button{border-left:1px solid var(--necto-border-strong)}.necto-segmented button:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-segmented button[aria-pressed=true]{background:var(--necto-selected);color:var(--necto-text)}.necto-stepper{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--necto-border-strong);border-radius:var(--necto-radius-control);background:var(--necto-surface)}.necto-stepper button{width:22px;border:none;background:none;color:var(--necto-text-secondary);font-size:var(--necto-size-caption);line-height:1}.necto-stepper button:hover:not(:disabled){background:var(--necto-hover);color:var(--necto-text)}.necto-stepper button:disabled{color:var(--necto-text-tertiary)}.necto-stepper input{width:26px;height:calc(var(--necto-button-height) - 2px);padding:0;border:none;border-right:1px solid var(--necto-border-strong);border-left:1px solid var(--necto-border-strong);background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);font-variant-numeric:tabular-nums;text-align:right}.necto-stepper input:focus{outline:none}.necto-stepper-unit{padding:0 var(--necto-space-2) 0 2px;color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);line-height:calc(var(--necto-button-height) - 2px)}.necto-metrics{display:grid;background:var(--necto-border);gap:1px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.necto-metric{padding:var(--necto-space-3);background:var(--necto-bg)}.necto-metric-title{color:var(--necto-text-tertiary);font-family:var(--necto-font-ui);font-size:var(--necto-size-caption)}.necto-metric-value{font-family:var(--necto-font-mono);font-size:calc(20px * var(--necto-font-scale));font-variant-numeric:tabular-nums}.necto-metric-unit{color:var(--necto-text-tertiary);font-size:var(--necto-size-label)}.necto-metric-note{color:var(--necto-text-tertiary);font-family:var(--necto-font-mono);font-size:var(--necto-size-caption)}.necto-metric[data-over=true] .necto-metric-value,.necto-metric[data-over=true] .necto-metric-note{color:var(--necto-danger)}.necto-spark{display:block;width:100%;height:26px;margin-top:6px}.necto-tree{display:flex;flex-direction:column;padding:var(--necto-space-1) 0}.necto-tree-row{display:flex;height:var(--necto-row-height);align-items:center;padding-right:var(--necto-space-3);border:0;background:none;color:var(--necto-text);font-family:var(--necto-font-mono);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-tree-row:hover{background:var(--necto-hover)}.necto-tree-row[aria-selected=true]{background:var(--necto-selected)}.necto-tree-twist{width:12px;flex:none;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);text-align:center}.necto-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.necto-tree-name em{color:var(--necto-text-tertiary);font-style:normal}.necto-tree-meta{margin-left:auto;color:var(--necto-text-tertiary);font-size:var(--necto-size-caption);font-variant-numeric:tabular-nums;white-space:nowrap}.necto-nav{display:flex;box-sizing:border-box;width:180px;flex:none;flex-direction:column;padding:var(--necto-space-2) var(--necto-space-2) var(--necto-space-2) 0;border-right:1px solid var(--necto-border);gap:2px}.necto-nav-item{display:flex;align-items:center;padding:5px var(--necto-space-2);border:none;border-radius:var(--necto-radius-control);background:none;color:var(--necto-text-secondary);font-family:var(--necto-font-ui);font-size:var(--necto-size-label);gap:var(--necto-space-2);text-align:left}.necto-nav-item:hover{background:var(--necto-hover);color:var(--necto-text)}.necto-nav-item[aria-selected=true]{background:var(--necto-selected);color:var(--necto-text)}html,body,.necto-app{height:100%}.necto-body{padding:var(--necto-space-3)}#failure{margin-top:var(--necto-space-3)}.verification{margin:0;padding-left:var(--necto-space-5)}.verification li+li{margin-top:var(--necto-space-1)} diff --git a/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.js b/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.js index 79b0327..ca6b72d 100644 --- a/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.js +++ b/WebPackages/BuiltInPlugins/Plugins/shell-demo/assets/index.js @@ -1,2 +1,2 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();var E="necto",A=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function b(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function B(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[E])}async function l(e,t={}){var o,r,a;const n=(a=(r=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:r.messageHandlers)==null?void 0:a[E];if(!n)throw new A;const s=await n.postMessage({type:e,...t});if(!s.ok)throw b(s.error);return s.value}var i=new Map;function C(e,t){i.set(e,t)}function T(e){i.delete(e)}function x(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=i.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var s;const n=i.get(e);i.delete(e),(s=n==null?void 0:n.onError)==null||s.call(n,b(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{i.delete(e)})}function N(){var n,s;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((s=globalThis.navigator)==null?void 0:s.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function S(e){return(t,n={})=>{var o;return(((o=e[N()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(r,a)=>n[a]===void 0?r:String(n[a]))}}x();function D(){return B()}function v(e){return e instanceof Error&&"code"in e}function I(){return l("context")}async function k(){await l("ready")}function w(){return{send(e,t={}){return l("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,s){const o=await l("subscribe",{operationID:e,input:t});return C(o,{onEvent:n,onError:s}),{id:o,async unsubscribe(){T(o),await l("unsubscribe",{subscriptionID:o})}}}}}function _(e,t){var n;return((n=e.operations.find(s=>s.id===t))==null?void 0:n.available)??!1}var d={isAvailable:D,context:I,ready:k,locale:N,createTranslator:S,isOperationAvailable:_,device:w(),desktop:w()};const c=S({ko:{"Desktop Shell Demo":"데스크톱 셸 데모",Waiting:"대기 중",Connected:"연결됨","Exact command":"정확한 명령어","Command approval compares this exact string. Change one character to make it a different command.":"명령별 승인은 이 문자열 전체를 비교합니다. 한 글자만 달라져도 다른 명령어입니다.","Request approval":"승인 요청","Request Full Access":"전체 허용 요청","Allow every Shell Demo command?":"Shell Demo의 모든 명령을 허용할까요?","Full Access lets this plugin run any shell command without asking again. Use it only to verify the broad permission flow.":"전체 허용은 이 플러그인이 다시 묻지 않고 모든 셸 명령어를 실행할 수 있게 합니다. 넓은 권한 흐름을 검증할 때만 사용하세요.","All commands":"모든 명령어","Allow the Shell Demo greeting?":"Shell Demo 인사 명령을 허용할까요?","The demo uses printf to prove an approved command reaches Bash and returns stdout.":"이 데모는 printf 명령으로 승인된 명령어가 Bash까지 전달되고 stdout이 돌아오는지 확인합니다.","Run command":"명령 실행","Try unapproved command":"미승인 명령 실행","Last result":"최근 결과","Not run yet":"아직 실행하지 않았습니다","Verification flow":"검증 순서","Run first to see PERMISSION_DENIED in Protected mode.":"먼저 실행해 보호 모드의 PERMISSION_DENIED를 확인합니다.","Request approval and accept the native Necto dialog.":"승인을 요청하고 Necto 네이티브 다이얼로그에서 허용합니다.","Run again to see stdout and exitCode 0.":"다시 실행해 stdout과 exitCode 0을 확인합니다.","Try the unapproved command to prove exact matching.":"미승인 명령을 실행해 정확한 문자열 비교를 확인합니다.",Notice:"알림","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작합니다."}}),m="/usr/bin/printf 'Hello from Necto Shell Demo\\n'",L="/usr/bin/printf 'This exact command was not approved\\n'";function R(e){return[["stdout",e.stdout||"—"],["stderr",e.stderr||"—"],["exitCode",e.exitCode]]}for(const e of document.querySelectorAll("[data-i18n]"))e.textContent=c(e.dataset.i18n??"");function p(){return document.getElementById("shell-command")}function u(e){const t=document.getElementById("result");t&&t.replaceChildren(...e.map(([n,s])=>{const o=document.createElement("div"),r=document.createElement("dt"),a=document.createElement("dd");return r.textContent=n,a.textContent=String(s),o.append(r,a),o}))}function f(e){const t=document.getElementById("failure");if(!t)return;const n=v(e)?e.code:"UNKNOWN",s=v(e)?e.message:String(e);t.replaceChildren();const o=document.createElement("div");o.className="necto-notice necto-notice-danger";const r=document.createElement("div"),a=document.createElement("span"),h=document.createElement("p");a.className="necto-notice-title",a.textContent=n,h.textContent=s,r.append(a,h),o.append(r),t.append(o)}function g(){var e;(e=document.getElementById("failure"))==null||e.replaceChildren()}async function q(){var t;const e=((t=p())==null?void 0:t.value)??m;g();try{const n=await d.desktop.send("shell.request",{commands:[e],title:c("Allow the Shell Demo greeting?"),message:c("The demo uses printf to prove an approved command reaches Bash and returns stdout.")});u([["approved",String(n.approved)],["commands",n.approvedCommands.join(` +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();var E="necto",A=class extends Error{constructor(){super("The Necto host was not found. This page must run inside Necto."),this.name="NectoBridgeUnavailableError"}};function b(e){const t=new Error(e.message);return t.name="NectoBridgeError",t.code=e.code,t.operationID=e.operationID,t.details=e.details,t}function B(){var e,t,n;return!!((n=(t=(e=globalThis.window)==null?void 0:e.webkit)==null?void 0:t.messageHandlers)!=null&&n[E])}async function l(e,t={}){var o,r,a;const n=(a=(r=(o=globalThis.window)==null?void 0:o.webkit)==null?void 0:r.messageHandlers)==null?void 0:a[E];if(!n)throw new A;const s=await n.postMessage({type:e,...t});if(!s.ok)throw b(s.error);return s.value}var i=new Map;function C(e,t){i.set(e,t)}function T(e){i.delete(e)}function x(){!globalThis.window||globalThis.window.__nectoBridgeDeliver||(globalThis.window.__nectoBridgeDeliver=(e,t)=>{var n;(n=i.get(e))==null||n.onEvent(t)},globalThis.window.__nectoBridgeStreamError=(e,t)=>{var s;const n=i.get(e);i.delete(e),(s=n==null?void 0:n.onError)==null||s.call(n,b(t))},globalThis.window.__nectoBridgeStreamEnd=e=>{i.delete(e)})}function N(){var n,s;return(((n=globalThis.document)==null?void 0:n.documentElement.lang)||((s=globalThis.navigator)==null?void 0:s.language)||"en").trim().toLowerCase().split(/[-_]/,1)[0]||"en"}function S(e){return(t,n={})=>{var o;return(((o=e[N()])==null?void 0:o[t])??t).replace(/\{([A-Za-z0-9_]+)\}/g,(r,a)=>n[a]===void 0?r:String(n[a]))}}x();function D(){return B()}function v(e){return e instanceof Error&&"code"in e}function I(){return l("context")}async function k(){await l("ready")}function w(){return{send(e,t={}){return l("invoke",{operationID:e,input:t})},async subscribe(e,t={},n,s){const o=await l("subscribe",{operationID:e,input:t});return C(o,{onEvent:n,onError:s}),{id:o,async unsubscribe(){T(o),await l("unsubscribe",{subscriptionID:o})}}}}}function _(e,t){var n;return((n=e.operations.find(s=>s.id===t))==null?void 0:n.available)??!1}var d={isAvailable:D,context:I,ready:k,locale:N,createTranslator:S,isOperationAvailable:_,device:w(),desktop:w()};const c=S({ko:{"Desktop Shell Demo":"데스크탑 셸 데모",Waiting:"대기 중",Connected:"연결됨","Exact command":"정확한 명령어","Command approval compares this exact string. Change one character to make it a different command.":"명령별 승인은 이 문자열 전체를 비교해요. 한 글자만 달라져도 다른 명령어예요.","Request approval":"승인 요청","Request Full Access":"전체 허용 요청","Allow every Shell Demo command?":"Shell Demo의 모든 명령을 허용할까요?","Full Access lets this plugin run any shell command without asking again. Use it only to verify the broad permission flow.":"모든 셸 명령어를 다시 묻지 않고 실행해요. 전체 허용 동작을 검증할 때만 사용해 주세요.","All commands":"모든 명령어","Allow the Shell Demo greeting?":"Shell Demo 인사 명령을 허용할까요?","The demo uses printf to prove an approved command reaches Bash and returns stdout.":"printf로 승인한 명령어의 Bash 실행과 stdout 응답을 확인해요.","Run command":"명령 실행","Try unapproved command":"미승인 명령 실행","Last result":"최근 결과","Not run yet":"아직 실행하지 않았어요","Verification flow":"검증 순서","Run first to see PERMISSION_DENIED in Protected mode.":"먼저 실행해 보호 모드의 PERMISSION_DENIED를 확인해 주세요.","Request approval and accept the native Necto dialog.":"승인을 요청하고 Necto 확인 창에서 허용해 주세요.","Run again to see stdout and exitCode 0.":"다시 실행해 stdout과 exitCode 0을 확인해 주세요.","Try the unapproved command to prove exact matching.":"미승인 명령어를 실행해 문자열이 정확히 일치해야 하는지 확인해 주세요.",Notice:"알림","This plugin only works inside Necto":"이 플러그인은 Necto 안에서만 동작해요."}}),m="/usr/bin/printf 'Hello from Necto Shell Demo\\n'",L="/usr/bin/printf 'This exact command was not approved\\n'";function R(e){return[["stdout",e.stdout||"—"],["stderr",e.stderr||"—"],["exitCode",e.exitCode]]}for(const e of document.querySelectorAll("[data-i18n]"))e.textContent=c(e.dataset.i18n??"");function p(){return document.getElementById("shell-command")}function u(e){const t=document.getElementById("result");t&&t.replaceChildren(...e.map(([n,s])=>{const o=document.createElement("div"),r=document.createElement("dt"),a=document.createElement("dd");return r.textContent=n,a.textContent=String(s),o.append(r,a),o}))}function f(e){const t=document.getElementById("failure");if(!t)return;const n=v(e)?e.code:"UNKNOWN",s=v(e)?e.message:String(e);t.replaceChildren();const o=document.createElement("div");o.className="necto-notice necto-notice-danger";const r=document.createElement("div"),a=document.createElement("span"),h=document.createElement("p");a.className="necto-notice-title",a.textContent=n,h.textContent=s,r.append(a,h),o.append(r),t.append(o)}function g(){var e;(e=document.getElementById("failure"))==null||e.replaceChildren()}async function q(){var t;const e=((t=p())==null?void 0:t.value)??m;g();try{const n=await d.desktop.send("shell.request",{commands:[e],title:c("Allow the Shell Demo greeting?"),message:c("The demo uses printf to prove an approved command reaches Bash and returns stdout.")});u([["approved",String(n.approved)],["commands",n.approvedCommands.join(` `)||"—"]])}catch(n){f(n)}}async function O(){g();try{const e=await d.desktop.send("shell.request",{access:"fullAccess",title:c("Allow every Shell Demo command?"),message:c("Full Access lets this plugin run any shell command without asking again. Use it only to verify the broad permission flow.")});u([["fullAccess",String(e.approved)],["commands",c("All commands")]])}catch(e){f(e)}}async function y(e){g();try{const t=await d.desktop.send("shell.execute",{command:e});u(R(t))}catch(t){f(t)}}async function F(){var n,s,o,r;const e=p();if(e&&(e.value=m),!d.isAvailable()){u([[c("Notice"),c("This plugin only works inside Necto")]]);return}const t=document.getElementById("bridge-status");t&&(t.className="necto-status necto-status-ok",t.textContent=c("Connected")),(n=document.getElementById("request-access"))==null||n.addEventListener("click",()=>void q()),(s=document.getElementById("request-full-access"))==null||s.addEventListener("click",()=>void O()),(o=document.getElementById("run-command"))==null||o.addEventListener("click",()=>{var a;y(((a=p())==null?void 0:a.value)??m)}),(r=document.getElementById("run-unapproved"))==null||r.addEventListener("click",()=>void y(L)),await d.ready()}F(); diff --git a/WebPackages/BuiltInPlugins/src/control/src/localization.ts b/WebPackages/BuiltInPlugins/src/control/src/localization.ts index 9cf757c..306df46 100644 --- a/WebPackages/BuiltInPlugins/src/control/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/control/src/localization.ts @@ -14,10 +14,10 @@ export const t = createTranslator({ "Custom position": "직접 지정", "X (left to right)": "X (왼쪽 → 오른쪽)", "Y (top to bottom)": "Y (위 → 아래)", - "Use 0–1 within the visible target. Swipe starts here and stops at its edge.": "보이는 요소 안의 위치를 0~1로 입력하세요. 스와이프는 이 위치에서 시작하며 요소 경계를 넘지 않습니다.", + "Use 0–1 within the visible target. Swipe starts here and stops at its edge.": "요소 안의 위치를 0~1로 입력해 주세요. 스와이프는 이 위치에서 시작해 요소 경계에서 멈춰요.", "Use position.x and position.y between 0 and 1": "X와 Y를 0~1 사이로 입력해 주세요.", - "There is no room to swipe in that direction": "해당 방향으로 스와이프할 공간이 없습니다.", - "There is not enough room for these fingers at this position": "이 위치에는 지정한 손가락 수만큼 터치할 공간이 없습니다.", + "There is no room to swipe in that direction": "이 방향으로 스와이프할 공간이 없어요.", + "There is not enough room for these fingers at this position": "이 위치에는 지정한 손가락 수만큼 터치할 공간이 없어요.", Fingers: "손가락 수", "Tap count": "탭 횟수", "Use 1–5 fingers and 1–3 taps": "손가락 수는 1~5개, 탭 횟수는 1~3회로 입력해 주세요.", @@ -31,22 +31,22 @@ export const t = createTranslator({ "↓ Swipe down": "↓ 아래로 스와이프", "← Swipe left": "← 왼쪽으로 스와이프", "→ Swipe right": "→ 오른쪽으로 스와이프", - "Arrows show finger movement. Swipe up to reveal content below.": "화살표는 손가락을 움직이는 방향입니다. 위로 밀면 아래쪽 내용이 보입니다.", + "Arrows show finger movement. Swipe up to reveal content below.": "화살표는 손가락을 움직이는 방향이에요. 위로 밀면 아래쪽 내용이 보여요.", "Distance ratio": "이동 거리 비율", "Duration (ms)": "동작 시간 (ms)", "Sending input…": "입력 전달 중…", - "Input sent · accessibility content changed": "입력 전달됨 · 접근성 내용이 바뀌었습니다", - "Input sent · no accessibility change observed": "입력 전달됨 · 접근성 내용의 변화는 확인되지 않았습니다", - "Another action is in progress": "다른 동작이 실행 중입니다.", - "The target changed. Refresh Control before acting.": "요소가 바뀌었습니다. 새로고침한 뒤 다시 선택해 주세요.", - "The target is covered by another view. Refresh Control before acting.": "다른 화면이 요소를 가리고 있습니다. 새로고침한 뒤 다시 선택해 주세요.", - "The text field did not receive focus. Refresh Control before acting.": "입력란에 포커스가 이동하지 않았습니다. 새로고침한 뒤 다시 선택해 주세요.", + "Input sent · accessibility content changed": "입력 전달됨 · 접근성 내용 변경됨", + "Input sent · no accessibility change observed": "입력 전달됨 · 접근성 변화 확인 안 됨", + "Another action is in progress": "다른 동작이 실행 중이에요.", + "The target changed. Refresh Control before acting.": "요소가 바뀌었어요. 새로고침한 뒤 다시 선택해 주세요.", + "The target is covered by another view. Refresh Control before acting.": "다른 화면이 요소를 가리고 있어요. 새로고침한 뒤 다시 선택해 주세요.", + "The text field did not receive focus. Refresh Control before acting.": "입력란에 포커스가 이동하지 않았어요. 새로고침한 뒤 다시 선택해 주세요.", Actions: "조작", "Read accessibility": "접근성 읽기", Read: "조회", "Filter accessibility content": "접근성 내용 검색", - "No accessibility content": "읽을 수 있는 접근성 정보가 없습니다", - "Read the current screen to check text and values.": "현재 화면을 조회해 텍스트와 값을 확인하세요.", + "No accessibility content": "읽을 수 있는 접근성 정보가 없어요", + "Read the current screen to check text and values.": "현재 화면을 조회해 텍스트와 값을 확인해 주세요.", Role: "역할", Label: "레이블", Value: "값", @@ -58,19 +58,19 @@ export const t = createTranslator({ Element: "요소", "Loading…": "조회 중…", "Filter elements": "요소 검색", - "No actionable elements": "조작할 수 있는 요소가 없습니다", - "Refresh to find controls on the current screen.": "새로고침해 현재 화면의 요소를 확인하세요.", + "No actionable elements": "조작할 수 있는 요소가 없어요", + "Refresh to find controls on the current screen.": "새로고침해 현재 화면의 요소를 확인해 주세요.", Elements: "요소", Button: "버튼", "Scroll area": "스크롤 영역", Screen: "화면", Refresh: "새로고침", - "Nothing matches": "일치하는 요소가 없습니다", + "Nothing matches": "일치하는 요소가 없어요", "Resize the detail pane": "상세 패널 크기 조절", "Close details": "상세 닫기", "Text input": "텍스트 입력", - "Secure value is hidden": "비밀번호 값은 표시하지 않습니다", - "The element moved. Refresh Control before acting.": "요소 위치가 바뀌었습니다. 새로고침한 뒤 다시 선택해 주세요.", - "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작합니다.", + "Secure value is hidden": "비밀번호 값은 표시하지 않아요", + "The element moved. Refresh Control before acting.": "요소 위치가 바뀌었어요. 새로고침한 뒤 다시 선택해 주세요.", + "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작해요.", }, }); diff --git a/WebPackages/BuiltInPlugins/src/event-log/src/localization.ts b/WebPackages/BuiltInPlugins/src/event-log/src/localization.ts index d9de135..8272615 100644 --- a/WebPackages/BuiltInPlugins/src/event-log/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/event-log/src/localization.ts @@ -17,8 +17,8 @@ export const t = createTranslator({ "Resize event detail": "이벤트 상세 높이 조절", "Close event detail": "이벤트 상세 닫기", Clear: "비우기", - "Nothing logged yet": "아직 기록된 이벤트가 없습니다", - "Events the connected app records appear here as they happen.": "연결된 앱이 기록한 이벤트가 실시간으로 표시됩니다.", + "Nothing logged yet": "아직 기록된 이벤트가 없어요", + "Events the connected app records appear here as they happen.": "연결된 앱이 기록한 이벤트가 실시간으로 표시돼요.", Time: "시간", Level: "레벨", Tag: "태그", @@ -27,8 +27,8 @@ export const t = createTranslator({ Metadata: "메타데이터", Source: "출처", "Loading…": "불러오는 중…", - "Nothing else was recorded.": "추가로 기록된 내용이 없습니다.", + "Nothing else was recorded.": "추가로 기록된 내용이 없어요.", "Show full value": "전체 보기", - "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작합니다.", + "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작해요.", }, }); diff --git a/WebPackages/BuiltInPlugins/src/files/src/localization.ts b/WebPackages/BuiltInPlugins/src/files/src/localization.ts index a12d246..787d163 100644 --- a/WebPackages/BuiltInPlugins/src/files/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/files/src/localization.ts @@ -6,8 +6,8 @@ import { createTranslator } from "@necto/bridge"; export const t = createTranslator({ ko: { - "Nothing here": "표시할 파일이 없습니다", - "This directory is empty.": "이 디렉터리는 비어 있습니다.", + "Nothing here": "표시할 파일이 없어요", + "This directory is empty.": "이 디렉터리는 비어 있어요.", "{count} item": "{count}개 항목", "{count} items": "{count}개 항목", "Resize the detail pane": "상세 패널 크기 조절", @@ -25,12 +25,12 @@ export const t = createTranslator({ Size: "크기", Modified: "수정 시간", Created: "생성 시간", - "Binary — described rather than rendered": "바이너리 — 화면 대신 정보만 표시합니다", + "Binary — described rather than rendered": "바이너리 — 화면 대신 정보만 표시해요", "Preview · the head of the file": "미리보기 · 파일 앞부분", Image: "이미지", "Preview of {name}": "{name} 미리보기", Contents: "내용", Saved: "저장됨", - "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작합니다.", + "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작해요.", }, }); diff --git a/WebPackages/BuiltInPlugins/src/network-logger/src/localization.ts b/WebPackages/BuiltInPlugins/src/network-logger/src/localization.ts index 9fe565d..e4ab1e7 100644 --- a/WebPackages/BuiltInPlugins/src/network-logger/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/network-logger/src/localization.ts @@ -13,11 +13,11 @@ export const t = createTranslator({ copied: "복사됨", failed: "실패", fail: "실패", - "Nothing recorded.": "기록된 내용이 없습니다.", - "No {side} body.": "{side} 본문이 없습니다.", + "Nothing recorded.": "기록된 내용이 없어요.", + "No {side} body.": "{side} 본문이 없어요.", request: "요청", response: "응답", - "Binary body.": "바이너리 본문입니다.", + "Binary body.": "바이너리 본문이에요.", truncated: "일부만 표시", Method: "메서드", State: "상태", @@ -31,11 +31,11 @@ export const t = createTranslator({ "Filter by method, host or path": "메서드, 호스트 또는 경로 필터", "Filter requests": "요청 필터", Clear: "비우기", - "No requests yet": "아직 요청이 없습니다", - "Make a request in the connected app and it appears here.": "연결된 앱에서 요청을 보내면 여기에 표시됩니다.", + "No requests yet": "아직 요청이 없어요", + "Make a request in the connected app and it appears here.": "연결된 앱에서 요청을 보내면 여기에 표시돼요.", "Resize the detail pane": "상세 패널 크기 조절", "Close details": "상세 닫기", "Loading…": "불러오는 중…", - "No command available.": "사용 가능한 명령이 없습니다.", + "No command available.": "사용 가능한 명령어가 없어요.", }, }); diff --git a/WebPackages/BuiltInPlugins/src/performance-monitor/src/localization.ts b/WebPackages/BuiltInPlugins/src/performance-monitor/src/localization.ts index fdfdba2..79f9a7b 100644 --- a/WebPackages/BuiltInPlugins/src/performance-monitor/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/performance-monitor/src/localization.ts @@ -9,18 +9,18 @@ export const t = createTranslator({ "1 m": "1분", "5 m": "5분", "1 h": "1시간", - "Live while this panel is open": "패널이 열려 있는 동안 실시간으로 측정합니다", - "not enough readings yet": "아직 측정값이 부족합니다", + "Live while this panel is open": "패널이 열려 있는 동안 실시간으로 측정해요", + "not enough readings yet": "아직 측정값이 부족해요", steady: "변화 없음", "{direction} {value} {unit} in {minutes} m": "{minutes}분 동안 {direction} {value} {unit}", - "Nothing measured yet": "아직 측정된 항목이 없습니다", - "The connected app decides which metrics and sampler to provide.": "연결된 앱이 제공할 측정 항목과 수집 방식을 결정합니다.", + "Nothing measured yet": "아직 측정된 항목이 없어요", + "The connected app decides which metrics and sampler to provide.": "연결된 앱이 제공할 측정 항목과 수집 방식을 결정해요.", "▼ under {budget} {unit}": "▼ {budget} {unit} 미만", "▲ over {budget} {unit}": "▲ {budget} {unit} 초과", Memory: "메모리", "{footprint} MB footprint · {resident} MB resident": "footprint {footprint} MB · 상주 {resident} MB", - "Memory detail unavailable": "메모리 상세 정보를 사용할 수 없습니다", - "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작합니다.", + "Memory detail unavailable": "메모리 상세 정보를 사용할 수 없어요", + "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작해요.", CPU: "CPU", "Frame rate": "프레임률", "Frame time": "프레임 시간", diff --git a/WebPackages/BuiltInPlugins/src/plugin-sample/src/localization.ts b/WebPackages/BuiltInPlugins/src/plugin-sample/src/localization.ts index 248c2fa..5cbc9d3 100644 --- a/WebPackages/BuiltInPlugins/src/plugin-sample/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/plugin-sample/src/localization.ts @@ -6,31 +6,31 @@ import { createTranslator } from "@necto/bridge"; export const t = createTranslator({ ko: { - Bridge: "브릿지", + Bridge: "브리지", States: "상태", Context: "컨텍스트", "Loading…": "불러오는 중…", "Query · host.info": "쿼리 · host.info", Run: "실행", - "Not run yet": "아직 실행하지 않았습니다", + "Not run yet": "아직 실행하지 않았어요", "Stream · host.ticks": "스트림 · host.ticks", Start: "시작", Stop: "중지", "0 events": "이벤트 0개", - "Not started": "시작하지 않았습니다", + "Not started": "시작하지 않았어요", "Make it fail": "실패 상태 만들기", - "Every refusal below is real: the call is made and Necto turns it down. This is what a plugin's error handling has to survive.": "아래 거절은 모두 실제 호출 결과입니다. Necto가 요청을 거절할 때 플러그인의 오류 처리가 견뎌야 하는 상태를 보여줍니다.", + "Every refusal below is real: the call is made and Necto turns it down. This is what a plugin's error handling has to survive.": "실제로 요청을 보내고 거절된 결과를 표시해요. 플러그인의 오류 처리를 확인해 주세요.", "Unknown operation": "알 수 없는 오퍼레이션", "Bad input": "잘못된 입력", Empty: "비어 있음", - "Nothing to show": "표시할 내용이 없습니다", - "What a plugin looks like before its first result.": "플러그인이 첫 결과를 받기 전의 모습입니다.", + "Nothing to show": "표시할 내용이 없어요", + "What a plugin looks like before its first result.": "플러그인이 첫 결과를 받기 전의 모습이에요.", failed: "실패", "{count} event": "이벤트 {count}개", "{count} events": "이벤트 {count}개", - "Necto allowed it. That is itself worth knowing.": "Necto가 요청을 허용했습니다. 이것도 확인할 가치가 있습니다.", + "Necto allowed it. That is itself worth knowing.": "Necto가 요청을 허용했어요.", Notice: "알림", - "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작합니다.", + "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작해요.", "none selected": "선택되지 않음", }, }); diff --git a/WebPackages/BuiltInPlugins/src/preferences/src/localization.ts b/WebPackages/BuiltInPlugins/src/preferences/src/localization.ts index 0258434..3c7b3e9 100644 --- a/WebPackages/BuiltInPlugins/src/preferences/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/preferences/src/localization.ts @@ -8,10 +8,10 @@ export const t = createTranslator({ ko: { "Filter keys": "키 필터", "{shown} of {total}": "{total}개 중 {shown}개", - "Nothing matches": "일치하는 항목이 없습니다", - "Nothing stored": "저장된 값이 없습니다", - "No key contains that text.": "해당 텍스트를 포함하는 키가 없습니다.", - "Keys the app stores appear here.": "앱이 저장한 키가 여기에 표시됩니다.", + "Nothing matches": "일치하는 항목이 없어요", + "Nothing stored": "저장된 값이 없어요", + "No key contains that text.": "해당 텍스트를 포함하는 키가 없어요.", + "Keys the app stores appear here.": "앱이 저장한 키가 여기에 표시돼요.", Key: "키", Type: "타입", Value: "값", @@ -23,17 +23,17 @@ export const t = createTranslator({ Copy: "복사", Copied: "복사됨", Failed: "실패", - "Not a valid {type}": "올바른 {type} 값이 아닙니다", + "Not a valid {type}": "올바른 {type} 값이 아니에요", "Item {index}": "항목 {index}", "Remove item": "항목 삭제", "+ Add item": "+ 항목 추가", "Remove pair": "키-값 삭제", "+ Add pair": "+ 키-값 추가", - "A pair is missing its key": "키가 비어 있는 항목이 있습니다", + "A pair is missing its key": "키가 비어 있는 항목이 있어요", "Duplicate key '{key}'": "중복된 키 '{key}'", - "{value} — not editable from here": "{value} — 여기서는 편집할 수 없습니다", + "{value} — not editable from here": "{value} — 여기서는 편집할 수 없어요", Suite: "저장소", Save: "저장", - "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작합니다.", + "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작해요.", }, }); diff --git a/WebPackages/BuiltInPlugins/src/shell-demo/src/localization.ts b/WebPackages/BuiltInPlugins/src/shell-demo/src/localization.ts index 8d3b52e..7648ed4 100644 --- a/WebPackages/BuiltInPlugins/src/shell-demo/src/localization.ts +++ b/WebPackages/BuiltInPlugins/src/shell-demo/src/localization.ts @@ -6,28 +6,28 @@ import { createTranslator } from "@necto/bridge"; export const t = createTranslator({ ko: { - "Desktop Shell Demo": "데스크톱 셸 데모", + "Desktop Shell Demo": "데스크탑 셸 데모", Waiting: "대기 중", Connected: "연결됨", "Exact command": "정확한 명령어", - "Command approval compares this exact string. Change one character to make it a different command.": "명령별 승인은 이 문자열 전체를 비교합니다. 한 글자만 달라져도 다른 명령어입니다.", + "Command approval compares this exact string. Change one character to make it a different command.": "명령별 승인은 이 문자열 전체를 비교해요. 한 글자만 달라져도 다른 명령어예요.", "Request approval": "승인 요청", "Request Full Access": "전체 허용 요청", "Allow every Shell Demo command?": "Shell Demo의 모든 명령을 허용할까요?", - "Full Access lets this plugin run any shell command without asking again. Use it only to verify the broad permission flow.": "전체 허용은 이 플러그인이 다시 묻지 않고 모든 셸 명령어를 실행할 수 있게 합니다. 넓은 권한 흐름을 검증할 때만 사용하세요.", + "Full Access lets this plugin run any shell command without asking again. Use it only to verify the broad permission flow.": "모든 셸 명령어를 다시 묻지 않고 실행해요. 전체 허용 동작을 검증할 때만 사용해 주세요.", "All commands": "모든 명령어", "Allow the Shell Demo greeting?": "Shell Demo 인사 명령을 허용할까요?", - "The demo uses printf to prove an approved command reaches Bash and returns stdout.": "이 데모는 printf 명령으로 승인된 명령어가 Bash까지 전달되고 stdout이 돌아오는지 확인합니다.", + "The demo uses printf to prove an approved command reaches Bash and returns stdout.": "printf로 승인한 명령어의 Bash 실행과 stdout 응답을 확인해요.", "Run command": "명령 실행", "Try unapproved command": "미승인 명령 실행", "Last result": "최근 결과", - "Not run yet": "아직 실행하지 않았습니다", + "Not run yet": "아직 실행하지 않았어요", "Verification flow": "검증 순서", - "Run first to see PERMISSION_DENIED in Protected mode.": "먼저 실행해 보호 모드의 PERMISSION_DENIED를 확인합니다.", - "Request approval and accept the native Necto dialog.": "승인을 요청하고 Necto 네이티브 다이얼로그에서 허용합니다.", - "Run again to see stdout and exitCode 0.": "다시 실행해 stdout과 exitCode 0을 확인합니다.", - "Try the unapproved command to prove exact matching.": "미승인 명령을 실행해 정확한 문자열 비교를 확인합니다.", + "Run first to see PERMISSION_DENIED in Protected mode.": "먼저 실행해 보호 모드의 PERMISSION_DENIED를 확인해 주세요.", + "Request approval and accept the native Necto dialog.": "승인을 요청하고 Necto 확인 창에서 허용해 주세요.", + "Run again to see stdout and exitCode 0.": "다시 실행해 stdout과 exitCode 0을 확인해 주세요.", + "Try the unapproved command to prove exact matching.": "미승인 명령어를 실행해 문자열이 정확히 일치해야 하는지 확인해 주세요.", Notice: "알림", - "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작합니다.", + "This plugin only works inside Necto": "이 플러그인은 Necto 안에서만 동작해요.", }, }); diff --git a/WebPackages/CreateNectoPlugin/src/create-project.js b/WebPackages/CreateNectoPlugin/src/create-project.js index f5edb24..9658516 100644 --- a/WebPackages/CreateNectoPlugin/src/create-project.js +++ b/WebPackages/CreateNectoPlugin/src/create-project.js @@ -82,7 +82,8 @@ async function assertEmpty(directory) { async function renderDirectory(source, destination, replacements) { await mkdir(destination, { recursive: true }); for (const entry of await readdir(source, { withFileTypes: true })) { - const outputName = replace(entry.name, replacements); + // npm excludes .gitignore files from packed templates. + const outputName = entry.name === "gitignore" ? ".gitignore" : replace(entry.name, replacements); const sourcePath = resolve(source, entry.name); const destinationPath = resolve(destination, outputName); diff --git a/WebPackages/CreateNectoPlugin/templates/desktop/.gitignore b/WebPackages/CreateNectoPlugin/templates/desktop/gitignore similarity index 100% rename from WebPackages/CreateNectoPlugin/templates/desktop/.gitignore rename to WebPackages/CreateNectoPlugin/templates/desktop/gitignore diff --git a/WebPackages/CreateNectoPlugin/templates/device/.gitignore b/WebPackages/CreateNectoPlugin/templates/device/gitignore similarity index 100% rename from WebPackages/CreateNectoPlugin/templates/device/.gitignore rename to WebPackages/CreateNectoPlugin/templates/device/gitignore diff --git a/WebPackages/CreateNectoPlugin/tests/cli.test.js b/WebPackages/CreateNectoPlugin/tests/cli.test.js index 23b68c3..b116a58 100644 --- a/WebPackages/CreateNectoPlugin/tests/cli.test.js +++ b/WebPackages/CreateNectoPlugin/tests/cli.test.js @@ -8,13 +8,14 @@ import { existsSync, mkdtempSync, readdirSync, rmSync } from "node:fs"; import { tmpdir } from "node:os"; import { resolve } from "node:path"; import test from "node:test"; +import { fileURLToPath } from "node:url"; const cli = new URL("../bin/create-necto-plugin.js", import.meta.url); function run(t, args) { const cwd = mkdtempSync(resolve(tmpdir(), "necto-generator-cli-")); t.after(() => rmSync(cwd, { recursive: true, force: true })); - return { cwd, ...spawnSync(process.execPath, [cli.pathname, ...args], { + return { cwd, ...spawnSync(process.execPath, [fileURLToPath(cli), ...args], { cwd, encoding: "utf8", timeout: 10_000, }) }; } diff --git a/WebPackages/CreateNectoPlugin/tests/package.test.js b/WebPackages/CreateNectoPlugin/tests/package.test.js new file mode 100644 index 0000000..0eceeda --- /dev/null +++ b/WebPackages/CreateNectoPlugin/tests/package.test.js @@ -0,0 +1,51 @@ +// +// Copyright (c) 2026 Viva Republica, Inc. +// + +import assert from "node:assert/strict"; +import { execFileSync, execSync } from "node:child_process"; +import { mkdtemp, readFile, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { resolve } from "node:path"; +import test from "node:test"; +import { fileURLToPath, pathToFileURL } from "node:url"; + +test("the packed generator creates projects that ignore generated files", async (t) => { + const directory = await mkdtemp(resolve(tmpdir(), "necto-packed-generator-")); + t.after(() => rm(directory, { recursive: true, force: true })); + const [{ filename }] = JSON.parse(execSync("npm pack --ignore-scripts --json", { + cwd: fileURLToPath(new URL("..", import.meta.url)), + encoding: "utf8", + env: { + ...process.env, + npm_config_pack_destination: directory, + npm_config_cache: resolve(directory, "cache"), + }, + })); + execFileSync("tar", ["-xzf", resolve(directory, filename), "-C", directory]); + const { createProject } = await import(pathToFileURL(resolve(directory, "package/src/create-project.js")).href); + + for (const type of ["device", "desktop"]) { + await t.test(type, async () => { + const project = await createProject({ name: "HostStatus", type, cwd: resolve(directory, type) }); + const ignore = await readFile(resolve(project.directory, ".gitignore"), "utf8"); + assert.doesNotMatch(ignore, /__[A-Z_]+__/); + await assert.rejects(readFile(resolve(project.directory, "gitignore")), { code: "ENOENT" }); + const paths = type === "desktop" + ? ["node_modules/example/index.js", "dist/index.html"] + : [ + "node_modules/example/index.js", ".build/debug/example", "DerivedData/example", "Package.resolved", + "Sources/HostStatusPlugin/Panel/assets/main.js", + "Sources/HostStatusPlugin/Panel/index.html", + "Sources/HostStatusPlugin/Panel/manifest.json", + ]; + execFileSync("git", ["init", "--quiet"], { cwd: project.directory }); + const ignored = execFileSync("git", ["-c", "core.excludesFile=", "check-ignore", "--no-index", "--stdin"], { + cwd: project.directory, + input: `${paths.join("\n")}\npackage.json\nsrc/main.ts\nSources/HostStatusPlugin/HostStatusPlugin.swift\n`, + encoding: "utf8", + }); + assert.deepEqual(ignored.trim().split(/\r?\n/), paths); + }); + } +}); diff --git a/docs/architecture.md b/docs/architecture.md index dc68f41..9077865 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -56,6 +56,8 @@ handlers and manifest bindings, not a feature-specific host adapter or wire mess | `NectoUIControlPlugin` | UI inspection, interaction and iOS touch runtime | Other plugins | | `NectoProcessMetricPlugin` | Optional CPU, memory, FPS and thread sampling | Starting unless the app registers it and a reader subscribes | | `NectoURLSessionCapturePlugin` | One capture mechanism, for apps using `URLSession` | Capture that an app cannot disable | +| `necto-core`, `necto-android` | The Android bridge: protocol, runtime, ADB listener and app identity | Feature implementations or panels | +| `SDK/Plugins/` | One plugin on both platforms: its built panel, Swift target and Gradle module | Another plugin | | `Necto/` | Shell UI and the plugin host | Feature screens | | `ExampleApp/` | Verifying connection and plugins on a device | Product features | diff --git a/docs/design.md b/docs/design.md index 759c46f..2685476 100644 --- a/docs/design.md +++ b/docs/design.md @@ -168,6 +168,15 @@ surface, not both. `--necto-selected` plus an ink bar down the leading edge. Selection is never colour alone. +Sidebar group labels scroll with their rows; they do not use pinned, blurred headers. +Device, plugin, and Settings rows share an 8pt outer inset. Inner padding is 8pt +on the leading edge and 16pt on the trailing edge, leaving room beside versions +and status dots. The native list adds no extra horizontal inset. +The sidebar uses slim native overlay scrollbars, so switching between short and +long lists does not shift their trailing content. +Settings body rows have 8pt padding on all sides, with separators spanning the +row width outside that padding. + **Tables** are compact, fixed layout, and truncate with an ellipsis rather than wrapping. Headers are caption sized, secondary coloured, sticky, and not uppercased. @@ -183,6 +192,16 @@ ship an icon set through the bridge. disconnected targets, including simulators. The icon beside the name identifies the target type. +**Update availability** uses a red dot at the trailing edge of Settings and the +matching settings page: General for the app, Desktop Plugins for plugins. General +also marks the Necto row under About. Desktop plugin updates mark their row under +Available updates; plugin navigation rows keep their versions aligned without dots. Dots share the connection indicator's fixed size. Leave +space between each dot and the edge. +Opening a page does not clear it. Pair the dot with an accessible update label and +the update action on that page. Progress appears only in the Necto row under General. +App downloads show byte-based progress; unknown lengths and later installation steps +use a native indeterminate bar. See `docs/design/updater.html`. + **Buttons** are quiet until needed. A destructive action reads as plain text and only colours itself when the pointer is on it. @@ -195,6 +214,12 @@ actions outside the scrolling editor so the data gets the usable area. **Empty state** says what is missing and what to do next, in two lines at most. It never advertises features. +**Copy** uses short labels and explains the effect of a control in one sentence +where possible. Korean descriptions use the polite conversational form; buttons +and status labels stay brief. Keep permissions and consequences in confirmation +dialogs, and avoid repeating implementation details in settings descriptions. +Keep placeholders, command names, and error codes intact when localizing. + **Search and filters** belong on growing logs and lookup-heavy lists. Search matches the summary text already in memory; it never fetches detail payloads as an index. Stable facets such as level, status and kind are separate filters and combine with diff --git a/docs/design/gallery.css b/docs/design/gallery.css index a516514..2cc9ea3 100644 --- a/docs/design/gallery.css +++ b/docs/design/gallery.css @@ -116,6 +116,9 @@ code { padding: 1px 4px; border-radius: 3px; background: var(--necto-base-05); f /* Settings sits at the foot of the sidebar, away from the things that change. */ .side-foot { margin-top: auto; padding-top: var(--necto-space-2); border-top: 1px solid var(--necto-border); } +.update-dot { display: inline-block; flex: none; margin-left: auto; margin-right: var(--necto-space-2); width: calc(var(--necto-space-1) * 1.5); height: calc(var(--necto-space-1) * 1.5); border-radius: 50%; background: var(--necto-danger); } +.necto-trailing + .update-dot { margin-left: 0; } +.necto-sidebar-item .update-dot { margin-right: 0; } /* An icon reads as part of the name, not as its own column. */ .named { display: inline-flex; align-items: center; gap: 6px; } @@ -127,7 +130,7 @@ h3.stepped { margin: var(--necto-space-5) 0 var(--necto-space-1); font-size: 14p .gallery-network-list th:nth-child(n+4), .gallery-network-list td:nth-child(n+4) { display: none; } } -.gallery-plugin-group { display:flex; align-items:center; justify-content:space-between; } +.gallery-plugin-group { display:flex; align-items:center; justify-content:space-between; padding-right:var(--necto-space-5); } .gallery-plugin-search { margin-left:auto; display:flex; padding:0; border:0; background:none; color:inherit; cursor:pointer; } .gallery-plugin-search-popover { width:280px; diff --git a/docs/design/gallery.js b/docs/design/gallery.js index c5a1057..31e4459 100644 --- a/docs/design/gallery.js +++ b/docs/design/gallery.js @@ -222,7 +222,8 @@ const pluginSearchButton = ``; -const sidebar = (onSettings = false) => ` +const updateDot = ''; +const sidebar = (onSettings = false, hasUpdate = false) => `
${lights}
@@ -258,7 +259,7 @@ const sidebar = (onSettings = false) => `
- +
`; @@ -391,21 +392,21 @@ const desktopPlugins = [ /// Two columns inside one screen: what you are configuring on the left, the settings /// themselves on the right. One flat list stopped working the moment plugins arrived — /// appearance and plugin management have nothing to do with each other. -const settingsNav = (current) => ` +const settingsNav = (current, updates = false) => `
- + - +
`; -const generalPage = () => ` +const generalPage = (updates = false) => `

Appearance

Language -

Changes Necto's native interface. Plugins manage their own language.

+

Necto's display language. Plugins use their own language settings.

Code font -

Used for code, values and plugin data.

+

Font for code, values and plugin data.

@@ -455,21 +456,24 @@ const generalPage = () => `

About

-
Necto
+
Necto + ${updates ? '

Version 0.2.2 is available. Necto restarts after updating.

' : ''} +
- + 0.1.0
+ ${updates ? updateDot : ""}
Protocol -

The wire version this build speaks.

+

Version used to communicate with connected apps.

1
Command line tool -

Adds necto and necto-cli to /usr/local/bin. macOS will ask for administrator approval.

+

Use necto or necto-cli in your terminal. Installation requires administrator approval.

@@ -488,9 +492,9 @@ const generalPage = () => `
`; -const pluginsPage = () => ` +const pluginsPage = (updates = false) => `
-

Installed

+

Installed plugins

@@ -509,11 +513,18 @@ const pluginsPage = () => `
OnName
-

Add and edit

+

Install and manage

+ +
+
Install from GitHub +

Install using a repository or release URL.

+
+ +
-
Install -

Install a built desktop plugin from a folder or zip file. Necto does not verify the source or check for updates for file installs. Device plugins must be included in the app's Swift package.

+
Install from a file +

Install from a folder or ZIP file. Source verification and update checks are not available.

@@ -522,13 +533,28 @@ const pluginsPage = () => `
Plugins folder -

After adding or changing a plugin folder, reload and approve the plugin. Deleting its folder also removes its permissions.

+

Reload after adding or changing a plugin folder.

+
+
Updates +

Check for updates to plugins installed from GitHub.

+
+ +
+ ${updates ? ` +

Available updates

+
+
Target Notes +

Version 0.2.0 is available.

+
+ + ${updateDot} +
` : ""}
`; const shellCallers = [ @@ -589,17 +615,17 @@ const shellDetailPage = () => `
`; -const settingsPane = (page = "general") => ` +const settingsPane = (page = "general", updates = false) => `
${gearIcon}Settings
- ${settingsNav(page)} - ${page === "general" ? generalPage() : page === "plugins" ? pluginsPage() : page === "shell-detail" ? shellDetailPage() : shellAccessPage()} + ${settingsNav(page, updates)} + ${page === "general" ? generalPage(updates) : page === "plugins" ? pluginsPage(updates) : page === "shell-detail" ? shellDetailPage() : shellAccessPage()}
`; -document.getElementById("settings").innerHTML = `
${sidebar(true)}${settingsPane("general")}
`; -document.getElementById("settings-plugins").innerHTML = `
${sidebar(true)}${settingsPane("plugins")}
`; +document.getElementById("settings").innerHTML = `
${sidebar(true, true)}${settingsPane("general", true)}
`; +document.getElementById("settings-plugins").innerHTML = `
${sidebar(true, true)}${settingsPane("plugins", true)}
`; document.getElementById("settings-shell").innerHTML = `
${sidebar(true)}${settingsPane("shell")}
`; document.getElementById("settings-shell-detail").innerHTML = `
${sidebar(true)}${settingsPane("shell-detail")}
`; diff --git a/docs/design/updater.html b/docs/design/updater.html index b3bb357..5beb320 100644 --- a/docs/design/updater.html +++ b/docs/design/updater.html @@ -9,148 +9,120 @@
- rendered from WebPackages/Bridge/theme.css + components.css + Necto update indicators
- - - + + +
-
-

Necto · design proposal

-

The update lives where the version lives

-

- No new screen. When a release is out, an Update button appears beside - Settings at the foot of the sidebar — one click downloads, verifies - against the published hash, installs and relaunches. The About row in - Settings mirrors the same state with the detail. -

+

Necto · design guide

+

Updates in Settings

+

A red dot beside Settings points to an available update. General shows app updates; Desktop Plugins shows plugin updates. Opening a page keeps its dot until the update is installed.

-
-
-
Device Plugins
-
Events
-
Network
-
+
-
-

Settings › About

-
- Necto - - + + +
+

About

+
+
Necto

+ + + 0.3.2 +
-

- One state, two places: the sidebar button acts, the About row explains. -

-
+

Download percentages use received bytes. Unknown sizes, verification, installation and relaunch use an indeterminate bar.

+
-
- - diff --git a/docs/install.md b/docs/install.md index 46868a1..703e415 100644 --- a/docs/install.md +++ b/docs/install.md @@ -47,9 +47,10 @@ output is committed, so building the app alone does not require Node. ## Connect an app **Your own app**, with the SDK wired per [setup.md](setup.md) — launch it in a -simulator or attach the device over USB. The app appears in Necto's sidebar when connected. +simulator or an emulator, or attach the device over USB. The app appears in Necto's +sidebar when connected. -**No app yet** — run the bundled example app in a simulator. +**No app yet** — run the bundled example app in an iOS simulator. ```bash xcrun simctl list devices available # pick a device id @@ -59,6 +60,15 @@ xcrun simctl install Build/Products/Debug-iphonesimulator/ExampleApp xcrun simctl launch im.toss.necto.example ``` +Or run the Android sample on an emulator or a USB device. This needs JDK 17 and the +Android SDK. + +```bash +SDK/Android/gradlew -p SDK/Android :sample:assembleDebug +adb install -r SDK/Android/sample/build/outputs/apk/debug/sample-debug.apk +adb shell am start -n im.toss.necto.sample/.MainActivity +``` + ## Watch the first request Select the app in the sidebar and open the **Network** panel. Requests appear @@ -80,6 +90,10 @@ responses to rejected requests. - On a device, a `connectionRefused` result means the tunnel reached the device but nothing was listening — the expected answer when the app is not running. +- For an Android app, Necto needs `adb`. It looks in `ANDROID_HOME`, `ANDROID_SDK_ROOT` + and `~/Library/Android/sdk`. `adb devices` must list the device as `device`, on a USB + cable or as a local emulator; wireless ADB is not used. The app must be a debuggable + build, because the SDK does nothing in any other. - [verification.md](verification.md) covers the full checklist. ## Where next diff --git a/docs/ko/architecture.md b/docs/ko/architecture.md index e79aaee..0ce6ecf 100644 --- a/docs/ko/architecture.md +++ b/docs/ko/architecture.md @@ -56,6 +56,8 @@ NectoPluginRegistry | `NectoUIControlPlugin` | UI 조회·조작과 iOS 터치 런타임 | 다른 플러그인 | | `NectoProcessMetricPlugin` | 선택적인 CPU, 메모리, FPS, 스레드 샘플링 | 앱에 등록되거나 리더가 구독하기 전의 샘플링 | | `NectoURLSessionCapturePlugin` | `URLSession`을 쓰는 앱을 위한 하나의 캡처 메커니즘 | 앱에서 끌 수 없는 캡처 기능 | +| `necto-core`, `necto-android` | Android 브리지: 프로토콜, 런타임, ADB 리스너, 앱 식별 | 기능 구현이나 패널 | +| `SDK/Plugins/` | 두 플랫폼의 플러그인 하나: 빌드된 패널, Swift 타깃, Gradle 모듈 | 다른 플러그인 | | `Necto/` | 셸 UI와 플러그인 호스트 | 기능 화면 | | `ExampleApp/` | 디바이스에서 연결과 플러그인 검증 | 제품 기능 | diff --git a/docs/ko/harness.md b/docs/ko/harness.md index e148cac..e34a936 100644 --- a/docs/ko/harness.md +++ b/docs/ko/harness.md @@ -47,6 +47,9 @@ Mac host ── runtime ──┬─ host bridge storage, targets, shell **검사** — Swift 패키지의 실제 의존성과 외부 패키지에서의 SDK 사용을 확인해요. 기능별 모듈 분리는 코드 리뷰에서 확인하며, 주석이나 식별자 표기를 테스트하지는 않아요. +Android는 `script/test-android-consumer`가 게시된 의존성 그래프와 독립 소비자 앱의 +패널을 확인해요. `necto-core`와 `necto-android`는 기능 모듈에 의존하면 안 되고, +보고용 플러그인이 선택 사항인 캡처 어댑터를 끌어오면 안 돼요. ```bash node --test script/tests/package.test.mjs diff --git a/docs/ko/install.md b/docs/ko/install.md index 8596729..f17b838 100644 --- a/docs/ko/install.md +++ b/docs/ko/install.md @@ -46,10 +46,10 @@ open Build/Products/Debug/Necto.app ## 앱 연결하기 -**내 앱** — [setup.md](setup.md)대로 SDK를 연결했다면, 시뮬레이터에서 +**내 앱** — [setup.md](setup.md)대로 SDK를 연결했다면, 시뮬레이터나 에뮬레이터에서 실행하거나 실기기를 USB로 연결하세요. 연결되면 Necto 사이드바에 앱이 나타나요. -**아직 앱이 없다면** — 시뮬레이터에서 예제 앱을 실행해요. +**아직 앱이 없다면** — iOS 시뮬레이터에서 예제 앱을 실행해요. ```bash xcrun simctl list devices available # 디바이스 id를 하나 골라요 @@ -59,6 +59,15 @@ xcrun simctl install Build/Products/Debug-iphonesimulator/ExampleApp xcrun simctl launch im.toss.necto.example ``` +Android 샘플을 에뮬레이터나 USB 기기에서 실행해도 돼요. JDK 17과 Android SDK가 +필요해요. + +```bash +SDK/Android/gradlew -p SDK/Android :sample:assembleDebug +adb install -r SDK/Android/sample/build/outputs/apk/debug/sample-debug.apk +adb shell am start -n im.toss.necto.sample/.MainActivity +``` + ## 첫 요청 확인하기 사이드바에서 앱을 선택하고 **Network** 패널을 열어 보세요. 요청은 시작하는 @@ -78,6 +87,10 @@ xcrun simctl launch im.toss.necto.example Xcode의 Signing & Capabilities를 확인하세요. SDK 연결보다 앞선 단계의 문제예요. - 실기기에서 `connectionRefused`가 나오면 터널은 기기까지 연결됐지만 앱이 수신 대기 중이지 않다는 뜻이에요. 앱이 실행 중이 아닐 때의 정상 응답이에요. +- Android 앱은 Necto가 `adb`를 찾을 수 있어야 해요. `ANDROID_HOME`, `ANDROID_SDK_ROOT`, + `~/Library/Android/sdk` 순서로 찾아요. `adb devices`에 기기가 `device` 상태로 + 보여야 하고, USB 기기나 로컬 에뮬레이터만 연결해요. 무선 ADB는 쓰지 않아요. + debuggable 빌드가 아니면 SDK가 아무 일도 하지 않으니 디버그 빌드인지 확인하세요. - 전체 체크리스트는 [verification.md](verification.md)에 있어요. ## 다음 단계 diff --git a/docs/ko/plugin-manifest.md b/docs/ko/plugin-manifest.md index c362feb..4abac5c 100644 --- a/docs/ko/plugin-manifest.md +++ b/docs/ko/plugin-manifest.md @@ -69,7 +69,8 @@ 바인딩에 따라 플러그인을 배포하는 방식이 달라져요. - **디바이스 플러그인.** `necto.device.*`를 바인딩하는 플러그인은 구현을 담은 - Swift 패키지의 `Panel` 리소스로 배포해요. 앱이 패키지를 링크하고 플러그인을 + 패키지(iOS는 Swift 패키지, Android는 Gradle 모듈)의 `Panel` 리소스로 배포해요. + 앱이 패키지를 링크하고 플러그인을 등록하면 Necto가 연결된 앱에서 패널을 가져와 표시해요. 패널과 구현은 같은 커밋의 같은 패키지에 포함돼요. 웹 소스가 바뀌면 커밋하는 에셋도 다시 빌드하고 등록한 계약과 함께 검증하세요. @@ -89,7 +90,7 @@ 관리해요. `com.example.notes`처럼 안정적인 소문자 역도메인 ID를 권장해요. 이 형식은 관례이며 도메인 소유권을 확인하지는 않아요. 허용 형식은 여전히 `[A-Za-z0-9._-]+`이고 짧은 ID도 호환되며 매니페스트에 UUID를 쓸 필요는 없어요. -ID를 바꾸면 업데이트가 아닌 다른 플러그인이 돼요. Swift와 매니페스트의 ID는 같아야 해요. +ID를 바꾸면 업데이트가 아닌 다른 플러그인이 돼요. 코드의 플러그인 ID와 매니페스트의 ID는 같아야 해요. | 출처 | 권한 식별 기준 | 신뢰를 결정하는 주체 | | --- | --- | --- | diff --git a/docs/ko/publishing.md b/docs/ko/publishing.md index d5806f3..2d36d2e 100644 --- a/docs/ko/publishing.md +++ b/docs/ko/publishing.md @@ -5,8 +5,8 @@ 설치하는 사람은 Necto의 Settings → Desktop Plugins에 저장소 주소를 붙여넣어요. -디바이스 플러그인은 이렇게 배포하지 않아요. 태그에 달린 Swift 패키지로 앱에 -들어가니까, 이쪽은 태그가 곧 릴리스예요. +디바이스 플러그인은 이렇게 배포하지 않아요. 앱이 링크하는 패키지(Swift 패키지나 +Gradle 모듈)로 앱에 들어가니까, 이쪽은 태그가 곧 릴리스예요. ## 태그로 배포하기 @@ -44,7 +44,7 @@ necto-cli plugin pack dist ``` `necto.device.*`에 바인딩하는 패널은 거부해요. `pack`은 데스크탑 플러그인만 -다루며 디바이스 플러그인은 앱의 Swift 패키지로 배포해요. +다루며 디바이스 플러그인은 앱이 링크하는 패키지로 배포해요. 검사를 통과하면 다음에 실행할 `gh` 명령어를 출력해요. 배포 전에 설치를 시험하려면 Necto를 실행한 상태에서 로컬 폴더나 ZIP을 전달하세요. diff --git a/docs/ko/tutorial-device.md b/docs/ko/tutorial-device.md index 86b002a..e51e1ff 100644 --- a/docs/ko/tutorial-device.md +++ b/docs/ko/tutorial-device.md @@ -1,11 +1,14 @@ # 2부 — 첫 디바이스 플러그인 [1부](tutorial-desktop.md)에서는 플러그인이 온전히 Mac에서 실행됐어요. 이번 -플러그인은 앱 안에 실려요. 디바이스 플러그인은 구현과 웹 패널을 함께 담은 +플러그인은 앱 안에 실려요. iOS에서 디바이스 플러그인은 구현과 웹 패널을 함께 담은 Swift 패키지 하나예요. 앱이 패키지를 링크하고 플러그인을 등록하면 앱이 연결되어 있는 동안 패널이 Necto에 나타나요. Mac 쪽에는 아무것도 설치되지 않아요 — 두 종류의 차이는 [plugin-manifest.md](plugin-manifest.md)가 설명해요. +아래 단계는 플러그인을 Swift로 작성해요. Android 앱이라면 계약과 패널을 똑같이 만든 +다음 [Android에서 같은 플러그인 만들기](#android)에서 Kotlin으로 응답을 구현하세요. + **Uptime**은 앱 실행 시간을 보여 주는 패널이에요. 종류별로 오퍼레이션을 하나씩 구현해요. @@ -425,6 +428,127 @@ Refresh를 누르면 다시 조회해요. 패널은 연결된 앱에서 가져 플러그인을 기여하거나 브리지를 바꿀 때는 [harness.md](harness.md)의 규칙과 검증 방법을 확인하세요. + + +## Android에서 같은 플러그인 만들기 + +Android 앱은 Swift 패키지 대신 Kotlin 코드와 Java 리소스로 플러그인을 실어요. +[계약](#계약)과 [패널](#패널)은 그대로 써요. Kotlin 플러그인이 같은 id로 같은 +오퍼레이션 두 개에 응답하므로 한 번 빌드한 패널을 두 플랫폼이 함께 써요. + +[setup.md](setup.md#android)대로 JitPack을 설정하고 디버그 빌드에 `necto-android`를 +추가해요. 플러그인 API가 들어 있는 `necto-core`가 함께 따라오므로 직접 만든 +플러그인에는 다른 모듈이 필요하지 않아요. + +```kotlin +// app/build.gradle.kts +val nectoVersion = "COMMIT_OR_TAG" +dependencies { + debugImplementation("com.github.toss.necto:necto-android:$nectoVersion") +} +``` + +[`NectoPlugin`](https://github.com/toss/necto/blob/main/SDK/Android/necto-core/src/main/kotlin/im/toss/necto/sdk/NectoPlugin.kt)이 +요구하는 것은 Swift와 같아요. `id`와 `register(necto)`를 구현하고 `panel`의 기본값은 +`null`이에요. 클래스는 의존성과 마찬가지로 debug 소스 세트에 두세요. + +`app/src/debug/kotlin/com/example/UptimePlugin.kt` + +```kotlin +package com.example + +import im.toss.necto.model.jsonObject +import im.toss.necto.model.jsonOf +import im.toss.necto.sdk.NectoPlugin +import im.toss.necto.sdk.NectoPluginPanel +import im.toss.necto.sdk.NectoRegistrar +import kotlinx.coroutines.delay +import java.time.Duration +import java.time.Instant + +/** How long the app has been running, asked once or watched live. */ +class UptimePlugin : NectoPlugin { + override val id = "uptime" + + private val startedAt = Instant.now() + + override val panel: NectoPluginPanel = + NectoPluginPanel.resources("panels/uptime", UptimePlugin::class.java.classLoader!!) + + override fun register(necto: NectoRegistrar) { + necto.handle("uptime.get") { + jsonObject( + "startedAt" to jsonOf(startedAt.toString()), + "uptimeSeconds" to jsonOf(uptimeSeconds()), + ) + } + + necto.stream("uptime.observe") { _, out -> + while (true) { + out.send(jsonObject("uptimeSeconds" to jsonOf(uptimeSeconds()))) + delay(1000) + } + } + } + + private fun uptimeSeconds(): Double = + Duration.between(startedAt, Instant.now()).toMillis() / 1000.0 +} +``` + +Kotlin에서는 메서드로 종류를 구분해요. `handle`은 한 번 응답하고 `stream`은 본문이 +반환하거나 호출자가 구독을 취소할 때까지 스트리밍해요. 구독을 취소하면 본문을 실행하던 +코루틴도 취소돼 루프가 끝나요. 페이로드는 `jsonObject`와 `jsonOf`로 만든 +`NectoJsonValue`예요. + +### 패널 싣기 + +`NectoPluginPanel.resources("panels/uptime", …)`는 앱의 Java 리소스에서 패널을 읽어요. +리소스 폴더는 실행 중에 목록을 조회할 수 없어서 인덱스가 필요해요. +`panels/uptime/files.txt`에 패널 파일마다 그 폴더 기준 상대 경로를 한 줄씩 적어요. + +Necto가 제공하는 모듈은 이 리소스와 인덱스를 +[`NectoPanelResources`](https://github.com/toss/necto/blob/main/SDK/Android/buildSrc/src/main/kotlin/NectoPanelResources.kt)로 +생성해요. 이 Gradle 태스크는 저장소의 `buildSrc`에만 있고 배포되지 않아요. 내 앱에서는 +빌드된 패널을 debug 리소스로 복사하고 인덱스를 직접 만들어요. 앱 프로젝트 루트에서 +실행하세요. + +```bash +panel=app/src/debug/resources/panels/uptime +mkdir -p "$panel" +cp -R /necto-uptime-plugin/Sources/NectoUptimePlugin/Panel/. "$panel" +(cd "$panel" && find . -type f ! -name '.*' ! -name files.txt | sed 's|^\./||' | sort > files.txt) +``` + +이제 `files.txt`에 `index.html`, `manifest.json`, `assets/` 아래 파일이 나열돼요. 패널을 +빌드할 때마다 다시 실행하세요. 인덱스에 없는 파일은 제공되지 않고 인덱스에 적힌 파일이 +없으면 패널 전체를 읽지 못해요. +[샘플 앱](https://github.com/toss/necto/blob/main/SDK/Android/sample/build.gradle.kts)에서 +같은 작업을 Gradle 태스크로 하는 방법을 볼 수 있어요. + +### 등록하고 실행하기 + +[setup.md](setup.md#android)의 debug `NectoSetup`에서 `NectoAndroid.start`에 플러그인을 +넘겨요. 목록의 플러그인을 등록하고 수신 대기를 시작해요. debuggable 빌드가 아니면 +경고만 로그로 남겨요. + +```kotlin +// app/src/debug/kotlin/com/example/NectoSetup.kt +NectoAndroid.start(app, listOf(UptimePlugin())) +``` + +디버그 빌드를 에뮬레이터나 USB 기기에 설치한 다음 앱을 실행해요. + +```bash +./gradlew :app:installDebug +``` + +Necto가 실행 중이면 사이드바에 앱과 **Uptime**이 나타나요. 나타나지 않으면 +[install.md](install.md)에서 Necto가 Android 앱을 찾는 조건을 확인하세요. +[플러그인 검증하기](#플러그인-검증하기)의 체크도 두 가지만 바꿔 그대로 적용해요. 순서는 +패널 빌드, 복사와 인덱스 생성, 앱 재설치예요. 그리고 에뮬레이터의 ADB 연결은 USB가 +아니므로 USB 경로는 실기기에서 실행해 확인하세요. + ## 다음으로 - [plugin-manifest.md](plugin-manifest.md) — 매니페스트 전체 레퍼런스예요. diff --git a/docs/ko/verification.md b/docs/ko/verification.md index 29ab6f0..eff308b 100644 --- a/docs/ko/verification.md +++ b/docs/ko/verification.md @@ -27,6 +27,7 @@ | 앱까지 도달하는 모든 변경 | `script/build` 실행 후, 앱 실행하기 | | SDK의 공개 API | 시뮬레이터를 부팅한 상태에서 `script/build`로 ExampleApp의 SDK 연동까지 빌드하기 | | 연결 수명주기, CLI의 디바이스 오퍼레이션 | `script/test e2e` | +| Android SDK, Mac의 Android 연결 | `SDK/Android/gradlew -p SDK/Android build` 실행 후, 아래 Android 검사 | | 계약 변경 | 같은 커밋에서 픽스처 업데이트하기 | `script/test`는 Swift·Vitest 단위 테스트, 네이티브 캐시·WebView 통합 테스트, @@ -66,7 +67,7 @@ Simulator를 열고 부팅이 끝나면 테스트용 ExampleApp(`im.toss.necto.e 제한 시간 안에 연결과 응답을 확인해요. 로그와 테스트 결과는 `Build/E2E/Logs`에 남아요. 로컬에서는 별도로 실행하며 기본 `script/test`에는 포함하지 않아요. -CI에서는 Mac·SDK 잡이 끝나면 `Simulator Connection & CLI E2E`를 실행해요. +CI에서는 Mac·iOS SDK 잡이 끝나면 `iOS Simulator Connection & CLI E2E`를 실행해요. Mac 잡은 앱·CLI·테스트 번들을, SDK 잡은 ExampleApp을 전달해요. 같은 워크플로 실행의 아티팩트를 받아 `test-without-building`으로 재빌드 없이 검증해요. 실행 권한과 번들 내부 심볼릭 링크를 유지하도록 압축해서 전달해요. @@ -100,6 +101,29 @@ SDK는 8개 포트 범위에서 빈 포트를 선택하고 Mac은 8개 모두 터널이 기기까지 연결됐지만 앱이 수신 대기 중이지 않다는 뜻이에요. 앱이 실행 중이 아닐 때 나오는 정상 응답이에요. +### Android 연결 + +에뮬레이터를 부팅하거나 USB 기기를 연결한 뒤 실행해요. + +```bash +script/android-sample +``` + +Android 샘플과 별도의 Necto.app(`im.toss.necto.android-sample`)을 빌드하고, 샘플을 +설치·실행한 뒤 그 Necto를 Ctrl-C까지 띄워 둬요. 이 Necto는 ADB로 샘플을 직접 찾아요. +실행 중인 상태에서 다른 터미널로 아래 스크립트를 돌려요. + +| 스크립트 | 확인하는 것 | +| --- | --- | +| `script/test-android-sample` | `necto-cli`로 기본 패널의 모든 오퍼레이션 호출, 스트림 취소와 재구독, 잘못된 입력 거부, 강제 종료 시 타깃이 사라지고 재실행 시 돌아오는지 | +| `script/test-android-security` | 비공개 소켓에 붙는 비정상 피어: 응답 없는 핸드셰이크, 제한을 벗어난 프레임, 깊은 중첩, 멈춘 프레임, 과도한 동시 요청. 모두 끊기고 다음 연결은 정상이어야 해요 | +| `script/test-android-artifacts` | SDK AAR이 권한을 선언하지 않는지, 플러그인 모듈이 자기 패널만 싣는지. 실행 중인 앱이 아니라 전체 Gradle 빌드가 필요해요 | +| `script/test-android-consumer` | 게시된 Maven 아티팩트로 만든 독립 앱 5개가 선택한 모듈만 해석하고 그 패널만 패키징하는지. `--jitpack `을 주면 로컬 게시물 대신 JitPack 아티팩트를 검사해요. 실행 중인 앱은 필요 없어요 | + +`script/android-sample --sdk-only`는 이미 빌드한 샘플을 Necto 호스트 없이 +설치하고 실행해요. `script/test-android-security`는 이 상태에서도 돌아가며, CI가 Mac +없이 에뮬레이터에서 SDK를 검사하는 방식이에요. + ## 플러그인 검증하기 CLI 설치·삭제 변경은 Settings → About의 명령을 실행한 뒤 `necto --help`, @@ -224,11 +248,21 @@ npm 압축 파일에는 `LICENSE`를, DMG와 앱의 `Contents/Resources`에는 공개 CI는 GitHub-hosted runner를 사용해요. Mac 잡의 앱과 테스트 번들에는 ad-hoc 서명을 사용하고 SDK 잡의 ExampleApp은 서명 없이 빌드해요. -`Check`의 작업은 `Mac Build & Tests`, `SDK Build & Tests`, -`Simulator Connection & CLI E2E`, `Web Plugins Build & Tests`, `Documentation Build`로 나뉘어요. -Mac·SDK·E2E는 `macos-26`에서 Xcode 26.6을 사용하고 -웹과 문서 빌드는 `ubuntu-24.04`에서 실행해요. -Node 22.12.0은 E2E를 제외한 네 작업에서, Yarn 4.6.0은 웹과 문서 빌드에서 사용해요. +`Check`의 작업은 `Mac Build & Tests`, `iOS SDK Build & Tests`, +`iOS Simulator Connection & CLI E2E`, `Web Plugins Build & Tests`, +`Android SDK Build & Tests`, `Android Emulator Connection E2E`, `Documentation Build`로 +나뉘어요. Mac·iOS SDK·iOS E2E는 `macos-26`에서 Xcode 26.6을 사용하고 +웹·Android·문서 작업은 `ubuntu-24.04`에서 실행해요. +Android 작업은 Temurin JDK 17로 `SDK/Android`에서 `./gradlew build`를 실행한 뒤 +`script/test-android-artifacts`와 `script/test-android-consumer`를 돌려요. +Android E2E 작업은 API 35 에뮬레이터를 부팅하고 +`script/android-sample emulator-5554 --sdk-only`로 샘플을 띄운 뒤 +`script/test-android-security`를 실행해요. Necto 호스트는 macOS가 필요한데 호스티드 Mac +러너에서는 에뮬레이터를 띄울 수 없어서, 호스트 없이 SDK에 직접 연결해 검사해요. +Node 22.12.0은 Mac·iOS SDK·웹·문서 작업에서, Yarn 4.6.0은 웹과 문서 빌드에서 사용해요. +릴리스 워크플로는 게시 후 `Android SDK on JitPack` 작업에서 JitPack에 새 태그의 빌드를 +요청하고 `script/test-android-consumer --jitpack `으로 결과를 검사해요. 이 +시점에는 릴리스가 이미 공개돼 있어서, 실패하면 재시도가 아니라 수정 릴리스가 필요해요. 문서 배포는 별도 워크플로에서 수동으로 실행하며 GitHub Pages는 Actions 배포로 설정해야 해요. 워크플로 파일을 추가한 것만으로 외부 환경에서 실행에 성공했다고 볼 수는 없어요. @@ -264,6 +298,8 @@ Dock에 고정하고 업데이트해 기존 PID가 종료된 뒤 새 PID가 시 - **시뮬레이터에서의 USB.** 시뮬레이터에는 usbmuxd 경로가 없어요. 루프백을 사용해요. +- **에뮬레이터에서의 Android USB.** 에뮬레이터의 ADB 전송은 USB가 아니에요. USB 경로를 + 검증했다고 하려면 실기기에서 Android 검사를 실행하세요. - **런타임 증거 없는 외형 확인.** 빌드나 정적 검사만으로 화면을 확인할 수는 없어요. Loupe나 권한이 허용된 캡처 경로를 사용하고 필요한 런타임 접근이나 화면 기록 권한이 없다면 미검증 범위를 명시하세요. diff --git a/docs/plugin-manifest.md b/docs/plugin-manifest.md index aa49c5a..4d93502 100644 --- a/docs/plugin-manifest.md +++ b/docs/plugin-manifest.md @@ -71,8 +71,9 @@ their existing behavior. A plugin reaches Necto one of two ways, and the way is decided by what it binds: -- **Device plugins.** Anything that binds `necto.device.*` ships inside the Swift - package that implements it, as a `Panel` resource next to the code. The app links +- **Device plugins.** Anything that binds `necto.device.*` ships inside the package + that implements it, a Swift package on iOS or a Gradle module on Android, as a + `Panel` resource next to the code. The app links the package and registers the plugin; Necto fetches the panel over the wire when the app connects and shows it for as long as the app offers it. The panel and its implementation are distributed together. Rebuild committed web assets when their @@ -92,7 +93,7 @@ without rebuilding the app. Use a stable lowercase reverse-domain ID, for example `com.example.notes`. This is a convention, not domain verification: `[A-Za-z0-9._-]+` remains the accepted format, short IDs remain compatible, and UUIDs are not required in manifests. Changing an -ID creates a different plugin, not an update. Keep the Swift and manifest IDs equal. +ID creates a different plugin, not an update. Keep the plugin's ID in code and in the manifest equal. | Source | Permission identity | Who establishes trust? | | --- | --- | --- | diff --git a/docs/publishing.md b/docs/publishing.md index 8b20ceb..b4de3a2 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -6,8 +6,9 @@ root. Attach it to a GitHub release; building and packaging do not require macOS Someone installs it by pasting your repository address into Necto, under Settings → Desktop Plugins. -Device plugins are not published this way. They reach an app through the Swift -package at your tag, so for those the tag is the release. +Device plugins are not published this way. They reach an app through the package it +links at your tag, a Swift package or a Gradle module, so for those the tag is the +release. ## From a tag @@ -45,7 +46,7 @@ necto-cli plugin pack dist ``` The `pack` command supports desktop plugins only and rejects `necto.device.*` -bindings. Device plugins ship in the app's Swift package. +bindings. Device plugins ship in the package the app links. After validation, it prints the `gh` command to run next. To try a built plugin locally before publishing, keep Necto running and use diff --git a/docs/tutorial-device.md b/docs/tutorial-device.md index d22b1c5..79aed11 100644 --- a/docs/tutorial-device.md +++ b/docs/tutorial-device.md @@ -1,10 +1,14 @@ # Part 2 — Your first device plugin In [Part 1](tutorial-desktop.md) the plugin ran entirely on the Mac; this one rides in -the app. A device plugin is one Swift package that carries both the implementation and -its web panel: the app links the package and registers the plugin, and the panel -appears in Necto while the app is connected. Nothing is installed on the Mac side — -[plugin-manifest.md](plugin-manifest.md) explains the two kinds. +the app. On iOS, a device plugin is one Swift package that carries both the +implementation and its web panel: the app links the package and registers the plugin, +and the panel appears in Necto while the app is connected. Nothing is installed on the +Mac side — [plugin-manifest.md](plugin-manifest.md) explains the two kinds. + +The steps below write the plugin in Swift. For an Android app, build the same contract +and panel, then answer them in Kotlin with +[The same plugin on Android](#the-same-plugin-on-android). We build **Uptime**: a panel that shows how long the app has been running. Two operations, one of each kind — @@ -423,6 +427,127 @@ The checks from [verification.md](verification.md) that apply here: When contributing a plugin or changing a bridge, follow the implementation rules and verification steps in [harness.md](harness.md). +## The same plugin on Android + +An Android app carries the plugin as Kotlin code and Java resources instead of a Swift +package. [The contract](#the-contract) and [the panel](#the-panel) stay as they are: +the Kotlin plugin uses the same id and answers the same two operations, so one built +panel serves both platforms. + +Add `necto-android` to the debug build, with JitPack configured as in +[setup.md](setup.md#android). It brings in `necto-core`, which holds the plugin API, so +a plugin of your own needs no other module. + +```kotlin +// app/build.gradle.kts +val nectoVersion = "COMMIT_OR_TAG" +dependencies { + debugImplementation("com.github.toss.necto:necto-android:$nectoVersion") +} +``` + +[`NectoPlugin`](https://github.com/toss/necto/blob/main/SDK/Android/necto-core/src/main/kotlin/im/toss/necto/sdk/NectoPlugin.kt) +asks for the same things as in Swift: an `id` and `register(necto)`, plus a `panel` that +defaults to `null`. Keep the class in the debug source set, next to the dependency. + +`app/src/debug/kotlin/com/example/UptimePlugin.kt`: + +```kotlin +package com.example + +import im.toss.necto.model.jsonObject +import im.toss.necto.model.jsonOf +import im.toss.necto.sdk.NectoPlugin +import im.toss.necto.sdk.NectoPluginPanel +import im.toss.necto.sdk.NectoRegistrar +import kotlinx.coroutines.delay +import java.time.Duration +import java.time.Instant + +/** How long the app has been running, asked once or watched live. */ +class UptimePlugin : NectoPlugin { + override val id = "uptime" + + private val startedAt = Instant.now() + + override val panel: NectoPluginPanel = + NectoPluginPanel.resources("panels/uptime", UptimePlugin::class.java.classLoader!!) + + override fun register(necto: NectoRegistrar) { + necto.handle("uptime.get") { + jsonObject( + "startedAt" to jsonOf(startedAt.toString()), + "uptimeSeconds" to jsonOf(uptimeSeconds()), + ) + } + + necto.stream("uptime.observe") { _, out -> + while (true) { + out.send(jsonObject("uptimeSeconds" to jsonOf(uptimeSeconds()))) + delay(1000) + } + } + } + + private fun uptimeSeconds(): Double = + Duration.between(startedAt, Instant.now()).toMillis() / 1000.0 +} +``` + +Here the method picks the kind: `handle` answers once, and `stream` answers until its +body returns or the caller stops listening, which cancels the coroutine running the +body and ends the loop. Payloads are `NectoJsonValue`, built with `jsonObject` and +`jsonOf`. + +### Carry the panel + +`NectoPluginPanel.resources("panels/uptime", …)` reads the panel from the app's Java +resources. Resource folders cannot be listed at run time, so it needs an index: +`panels/uptime/files.txt`, naming each panel file by its path relative to that folder, +one per line. + +The modules Necto ships generate both with +[`NectoPanelResources`](https://github.com/toss/necto/blob/main/SDK/Android/buildSrc/src/main/kotlin/NectoPanelResources.kt), +a Gradle task in the repository's own `buildSrc` that is not published. In your own +app, copy the built panel into the debug resources and write the index yourself, from +the app project's root: + +```bash +panel=app/src/debug/resources/panels/uptime +mkdir -p "$panel" +cp -R /necto-uptime-plugin/Sources/NectoUptimePlugin/Panel/. "$panel" +(cd "$panel" && find . -type f ! -name '.*' ! -name files.txt | sed 's|^\./||' | sort > files.txt) +``` + +`files.txt` now lists `index.html`, `manifest.json` and the files under `assets/`. Run +this again after every panel build: a file missing from the index is not served, and a +listed file that does not exist fails the whole panel. The +[sample app](https://github.com/toss/necto/blob/main/SDK/Android/sample/build.gradle.kts) +shows the Gradle task doing the same for an app's own panel. + +### Register and run + +Pass the plugin to `NectoAndroid.start` in the debug `NectoSetup` from +[setup.md](setup.md#android). It registers the listed plugins and starts listening; in +a build that is not debuggable it only logs a warning. + +```kotlin +// app/src/debug/kotlin/com/example/NectoSetup.kt +NectoAndroid.start(app, listOf(UptimePlugin())) +``` + +Install the debug build on an emulator or a USB device, then launch the app: + +```bash +./gradlew :app:installDebug +``` + +With Necto running, the app appears in the sidebar, and **Uptime** with it. If it does +not, [install.md](install.md) lists what Necto needs to find an Android app. The checks +in [Verify the plugin](#verify-the-plugin) apply with two differences. The order is +panel build, copy and index, then reinstall the app. And an emulator's ADB transport is +not USB, so run the plugin on a device before calling the USB path verified. + ## Where next - [plugin-manifest.md](plugin-manifest.md) — the full manifest reference: version diff --git a/docs/verification.md b/docs/verification.md index 656b5a9..8d60edc 100644 --- a/docs/verification.md +++ b/docs/verification.md @@ -110,7 +110,7 @@ Waits check observable state with deadlines, not fixed startup delays or perform thresholds. Build logs, command output and the test result bundle are in `Build/E2E/Logs`. E2E is opt-in locally and is not part of the default `script/test` run. -CI runs `Simulator Connection & CLI E2E` after the Mac and SDK jobs. The Mac job +CI runs `iOS Simulator Connection & CLI E2E` after the Mac and iOS SDK jobs. The Mac job uploads the app, CLI and test bundle; the SDK job uploads ExampleApp. E2E downloads those artifacts from the same workflow run and uses `test-without-building`. The CI jobs pin Xcode 26.6. E2E disables parallel testing and uses @@ -166,9 +166,13 @@ until Ctrl-C. While it runs, from another terminal: | --- | --- | | `script/test-android-sample` | Every shipped panel's operations through `necto-cli`, a stream cancelled and resubscribed, invalid input, then a force stop that removes the target and a relaunch that brings it back | | `script/test-android-security` | Malformed peers on the private socket: a silent handshake, frames outside the limits, deep nesting, a stalled frame, too many requests. Each is dropped and the next connection works | -| `script/test-android-artifacts` | No SDK AAR declares a permission, each plugin module carries only its own panel, the packaged panels equal the built ones, and only the debug sample is debuggable. Needs a full Gradle build, not a running app | +| `script/test-android-artifacts` | No SDK AAR declares a permission, and each plugin module carries only its own panel. Needs a full Gradle build, not a running app | | `script/test-android-consumer` | Five independent minified apps built from the published Maven artifacts resolve only the modules they select and package only those panels. `--jitpack ` checks JitPack's artifacts instead of a local publication. Needs no running app | +`script/android-sample --sdk-only` installs and launches an already built +sample without a Necto host. `script/test-android-security` runs against that too, which +is how CI checks the SDK on an emulator without a Mac. + ## Verifying a plugin For CLI lifecycle changes, click **Install CLI** in Settings → General → Command @@ -289,6 +293,10 @@ are reused; conflicting files stop the run for review. An upload failure leaves the release unpublished. Use **Re-run failed jobs** to retry publishing with the same build artifacts, retained for seven days. +After publishing, the `Android SDK on JitPack` job asks JitPack to build the new tag and +runs `script/test-android-consumer --jitpack ` against the result. The release +is already public by then, so a failure there calls for a fixed release, not a retry. + ### Local checks `script/test release` runs the release script in temporary fixtures with build, @@ -327,13 +335,17 @@ read this bundle value, not an independent source-code version. Public CI uses GitHub-hosted runners. The Mac job ad-hoc signs its app and test bundle; the SDK job builds ExampleApp without signing. -`Check` runs six jobs: `Mac Build & Tests`, `SDK Build & Tests`, -`Simulator Connection & CLI E2E`, `Web Plugins Build & Tests`, -`Android SDK Build & Tests`, and `Documentation Build`. -Mac, SDK and E2E use Xcode 26.6 on `macos-26`; web, Android and documentation builds use -`ubuntu-24.04`. The Android job uses Temurin JDK 17 and runs `./gradlew build` in -`SDK/Android`, then `script/test-android-artifacts` and `script/test-android-consumer`. The four non-E2E jobs use Node 22.12.0, and web and documentation -builds use Yarn 4.6.0. +`Check` runs seven jobs: `Mac Build & Tests`, `iOS SDK Build & Tests`, +`iOS Simulator Connection & CLI E2E`, `Web Plugins Build & Tests`, +`Android SDK Build & Tests`, `Android Emulator Connection E2E`, and `Documentation Build`. +The Mac, iOS SDK and iOS E2E jobs use Xcode 26.6 on `macos-26`; the web, Android and +documentation jobs use `ubuntu-24.04`. The Android job uses Temurin JDK 17 and runs +`./gradlew build` in `SDK/Android`, then `script/test-android-artifacts` and +`script/test-android-consumer`. The Android E2E job boots an API 35 emulator, starts the +sample with `script/android-sample emulator-5554 --sdk-only` and runs +`script/test-android-security`. It speaks to the SDK directly: the Necto host needs +macOS, and hosted Mac runners cannot run an emulator. The Mac, iOS SDK, web and +documentation jobs use Node 22.12.0, and web and documentation builds use Yarn 4.6.0. Documentation deployment remains a separate manual workflow. GitHub Pages must be configured to deploy from Actions. Workflow files alone do not prove a successful run on those machines. diff --git a/script/android-sample b/script/android-sample index ccb2031..bcb222c 100755 --- a/script/android-sample +++ b/script/android-sample @@ -2,12 +2,15 @@ # Builds the Android sample and a separate Necto.app, installs the sample on a USB device # or a local emulator, and runs that Necto until Ctrl-C. Necto finds the sample through # ADB itself, as it finds any debuggable app that carries the SDK. +# +# --sdk-only installs and launches an already built sample and stops there, for checks +# that speak to the SDK directly and need no Mac. set -euo pipefail cd "$(dirname "$0")/.." -serial="${1:?Usage: script/android-sample ADB_SERIAL [--no-build]}" +serial="${1:?Usage: script/android-sample ADB_SERIAL [--no-build|--sdk-only]}" mode="${2:-build}" -case "$mode" in build|--no-build) ;; *) echo "Unknown option: $mode" >&2; exit 2 ;; esac +case "$mode" in build|--no-build|--sdk-only) ;; *) echo "Unknown option: $mode" >&2; exit 2 ;; esac sdk="${ANDROID_HOME:-${ANDROID_SDK_ROOT:-$HOME/Library/Android/sdk}}" adb="$sdk/platform-tools/adb" [[ -x "$adb" ]] || { echo "Set ANDROID_HOME to an installed Android SDK." >&2; exit 1; } @@ -47,10 +50,24 @@ fi host="$out/Products/Debug/Necto.app/Contents/MacOS/Necto" cli="$PWD/NectoMac/.build/debug/necto-cli" -[[ -x "$host" && -x "$cli" ]] || { echo "Build first: run without --no-build." >&2; exit 1; } +if [[ "$mode" != --sdk-only ]]; then + [[ -x "$host" && -x "$cli" ]] || { echo "Build first: run without --no-build." >&2; exit 1; } +fi run install "$adb" -s "$serial" install -r SDK/Android/sample/build/outputs/apk/debug/sample-debug.apk run launch "$adb" -s "$serial" shell am start -W -n im.toss.necto.sample/.MainActivity +if [[ "$mode" == --sdk-only ]]; then + cat >"$out/current-run.json" <"$out/Logs/host.log" 2>&1 & diff --git a/script/test-android-artifacts b/script/test-android-artifacts index 1799ba3..c848581 100755 --- a/script/test-android-artifacts +++ b/script/test-android-artifacts @@ -1,20 +1,13 @@ #!/usr/bin/env python3 -"""Verify what the Android build ships: the SDK asks for no permissions, carries the -built panels unchanged, and the sample is debuggable in debug builds only.""" -import argparse +"""Verify what the Android build ships: no SDK module asks for a permission, and each +plugin module carries its own panel and nothing else.""" import json import io -import os from pathlib import Path -import subprocess import zipfile root = Path(__file__).resolve().parent.parent android = root / "SDK/Android" -sdk = Path(os.environ.get("ANDROID_HOME", Path.home() / "Library/Android/sdk")) -parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument("--aapt", default=str(sdk / "build-tools/35.0.0/aapt")) -args = parser.parse_args() results = {} # A plugin owns its panel; the bridge and capture adapters carry no unrelated assets. @@ -45,7 +38,6 @@ def directory(module): android_modules = {"necto-android", "necto-files-plugin", "necto-ui-control-plugin", "necto-process-metric-plugin", "necto-datastore-preferences-plugin"} modules = ["necto-core", "necto-plugin-support", "necto-android", "necto-okhttp-capture-plugin", "necto-process-metric-plugin", *plugins] -compared = 0 for module in modules: if module in android_modules: artifact = directory(module) / f"build/outputs/aar/{module}-release.aar" @@ -63,26 +55,9 @@ for module in modules: assert carried == ({expected_id} if expected_id else set()), (module, carried) if module == "necto-core": assert not any(name.startswith("im/toss/necto/plugins/") for name in archive.namelist()) - if expected_id: - panel = directory(module).parent / "Panel" - override = directory(module) / f"src/main/panel-manifests/{expected_id}.json" - for file in sorted(path for path in panel.rglob("*") if path.is_file()): - relative = file.relative_to(panel).as_posix() - expected = override.read_bytes() if relative == "manifest.json" and override.exists() else file.read_bytes() - assert archive.read(f"necto/panels/{expected_id}/{relative}") == expected, (module, relative) - compared += 1 results[module] = dict(bytes=artifact.stat().st_size, panels=sorted(carried)) -results["panels"] = dict(files=compared) - -# Necto starts in debuggable builds only, so a release must not be debuggable. -for variant, suffix in (("debug", ""), ("release", "-unsigned")): - apk = android / f"sample/build/outputs/apk/{variant}/sample-{variant}{suffix}.apk" - badging = subprocess.check_output([args.aapt, "dump", "badging", str(apk)], text=True) - debuggable = "application-debuggable" in badging.splitlines() - assert debuggable == (variant == "debug"), f"Unexpected debuggable flag in {variant}" - results[variant] = dict(debuggable=debuggable) output = root / "Build/Android/artifact-results.json" output.parent.mkdir(parents=True, exist_ok=True) output.write_text(json.dumps(results, indent=2)) -print(f"PASS: optional modules carry only their own panels, no SDK permissions, {compared} panel files match, debuggable in debug only") +print("PASS: no SDK module declares a permission, and each plugin module carries only its own panel") diff --git a/script/test-android-security b/script/test-android-security index add8936..d30f760 100755 --- a/script/test-android-security +++ b/script/test-android-security @@ -91,15 +91,20 @@ def invoke(client, request_id, operation, kind="once"): }}) -expected_host = out / "Products/Debug/Necto.app/Contents/MacOS/Necto" -command = subprocess.check_output(["ps", "-p", str(run["pid"]), "-o", "command="], text=True).strip() -assert command == str(expected_host), "The recorded host is no longer running" +# A Necto host holds the sample's one session, so it is paused for the duration. A run +# started with --sdk-only has no host. +host = run.get("pid") +if host is not None: + expected_host = out / "Products/Debug/Necto.app/Contents/MacOS/Necto" + command = subprocess.check_output(["ps", "-p", str(host), "-o", "command="], text=True).strip() + assert command == str(expected_host), "The recorded host is no longer running" def terminate(signum, _frame): raise SystemExit(128 + signum) signal.signal(signal.SIGTERM, terminate) -os.kill(run["pid"], signal.SIGSTOP) +if host is not None: + os.kill(host, signal.SIGSTOP) try: adb("shell", "am", "force-stop", "im.toss.necto.sample") adb("shell", "am", "start", "-W", "-n", "im.toss.necto.sample/.MainActivity") @@ -147,7 +152,8 @@ try: assert "events" in reply["payload"]["output"] results["recoversWithoutAppRestart"] = True finally: - os.kill(run["pid"], signal.SIGCONT) + if host is not None: + os.kill(host, signal.SIGCONT) subprocess.run([run["adb"], "-s", run["serial"], "forward", "--remove", "localfilesystem:" + socket_path], capture_output=True, timeout=10) shutil.rmtree(private, ignore_errors=True)