@teambit/pubsub 1.0.226 → 1.0.228
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_harmony_pubsub-preview.js +1 -1
- package/artifacts/schema.json +5 -17
- package/dist/{preview-1712632644937.js → preview-1712805335812.js} +2 -2
- package/package.json +6 -6
- package/tsconfig.json +13 -1
- package/dist/bit-base-event.d.ts +0 -7
- package/dist/index.d.ts +0 -7
- package/dist/no-parent-error.d.ts +0 -3
- package/dist/pubsub-context.d.ts +0 -14
- package/dist/pubsub.aspect.d.ts +0 -3
- package/dist/pubsub.composition.d.ts +0 -1
- package/dist/pubsub.main.runtime.d.ts +0 -10
- package/dist/pubsub.preview.runtime.d.ts +0 -16
- package/dist/pubsub.ui.runtime.d.ts +0 -36
- package/dist/types.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.harmony/pubsub@1.0.
|
|
3
|
+
<testsuite name="teambit.harmony/pubsub@1.0.228" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/pubsub-preview"]=t():e["teambit.harmony/pubsub-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/pubsub-preview"]=t():e["teambit.harmony/pubsub-preview"]=t()}(self,(()=>(()=>{"use strict";var e={86003:(e,t,o)=>{var r={id:"teambit.harmony/pubsub@1.0.228",homepage:"https://bit.cloud/teambit/harmony/pubsub",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const p=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/pubsub.svg"}));p.__bit_component=r,t.Logo=p},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>d,compositions_metadata:()=>f,overview:()=>b});var e={};o.r(e),o.d(e,{default:()=>u});var t=o(86003);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var p=["components"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},a.apply(this,arguments)}var s={},c="wrapper";function u(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,p);return(0,n.mdx)(c,a({},s,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}u.isMDXComponent=!0;const d=[t],b=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -360,8 +360,7 @@
|
|
|
360
360
|
"line": 24,
|
|
361
361
|
"character": 39
|
|
362
362
|
},
|
|
363
|
-
"name": "Callback"
|
|
364
|
-
"internalFilePath": "types.ts"
|
|
363
|
+
"name": "Callback"
|
|
365
364
|
},
|
|
366
365
|
"isOptional": false,
|
|
367
366
|
"isSpread": false
|
|
@@ -683,11 +682,7 @@
|
|
|
683
682
|
"line": 92,
|
|
684
683
|
"character": 34
|
|
685
684
|
},
|
|
686
|
-
"name": "UiUI"
|
|
687
|
-
"componentId": {
|
|
688
|
-
"scope": "teambit.ui-foundation",
|
|
689
|
-
"name": "ui"
|
|
690
|
-
}
|
|
685
|
+
"name": "UiUI"
|
|
691
686
|
}
|
|
692
687
|
]
|
|
693
688
|
},
|
|
@@ -958,7 +953,6 @@
|
|
|
958
953
|
"character": 39
|
|
959
954
|
},
|
|
960
955
|
"name": "RefObject",
|
|
961
|
-
"packageName": "react",
|
|
962
956
|
"typeArgs": [
|
|
963
957
|
{
|
|
964
958
|
"__schema": "TypeRefSchema",
|
|
@@ -1102,8 +1096,7 @@
|
|
|
1102
1096
|
"line": 24,
|
|
1103
1097
|
"character": 39
|
|
1104
1098
|
},
|
|
1105
|
-
"name": "Callback"
|
|
1106
|
-
"internalFilePath": "types.ts"
|
|
1099
|
+
"name": "Callback"
|
|
1107
1100
|
},
|
|
1108
1101
|
"isOptional": false,
|
|
1109
1102
|
"isSpread": false
|
|
@@ -1562,11 +1555,7 @@
|
|
|
1562
1555
|
"line": 92,
|
|
1563
1556
|
"character": 34
|
|
1564
1557
|
},
|
|
1565
|
-
"name": "UiUI"
|
|
1566
|
-
"componentId": {
|
|
1567
|
-
"scope": "teambit.ui-foundation",
|
|
1568
|
-
"name": "ui"
|
|
1569
|
-
}
|
|
1558
|
+
"name": "UiUI"
|
|
1570
1559
|
}
|
|
1571
1560
|
]
|
|
1572
1561
|
},
|
|
@@ -1959,7 +1948,6 @@
|
|
|
1959
1948
|
"character": 39
|
|
1960
1949
|
},
|
|
1961
1950
|
"name": "RefObject",
|
|
1962
|
-
"packageName": "react",
|
|
1963
1951
|
"typeArgs": [
|
|
1964
1952
|
{
|
|
1965
1953
|
"__schema": "TypeRefSchema",
|
|
@@ -1996,7 +1984,7 @@
|
|
|
1996
1984
|
"componentId": {
|
|
1997
1985
|
"scope": "teambit.harmony",
|
|
1998
1986
|
"name": "pubsub",
|
|
1999
|
-
"version": "1.0.
|
|
1987
|
+
"version": "1.0.228"
|
|
2000
1988
|
},
|
|
2001
1989
|
"taggedModuleExports": []
|
|
2002
1990
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.228/dist/pubsub.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.228/dist/pubsub.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/pubsub",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.228",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/pubsub",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "pubsub",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.228"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"eventemitter2": "6.4.4",
|
|
13
13
|
"penpal": "6.2.2",
|
|
14
14
|
"@teambit/harmony": "0.4.6",
|
|
15
|
-
"@teambit/cli": "0.0.
|
|
16
|
-
"@teambit/ui": "1.0.
|
|
15
|
+
"@teambit/cli": "0.0.861",
|
|
16
|
+
"@teambit/ui": "1.0.228"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/mocha": "9.1.0",
|
|
20
20
|
"chai": "4.3.0",
|
|
21
21
|
"@teambit/ui-foundation.ui.is-browser": "0.0.500",
|
|
22
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
23
|
-
"@teambit/preview": "1.0.
|
|
22
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30",
|
|
23
|
+
"@teambit/preview": "1.0.228"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
23
|
+
"noImplicitAny": false,
|
|
24
|
+
"composite": true
|
|
24
25
|
},
|
|
25
26
|
"exclude": [
|
|
26
27
|
"artifacts",
|
|
@@ -35,5 +36,16 @@
|
|
|
35
36
|
"include": [
|
|
36
37
|
"**/*",
|
|
37
38
|
"**/*.json"
|
|
39
|
+
],
|
|
40
|
+
"references": [
|
|
41
|
+
{
|
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.861"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.228"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.preview_preview@1.0.228"
|
|
49
|
+
}
|
|
38
50
|
]
|
|
39
51
|
}
|
package/dist/bit-base-event.d.ts
DELETED
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { PubsubAspect, PubsubAspect as default } from './pubsub.aspect';
|
|
2
|
-
export type { PubsubMain } from './pubsub.main.runtime';
|
|
3
|
-
export type { PubsubPreview } from './pubsub.preview.runtime';
|
|
4
|
-
export type { PubsubUI } from './pubsub.ui.runtime';
|
|
5
|
-
export { BitBaseEvent } from './bit-base-event';
|
|
6
|
-
export type { PubSubRegistry } from './pubsub-context';
|
|
7
|
-
export { usePubSub, usePubSubIframe } from './pubsub-context';
|
package/dist/pubsub-context.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React, { RefObject, ReactNode } from 'react';
|
|
2
|
-
export interface PubSubRegistry {
|
|
3
|
-
/**
|
|
4
|
-
* starts a connection to an iframe child.
|
|
5
|
-
* Returns a destroy() function that will break the connection.
|
|
6
|
-
*/
|
|
7
|
-
connect(ref: HTMLIFrameElement): () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const pubsubRegistry: React.Context<PubSubRegistry | undefined>;
|
|
10
|
-
export declare function createProvider(pubSubContext: PubSubRegistry): ({ children }: {
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare function usePubSub(): PubSubRegistry | undefined;
|
|
14
|
-
export declare function usePubSubIframe(ref?: RefObject<HTMLIFrameElement>): void;
|
package/dist/pubsub.aspect.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BitBaseEvent } from './bit-base-event';
|
|
2
|
-
export declare class PubsubMain {
|
|
3
|
-
private topicMap;
|
|
4
|
-
private createOrGetTopic;
|
|
5
|
-
sub(topicUUID: any, callback: any): void;
|
|
6
|
-
pub(topicUUID: any, event: BitBaseEvent<any>): void;
|
|
7
|
-
unsubscribeAll(topicId: string): void;
|
|
8
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
9
|
-
static provider(): Promise<PubsubMain>;
|
|
10
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Please Notice: This file will run in the preview iframe.
|
|
3
|
-
*/
|
|
4
|
-
import { BitBaseEvent } from './bit-base-event';
|
|
5
|
-
import { Callback } from './types';
|
|
6
|
-
export declare class PubsubPreview {
|
|
7
|
-
private _parentPubsub?;
|
|
8
|
-
private events;
|
|
9
|
-
sub(topic: string, callback: Callback): () => void;
|
|
10
|
-
pub(topic: string, event: BitBaseEvent<any>): void;
|
|
11
|
-
private inIframe;
|
|
12
|
-
private connectToParentPubSub;
|
|
13
|
-
private handleMessageFromParent;
|
|
14
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
15
|
-
static provider(): Promise<PubsubPreview>;
|
|
16
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { UiUI } from '@teambit/ui';
|
|
3
|
-
import { BitBaseEvent } from './bit-base-event';
|
|
4
|
-
import { Callback } from './types';
|
|
5
|
-
type PubOptions = {
|
|
6
|
-
/** forward the event to adjacent windows (including the preview iframe) */
|
|
7
|
-
propagate?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare class PubsubUI {
|
|
10
|
-
private childApi?;
|
|
11
|
-
private events;
|
|
12
|
-
/**
|
|
13
|
-
* subscribe to events
|
|
14
|
-
*/
|
|
15
|
-
sub: (topic: string, callback: Callback) => () => void;
|
|
16
|
-
/**
|
|
17
|
-
* publish event to all subscribers, including nested iframes.
|
|
18
|
-
*/
|
|
19
|
-
pub: (topic: string, event: BitBaseEvent<any>, { propagate }?: PubOptions) => void;
|
|
20
|
-
private connectToIframe;
|
|
21
|
-
getPubSubContext(): ({ children }: {
|
|
22
|
-
children: import("react").ReactNode;
|
|
23
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
* publish event to all subscribers in this window
|
|
26
|
-
*/
|
|
27
|
-
private emitEvent;
|
|
28
|
-
/**
|
|
29
|
-
* publish event to nested iframes
|
|
30
|
-
*/
|
|
31
|
-
private pubToChild;
|
|
32
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
33
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
34
|
-
static provider([uiUI]: [UiUI]): Promise<PubsubUI>;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
package/dist/types.d.ts
DELETED