gui/components/DplInsertBar

The DPL insert control above the prompt box. It teaches + inserts the lax line grammar (conditions, choices, calls, weights, …) that's hard to discover by typing: each construct shows its name, a one-line description, the literal syntax, and a live re-rolling example; picking one drops its snippet at the editor's cursor (via the editor's imperative insertSnippet).

Two presentations, chosen by width (a hydration-safe media-query hook — the DESKTOP row renders from first paint, unchanged): • Desktop (>768px): the original slim ROW of per-category buttons, each opening its own popover. • Compact (<=768px): a single Insert ▾ button opening a menu — category list → drill into a category's constructs with a Back row — so it never wraps on a narrow screen.

Description:
  • The DPL insert control above the prompt box. It teaches + inserts the lax line grammar (conditions, choices, calls, weights, …) that's hard to discover by typing: each construct shows its name, a one-line description, the literal syntax, and a live re-rolling example; picking one drops its snippet at the editor's cursor (via the editor's imperative insertSnippet).

    Two presentations, chosen by width (a hydration-safe media-query hook — the DESKTOP row renders from first paint, unchanged): • Desktop (>768px): the original slim ROW of per-category buttons, each opening its own popover. • Compact (<=768px): a single Insert ▾ button opening a menu — category list → drill into a category's constructs with a Back row — so it never wraps on a narrow screen.

Source:

Methods

(inner) InsertMenu()

Description:
  • Compact (<=768px): a single Insert button opening a category list → drill-into-items menu.

Source:

(inner) InsertRow()

Description:
  • Desktop (>768px): the original row of per-category buttons, each with its own popover.

Source:

(inner) ItemButton()

Description:
  • One construct row (name + description + syntax + live example). Shared by both presentations.

Source:

(inner) rollExample()

Description:
  • Roll one item's example DPL into a concrete string (no auto-FX/artist noise).

Source:

(inner) useExamples()

Description:
  • Live-rolling examples for the currently-open category (keyed by item id).

Source: