@umbraco-ai/core 17.4.0-rc.4 → 17.4.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.
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import type { ManifestApi } from '@umbraco-cms/backoffice/extension-api';
|
|
|
5
5
|
import type { ManifestBase } from '@umbraco-cms/backoffice/extension-api';
|
|
6
6
|
import type { ManifestMenuItem } from '@umbraco-cms/backoffice/menu';
|
|
7
7
|
import type { ManifestRepository } from '@umbraco-cms/backoffice/extension-registry';
|
|
8
|
+
import { nothing } from '@umbraco-cms/backoffice/external/lit';
|
|
8
9
|
import { Observable } from '@umbraco-cms/backoffice/external/rxjs';
|
|
9
10
|
import { Observable as Observable_2 } from 'rxjs';
|
|
10
11
|
import { TemplateResult } from 'lit-html';
|
|
@@ -718,6 +719,8 @@ export declare const UAI_CONFIGURATION_MENU_ALIAS = "Uai.Menu.Configuration";
|
|
|
718
719
|
*/
|
|
719
720
|
export declare const UAI_CORE_MENU_ALIAS = "Uai.Menu.Configuration";
|
|
720
721
|
|
|
722
|
+
export declare const UAI_DISCLOSURE_CONTEXT: UmbContextToken<UaiDisclosureContext, UaiDisclosureContext>;
|
|
723
|
+
|
|
721
724
|
/**
|
|
722
725
|
* A constant representing an empty GUID.
|
|
723
726
|
* @public
|
|
@@ -1036,6 +1039,78 @@ export declare interface UaiDetectedEntity {
|
|
|
1036
1039
|
workspaceContext: object;
|
|
1037
1040
|
}
|
|
1038
1041
|
|
|
1042
|
+
/**
|
|
1043
|
+
* Global context providing the AI disclosure notice state.
|
|
1044
|
+
* Registered as a globalContext manifest - auto-instantiated at backoffice root.
|
|
1045
|
+
*/
|
|
1046
|
+
export declare class UaiDisclosureContext extends UmbControllerBase {
|
|
1047
|
+
#private;
|
|
1048
|
+
/** Type guard marker for context resolution. */
|
|
1049
|
+
readonly IS_DISCLOSURE_CONTEXT = true;
|
|
1050
|
+
/** The configured notice mode, or undefined while loading. */
|
|
1051
|
+
readonly mode: Observable<UaiDisclosureNoticeMode | undefined>;
|
|
1052
|
+
/** Whether the notice can be dismissed by the user. */
|
|
1053
|
+
readonly canDismiss: Observable<boolean>;
|
|
1054
|
+
/**
|
|
1055
|
+
* Whether the notice should be shown right now at the given location.
|
|
1056
|
+
* @param location A short key for the AI surface, e.g. "chat" or "prompt".
|
|
1057
|
+
*/
|
|
1058
|
+
showNoticeFor(location: string): Observable<boolean>;
|
|
1059
|
+
constructor(host: UmbControllerHost);
|
|
1060
|
+
/**
|
|
1061
|
+
* Updates the mode without a reload, e.g. straight after the AI settings are saved.
|
|
1062
|
+
*/
|
|
1063
|
+
setMode(mode: UaiDisclosureNoticeMode): void;
|
|
1064
|
+
/**
|
|
1065
|
+
* Hides the notice at the given location for this browser. Other locations are unaffected.
|
|
1066
|
+
* Only has an effect when the mode is Dismissible.
|
|
1067
|
+
* @param location A short key for the AI surface, e.g. "chat" or "prompt" (letters, digits, dashes).
|
|
1068
|
+
*/
|
|
1069
|
+
dismiss(location: string): void;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* The "Responses are AI-generated" notice, shown next to AI output.
|
|
1074
|
+
*
|
|
1075
|
+
* Follows the global AI Disclosure Notice setting: always shown, dismissible (per location,
|
|
1076
|
+
* remembered per browser) or never shown. Renders nothing while hidden, so hosts can place
|
|
1077
|
+
* it unconditionally.
|
|
1078
|
+
*
|
|
1079
|
+
* Styling hooks for hosts:
|
|
1080
|
+
* - `--uai-disclosure-notice-background` (default: transparent)
|
|
1081
|
+
* - `--uai-disclosure-notice-padding` (default: 0)
|
|
1082
|
+
* - `--uai-disclosure-notice-border-radius` (default: 0)
|
|
1083
|
+
*
|
|
1084
|
+
* @example
|
|
1085
|
+
* ```html
|
|
1086
|
+
* <uai-disclosure-notice location="chat"></uai-disclosure-notice>
|
|
1087
|
+
* ```
|
|
1088
|
+
*/
|
|
1089
|
+
export declare class UaiDisclosureNoticeElement extends UmbLitElement {
|
|
1090
|
+
#private;
|
|
1091
|
+
/**
|
|
1092
|
+
* A short key for where the notice is shown, e.g. "chat" or "prompt" (letters, digits, dashes).
|
|
1093
|
+
* Dismissing the notice only hides it at this location.
|
|
1094
|
+
*/
|
|
1095
|
+
location: string;
|
|
1096
|
+
/** Reflected so hosts can style around the notice, and so it takes no space while hidden. */
|
|
1097
|
+
visible: boolean;
|
|
1098
|
+
private _canDismiss;
|
|
1099
|
+
constructor();
|
|
1100
|
+
updated(changed: Map<PropertyKey, unknown>): void;
|
|
1101
|
+
render(): TemplateResult<1> | typeof nothing;
|
|
1102
|
+
static styles: CSSResult;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* How the backoffice shows the notice that tells users a response is AI-generated.
|
|
1107
|
+
*
|
|
1108
|
+
* - `Always`: always shown.
|
|
1109
|
+
* - `Dismissible`: shown until the user dismisses it; the dismissal is remembered per browser.
|
|
1110
|
+
* - `Off`: never shown.
|
|
1111
|
+
*/
|
|
1112
|
+
export declare type UaiDisclosureNoticeMode = "Always" | "Dismissible" | "Off";
|
|
1113
|
+
|
|
1039
1114
|
/**
|
|
1040
1115
|
* Adapter for Umbraco document entities.
|
|
1041
1116
|
*/
|