First real content under app/. Lays the whole Tier 0 foundation in one
commit because the pieces depend on each other circularly (kernel →
extension → widgets → built-ins all reference types from the layer
below); splitting would leave intermediate commits that don't compile.
Key shapes:
* bare WidgetsApp root — no Material, no Cupertino, no Scaffold.
ClideTheme InheritedWidget is the only source of tokens.
* ClideKernel InheritedWidget aggregates 18 services (settings,
project, extensions, theme, panels, events, ipc, commands +
palette + keybindings, clipboard, files, notify, dialog, tray,
secrets, os, net, focus, log, i18n). ExtensionContext exposes
them through a stable interface.
* ClideExtension + sealed ContributionPoint hierarchy (Tab,
StatusItem, Toolbar, Command, TrayItem, LayoutPreset). One
manifest ships N contributions into kernel slots.
* Three-tier theme pipeline: palette (named colors) → semantic
roles → ~60 surface tokens. Defaults at each layer so legacy
palette-only themes produce a complete SurfaceTokens.
* A11y baked in from day one — every interactive primitive wraps
in Semantics(label:, hint:, button:); ensureSemantics() at boot;
theme/contrast.dart helper exposes token pairs for the WCAG
gate in the a11y test suite.
* i18n ported from fframe's L10n pattern (text-driven, namespaced
JSON catalogs, caller-supplied placeholders) with a proper
locale fallback chain (exact → language → default → placeholder)
fframe lacks.
* Four Tier-0 built-ins live (default-layout, welcome, ipc-status,
theme-picker) plus 17 id-reserving stubs so later tiers fill in
without rename churn.
.gitignore extended to cover app/ sub-package artefacts and the
Playwright harness scratch dirs.
Co-Authored-By: Claude <noreply@anthropic.com>
89 lines
2.7 KiB
CMake
89 lines
2.7 KiB
CMake
# This file controls Flutter-level build steps. It should not be edited.
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
|
|
|
# Configuration provided via flutter tool.
|
|
include(${EPHEMERAL_DIR}/generated_config.cmake)
|
|
|
|
# TODO: Move the rest of this into files in ephemeral. See
|
|
# https://github.com/flutter/flutter/issues/57146.
|
|
|
|
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
|
|
# which isn't available in 3.10.
|
|
function(list_prepend LIST_NAME PREFIX)
|
|
set(NEW_LIST "")
|
|
foreach(element ${${LIST_NAME}})
|
|
list(APPEND NEW_LIST "${PREFIX}${element}")
|
|
endforeach(element)
|
|
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
# === Flutter Library ===
|
|
# System-level dependencies.
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
|
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
|
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
|
|
|
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
|
|
|
|
# Published to parent scope for install step.
|
|
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
|
|
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
|
|
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
|
|
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
|
|
|
|
list(APPEND FLUTTER_LIBRARY_HEADERS
|
|
"fl_basic_message_channel.h"
|
|
"fl_binary_codec.h"
|
|
"fl_binary_messenger.h"
|
|
"fl_dart_project.h"
|
|
"fl_engine.h"
|
|
"fl_json_message_codec.h"
|
|
"fl_json_method_codec.h"
|
|
"fl_message_codec.h"
|
|
"fl_method_call.h"
|
|
"fl_method_channel.h"
|
|
"fl_method_codec.h"
|
|
"fl_method_response.h"
|
|
"fl_plugin_registrar.h"
|
|
"fl_plugin_registry.h"
|
|
"fl_standard_message_codec.h"
|
|
"fl_standard_method_codec.h"
|
|
"fl_string_codec.h"
|
|
"fl_value.h"
|
|
"fl_view.h"
|
|
"flutter_linux.h"
|
|
)
|
|
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
|
|
add_library(flutter INTERFACE)
|
|
target_include_directories(flutter INTERFACE
|
|
"${EPHEMERAL_DIR}"
|
|
)
|
|
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
|
|
target_link_libraries(flutter INTERFACE
|
|
PkgConfig::GTK
|
|
PkgConfig::GLIB
|
|
PkgConfig::GIO
|
|
)
|
|
add_dependencies(flutter flutter_assemble)
|
|
|
|
# === Flutter tool backend ===
|
|
# _phony_ is a non-existent file to force this command to run every time,
|
|
# since currently there's no way to get a full input/output list from the
|
|
# flutter tool.
|
|
add_custom_command(
|
|
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
|
|
${CMAKE_CURRENT_BINARY_DIR}/_phony_
|
|
COMMAND ${CMAKE_COMMAND} -E env
|
|
${FLUTTER_TOOL_ENVIRONMENT}
|
|
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
|
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
|
|
VERBATIM
|
|
)
|
|
add_custom_target(flutter_assemble DEPENDS
|
|
"${FLUTTER_LIBRARY}"
|
|
${FLUTTER_LIBRARY_HEADERS}
|
|
)
|