Skip to content

v0.30.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 18:47
· 3546 commits to main since this release

One owner for every interactive state. foldkit-mixins 0.18.0 adds surface.hoverStrength (how
strongly a hover tints, 4% to 24% around the shipped 12%) and state.disabledOpacity (how far a
disabled control fades), so a theme moves every hover and every disabled control at once.
foldkit-mixins-ui 0.19.0 makes a press its own state: state.press is the hover's film at 1.75,
hover() lays it on a held row, tab or menu item, and FluidHover marks the container so a held
fluid highlight deepens too; every tinted hover — Table's, Segmented's, pill Tabs' — now follows
surface.hover. Packages that pin either republish with a patch, and foldkit-plus is 0.12.0.

Changed

  • foldkit-mixins-ui: every tinted hover follows the theme's surface.hover, fluid highlights
    included. Table's highlight and its expand toggle, a filled Segmented's highlight and pill
    Tabs' highlight painted with the text (Table) or the accent's subtle fill whatever the theme
    chose; they now paint with unfilledHover, as Nav, Sidebar and TreeView do. The accent's
    "trying the tab on" look is surface: { hover: 'accent' }. A Segmented without fluid tints
    its option under the pointer, as a fluid tray's highlight does. A Dialog's or Sheet's close
    button hovered with a surface step; it now hovers as every icon button does.
  • foldkit-media/server: UploadPolicy.admit(request, route) is told which route it guards,
    'Upload' or 'DescribeUrl' (the facts route), so a policy may admit uploads and refuse URL
    lookups. A hand-written policy gains the parameter. UploadUnauthenticated is a 401, for a
    request whose session the policy cannot tell, beside UploadForbidden's 403.
  • foldkit-media/server: Uploads.put(hash, bytes, facts) keeps the facts the route read
    beside the bytes; an Uploads of your own gains the parameter.

Added

  • foldkit-mixins / foldkit-mixins-ui: a press is its own state. state.press is the
    hover's film at 1.75, and hover() lays it while a row, tab, accordion trigger or menu item
    is held, so a press no longer looks like the hover it followed. FluidHover marks its
    container data-fluid-held while the lit item is pressed, and every fluid highlight (Table,
    Segmented, Tabs, Nav, Sidebar, TreeView) and the popups' own deepen with it. One knob,
    surface.hoverStrength, sets both strengths.

  • foldkit-mixins: state.disabledOpacity (Disabled, 0.3 to 0.7, half by default), how far a
    disabled control fades. Every recipe that draws the state reads it, so a page no longer shows
    0.4 on a calendar day and 0.5 on the button beside it, and a theme sets them all.

  • foldkit-mixins: surface.hoverStrength, how strongly a hovered row or button is tinted
    (4% to 24%); the palette's state-hover was a fixed 12%, which stays the default, so a theme
    that does not set it draws as before.

  • examples/site: /create turns the two new knobs, Hover strength in the Color pane beside
    Hover and Disabled in Shape after Outlines, so a reader sees each change beside the knob it
    belongs with; its end-to-end test hovers the canvas's Segmented preview and measures the film.
    Its Icons pane draws the chosen pack at the Glyph stroke the theme sets
    (Icons.tokens(pack, { width })), the specimen and every preview with it, and writes
    that width into the code.

  • foldkit-media/server: uploadPolicyAny(a, b, …) tries upload policies in turn, the first to
    admit winning, so a deployment's secret and sessions can both upload; when every one refuses,
    the last refusal is the answer. Each is built once, with the combined layer.

  • foldkit-guard/media: GuardMedia.uploadPolicy(Policy, { resolve, Upload, DescribeUrl }) is
    foldkit-media's UploadPolicy decided by principal guards per route, for who resolve says
    is asking (Remote's resolver; AuthServer.resolver has the shape). The resolver gets the
    request's URL, method and headers, never its body, so a refused upload still reads no byte. A
    route admits when any of its guards allows, a route given none admits nobody, and a row guard
    is a type error. A resolver failure is a 401, a refusal a 403. foldkit-media is a new
    optional peer of foldkit-guard.

  • foldkit-media/server: StoredFacts.get(hash) reads back the facts the upload route read, so
    a mutation registering an upload takes a hash and never a client's facts; none for a hash
    nobody uploaded, or one kept before facts were. storedFactsKeyValueStore() over the
    application's store, storedFactsR2(bucket) on Cloudflare.

  • The foldkit-plus skill has references/greenfield.md: how an agent starts a new
    application. The brief, the look (a theme the user designs at foldkit-plus.pages.dev/create,
    its code saved as the app's style module), then a scaffold with the matching
    create-foldkit-app, then rounds of
    domain questions recorded in docs/domain/ until the user stops, a mapping of the domain to
    the packages agreed with them, a plan (plan.md) for architecture, performance budgets, SEO,
    accessibility, design, testing, CI, deployment, security, operations and milestones, and only
    then the build, in slices, CI and deployment first. npx foldkit-plus setup
    run where there is no package.json sends an agent there and prints the non-interactive
    scaffold command (create-foldkit-app@0.39.1, which installs Foldkit 0.168.0); in a project it
    names the guide too.

Fixed

  • The skill said it targets Foldkit 0.165; it is 0.168.
  • foldkit-media's README and the skill no longer promise more than the code keeps: a variant's
    URL names the variant, not its bytes, so a change to how variants are made is a revision the
    application bumps; anyone holding a variant's URL can read it; a Worker cannot coalesce two
    misses for one variant, so both transform; and HashedAsset checks the shape of facts, not
    that they are true, so a server stores the facts it read, not ones a client sends back.