@cxxi-lab/hubbyware-sdk 3.0.1 → 3.1.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/frame/hubby.tsx +0 -3
- package/frame/index.ts +1 -1
- package/package.json +1 -1
- package/protocol.ts +2 -6
- package/types/index.d.ts +4 -16
- package/version.json +2 -2
package/frame/hubby.tsx
CHANGED
|
@@ -26,9 +26,6 @@ export function defineHubby(definition: HubbyDefinition): HubbyDefinition {
|
|
|
26
26
|
return definition
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/** @deprecated defineHubby: its SDK 2 name, kept for the hubbies built before the rename */
|
|
30
|
-
export const defineModule = defineHubby
|
|
31
|
-
|
|
32
29
|
/** The page matching a path, with its parameters (`:name` segments). */
|
|
33
30
|
export function match(pages: HubbyPageDefinition[], path: string): { page: HubbyPageDefinition, params: Record<string, string> } | null {
|
|
34
31
|
const parts = path.split('/').filter(Boolean)
|
package/frame/index.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
import './runtime.css'
|
|
5
5
|
|
|
6
6
|
export { call, collection, nav, notifications, settings, useInit, usePath, type Doc } from './sdk'
|
|
7
|
-
export { defineHubby,
|
|
7
|
+
export { defineHubby, start, type HubbyDefinition, type HubbyPageDefinition } from './hubby'
|
|
8
8
|
export { useBackHandler, useMediaQuery } from '@cxxi-lab/hubbyware-ui'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cxxi-lab/hubbyware-sdk",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "The contract of Hubbyware's hubbies: the SDK a hubby builds on (provided by the host app at run time), and the SDK of the hubbies running isolated in their frame. Formerly @cxxi-lab/hub-sdk.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/protocol.ts
CHANGED
|
@@ -26,12 +26,8 @@ export type GuestMessage =
|
|
|
26
26
|
|
|
27
27
|
/** Host → guest. */
|
|
28
28
|
export type HostMessage =
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
* hubby's id under its SDK 2 name, still sent for the hubbies built before the rename (a host from
|
|
32
|
-
* before it sends `module` only).
|
|
33
|
-
*/
|
|
34
|
-
| { type: 'init', hubby: string, module: string, path: string, phone: boolean, scopes: string[], theme?: 'light' | 'dark', accent?: string }
|
|
29
|
+
/** `theme`, `accent`: the app's (a host from before themes sends none: dark, blue) */
|
|
30
|
+
| { type: 'init', hubby: string, path: string, phone: boolean, scopes: string[], theme?: 'light' | 'dark', accent?: string }
|
|
35
31
|
| { type: 'result', id: number, ok: true, value: unknown }
|
|
36
32
|
| { type: 'result', id: number, ok: false, error: string }
|
|
37
33
|
| { type: 'back' }
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @cxxi-lab/hubbyware-sdk 3.0
|
|
1
|
+
// @cxxi-lab/hubbyware-sdk 3.1.0: generated by app/scripts/emit-sdk-types.mjs from app/src/sdk — do not edit.
|
|
2
2
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
import { ComponentType, HTMLInputTypeAttribute, MouseEventHandler, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
4
4
|
|
|
@@ -421,8 +421,6 @@ export interface Platform {
|
|
|
421
421
|
authorizeOAuth(url: string, redirectUri: string): Promise<string | null>;
|
|
422
422
|
/** Opens a hubby's window (HubbyManifest.windows), registered beforehand. */
|
|
423
423
|
openHubbyWindow(hubbyId: string, windowId: string): Promise<void>;
|
|
424
|
-
/** @deprecated openHubbyWindow: its SDK 2 name, kept for the hubbies built before the rename */
|
|
425
|
-
openModuleWindow(hubbyId: string, windowId: string): Promise<void>;
|
|
426
424
|
/** The windows of the active hubbies: what the app menu offers (replaces the previous list). */
|
|
427
425
|
registerHubbyWindows(windows: HubbyWindowInfo[]): Promise<void>;
|
|
428
426
|
openAbout(): Promise<void>;
|
|
@@ -479,13 +477,8 @@ export interface TimelineItem {
|
|
|
479
477
|
id: string;
|
|
480
478
|
date: Date;
|
|
481
479
|
title: string;
|
|
482
|
-
/**
|
|
483
|
-
* the hubby that produced it (for grouping / coloring). A hubby built before the rename (SDK 2)
|
|
484
|
-
* sets `moduleId` instead: a consumer reads `hubbyId ?? moduleId`.
|
|
485
|
-
*/
|
|
480
|
+
/** the hubby that produced it (for grouping / coloring) */
|
|
486
481
|
hubbyId: string;
|
|
487
|
-
/** @deprecated hubbyId (SDK 2) */
|
|
488
|
-
moduleId?: string;
|
|
489
482
|
/** where a consumer can send the user for the full item (deep-link fallback) */
|
|
490
483
|
href: string;
|
|
491
484
|
/** optional presentation hint: a CSS color used as the chip accent (generic) */
|
|
@@ -521,8 +514,6 @@ export type ContributionPoint = keyof ContributionPoints;
|
|
|
521
514
|
/** One hubby's contribution to a point. */
|
|
522
515
|
export interface Contribution<P extends ContributionPoint> {
|
|
523
516
|
hubbyId: string;
|
|
524
|
-
/** @deprecated hubbyId: its SDK 2 name, still set for the hubbies built before the rename */
|
|
525
|
-
moduleId: string;
|
|
526
517
|
value: ContributionPoints[P];
|
|
527
518
|
}
|
|
528
519
|
export interface HubbyNavItem {
|
|
@@ -661,10 +652,8 @@ export declare function usePrivateMode(): boolean;
|
|
|
661
652
|
* (`supports: ['amounts']`), a click shows that one until it is clicked again, the page is left or
|
|
662
653
|
* Ctrl+Alt+Q. Not for an amount being typed (a field): only shown ones.
|
|
663
654
|
*/
|
|
664
|
-
export declare function Amount({ hubby,
|
|
665
|
-
hubby
|
|
666
|
-
/** @deprecated hubby: its SDK 2 name, still read for the hubbies built before the rename */
|
|
667
|
-
module?: string;
|
|
655
|
+
export declare function Amount({ hubby, children, className }: {
|
|
656
|
+
hubby: string;
|
|
668
657
|
children: ReactNode;
|
|
669
658
|
className?: string;
|
|
670
659
|
}): import("react").JSX.Element;
|
|
@@ -1024,7 +1013,6 @@ export declare function formatDate(iso: string | null): string;
|
|
|
1024
1013
|
|
|
1025
1014
|
export {
|
|
1026
1015
|
FormData$1 as FormData,
|
|
1027
|
-
useHubbyVisible as useModuleVisible,
|
|
1028
1016
|
};
|
|
1029
1017
|
|
|
1030
1018
|
export {};
|
package/version.json
CHANGED