@croct/plug 0.12.0 → 0.12.1
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/constants.d.ts +1 -1
- package/constants.js +1 -1
- package/package.json +1 -1
- package/slot.d.ts +3 -3
- package/src/slot.ts +3 -3
package/constants.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export declare const CDN_URL = "https://cdn.croct.io/js/v1/lib/plug.js";
|
|
|
2
2
|
export declare const PLAYGROUND_ORIGIN = "https://play.croct.com";
|
|
3
3
|
export declare const PLAYGROUND_CONNECT_URL = "https://play.croct.com/connect.html";
|
|
4
4
|
export declare const PREVIEW_WIDGET_ORIGIN = "https://cdn.croct.io";
|
|
5
|
-
export declare const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.12.
|
|
5
|
+
export declare const PREVIEW_WIDGET_URL = "https://cdn.croct.io/js/v1/lib/plug/widget-0.12.1.html";
|
package/constants.js
CHANGED
|
@@ -5,5 +5,5 @@ exports.CDN_URL = 'https://cdn.croct.io/js/v1/lib/plug.js';
|
|
|
5
5
|
exports.PLAYGROUND_ORIGIN = 'https://play.croct.com';
|
|
6
6
|
exports.PLAYGROUND_CONNECT_URL = 'https://play.croct.com/connect.html';
|
|
7
7
|
exports.PREVIEW_WIDGET_ORIGIN = 'https://cdn.croct.io';
|
|
8
|
-
exports.PREVIEW_WIDGET_URL = 'https://cdn.croct.io/js/v1/lib/plug/widget-0.12.
|
|
8
|
+
exports.PREVIEW_WIDGET_URL = 'https://cdn.croct.io/js/v1/lib/plug/widget-0.12.1.html';
|
|
9
9
|
//# sourceMappingURL=constants.js.map
|
package/package.json
CHANGED
package/slot.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ export interface VersionedSlotMap extends LatestSlotVersionMap {
|
|
|
21
21
|
* which improves type inference when narrowing the type.
|
|
22
22
|
*/
|
|
23
23
|
type Intersection<T, E> = T extends infer O ? O & E : never;
|
|
24
|
-
type UnionContent = {
|
|
24
|
+
type UnionContent<T = null> = {
|
|
25
25
|
[K in ComponentVersionId]: Intersection<ComponentContent<K>, {
|
|
26
|
-
_component: K |
|
|
26
|
+
_component: K | T;
|
|
27
27
|
}>;
|
|
28
28
|
};
|
|
29
29
|
type UnknownContent = UnionContent[ComponentVersionId] extends never ? (JsonObject & {
|
|
@@ -35,6 +35,6 @@ export type SlotId = keyof VersionedSlotMap extends never ? string : keyof Versi
|
|
|
35
35
|
export type SlotVersion<I extends SlotId = SlotId> = Version<VersionedSlotMap, I>;
|
|
36
36
|
export type SlotVersionId<I extends SlotId = SlotId> = CanonicalVersionId<I, VersionedSlotMap>;
|
|
37
37
|
export type VersionedSlotId<I extends SlotId = SlotId> = VersionedId<I, VersionedSlotMap>;
|
|
38
|
-
export type CompatibleSlotContent<T extends ComponentVersionId = ComponentVersionId> = UnionContent[T];
|
|
38
|
+
export type CompatibleSlotContent<T extends ComponentVersionId = ComponentVersionId> = UnionContent<never>[T];
|
|
39
39
|
export type SlotContent<I extends VersionedSlotId = VersionedSlotId, C extends JsonObject = JsonObject> = JsonObject extends C ? (string extends I ? UnknownContent : VersionedContent<I>) : C;
|
|
40
40
|
export {};
|
package/src/slot.ts
CHANGED
|
@@ -22,8 +22,8 @@ export interface VersionedSlotMap extends LatestSlotVersionMap {
|
|
|
22
22
|
*/
|
|
23
23
|
type Intersection<T, E> = T extends infer O ? O & E : never;
|
|
24
24
|
|
|
25
|
-
type UnionContent = {
|
|
26
|
-
[K in ComponentVersionId]: Intersection<ComponentContent<K>, {_component: K |
|
|
25
|
+
type UnionContent<T = null> = {
|
|
26
|
+
[K in ComponentVersionId]: Intersection<ComponentContent<K>, {_component: K | T}>;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
type UnknownContent = UnionContent[ComponentVersionId] extends never
|
|
@@ -42,7 +42,7 @@ export type SlotVersionId<I extends SlotId = SlotId> = CanonicalVersionId<I, Ver
|
|
|
42
42
|
|
|
43
43
|
export type VersionedSlotId<I extends SlotId = SlotId> = VersionedId<I, VersionedSlotMap>;
|
|
44
44
|
|
|
45
|
-
export type CompatibleSlotContent<T extends ComponentVersionId = ComponentVersionId> = UnionContent[T];
|
|
45
|
+
export type CompatibleSlotContent<T extends ComponentVersionId = ComponentVersionId> = UnionContent<never>[T];
|
|
46
46
|
|
|
47
47
|
export type SlotContent<I extends VersionedSlotId = VersionedSlotId, C extends JsonObject = JsonObject> =
|
|
48
48
|
JsonObject extends C ? (string extends I ? UnknownContent : VersionedContent<I>) : C;
|