Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .fvmrc

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,6 @@ jobs:
run: dart pub publish --dry-run
working-directory: ${{ steps.tag.outputs.directory }}

# Only Noir carries bundled native binaries. They are committed, not
# built, so this is a repackaging — but the next job proves the packaged
# copy actually loads, and it does so while the upload can still be
# stopped.
- name: Package tracked native assets
if: >-
steps.preflight.outputs.publish == 'true'
&& steps.tag.outputs.package == 'noir'
timeout-minutes: 2
shell: bash
run: tar -czf "opentui-binaries-$RELEASE_TAG.tar.gz" native native_manifest.json LICENSE THIRD_PARTY_NOTICES.md third_party
env:
RELEASE_TAG: ${{ github.ref_name }}

- name: Upload package-test assets
if: >-
steps.preflight.outputs.publish == 'true'
Expand Down
2 changes: 1 addition & 1 deletion GOALS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Noir quality standard

This document is the durable standard for Noir. The current candidate is
described at the top of [`CHANGELOG.md`](CHANGELOG.md); open work lives in
described at the top of [`CHANGELOG.md`](packages/noir/CHANGELOG.md); open work lives in
GitHub issues and pull requests.

## Architectural invariant
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the required checks and

## License

MIT. See [LICENSE](LICENSE) and
BSD 3-Clause. See [LICENSE](LICENSE) and
[the third-party notices](packages/noir/THIRD_PARTY_NOTICES.md).
6 changes: 0 additions & 6 deletions packages/noir/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ analyzer:
- test/fixtures/source_package_consumer/**
- tool/mcp_fixtures/**
- tool/mcp_inspector/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

linter:
rules:
Expand Down
6 changes: 6 additions & 0 deletions packages/noir/example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Examples are not the published API. Keep every other package lint.
include: ../analysis_options.yaml

linter:
rules:
public_member_api_docs: false
1 change: 0 additions & 1 deletion packages/noir/example/autocomplete_demo.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Run with: dart run example/autocomplete_demo.dart
// The initial `noi` query demonstrates application-owned debounce and stale
// response protection. Type to replace or refine it, Tab into suggestions,
// use arrows to move, Enter or click to choose, and Escape to clear results or
Expand Down
2 changes: 0 additions & 2 deletions packages/noir/example/components_demo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Run with: dart run example/components_demo.dart
//
// Tab and Shift+Tab move between the interactive controls; Space or Enter
// activates the focused one, and a left click does the same. Press Ctrl+T to
// swap the complete palette, Ctrl+S to stop or restart the spinner, and Ctrl+Q
Expand Down
2 changes: 0 additions & 2 deletions packages/noir/example/data_table_demo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Run with: dart run example/data_table_demo.dart
//
// Use ↑/↓ (or j/k), PageUp/PageDown, Home/End to move the highlight and Enter
// to open a row. Press s to cycle sortable columns, or click a `package` or
// `state` header; repeating either action reverses the direction. Press q to
Expand Down
1 change: 0 additions & 1 deletion packages/noir/example/dialog_demo.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Run with: dart run example/dialog_demo.dart
// Activate `Review deploy` to open the dialog. Tab and Shift+Tab remain inside
// it; Escape or Cancel closes it, and Deploy confirms. The full-screen pointer
// barrier keeps the underlying screen visible without letting it receive
Expand Down
55 changes: 19 additions & 36 deletions packages/noir/example/file_picker_demo.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Run with: dart run example/file_picker_demo.dart
// The example uses an in-memory project tree and never reads the host file
// system. Up/Down move, Right expands, Left collapses or selects the parent,
// and Enter toggles a folder. Tab reaches Cancel and Open; Escape closes the
Expand Down Expand Up @@ -216,50 +215,34 @@ class _FilePickerDemoAppState extends State<FilePickerDemoApp> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
SizedBox(
height: 11,
height: 12,
child: Row(
spacing: 1,
children: [
SizedBox(
width: 32,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
_treeFocus.hasFocus ? '› Project' : 'Project',
style: TextStyle(
color: _treeFocus.hasFocus
? theme.accent
: theme.textMuted,
fontWeight: _treeFocus.hasFocus
? FontWeight.bold
: FontWeight.normal,
),
),
TreeView<DemoFileNode>(
key: const ValueKey<String>('file-tree'),
controller: _tree,
itemBuilder: _buildTreeRow,
height: 10,
focusNode: _treeFocus,
showScrollIndicator: true,
backgroundColor: Color.transparent,
onActivate: _openNode,
),
],
Panel(
title: 'Project',
focused: _treeFocus.hasFocus,
width: 34,
height: 12,
child: TreeView<DemoFileNode>(
key: const ValueKey<String>('file-tree'),
controller: _tree,
itemBuilder: _buildTreeRow,
height: 10,
focusNode: _treeFocus,
showScrollIndicator: true,
backgroundColor: Color.transparent,
onActivate: _openNode,
),
),
const SizedBox(height: 11, child: Divider(axis: Axis.vertical)),
Expanded(
child: Container(
padding: const EdgeInsets.only(left: 1),
child: Panel(
title: 'Preview',
height: 12,
child: Column(
spacing: 1,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
'Preview',
style: TextStyle(color: theme.textMuted),
),
Text(
selectedPath ?? 'No selection',
maxLines: 1,
Expand Down
83 changes: 42 additions & 41 deletions packages/noir/example/framework_primitives.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Run with: dart run example/framework_primitives.dart
//
// Press Enter or Space, or click Activate, to increment. Press q to quit.

import 'package:noir/noir.dart';
Expand Down Expand Up @@ -56,51 +54,54 @@ class _FrameworkPrimitivesAppState extends State<FrameworkPrimitivesApp> {
}

@override
Widget build(BuildContext context) => Shortcuts(
shortcuts: const <ShortcutActivator, Intent>{
SingleActivator(LogicalKeyboardKey.enter): _IncrementIntent(),
SingleActivator(LogicalKeyboardKey.space): _IncrementIntent(),
},
child: Actions(
actions: <Type, Action<Intent>>{
_IncrementIntent: CallbackAction<_IncrementIntent>((intent, context) {
_activationKey.currentState?.activate('keyboard');
return KeyEventResult.handled;
}),
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Shortcuts(
shortcuts: const <ShortcutActivator, Intent>{
SingleActivator(LogicalKeyboardKey.enter): _IncrementIntent(),
SingleActivator(LogicalKeyboardKey.space): _IncrementIntent(),
},
child: Focus(
autofocus: true,
onKeyEvent: _handleQuit,
child: DemoScaffold(
title: 'Framework primitives',
hint: 'Enter/Space/click increments. q quits.',
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 1,
children: [
RichText(
text: TextSpan(
text: 'Count: ',
style: const TextStyle(color: Color.lightGray),
children: [
TextSpan(
text: '${_count.value}',
style: const TextStyle(
color: Color.yellow,
fontWeight: FontWeight.bold,
child: Actions(
actions: <Type, Action<Intent>>{
_IncrementIntent: CallbackAction<_IncrementIntent>((intent, context) {
_activationKey.currentState?.activate('keyboard');
return KeyEventResult.handled;
}),
},
child: Focus(
autofocus: true,
onKeyEvent: _handleQuit,
child: DemoScaffold(
title: 'Framework primitives',
hint: 'Enter/Space/click increments. q quits.',
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 1,
children: [
RichText(
text: TextSpan(
text: 'Count: ',
style: TextStyle(color: theme.textMuted),
children: [
TextSpan(
text: '${_count.value}',
style: TextStyle(
color: theme.text,
fontWeight: FontWeight.bold,
),
),
),
],
],
),
),
),
_ActivationSurface(key: _activationKey, onActivate: _activate),
Text('Last activation: $_lastActivation'),
],
_ActivationSurface(key: _activationKey, onActivate: _activate),
Text('Last activation: $_lastActivation'),
],
),
),
),
),
),
);
);
}
}

class _ActivationSurface extends StatefulWidget {
Expand Down
53 changes: 28 additions & 25 deletions packages/noir/example/image_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,32 @@ class ImageDemo extends StatelessWidget {
]);

@override
Widget build(BuildContext context) => Container(
color: Color.black,
padding: const EdgeInsets.all(1),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 1,
children: [
const Text(
'Embedded RGBA image',
style: TextStyle(color: Color.yellow, fontWeight: FontWeight.bold),
),
Image.rgba(
_checkerboard,
pixelWidth: 2,
pixelHeight: 2,
rowStride: 8,
width: 12,
height: 6,
fit: ImageFit.fill,
),
const Text('Ctrl+C exits.', style: TextStyle(color: Color.lightGray)),
],
),
);
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Container(
color: theme.surface,
padding: const EdgeInsets.all(1),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 1,
children: [
Text(
'Embedded RGBA image',
style: TextStyle(color: theme.text, fontWeight: FontWeight.bold),
),
Image.rgba(
_checkerboard,
pixelWidth: 2,
pixelHeight: 2,
rowStride: 8,
width: 12,
height: 6,
fit: ImageFit.fill,
),
Text('Ctrl+C exits.', style: TextStyle(color: theme.textMuted)),
],
),
);
}
}
2 changes: 0 additions & 2 deletions packages/noir/example/listview_demo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Run with: dart run example/listview_demo.dart
//
// Tab moves between the two lists. In the selectable list use ↑/↓ (or j/k),
// PageUp/PageDown, Home/End, and Enter; the plain list scrolls with the same
// keys and with the mouse wheel. Press q to quit.
Expand Down
2 changes: 0 additions & 2 deletions packages/noir/example/parity_components_demo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Run with: dart run example/parity_components_demo.dart
//
// Left/Right or [/] changes the active document tab. Arrow keys adjust the
// slider when it has focus. Document text supports pointer/Shift selection,
// Ctrl+A, Escape, and explicit Ctrl+C OSC52 copy. Press q to quit.
Expand Down
1 change: 0 additions & 1 deletion packages/noir/example/pub_search.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Run with: dart run example/pub_search.dart
// Requires network access. Type at least three characters for completion;
// Enter searches or opens the selected package. Tab crosses the query, sort,
// filter, and results. Sort and filter open with Enter, Space, or a click. From
Expand Down
3 changes: 1 addition & 2 deletions packages/noir/example/pulse_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ class _PulseAnimationDemoState extends State<PulseAnimationDemo>
onKeyEvent: _onKey,
child: Container(
color: theme.surface,
alignment: Alignment.center,
padding: EdgeInsets.all(2),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 1,
children: [
Text(
Expand Down
2 changes: 0 additions & 2 deletions packages/noir/example/scrollbox_demo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Run with: dart run example/scrollbox_demo.dart
//
// Use ↑/↓ to scroll one line, PgUp/PgDn for a page, Home/End for ends.
// Press q to quit.

Expand Down
2 changes: 0 additions & 2 deletions packages/noir/example/select_demo.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Run with: dart run example/select_demo.dart
//
// Use ↑/↓ (or j/k) to move the highlight, Enter to confirm. Press q to quit.
// Demonstrates Select<T> rendering, focus, keyboard navigation, and the
// onChanged vs onSelect callback split.
Expand Down
23 changes: 7 additions & 16 deletions packages/noir/example/src/chat/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1408,22 +1408,13 @@ class _ChatDemoAppState extends State<ChatDemoApp> {
);
}

Widget _buildModal(BuildContext context) {
final content = switch (_surface) {
_ModalSurface.permission => _buildPermissionModal(context),
_ModalSurface.question => _buildQuestionModal(context),
_ModalSurface.model => _buildModelModal(context),
_ModalSurface.sessions => _buildSessionModal(context),
null => const SizedBox(),
};
return Container(
color: Theme.of(context).surface,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [content],
),
);
}
Widget _buildModal(BuildContext context) => switch (_surface) {
_ModalSurface.permission => _buildPermissionModal(context),
_ModalSurface.question => _buildQuestionModal(context),
_ModalSurface.model => _buildModelModal(context),
_ModalSurface.sessions => _buildSessionModal(context),
null => const SizedBox(),
};

Widget _buildPermissionModal(BuildContext context) {
final theme = Theme.of(context);
Expand Down
Loading
Loading