caspian-utils 0.1.6 → 0.1.7
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/docs/pulsepoint.md +11 -9
- package/package.json +1 -1
package/dist/docs/pulsepoint.md
CHANGED
|
@@ -346,11 +346,12 @@ Important:
|
|
|
346
346
|
- The script lookup walks the current root and skips nested `pp-component` boundaries, so a parent does not consume a child component's script.
|
|
347
347
|
- If multiple matching runtime scripts exist in the same root, the first matching owned script wins. Generate one script per root.
|
|
348
348
|
- Authored route, layout, and component templates still need one top-level parent node so Caspian can inject the component boundary correctly after component expansion.
|
|
349
|
-
- A scriptless component root still mounts and can receive props, refs, events, and nested children, but it
|
|
349
|
+
- A scriptless component root still mounts and can receive props, refs, events, and nested children, but it does not create local bindings from those props on its own.
|
|
350
350
|
- Component scripts are plain JavaScript executed with `new Function(...)`. Do not use `import`, `export`, or top-level `await` inside them.
|
|
351
351
|
- The runtime auto-returns supported top-level bindings from the script. Do not rely on manual `return { ... }` objects.
|
|
352
|
-
- `pp.props` contains the current prop bag for the component.
|
|
353
|
-
- `pp.props.children` contains the root's initial inner HTML before the owned script is removed from the render template.
|
|
352
|
+
- `pp.props` contains the current prop bag for the component.
|
|
353
|
+
- `pp.props.children` contains the root's initial inner HTML before the owned script is removed from the render template.
|
|
354
|
+
- Props are not auto-injected as standalone top-level template or handler variables. Read them through `pp.props` or explicitly destructure them in the component script.
|
|
354
355
|
|
|
355
356
|
Bindings exported to the template:
|
|
356
357
|
|
|
@@ -569,12 +570,13 @@ When a child component needs the same token object, pass it from the provider sc
|
|
|
569
570
|
|
|
570
571
|
- Child component props are derived from DOM attributes.
|
|
571
572
|
- Attribute names are converted from kebab-case to camelCase for the prop bag.
|
|
572
|
-
- Native `on*` attributes and `pp-component` are not included in props.
|
|
573
|
-
- Empty attributes become boolean `true` props.
|
|
574
|
-
- Pure prop expressions such as `title="{pageTitle}"` are evaluated in the parent scope.
|
|
575
|
-
- Mixed strings such as `class="card {isActive ? 'active' : ''}"` are interpolated in the parent scope.
|
|
576
|
-
- Non-expression attribute values are passed through as strings.
|
|
577
|
-
- `children` is injected into props using the root's initial inner HTML.
|
|
573
|
+
- Native `on*` attributes and `pp-component` are not included in props.
|
|
574
|
+
- Empty attributes become boolean `true` props.
|
|
575
|
+
- Pure prop expressions such as `title="{pageTitle}"` are evaluated in the parent scope.
|
|
576
|
+
- Mixed strings such as `class="card {isActive ? 'active' : ''}"` are interpolated in the parent scope.
|
|
577
|
+
- Non-expression attribute values are passed through as strings.
|
|
578
|
+
- `children` is injected into props using the root's initial inner HTML.
|
|
579
|
+
- Inside the child component, those values should be accessed through `pp.props` or a top-level destructure such as `const { title } = pp.props`; they are not implicitly available as bare identifiers.
|
|
578
580
|
|
|
579
581
|
Nested components:
|
|
580
582
|
|