@theaiplatform/miniapp-sdk 0.0.1 → 0.0.2

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/sdk.d.ts CHANGED
@@ -99,7 +99,7 @@ export declare type MiniAppAuthApi = {
99
99
  };
100
100
 
101
101
  /**
102
- * @capability integrations-and-marketplace
102
+ * @capability miniapp-platform
103
103
  */
104
104
  export declare type MiniAppChannel = {
105
105
  roomId: string;
@@ -143,6 +143,85 @@ export declare type MiniAppCreateSpecialistResult = {
143
143
  isActive: boolean;
144
144
  };
145
145
 
146
+ /** Metadata-only access to host-managed credentials in the active workspace. */
147
+ export declare type MiniAppCredentialsApi = {
148
+ listHttp(): MiniAppMaybePromise<MiniAppHttpCredentialMetadata[]>;
149
+ };
150
+
151
+ /** Host-mediated bounded HTTP(S); browser fetch is not the authority. */
152
+ export declare type MiniAppHttpApi = {
153
+ request(input: MiniAppHttpRequestInput, options?: MiniAppHttpRequestOptions): MiniAppMaybePromise<MiniAppHttpResponse>;
154
+ };
155
+
156
+ /** Metadata-only stored HTTP credential. Secret fields never cross IPC. */
157
+ export declare type MiniAppHttpCredentialMetadata = {
158
+ id: string;
159
+ credentialType: MiniAppHttpCredentialType;
160
+ displayName: string;
161
+ metadataFields: Record<string, string>;
162
+ };
163
+
164
+ export declare type MiniAppHttpCredentialType = 'http_bearer' | 'http_basic' | 'http_header_auth' | 'http_api_key';
165
+
166
+ export declare type MiniAppHttpHeader = {
167
+ name: string;
168
+ value: string;
169
+ };
170
+
171
+ export declare type MiniAppHttpHeaderInput = {
172
+ name: string;
173
+ value: string;
174
+ /** Defaults to true when omitted. */
175
+ enabled?: boolean;
176
+ };
177
+
178
+ export declare type MiniAppHttpQueryInput = {
179
+ name: string;
180
+ value: string;
181
+ /** Defaults to true when omitted. */
182
+ enabled?: boolean;
183
+ };
184
+
185
+ export declare type MiniAppHttpRequestInput = {
186
+ method: string;
187
+ url: string;
188
+ query?: MiniAppHttpQueryInput[];
189
+ headers?: MiniAppHttpHeaderInput[];
190
+ body?: string | null;
191
+ /** Defaults to 30 seconds and is capped by the host at 120 seconds. */
192
+ timeoutMs?: number | null;
193
+ /** Defaults to 5 MiB and is capped by the host at 10 MiB. */
194
+ responseBodyLimitBytes?: number | null;
195
+ /**
196
+ * Defaults to false. The host follows at most ten same-origin redirects;
197
+ * cross-origin redirects require a separate request and grant.
198
+ */
199
+ followRedirects?: boolean | null;
200
+ };
201
+
202
+ export declare type MiniAppHttpRequestOptions = {
203
+ /**
204
+ * Opaque host-managed credential reference. Secret material never enters
205
+ * miniapp JavaScript.
206
+ */
207
+ credentialRef?: string;
208
+ };
209
+
210
+ export declare type MiniAppHttpResponse = {
211
+ finalUrl: string;
212
+ status: number;
213
+ statusText: string;
214
+ /** Ordered entries; duplicate response header names remain separate. */
215
+ headers: MiniAppHttpHeader[];
216
+ bodyText: string | null;
217
+ bodyBase64: string | null;
218
+ bodyKind: 'text' | 'binary';
219
+ bodyTruncated: boolean;
220
+ sizeBytes: number;
221
+ elapsedMs: number;
222
+ contentType: string | null;
223
+ };
224
+
146
225
  /** JSON-compatible values accepted by public miniapp operations. */
147
226
  export declare type MiniAppJsonValue = null | boolean | number | string | MiniAppJsonValue[] | {
148
227
  [key: string]: MiniAppJsonValue;
@@ -236,6 +315,10 @@ export declare type MiniAppPlatformApi = {
236
315
  chat: MiniAppChatApi;
237
316
  storage: MiniAppStorageApi;
238
317
  presence: MiniAppPresenceApi;
318
+ /** Desktop host capability; feature-detect before use on portable targets. */
319
+ http?: MiniAppHttpApi;
320
+ /** Desktop host capability; feature-detect before use on portable targets. */
321
+ credentials?: MiniAppCredentialsApi;
239
322
  /** Browser capabilities appear only when the selected target supports them. */
240
323
  auth?: MiniAppAuthApi;
241
324
  vfs?: MiniAppVfsApi;
package/dist/surface.d.ts CHANGED
@@ -38,7 +38,7 @@ export declare interface TapFederatedSurfaceMountContext {
38
38
  }
39
39
 
40
40
  /**
41
- * @capability integrations-and-marketplace
41
+ * @capability miniapp-platform
42
42
  */
43
43
  /** Declared package-event channel supplied to an isolated UI contribution. */
44
44
  export declare interface TapPackageEventPublisher {
@@ -243,6 +243,9 @@
243
243
  .relative {
244
244
  position: relative;
245
245
  }
246
+ .static {
247
+ position: static;
248
+ }
246
249
  .sticky {
247
250
  position: sticky;
248
251
  }
@@ -414,6 +417,14 @@
414
417
  .aspect-square {
415
418
  aspect-ratio: 1 / 1;
416
419
  }
420
+ .size-2\.5 {
421
+ width: calc(var(--spacing) * 2.5);
422
+ height: calc(var(--spacing) * 2.5);
423
+ }
424
+ .size-3 {
425
+ width: calc(var(--spacing) * 3);
426
+ height: calc(var(--spacing) * 3);
427
+ }
417
428
  .size-4 {
418
429
  width: calc(var(--spacing) * 4);
419
430
  height: calc(var(--spacing) * 4);
@@ -674,6 +685,9 @@
674
685
  .justify-start {
675
686
  justify-content: flex-start;
676
687
  }
688
+ .gap-0 {
689
+ gap: calc(var(--spacing) * 0);
690
+ }
677
691
  .gap-1 {
678
692
  gap: calc(var(--spacing) * 1);
679
693
  }
@@ -719,6 +733,13 @@
719
733
  margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
720
734
  }
721
735
  }
736
+ .space-y-3 {
737
+ :where(& > :not(:last-child)) {
738
+ --tw-space-y-reverse: 0;
739
+ margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));
740
+ margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));
741
+ }
742
+ }
722
743
  .self-stretch {
723
744
  align-self: stretch;
724
745
  }
