@gjsify/adwaita-web 0.64.2 → 0.64.3-next.260
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.
- package/dist/adwaita-web.css +20 -1
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/elements/adw-about-dialog.d.ts +53 -7
- package/lib/types/language-host.d.ts +1 -0
- package/lib/types/namespace/glib.d.ts +4 -2
- package/lib/types/styles.generated.d.ts +1 -1
- package/package.json +13 -12
- package/scss/_about_dialog.scss +10 -2
- package/scss/_icons.generated.scss +12 -0
- package/src/adw-about-dialog.spec.ts +253 -12
- package/src/elements/adw-about-dialog.ts +258 -54
- package/src/elements/adw-preferences-row.ts +2 -1
- package/src/glib.spec.ts +62 -0
- package/src/language-host.ts +10 -0
- package/src/namespace/glib.ts +14 -2
- package/src/styles.generated.ts +1 -1
|
@@ -12,6 +12,14 @@ export declare class AdwAboutDialog extends WidgetElement {
|
|
|
12
12
|
private _designers;
|
|
13
13
|
private _artists;
|
|
14
14
|
private _documenters;
|
|
15
|
+
/** `license` + `license-type`, one state driven by the core transitions. */
|
|
16
|
+
private _licenseState;
|
|
17
|
+
/** Set while an attribute is being written back from `_licenseState`. */
|
|
18
|
+
private _reflecting;
|
|
19
|
+
/** `add_credit_section`, `add_acknowledgement_section` and `add_legal_section`, in call order. */
|
|
20
|
+
private _creditSections;
|
|
21
|
+
private _acknowledgementSections;
|
|
22
|
+
private _legalSections;
|
|
15
23
|
/** `add_link` rows, in order; `has_custom_links` latches with the first. */
|
|
16
24
|
private _links;
|
|
17
25
|
/**
|
|
@@ -41,8 +49,14 @@ export declare class AdwAboutDialog extends WidgetElement {
|
|
|
41
49
|
set issueUrl(value: string);
|
|
42
50
|
get copyright(): string;
|
|
43
51
|
set copyright(value: string);
|
|
52
|
+
/** `license`: the custom licence text, `''` for a stock licence. */
|
|
44
53
|
get license(): string;
|
|
45
54
|
set license(value: string);
|
|
55
|
+
/** `license-type`: a `Gtk.License` value (see `GTK_LICENSE`). */
|
|
56
|
+
get licenseType(): number;
|
|
57
|
+
set licenseType(value: number);
|
|
58
|
+
get translatorCredits(): string;
|
|
59
|
+
set translatorCredits(value: string);
|
|
46
60
|
get licenseUrl(): string;
|
|
47
61
|
set licenseUrl(value: string);
|
|
48
62
|
get releaseNotes(): string;
|
|
@@ -53,6 +67,15 @@ export declare class AdwAboutDialog extends WidgetElement {
|
|
|
53
67
|
set debugInfo(value: string);
|
|
54
68
|
/** `adw_about_dialog_add_link`: a Details-page link row; `_` marks a mnemonic. */
|
|
55
69
|
add_link(title: string, url: string): void;
|
|
70
|
+
/** `adw_about_dialog_add_credit_section`: a Credits group; `name` may be `null`. */
|
|
71
|
+
add_credit_section(name: string | null, people: string[]): void;
|
|
72
|
+
/** `adw_about_dialog_add_acknowledgement_section`: an Acknowledgements group. */
|
|
73
|
+
add_acknowledgement_section(name: string | null, people: string[]): void;
|
|
74
|
+
/**
|
|
75
|
+
* `adw_about_dialog_add_legal_section`: a Legal-page section. A `license_type` outside
|
|
76
|
+
* `Gtk.License` is rejected, like the property setter.
|
|
77
|
+
*/
|
|
78
|
+
add_legal_section(title: string, copyright: string | null, license_type: number, license: string | null): void;
|
|
56
79
|
get open(): boolean;
|
|
57
80
|
set open(value: boolean);
|
|
58
81
|
get developers(): string[];
|
|
@@ -69,17 +92,21 @@ export declare class AdwAboutDialog extends WidgetElement {
|
|
|
69
92
|
close(): void;
|
|
70
93
|
connectedCallback(): void;
|
|
71
94
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
95
|
+
/** Run the core setter an attribute maps to, notify what it notified, and write the pair back. */
|
|
96
|
+
private _applyLicenseAttribute;
|
|
97
|
+
/** An integer or a `Gtk.License` nick; anything else is out of range, so the setter refuses it. */
|
|
98
|
+
private _parseLicenseType;
|
|
99
|
+
/**
|
|
100
|
+
* Write `_licenseState` back onto the attributes, which a setter may have moved: a stock
|
|
101
|
+
* licence clears `license`. A `license-type` the app wrote as a nick is left as it wrote it.
|
|
102
|
+
*/
|
|
103
|
+
private _reflectLicense;
|
|
72
104
|
/** Reflect the presented state onto the host + reset the navigation stack. */
|
|
73
105
|
private _syncOpen;
|
|
74
106
|
/** The credit groups the Credits page shows, straight from `update_credits`. */
|
|
75
107
|
private _creditsSections;
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
* simplified one — a name plus an optional URL — so it maps onto `GtkLicense` as
|
|
79
|
-
* "custom text when a licence is set, unknown otherwise", which is what
|
|
80
|
-
* `adw_about_dialog_set_license` does to the type anyway.
|
|
81
|
-
*/
|
|
82
|
-
private _hasLegal;
|
|
108
|
+
/** What `update_legal` reads: the dialog's own copyright + licence, then the added sections. */
|
|
109
|
+
private _legalInput;
|
|
83
110
|
private _render;
|
|
84
111
|
/**
|
|
85
112
|
* A navigation page wrapping a header bar (with the close button) + content.
|
|
@@ -113,7 +140,17 @@ export declare class AdwAboutDialog extends WidgetElement {
|
|
|
113
140
|
/** `copy_property_cb`: an empty value copies nothing and shows no toast. */
|
|
114
141
|
private _copyProperty;
|
|
115
142
|
private _buildLinkRow;
|
|
143
|
+
/**
|
|
144
|
+
* `AdwLinkRow`: `adw_link_row_init` + `adw_link_row_set_uri`. The `link` class and the
|
|
145
|
+
* LINK state flag, accessible role LINK, the unescaped URI as tooltip, and a suffix glyph
|
|
146
|
+
* that says "leaves the app" (an envelope for `mailto:`) instead of a navigation chevron.
|
|
147
|
+
* Activation is `_activateLink`, which emits `activate-link` and then opens the URI.
|
|
148
|
+
*/
|
|
149
|
+
private _makeLinkRow;
|
|
116
150
|
private _buildCreditsPage;
|
|
151
|
+
private _buildAcknowledgementsPage;
|
|
152
|
+
/** Credits and Acknowledgements are one structure: a group per section, a row per person. */
|
|
153
|
+
private _buildCreditGroupsPage;
|
|
117
154
|
/**
|
|
118
155
|
* A credit row — a plain title, or a link row when the entry carries a URI. The gate
|
|
119
156
|
* is `link !== null`, not the URI's truthiness: `"Ada <>"` parses to an EMPTY link,
|
|
@@ -122,6 +159,15 @@ export declare class AdwAboutDialog extends WidgetElement {
|
|
|
122
159
|
*/
|
|
123
160
|
private _buildCreditRow;
|
|
124
161
|
private _buildLegalPage;
|
|
162
|
+
/** The custom licence text as a link to `license-url`. Cancelable like every other link. */
|
|
163
|
+
private _buildLicenseUrlLink;
|
|
164
|
+
/**
|
|
165
|
+
* A legal label's markup: Pango markup, with the `<a href>` GtkLabel adds on top — the
|
|
166
|
+
* stock warranty line is one. Each link raises the cancelable `activate-link`. Only
|
|
167
|
+
* `http`, `https` and `mailto` targets become links; any other is drawn as its text,
|
|
168
|
+
* since the default action hands the URI to `window.open`.
|
|
169
|
+
*/
|
|
170
|
+
private _renderLegalLabel;
|
|
125
171
|
/** Show the header title only once the main page is scrolled (AdwAboutDialog). */
|
|
126
172
|
private _updateHeaderTitle;
|
|
127
173
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hostLanguageTags(): string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { GLibBytes as Bytes, GLibError as Error } from '@gjsify/adwaita-core';
|
|
2
|
-
import { buildFilenamev, getCurrentDir, getSystemDataDirs, uriEscapeString } from '@gjsify/adwaita-core';
|
|
1
|
+
export { GLibBytes as Bytes, GLibError as Error, GLibVariant as Variant } from '@gjsify/adwaita-core';
|
|
2
|
+
import { buildFilenamev, getCurrentDir, getSystemDataDirs, unicharIsalpha, uriEscapeString } from '@gjsify/adwaita-core';
|
|
3
3
|
export declare const PRIORITY_HIGH: number;
|
|
4
4
|
export declare const PRIORITY_DEFAULT: number;
|
|
5
5
|
export declare const PRIORITY_HIGH_IDLE: number;
|
|
@@ -14,4 +14,6 @@ export declare const MAXUINT32 = 4294967295;
|
|
|
14
14
|
export declare const build_filenamev: typeof buildFilenamev;
|
|
15
15
|
export declare const get_current_dir: typeof getCurrentDir;
|
|
16
16
|
export declare const get_system_data_dirs: typeof getSystemDataDirs;
|
|
17
|
+
export declare const get_language_names: () => string[];
|
|
17
18
|
export declare const uri_escape_string: typeof uriEscapeString;
|
|
19
|
+
export declare const unichar_isalpha: typeof unicharIsalpha;
|