forgeframe 0.0.10 → 0.0.13
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/README.md +105 -43
- package/dist/communication/index.d.ts +5 -4
- package/dist/communication/messenger.d.ts +1 -0
- package/dist/core/consumer/callbacks.d.ts +19 -0
- package/dist/core/consumer/child-refs.d.ts +15 -0
- package/dist/core/consumer/siblings.d.ts +23 -0
- package/dist/core/consumer/transport.d.ts +15 -8
- package/dist/core/consumer.d.ts +0 -73
- package/dist/core/host/auto-init.d.ts +19 -0
- package/dist/core/host/bootstrap.d.ts +15 -0
- package/dist/core/host/component.d.ts +32 -0
- package/dist/core/host/props-runtime.d.ts +31 -0
- package/dist/core/host/security.d.ts +31 -0
- package/dist/core/host/transport.d.ts +44 -0
- package/dist/core/host/types.d.ts +63 -0
- package/dist/core/host.d.ts +6 -271
- package/dist/drivers/index.d.ts +7 -9
- package/dist/drivers/react.d.ts +1 -2
- package/dist/forgeframe.d.ts +202 -0
- package/dist/forgeframe.js +1601 -1730
- package/dist/forgeframe.umd.cjs +2 -2
- package/dist/index.d.ts +2 -202
- package/dist/props/clone.d.ts +22 -0
- package/dist/props/index.d.ts +2 -1
- package/dist/props/serialize.d.ts +1 -14
- package/dist/render/index.d.ts +5 -29
- package/dist/utils/browser.d.ts +6 -0
- package/dist/utils/domain-pattern.d.ts +35 -0
- package/dist/window/helpers.d.ts +1 -1
- package/dist/window/index.d.ts +6 -6
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Internal domain-pattern helpers shared by ForgeFrame trust and origin checks.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Centralizes wildcard compilation and stateless `RegExp` evaluation so
|
|
7
|
+
* window helpers and the messenger preserve identical domain-matching behavior.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Compiles a wildcard domain pattern into an anchored `RegExp`.
|
|
11
|
+
*
|
|
12
|
+
* @param pattern - Domain pattern that may contain `*` wildcards.
|
|
13
|
+
* @returns Compiled `RegExp`, or `null` when the pattern has no wildcards.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Compiled patterns are cached with a bounded, oldest-entry eviction policy to
|
|
17
|
+
* preserve the prior helper-level wildcard cache behavior.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function compileWildcardDomainPattern(pattern: string): RegExp | null;
|
|
22
|
+
/**
|
|
23
|
+
* Tests a domain `RegExp` without mutating `lastIndex` on global or sticky patterns.
|
|
24
|
+
*
|
|
25
|
+
* @param pattern - Pattern to test.
|
|
26
|
+
* @param value - Domain string to match.
|
|
27
|
+
* @returns `true` when the pattern matches the provided value.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Global and sticky flags are stripped from a cloned `RegExp` before testing so
|
|
31
|
+
* repeated trust checks behave consistently regardless of prior matches.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function testDomainRegExpStateless(pattern: RegExp, value: string): boolean;
|
package/dist/window/helpers.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare function isSameDomain(win: Window, reference?: Window): boolean;
|
|
|
56
56
|
* - `"*"` matches any domain
|
|
57
57
|
* - String patterns without wildcards require exact match
|
|
58
58
|
* - String patterns with `*` use wildcard matching (for example, `'https://*.example.com'`)
|
|
59
|
-
* - RegExp patterns
|
|
59
|
+
* - RegExp patterns are evaluated statelessly so global/sticky flags do not leak `lastIndex` across calls
|
|
60
60
|
* - Array patterns return `true` if any element matches (OR logic)
|
|
61
61
|
*
|
|
62
62
|
* @example
|
package/dist/window/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Internal source barrel for ForgeFrame window utilities.
|
|
3
4
|
*
|
|
4
5
|
* @remarks
|
|
5
|
-
* This
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
6
|
+
* This file groups cross-window helpers, payload parsing, and window reference
|
|
7
|
+
* helpers for internal source organization. The published package does not
|
|
8
|
+
* expose a `forgeframe/window` subpath, so consumers should treat this barrel
|
|
9
|
+
* as internal implementation structure.
|
|
10
10
|
*/
|
|
11
11
|
export { getDomain, isSameDomain, matchDomain, isWindowClosed, getOpener, getConsumer, getTop, isIframe, isPopup, getAncestor, getDistanceToConsumer, focusWindow, closeWindow, getFrames, } from './helpers';
|
|
12
12
|
export { buildWindowName, parseWindowName, isForgeFrameWindow, isHostOfComponent, createWindowPayload, updateWindowName, getInitialPayload, } from './name-payload';
|