@@ -935,6 +956,9 @@
935
956
  .bg-muted {
936
957
  background-color: var(--muted);
937
958
  }
959
+ .bg-muted-foreground {
960
+ background-color: var(--muted-foreground);
961
+ }
938
962
  .bg-muted\/50 {
939
963
  background-color: var(--muted);
940
964
  @supports (color: color-mix(in lab, red, red)) {
@@ -1058,6 +1082,12 @@
1058
1082
  .pt-0 {
1059
1083
  padding-top: calc(var(--spacing) * 0);
1060
1084
  }
1085
+ .pt-3 {
1086
+ padding-top: calc(var(--spacing) * 3);
1087
+ }
1088
+ .pt-6 {
1089
+ padding-top: calc(var(--spacing) * 6);
1090
+ }
1061
1091
  .pr-2 {
1062
1092
  padding-right: calc(var(--spacing) * 2);
1063
1093
  }
@@ -1070,6 +1100,9 @@
1070
1100
  .pr-10 {
1071
1101
  padding-right: calc(var(--spacing) * 10);
1072
1102
  }
1103
+ .pb-0 {
1104
+ padding-bottom: calc(var(--spacing) * 0);
1105
+ }
1073
1106
  .pl-2 {
1074
1107
  padding-left: calc(var(--spacing) * 2);
1075
1108
  }
@@ -1261,6 +1294,10 @@
1261
1294
  .text-yellow-500 {
1262
1295
  color: var(--color-yellow-500);
1263
1296
  }
1297
+ .tabular-nums {
1298
+ --tw-numeric-spacing: tabular-nums;
1299
+ font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
1300
+ }
1264
1301
  .underline-offset-4 {
1265
1302
  text-underline-offset: 4px;
1266
1303
  }
@@ -2562,6 +2599,11 @@
2562
2599
  margin-top: calc(var(--spacing) * -1);
2563
2600
  }
2564
2601
  }
2602
+ .motion-reduce\:animate-none {
2603
+ @media (prefers-reduced-motion: reduce) {
2604
+ animation: none;
2605
+ }
2606
+ }
2565
2607
  .sm\:mt-0 {
2566
2608
  @media (width >= 40rem) {
2567
2609
  margin-top: calc(var(--spacing) * 0);
@@ -3530,6 +3572,26 @@ button:not(:disabled), [role='button']:not([aria-disabled='true']) {
3530
3572
  syntax: "*";
3531
3573
  inherits: false;
3532
3574
  }
3575
+ @property --tw-ordinal {
3576
+ syntax: "*";
3577
+ inherits: false;
3578
+ }
3579
+ @property --tw-slashed-zero {
3580
+ syntax: "*";
3581
+ inherits: false;
3582
+ }
3583
+ @property --tw-numeric-figure {
3584
+ syntax: "*";
3585
+ inherits: false;
3586
+ }
3587
+ @property --tw-numeric-spacing {
3588
+ syntax: "*";
3589
+ inherits: false;
3590
+ }
3591
+ @property --tw-numeric-fraction {
3592
+ syntax: "*";
3593
+ inherits: false;
3594
+ }
3533
3595
  @property --tw-shadow {
3534
3596
  syntax: "*";
3535
3597
  inherits: false;
@@ -3653,6 +3715,11 @@ button:not(:disabled), [role='button']:not([aria-disabled='true']) {
3653
3715
  --tw-leading: initial;
3654
3716
  --tw-font-weight: initial;
3655
3717
  --tw-tracking: initial;
3718
+ --tw-ordinal: initial;
3719
+ --tw-slashed-zero: initial;
3720
+ --tw-numeric-figure: initial;
3721
+ --tw-numeric-spacing: initial;
3722
+ --tw-numeric-fraction: initial;
3656
3723
  --tw-shadow: 0 0 #0000;
3657
3724
  --tw-shadow-color: initial;
3658
3725
  --tw-shadow-alpha: 100%;
@@ -110,3 +110,4 @@
110
110
  }
111
111
 
112
112
  @source '../ui.js';
113
+ @source './wasm.js';