@pontive/pontkit-core 1.35.0 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,4 +19,11 @@ declare class AttrsDirective extends Directive {
19
19
  export declare const attrs: (_attrs: AttrMap) => import('lit-html/directive.js').DirectiveResult<typeof AttrsDirective>;
20
20
  /** Imperative twin of `attrs()`, for code that holds a node rather than a template. */
21
21
  export declare function applyAttrs(el: Element, map: AttrMap, previous?: Iterable<string>): void;
22
+ /**
23
+ * A list attribute: a JSON array (`["google","github"]`, the form the platform's
24
+ * resolve pass writes for `providers` and `identifiers`) or space/comma-separated
25
+ * words (`google github`), as authors write them. Non-string JSON items become
26
+ * strings; anything unparsable is an empty list.
27
+ */
28
+ export declare function parseList(value: string | null | undefined): string[];
22
29
  export {};
@@ -0,0 +1,37 @@
1
+ import { ReactiveElement } from 'lit';
2
+ /**
3
+ * # Design mode: the element is on the screen designer's canvas
4
+ *
5
+ * Resolution (turning an app's providers into buttons, narrowing identifiers,
6
+ * injecting the brand logo) happens at serve time, on the server. The designer
7
+ * has no app to resolve against, so an element placed there in its normal,
8
+ * bare authored form would render its empty state: an empty provider grid, a
9
+ * broken logo. That isn't neutral; it tells the author the element is broken.
10
+ *
11
+ * In design mode an element renders a **representative example** of itself
12
+ * instead (pontive-spec 17 §1). It must not prune itself, inject real
13
+ * configuration, or substitute `{{placeholders}}` (pont2 never does). Ported
14
+ * from the legacy `designModeContext` (migration tracker F-32).
15
+ *
16
+ * `pont2-layout` provides it (`design-mode`), which is how the dashboard's
17
+ * widget builder drives it. Its key is `pont2:design-mode`.
18
+ *
19
+ * Design mode is an authoring signal only: it never touches the branding
20
+ * entitlement (the watermark), which has no override at all.
21
+ */
22
+ export declare const designModeContext: {
23
+ __context__: boolean;
24
+ };
25
+ /**
26
+ * Reads design mode for one element. An explicit `design-mode` attribute on the
27
+ * element wins (`design-mode` or `design-mode="true"` on; `design-mode="false"`
28
+ * off), so a story or a standalone demo can show the design rendering without a
29
+ * layout. Otherwise the nearest provider decides.
30
+ */
31
+ export declare class DesignModeController {
32
+ private readonly host;
33
+ private consumer;
34
+ constructor(host: ReactiveElement);
35
+ /** Whether the element should render its design-mode example. */
36
+ get active(): boolean;
37
+ }
@@ -1,6 +1,7 @@
1
1
  export * from './host-element';
2
2
  export * from './form-control';
3
3
  export * from './attrs';
4
+ export * from './design-mode';
4
5
  export * from './ids';
5
6
  export * from './events';
6
7
  export * from './icons';