@swishapp/sdk 0.145.0 → 0.145.1-unstable.20260813150959

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.
@@ -1,6 +1,14 @@
1
1
  import { type Placement } from "@floating-ui/dom";
2
2
  import { SwishApp } from "../swish";
3
3
  import { CreateElementLocatorArgs } from "./dom-utils";
4
+ /** The placement that wraps the theme's account link. Resolves to one of the
5
+ * SDK's own custom elements rather than a `<swish-ui>` component — see
6
+ * `NATIVE_ELEMENT_TAGS` in ../swish-ui/swish-ui.ts. */
7
+ export declare const ACCOUNT_ICON = "account-icon";
8
+ /** A placement's element name, or undefined when it renders via a factory. */
9
+ export declare const elementNameOf: (spec: {
10
+ element?: ElementSpec<string> | RenderFn;
11
+ }) => string | undefined;
4
12
  export declare function createPlacement<TDomElement extends HTMLElement = HTMLElement, TElementName extends ElementName = ElementName>(swish: SwishApp, rawSpec: PlacementSpec<TDomElement, TElementName>): {
5
13
  mount(): void;
6
14
  unmount(): void;
@@ -16,7 +24,7 @@ export type ResponsiveValue<T> = T | {
16
24
  base?: T;
17
25
  [breakpoint: string]: T | undefined;
18
26
  };
19
- export type ElementName = "save-button" | "header-button" | "list-detail-page";
27
+ export type ElementName = "save-button" | "header-button" | "list-detail-page" | "account-icon";
20
28
  export type SaveButtonDesignSpec = {
21
29
  background?: ResponsiveValue<string>;
22
30
  savedBackground?: ResponsiveValue<string>;
@@ -63,7 +71,7 @@ type DesignSpecMap = {
63
71
  "header-button": HomeButtonDesignSpec;
64
72
  };
65
73
  export type DesignSpecForElementName<TName extends ElementName = ElementName> = TName extends keyof DesignSpecMap ? DesignSpecMap[TName] : never;
66
- export type MountMode = "before" | "after" | "append" | "prepend" | "replace";
74
+ export type MountMode = "before" | "after" | "append" | "prepend" | "replace" | "wrap";
67
75
  export type MountAt = "target" | {
68
76
  closest: string;
69
77
  } | {
@@ -1,3 +1,4 @@
1
+ export declare const BADGE_CLASS = "swish-drawer-badge";
1
2
  declare const BaseElement: typeof HTMLElement;
2
3
  export declare class SwishDrawerElement extends BaseElement {
3
4
  static get observedAttributes(): "view"[];
@@ -7,6 +8,8 @@ export declare class SwishDrawerElement extends BaseElement {
7
8
  disconnectedCallback(): void;
8
9
  private bind;
9
10
  private dispose;
11
+ private ensureBadge;
12
+ private findBadge;
10
13
  private resolveView;
11
14
  }
12
15
  export {};
@@ -93,9 +93,6 @@ export interface TransformOptions {
93
93
  export type TransformOptionsResolved = Required<TransformOptions>;
94
94
  export type UiOptions = UiOptionsParsed;
95
95
  export interface UiDesignOptions {
96
- appearance?: {
97
- iconThickness?: number | string;
98
- };
99
96
  sizes?: {
100
97
  buttonHeight?: number | string;
101
98
  iconButtonSize?: number | string;
@@ -109,6 +106,7 @@ export interface UiDesignOptions {
109
106
  borderRadiusScale?: number | string;
110
107
  badgeBorderRadius?: string;
111
108
  buttonBorderRadius?: string;
109
+ iconButtonBorderRadius?: string;
112
110
  dialogBorderRadius?: string;
113
111
  formInputBorderRadius?: string;
114
112
  imageCardBorderRadius?: string;