@alloy-js/core 0.23.0-dev.13 → 0.23.0-dev.16
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/api-extractor.json +1 -8
- package/api-extractor.testing.json +19 -0
- package/dist/dev/src/binder.js +108 -1
- package/dist/dev/src/binder.js.map +1 -1
- package/dist/dev/src/components/Block.js +17 -5
- package/dist/dev/src/components/Block.js.map +1 -1
- package/dist/dev/src/components/List.js +1 -1
- package/dist/dev/src/components/List.js.map +1 -1
- package/dist/dev/src/components/MemberDeclaration.js +6 -6
- package/dist/dev/src/components/MemberName.js +7 -0
- package/dist/dev/src/components/MemberName.js.map +1 -1
- package/dist/dev/src/components/MemberScope.js +7 -2
- package/dist/dev/src/components/MemberScope.js.map +1 -1
- package/dist/dev/src/components/Output.js +4 -4
- package/dist/dev/src/components/Output.js.map +1 -1
- package/dist/dev/src/components/Scope.js +7 -1
- package/dist/dev/src/components/Scope.js.map +1 -1
- package/dist/dev/src/components/SourceFile.js +3 -3
- package/dist/dev/src/components/SourceFile.js.map +1 -1
- package/dist/dev/src/context/binder.js +5 -0
- package/dist/dev/src/context/binder.js.map +1 -1
- package/dist/dev/src/context/format-options.js +14 -1
- package/dist/dev/src/context/format-options.js.map +1 -1
- package/dist/dev/src/context/scope.js +5 -0
- package/dist/dev/src/context/scope.js.map +1 -1
- package/dist/dev/src/context/source-directory.js +9 -0
- package/dist/dev/src/context/source-directory.js.map +1 -1
- package/dist/dev/src/library-symbol-reference.js +54 -0
- package/dist/dev/src/library-symbol-reference.js.map +1 -1
- package/dist/dev/src/name-policy.js +27 -0
- package/dist/dev/src/name-policy.js.map +1 -1
- package/dist/dev/src/reactivity.js +16 -0
- package/dist/dev/src/reactivity.js.map +1 -1
- package/dist/dev/src/render.js.map +1 -1
- package/dist/dev/src/symbols/output-scope.js +34 -1
- package/dist/dev/src/symbols/output-scope.js.map +1 -1
- package/dist/dev/src/symbols/output-space.js +15 -0
- package/dist/dev/src/symbols/output-space.js.map +1 -1
- package/dist/dev/src/symbols/output-symbol.js +81 -11
- package/dist/dev/src/symbols/output-symbol.js.map +1 -1
- package/dist/dev/src/symbols/symbol-slot.js +7 -0
- package/dist/dev/src/symbols/symbol-slot.js.map +1 -1
- package/dist/dev/src/symbols/symbol-slot.test.js +27 -2
- package/dist/dev/src/symbols/symbol-slot.test.js.map +1 -1
- package/dist/dev/testing/create-test-wrapper.js +59 -5
- package/dist/dev/testing/create-test-wrapper.js.map +1 -1
- package/dist/dev/testing/extend-expect.js +20 -0
- package/dist/dev/testing/extend-expect.js.map +1 -1
- package/dist/dev/testing/index.js +1 -1
- package/dist/dev/testing/index.js.map +1 -1
- package/dist/dev/testing/render.js +11 -0
- package/dist/dev/testing/render.js.map +1 -1
- package/dist/dev/testing/vitest.d.js +12 -0
- package/dist/dev/testing/vitest.d.js.map +1 -1
- package/dist/src/binder.d.ts +107 -3
- package/dist/src/binder.d.ts.map +1 -1
- package/dist/src/binder.js +108 -1
- package/dist/src/binder.js.map +1 -1
- package/dist/src/components/Block.d.ts +12 -0
- package/dist/src/components/Block.d.ts.map +1 -1
- package/dist/src/components/Block.js +12 -0
- package/dist/src/components/Block.js.map +1 -1
- package/dist/src/components/List.d.ts +11 -1
- package/dist/src/components/List.d.ts.map +1 -1
- package/dist/src/components/List.js.map +1 -1
- package/dist/src/components/MemberDeclaration.d.ts +6 -6
- package/dist/src/components/MemberDeclaration.js +6 -6
- package/dist/src/components/MemberName.d.ts +6 -0
- package/dist/src/components/MemberName.d.ts.map +1 -1
- package/dist/src/components/MemberName.js +7 -0
- package/dist/src/components/MemberName.js.map +1 -1
- package/dist/src/components/MemberScope.d.ts +5 -0
- package/dist/src/components/MemberScope.d.ts.map +1 -1
- package/dist/src/components/MemberScope.js +5 -0
- package/dist/src/components/MemberScope.js.map +1 -1
- package/dist/src/components/Output.d.ts +4 -2
- package/dist/src/components/Output.d.ts.map +1 -1
- package/dist/src/components/Output.js.map +1 -1
- package/dist/src/components/Scope.d.ts +6 -0
- package/dist/src/components/Scope.d.ts.map +1 -1
- package/dist/src/components/Scope.js +6 -0
- package/dist/src/components/Scope.js.map +1 -1
- package/dist/src/components/SourceFile.d.ts +22 -2
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js.map +1 -1
- package/dist/src/context/binder.d.ts +4 -0
- package/dist/src/context/binder.d.ts.map +1 -1
- package/dist/src/context/binder.js +5 -0
- package/dist/src/context/binder.js.map +1 -1
- package/dist/src/context/format-options.d.ts +14 -1
- package/dist/src/context/format-options.d.ts.map +1 -1
- package/dist/src/context/format-options.js +14 -1
- package/dist/src/context/format-options.js.map +1 -1
- package/dist/src/context/scope.d.ts +4 -0
- package/dist/src/context/scope.d.ts.map +1 -1
- package/dist/src/context/scope.js +5 -0
- package/dist/src/context/scope.js.map +1 -1
- package/dist/src/context/source-directory.d.ts +9 -0
- package/dist/src/context/source-directory.d.ts.map +1 -1
- package/dist/src/context/source-directory.js +9 -0
- package/dist/src/context/source-directory.js.map +1 -1
- package/dist/src/library-symbol-reference.d.ts +52 -0
- package/dist/src/library-symbol-reference.d.ts.map +1 -1
- package/dist/src/library-symbol-reference.js +54 -0
- package/dist/src/library-symbol-reference.js.map +1 -1
- package/dist/src/name-policy.d.ts +30 -3
- package/dist/src/name-policy.d.ts.map +1 -1
- package/dist/src/name-policy.js +27 -0
- package/dist/src/name-policy.js.map +1 -1
- package/dist/src/reactivity.d.ts +15 -0
- package/dist/src/reactivity.d.ts.map +1 -1
- package/dist/src/reactivity.js +16 -0
- package/dist/src/reactivity.js.map +1 -1
- package/dist/src/render.d.ts +2 -0
- package/dist/src/render.d.ts.map +1 -1
- package/dist/src/render.js.map +1 -1
- package/dist/src/symbols/output-scope.d.ts +33 -1
- package/dist/src/symbols/output-scope.d.ts.map +1 -1
- package/dist/src/symbols/output-scope.js +34 -1
- package/dist/src/symbols/output-scope.js.map +1 -1
- package/dist/src/symbols/output-space.d.ts +12 -0
- package/dist/src/symbols/output-space.d.ts.map +1 -1
- package/dist/src/symbols/output-space.js +15 -0
- package/dist/src/symbols/output-space.js.map +1 -1
- package/dist/src/symbols/output-symbol.d.ts +93 -12
- package/dist/src/symbols/output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/output-symbol.js +81 -11
- package/dist/src/symbols/output-symbol.js.map +1 -1
- package/dist/src/symbols/symbol-slot.d.ts.map +1 -1
- package/dist/src/symbols/symbol-slot.js +7 -0
- package/dist/src/symbols/symbol-slot.js.map +1 -1
- package/dist/src/symbols/symbol-slot.test.js +18 -1
- package/dist/src/symbols/symbol-slot.test.js.map +1 -1
- package/dist/testing/create-test-wrapper.d.ts +75 -2
- package/dist/testing/create-test-wrapper.d.ts.map +1 -1
- package/dist/testing/create-test-wrapper.js +55 -1
- package/dist/testing/create-test-wrapper.js.map +1 -1
- package/dist/testing/extend-expect.d.ts +26 -0
- package/dist/testing/extend-expect.d.ts.map +1 -1
- package/dist/testing/extend-expect.js +20 -0
- package/dist/testing/extend-expect.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/render.d.ts +9 -0
- package/dist/testing/render.d.ts.map +1 -1
- package/dist/testing/render.js +11 -0
- package/dist/testing/render.js.map +1 -1
- package/dist/testing/vitest.d.js +12 -0
- package/dist/testing/vitest.d.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/api/components/AppendRegion.md +83 -0
- package/docs/api/components/Block.md +49 -0
- package/docs/api/components/CopyFile.md +26 -0
- package/docs/api/components/Declaration.md +85 -0
- package/docs/api/components/For.md +91 -0
- package/docs/api/components/Indent.md +40 -0
- package/docs/api/components/List.md +68 -0
- package/docs/api/components/MemberDeclaration.md +89 -0
- package/docs/api/components/MemberName.md +21 -0
- package/docs/api/components/MemberScope.md +81 -0
- package/docs/api/components/Name.md +19 -0
- package/docs/api/components/Output.md +62 -0
- package/docs/api/components/Prose.md +29 -0
- package/docs/api/components/ReferenceOrContent.md +28 -0
- package/docs/api/components/Scope.md +83 -0
- package/docs/api/components/Show.md +32 -0
- package/docs/api/components/SourceDirectory.md +28 -0
- package/docs/api/components/SourceFile.md +60 -0
- package/docs/api/components/StatementList.md +29 -0
- package/docs/api/components/Switch.md +42 -0
- package/docs/api/components/TemplateFile.md +71 -0
- package/docs/api/components/TemplateVariable.md +57 -0
- package/docs/api/components/UpdateFile.md +56 -0
- package/docs/api/components/Wrap.md +40 -0
- package/docs/api/components/createAccessExpression.md +55 -0
- package/docs/api/components/index.md +27 -0
- package/docs/api/contexts/Assignment-context.md +43 -0
- package/docs/api/contexts/Binder-context.md +22 -0
- package/docs/api/contexts/Declaration-context.md +15 -0
- package/docs/api/contexts/Member-context.md +17 -0
- package/docs/api/contexts/MemberDeclaration-context.md +24 -0
- package/docs/api/contexts/NamePolicy-context.md +18 -0
- package/docs/api/contexts/Scope-context.md +20 -0
- package/docs/api/contexts/SourceDirectory-context.md +26 -0
- package/docs/api/contexts/SourceFile-context.md +19 -0
- package/docs/api/contexts/index.md +11 -0
- package/docs/api/functions/attachDiagnosticsCollector.md +18 -0
- package/docs/api/functions/baseListPropsToMapJoinArgs.md +20 -0
- package/docs/api/functions/children.md +27 -0
- package/docs/api/functions/childrenArray.md +25 -0
- package/docs/api/functions/code.md +25 -0
- package/docs/api/functions/computed.md +18 -0
- package/docs/api/functions/createComponent.md +20 -0
- package/docs/api/functions/createContentSlot.md +33 -0
- package/docs/api/functions/createContext.md +19 -0
- package/docs/api/functions/createCustomContext.md +18 -0
- package/docs/api/functions/createDeclarationTap.md +20 -0
- package/docs/api/functions/createFileResource.md +35 -0
- package/docs/api/functions/createFormatOptionsContextFor.md +28 -0
- package/docs/api/functions/createIntrinsic.md +19 -0
- package/docs/api/functions/createMemberTap.md +20 -0
- package/docs/api/functions/createNamePolicy.md +37 -0
- package/docs/api/functions/createNamedContext.md +19 -0
- package/docs/api/functions/createOutputBinder.md +24 -0
- package/docs/api/functions/createRenderTreeHook.md +19 -0
- package/docs/api/functions/createResource.md +77 -0
- package/docs/api/functions/createScope.md +35 -0
- package/docs/api/functions/createScopeTap.md +20 -0
- package/docs/api/functions/createSourceFileTap.md +20 -0
- package/docs/api/functions/createSymbol.md +25 -0
- package/docs/api/functions/createSymbolSlot.md +19 -0
- package/docs/api/functions/createTap.md +55 -0
- package/docs/api/functions/decl.md +20 -0
- package/docs/api/functions/defaultProps.md +21 -0
- package/docs/api/functions/effect.md +26 -0
- package/docs/api/functions/emitDiagnostic.md +18 -0
- package/docs/api/functions/emitSymbol.md +18 -0
- package/docs/api/functions/ensureIsEmpty.md +20 -0
- package/docs/api/functions/findCurrentEffectId.md +19 -0
- package/docs/api/functions/findKeyedChild.md +19 -0
- package/docs/api/functions/findKeyedChildren.md +19 -0
- package/docs/api/functions/findUnkeyedChildren.md +18 -0
- package/docs/api/functions/formatReactivePropertyLabel.md +21 -0
- package/docs/api/functions/getAssignmentSymbol.md +19 -0
- package/docs/api/functions/getContext.md +17 -0
- package/docs/api/functions/getContextForRenderNode.md +18 -0
- package/docs/api/functions/getDiagnosticsForTree.md +18 -0
- package/docs/api/functions/getEffectDebugId.md +18 -0
- package/docs/api/functions/getElementCache.md +17 -0
- package/docs/api/functions/getReactiveCreationLocation.md +18 -0
- package/docs/api/functions/getSymbolCreator.md +18 -0
- package/docs/api/functions/getSymbolCreatorSymbol.md +17 -0
- package/docs/api/functions/index.md +105 -0
- package/docs/api/functions/inspectRefkey.md +18 -0
- package/docs/api/functions/instantiateTakenMembersTo.md +20 -0
- package/docs/api/functions/isComponentCreator.md +19 -0
- package/docs/api/functions/isCustomContext.md +18 -0
- package/docs/api/functions/isIntrinsicElement.md +18 -0
- package/docs/api/functions/isKeyedChild.md +18 -0
- package/docs/api/functions/isLibrarySymbolReference.md +18 -0
- package/docs/api/functions/isMemberRefkey.md +18 -0
- package/docs/api/functions/isNamekey.md +18 -0
- package/docs/api/functions/isPrintHook.md +18 -0
- package/docs/api/functions/isRefkey.md +18 -0
- package/docs/api/functions/isRefkeyable.md +18 -0
- package/docs/api/functions/isRenderableObject.md +20 -0
- package/docs/api/functions/isSymbolRefkey.md +18 -0
- package/docs/api/functions/join.md +33 -0
- package/docs/api/functions/mapJoin.md +106 -0
- package/docs/api/functions/memberRefkey.md +27 -0
- package/docs/api/functions/memo.md +29 -0
- package/docs/api/functions/mergeProps.md +64 -0
- package/docs/api/functions/moveTakenMembersTo.md +18 -0
- package/docs/api/functions/namekey.md +41 -0
- package/docs/api/functions/nextReactiveId.md +19 -0
- package/docs/api/functions/notifyContentState.md +17 -0
- package/docs/api/functions/onCleanup.md +26 -0
- package/docs/api/functions/printTree.md +31 -0
- package/docs/api/functions/reactivePropertyRefId.md +21 -0
- package/docs/api/functions/ref.md +21 -0
- package/docs/api/functions/refId.md +18 -0
- package/docs/api/functions/refkey.md +24 -0
- package/docs/api/functions/render.md +31 -0
- package/docs/api/functions/renderAsync.md +31 -0
- package/docs/api/functions/renderTree.md +18 -0
- package/docs/api/functions/reportDiagnostics.md +18 -0
- package/docs/api/functions/resetRefIdCounter.md +17 -0
- package/docs/api/functions/resolve.md +31 -0
- package/docs/api/functions/root.md +25 -0
- package/docs/api/functions/shallowReactive.md +18 -0
- package/docs/api/functions/shallowRef.md +21 -0
- package/docs/api/functions/sourceFilesForTree.md +31 -0
- package/docs/api/functions/splitProps.md +19 -0
- package/docs/api/functions/stc.md +18 -0
- package/docs/api/functions/sti.md +18 -0
- package/docs/api/functions/symbolForRefkey.md +24 -0
- package/docs/api/functions/taggedComponent.md +19 -0
- package/docs/api/functions/takeSymbols.md +18 -0
- package/docs/api/functions/text.md +19 -0
- package/docs/api/functions/toRef.md +20 -0
- package/docs/api/functions/toRefkey.md +18 -0
- package/docs/api/functions/toRefs.md +20 -0
- package/docs/api/functions/traverseOutput.md +21 -0
- package/docs/api/functions/unresolvedRefkey.md +18 -0
- package/docs/api/functions/untrack.md +18 -0
- package/docs/api/functions/useContext.md +18 -0
- package/docs/api/functions/useFormatOptions.md +18 -0
- package/docs/api/functions/useMemberContext.md +17 -0
- package/docs/api/functions/useMemberScope.md +17 -0
- package/docs/api/functions/writeOutput.md +21 -0
- package/docs/api/index.md +9 -0
- package/docs/api/testing/functions/createTestWrapper.md +70 -0
- package/docs/api/testing/functions/d.md +21 -0
- package/docs/api/testing/functions/dedent.md +18 -0
- package/docs/api/testing/functions/index.md +6 -0
- package/docs/api/testing/functions/renderToString.md +20 -0
- package/docs/api/testing/index.md +4 -0
- package/docs/api/testing/types/TestWrapper.md +10 -0
- package/docs/api/testing/types/ToRenderToOptions.md +24 -0
- package/docs/api/testing/types/index.md +4 -0
- package/docs/api/types/AlignIntrinsicElement.md +5 -0
- package/docs/api/types/AppendRegionProps.md +5 -0
- package/docs/api/types/BaseListProps.md +21 -0
- package/docs/api/types/BasePartProps.md +10 -0
- package/docs/api/types/BasicScope.md +15 -0
- package/docs/api/types/BasicSymbol.md +18 -0
- package/docs/api/types/Binder.md +18 -0
- package/docs/api/types/BinderOptions.md +7 -0
- package/docs/api/types/BrIntrinsicElement.md +5 -0
- package/docs/api/types/BreakParentIntrinsicElement.md +5 -0
- package/docs/api/types/Child.md +5 -0
- package/docs/api/types/Children.md +5 -0
- package/docs/api/types/ChildrenOptions.md +7 -0
- package/docs/api/types/CommonFormatOptions.md +8 -0
- package/docs/api/types/Component.md +8 -0
- package/docs/api/types/ComponentContext.md +11 -0
- package/docs/api/types/ComponentCreator.md +11 -0
- package/docs/api/types/ComponentDefinition.md +7 -0
- package/docs/api/types/ContentOutputFile.md +10 -0
- package/docs/api/types/ContentSlot.md +12 -0
- package/docs/api/types/Context.md +19 -0
- package/docs/api/types/ContextProviderProps.md +8 -0
- package/docs/api/types/CopyFileContext.md +8 -0
- package/docs/api/types/CopyOutputFile.md +9 -0
- package/docs/api/types/CustomContext.md +10 -0
- package/docs/api/types/CustomContextChildrenCallback.md +5 -0
- package/docs/api/types/DeclarationProps.md +5 -0
- package/docs/api/types/DedentIntrinsicElement.md +5 -0
- package/docs/api/types/DedentToRootIntrinsicElement.md +5 -0
- package/docs/api/types/Diagnostic.md +11 -0
- package/docs/api/types/DiagnosticHandle.md +7 -0
- package/docs/api/types/DiagnosticInput.md +10 -0
- package/docs/api/types/DiagnosticSeverity.md +5 -0
- package/docs/api/types/DiagnosticStackEntry.md +9 -0
- package/docs/api/types/DiagnosticsCollector.md +8 -0
- package/docs/api/types/Disposable_2.md +7 -0
- package/docs/api/types/EffectDebugOptions.md +8 -0
- package/docs/api/types/EffectOptions.md +7 -0
- package/docs/api/types/ElementCache.md +5 -0
- package/docs/api/types/ElementCacheKey.md +5 -0
- package/docs/api/types/FillIntrinsicElement.md +5 -0
- package/docs/api/types/ForCallbackArgs.md +5 -0
- package/docs/api/types/ForSupportedCollections.md +5 -0
- package/docs/api/types/GroupIntrinsicElement.md +5 -0
- package/docs/api/types/HardlineIntrinsicElement.md +5 -0
- package/docs/api/types/HbrIntrinsicElement.md +5 -0
- package/docs/api/types/IfBreakIntrinsicElement.md +5 -0
- package/docs/api/types/IndentIfBreakIntrinsicElement.md +5 -0
- package/docs/api/types/IndentIntrinsicElement.md +5 -0
- package/docs/api/types/IntrinsicElement.md +5 -0
- package/docs/api/types/IntrinsicElementBase.md +9 -0
- package/docs/api/types/IntrinsicElements.md +26 -0
- package/docs/api/types/JoinOptions.md +9 -0
- package/docs/api/types/LbrIntrinsicElement.md +5 -0
- package/docs/api/types/LibrarySymbolReference.md +13 -0
- package/docs/api/types/LineIntrinsicElement.md +5 -0
- package/docs/api/types/LineSuffixBoundaryIntrinsicElement.md +5 -0
- package/docs/api/types/LineSuffixIntrinsicElement.md +5 -0
- package/docs/api/types/LiterallineIntrinsicElement.md +5 -0
- package/docs/api/types/MakeChildrenOptional.md +7 -0
- package/docs/api/types/MarkAsRootIntrinsicElement.md +5 -0
- package/docs/api/types/MatchProps.md +9 -0
- package/docs/api/types/MemberDeclarationProps.md +5 -0
- package/docs/api/types/MemberDescriptor.md +10 -0
- package/docs/api/types/MemberRefkey.md +10 -0
- package/docs/api/types/MemberResolutionContext.md +10 -0
- package/docs/api/types/MemberResolver.md +32 -0
- package/docs/api/types/MemberScopeProps.md +5 -0
- package/docs/api/types/Metadata.md +5 -0
- package/docs/api/types/NameConflictResolver.md +27 -0
- package/docs/api/types/NamePolicy.md +8 -0
- package/docs/api/types/NamePolicyGetter.md +9 -0
- package/docs/api/types/Namekey.md +10 -0
- package/docs/api/types/NamekeyOptions.md +8 -0
- package/docs/api/types/OnReactiveSetAddCallback.md +5 -0
- package/docs/api/types/OnReactiveSetDeleteCallback.md +5 -0
- package/docs/api/types/OutputDeclarationSpace.md +13 -0
- package/docs/api/types/OutputDirectory.md +59 -0
- package/docs/api/types/OutputFile.md +5 -0
- package/docs/api/types/OutputFileBase.md +8 -0
- package/docs/api/types/OutputMemberSpace.md +13 -0
- package/docs/api/types/OutputScope.md +33 -0
- package/docs/api/types/OutputScopeOptions.md +9 -0
- package/docs/api/types/OutputSpace.md +7 -0
- package/docs/api/types/OutputSymbol.md +76 -0
- package/docs/api/types/OutputSymbolOptions.md +16 -0
- package/docs/api/types/OutputVisitor.md +10 -0
- package/docs/api/types/PrintHook.md +10 -0
- package/docs/api/types/PrintTreeOptions.md +11 -0
- package/docs/api/types/Props.md +5 -0
- package/docs/api/types/ReactiveUnionSet.md +20 -0
- package/docs/api/types/ReactiveUnionSetOptions.md +8 -0
- package/docs/api/types/Refkey.md +5 -0
- package/docs/api/types/Refkeyable.md +5 -0
- package/docs/api/types/RefkeyableObject.md +7 -0
- package/docs/api/types/RenderableObject.md +9 -0
- package/docs/api/types/RenderedTextTree.md +5 -0
- package/docs/api/types/ResolutionResult.md +39 -0
- package/docs/api/types/ResolveDeclarationByKeyOptions.md +7 -0
- package/docs/api/types/Resource.md +11 -0
- package/docs/api/types/RootOptions.md +7 -0
- package/docs/api/types/SbrIntrinsicElement.md +5 -0
- package/docs/api/types/ScopeProps.md +5 -0
- package/docs/api/types/SoftlineIntrinsicElement.md +5 -0
- package/docs/api/types/SourceLocation.md +9 -0
- package/docs/api/types/SplitProps.md +12 -0
- package/docs/api/types/StcComponentCreator.md +9 -0
- package/docs/api/types/StcSignature.md +5 -0
- package/docs/api/types/StiComponentCreator.md +9 -0
- package/docs/api/types/StiSignature.md +7 -0
- package/docs/api/types/SymbolCreator.md +15 -0
- package/docs/api/types/SymbolRefkey.md +9 -0
- package/docs/api/types/SymbolSlot.md +12 -0
- package/docs/api/types/SymbolTable.md +15 -0
- package/docs/api/types/TakeSymbolCallback.md +7 -0
- package/docs/api/types/TakeSymbolsCallback.md +7 -0
- package/docs/api/types/Tap.md +11 -0
- package/docs/api/types/TapHandler.md +9 -0
- package/docs/api/types/Tapper.md +9 -0
- package/docs/api/types/TemplateVariableProps.md +5 -0
- package/docs/api/types/index.md +122 -0
- package/docs/api/variables/FormatOptions.md +5 -0
- package/docs/api/variables/Match.md +7 -0
- package/docs/api/variables/REFKEYABLE.md +5 -0
- package/docs/api/variables/RENDERABLE.md +5 -0
- package/docs/api/variables/TO_SYMBOL.md +39 -0
- package/docs/api/variables/contextsByKey.md +5 -0
- package/docs/api/variables/index.md +11 -0
- package/docs/api/variables/intrinsicElementKey.md +5 -0
- package/docs/api/variables/matchTag.md +5 -0
- package/docs/api/variables/printHookTag.md +7 -0
- package/docs/components.md +97 -0
- package/docs/context.md +67 -0
- package/docs/control-flow.md +5 -0
- package/docs/debugging.md +105 -0
- package/docs/formatting.md +99 -0
- package/docs/guides/language-package-guide.md +593 -0
- package/docs/guides/references-and-refkeys.md +210 -0
- package/docs/guides/style-guide.md +244 -0
- package/docs/index.md +22 -0
- package/docs/reactivity.md +68 -0
- package/docs/rendering.md +41 -0
- package/docs/symbols-and-scopes.md +180 -0
- package/package.json +4 -4
- package/src/binder.ts +107 -3
- package/src/components/Block.tsx +12 -0
- package/src/components/List.tsx +11 -1
- package/src/components/MemberDeclaration.tsx +6 -6
- package/src/components/MemberName.tsx +6 -0
- package/src/components/MemberScope.tsx +5 -0
- package/src/components/Output.tsx +4 -1
- package/src/components/Scope.tsx +6 -0
- package/src/components/SourceFile.tsx +22 -2
- package/src/context/binder.ts +4 -0
- package/src/context/format-options.ts +14 -1
- package/src/context/scope.ts +4 -0
- package/src/context/source-directory.ts +9 -0
- package/src/library-symbol-reference.ts +52 -0
- package/src/name-policy.ts +30 -3
- package/src/reactivity.ts +15 -0
- package/src/render.ts +2 -0
- package/src/symbols/output-scope.ts +33 -1
- package/src/symbols/output-space.ts +13 -0
- package/src/symbols/output-symbol.ts +93 -12
- package/src/symbols/symbol-slot.test.tsx +28 -1
- package/src/symbols/symbol-slot.tsx +8 -0
- package/temp/api-testing.json +673 -0
- package/temp/api.json +48 -47
- package/testing/create-test-wrapper.tsx +81 -2
- package/testing/extend-expect.ts +22 -1
- package/testing/index.ts +1 -1
- package/testing/render.ts +9 -0
- package/testing/vitest.d.ts +18 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# createMemberTap
|
|
2
|
+
|
|
3
|
+
Create a tap for [MemberDeclaration context](../../contexts/memberdeclaration-context/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createMemberTap } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createMemberTap<TSymbol extends OutputSymbol = OutputSymbol>(handler?: TapHandler<TSymbol>): Tap<TSymbol>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ------- | ----------------------------- | - |
|
|
16
|
+
| handler | optional TapHandler\<TSymbol> | |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
[Tap](../../types/tap/)\<TSymbol>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# createNamePolicy
|
|
2
|
+
|
|
3
|
+
Creates a name policy that transforms symbol names based on element kind.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createNamePolicy } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createNamePolicy<T extends string>(namer: (name: string, element: T) => string): NamePolicy<T>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ----- | ------------------------------------ | - |
|
|
16
|
+
| namer | (name: string, element: T) => string | |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
[NamePolicy](../../types/namepolicy/)\<T>
|
|
21
|
+
|
|
22
|
+
## Remarks
|
|
23
|
+
|
|
24
|
+
`element` identifies the kind of declaration (e.g., `"value"`, `"type"`). The set of valid element strings is defined by the language package.
|
|
25
|
+
|
|
26
|
+
When `element` is `undefined` (outside a declaration context), \[unresolved link] and \[unresolved link] short-circuit and return the original name unchanged — the namer callback is **not** invoked. The namer therefore always receives a defined `T`. This means names outside a declaration context cannot be transformed by the policy.
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
const policy = createNamePolicy((name, element) => {
|
|
32
|
+
if (element === "value") return toCamelCase(name);
|
|
33
|
+
if (element === "type") return toPascalCase(name);
|
|
34
|
+
return name;
|
|
35
|
+
});
|
|
36
|
+
<Output namePolicy={policy}>...</Output>
|
|
37
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# createNamedContext
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { createNamedContext } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function createNamedContext<T>(name: string, defaultValue?: T): ComponentContext<T>;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| ------------ | ---------- | - |
|
|
14
|
+
| name | string | |
|
|
15
|
+
| defaultValue | optional T | |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
[ComponentContext](../../types/componentcontext/)\<T>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# createOutputBinder
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { createOutputBinder } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function createOutputBinder(options?: BinderOptions): Binder;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| ------- | ---------------------- | - |
|
|
14
|
+
| options | optional BinderOptions | |
|
|
15
|
+
|
|
16
|
+
## Options
|
|
17
|
+
|
|
18
|
+
| | | |
|
|
19
|
+
| -------------------- | ------------------------------------------------------------------ | - |
|
|
20
|
+
| nameConflictResolver | optional [NameConflictResolver](../../types/nameconflictresolver/) | |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
[Binder](../../types/binder/)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# createRenderTreeHook
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { createRenderTreeHook } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function createRenderTreeHook(subtree: RenderedTextTree, hooks: Omit<PrintHook, typeof printHookTag | "subtree">): PrintHook;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| ------- | -------------------------------------------------- | - |
|
|
14
|
+
| subtree | RenderedTextTree | |
|
|
15
|
+
| hooks | Omit\<PrintHook, typeof printHookTag \| “subtree”> | |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
[PrintHook](../../types/printhook/)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# createResource
|
|
2
|
+
|
|
3
|
+
## Overload 1
|
|
4
|
+
|
|
5
|
+
Create a resource that fetches data asynchronously.
|
|
6
|
+
|
|
7
|
+
This function has two overloads:
|
|
8
|
+
|
|
9
|
+
1. Simple fetcher - fetches data once when the resource is created
|
|
10
|
+
2. Reactive fetcher - fetches data when a reactive source changes
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { createResource } from "@alloy-js/core";
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
function createResource<U>(fetcher: () => Promise<U>): Resource<U>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Parameters
|
|
20
|
+
|
|
21
|
+
| | | |
|
|
22
|
+
| ------- | ----------------- | - |
|
|
23
|
+
| fetcher | () => Promise\<U> | |
|
|
24
|
+
|
|
25
|
+
### Returns
|
|
26
|
+
|
|
27
|
+
[Resource](../../types/resource/)\<U>
|
|
28
|
+
|
|
29
|
+
### Examples
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// Simple usage - fetches data once when created
|
|
33
|
+
const userResource = createResource(async () => {
|
|
34
|
+
const response = await fetch('/api/user');
|
|
35
|
+
return response.json();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Access the resource state
|
|
39
|
+
console.log(userResource.loading); // true initially
|
|
40
|
+
console.log(userResource.data); // null initially
|
|
41
|
+
console.log(userResource.error); // null initially
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
// Reactive usage - fetches data when the ref changes
|
|
46
|
+
const userId = ref(1);
|
|
47
|
+
|
|
48
|
+
const userResource = createResource(userId, async (id) => {
|
|
49
|
+
const response = await fetch(`/api/user/${id}`);
|
|
50
|
+
return response.json();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// The fetcher will be called automatically when userId changes
|
|
54
|
+
userId.value = 2; // This triggers a new fetch with id=2
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Overload 2
|
|
58
|
+
|
|
59
|
+
Create a resource that fetches data asynchronously based on a reactive source.
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import { createResource } from "@alloy-js/core";
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
function createResource<T, U>(refSource: Ref<T> | (() => T), fetcher: (input: T) => Promise<U>): Resource<U>;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
| | | |
|
|
71
|
+
| --------- | ------------------------- | - |
|
|
72
|
+
| refSource | Ref\<T> \| (() => T) | |
|
|
73
|
+
| fetcher | (input: T) => Promise\<U> | |
|
|
74
|
+
|
|
75
|
+
### Returns
|
|
76
|
+
|
|
77
|
+
[Resource](../../types/resource/)\<U>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# createScope
|
|
2
|
+
|
|
3
|
+
Construct a scope instance and register it with devtools. Prefer this over calling `new` directly so that debugging tools can track the scope.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createScope } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createScope<TScope extends OutputScope, Args extends unknown[]>(ctor: new (...args: Args) => TScope, ...args: Args): TScope;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ---- | --------------------------- | - |
|
|
16
|
+
| ctor | new (…args: Args) => TScope | |
|
|
17
|
+
| args | Args | |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
TScope
|
|
22
|
+
|
|
23
|
+
## Remarks
|
|
24
|
+
|
|
25
|
+
Inside a component, obtain the current scope with `useScope()` and pass it as the `parentScope` constructor argument so the new scope is wired into the scope tree.
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
function MyScope(props) {
|
|
31
|
+
const parentScope = useScope();
|
|
32
|
+
const scope = createScope(MyScope, "scope-name", parentScope);
|
|
33
|
+
return <Scope value={scope}>{props.children}</Scope>;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# createScopeTap
|
|
2
|
+
|
|
3
|
+
Create a tap for [OutputScope](../../types/outputscope/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createScopeTap } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createScopeTap<TScope extends OutputScope = OutputScope>(handler?: TapHandler<TScope>): Tap<TScope>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ------- | ---------------------------- | - |
|
|
16
|
+
| handler | optional TapHandler\<TScope> | |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
[Tap](../../types/tap/)\<TScope>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# createSourceFileTap
|
|
2
|
+
|
|
3
|
+
Create a tap for [SourceFile context interface](../../contexts/sourcefile-context/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createSourceFileTap } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createSourceFileTap(handler?: TapHandler<SourceFileContext>): Tap<SourceFileContext>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ------- | --------------------------------------- | - |
|
|
16
|
+
| handler | optional TapHandler\<SourceFileContext> | |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
[Tap](../../types/tap/)<[SourceFile context interface](../../contexts/sourcefile-context/)>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# createSymbol
|
|
2
|
+
|
|
3
|
+
Construct a symbol instance and register it with devtools. Prefer this over calling `new` directly so that debugging tools can track the symbol.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createSymbol } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createSymbol<TSymbol extends OutputSymbol, Args extends unknown[]>(ctor: new (...args: Args) => TSymbol, ...args: Args): TSymbol;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ---- | ---------------------------- | - |
|
|
16
|
+
| ctor | new (…args: Args) => TSymbol | |
|
|
17
|
+
| args | Args | |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
TSymbol
|
|
22
|
+
|
|
23
|
+
## Remarks
|
|
24
|
+
|
|
25
|
+
Binder registration (via `useBinder()` + `notifySymbolCreated()`) happens inside the [`OutputSymbol`](../types/OutputSymbol.md) constructor regardless of whether you use `createSymbol` or `new`. This helper only adds devtools registration.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# createSymbolSlot
|
|
2
|
+
|
|
3
|
+
Create a component which accepts emitted symbols. The returned component has a `ref` property which is a ref to a reactive set of all symbols emitted by children of the component.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createSymbolSlot } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createSymbolSlot(): SymbolSlot;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| |
|
|
15
|
+
| - |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
[SymbolSlot](../../types/symbolslot/)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# createTap
|
|
2
|
+
|
|
3
|
+
Create a component that when rendered, initializes the tapped value with the provided callback. This is useful for accessing context provided by child components inside a parent component.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createTap } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function createTap<T = unknown>(tapper: Tapper<T>, handler?: TapHandler<T>): Tap<T>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ------- | ----------------------- | - |
|
|
16
|
+
| tapper | Tapper\<T> | |
|
|
17
|
+
| handler | optional TapHandler\<T> | |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
[Tap](../../types/tap/)\<T>
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { type Children, computed, createTap } from "@alloy-js/core";
|
|
27
|
+
|
|
28
|
+
// context we will tap into
|
|
29
|
+
const SomeContext = createContext<string>();
|
|
30
|
+
|
|
31
|
+
// a component which provides some specific context
|
|
32
|
+
function MyDeclaration(props: { children: Children }) {
|
|
33
|
+
return <SomeContext.Provider value="Hello World">
|
|
34
|
+
{props.children}
|
|
35
|
+
</SomeContext.Provider>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// a parent component which wants to know about the context set
|
|
39
|
+
// by its children
|
|
40
|
+
function MySpecialDeclaration() {
|
|
41
|
+
const SomeContextTap = createTap(() => useContext(SomeContext));
|
|
42
|
+
|
|
43
|
+
return <>
|
|
44
|
+
The declaration context is: {SomeContextTap.ref}
|
|
45
|
+
<MyDeclaration>
|
|
46
|
+
<SomeContextTap />
|
|
47
|
+
</MyDeclaration>
|
|
48
|
+
</>
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@see {@link createDeclarationTap} for tapping {@link DeclarationContext}.
|
|
52
|
+
@see {@link createMemberTap} for tapping {@link MemberDeclarationContext}.
|
|
53
|
+
@see {@link createScopeTap} for tapping {@link OutputScope}.
|
|
54
|
+
@see {@link createSourceFileTap} for tapping {@link SourceFileContext}.
|
|
55
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# decl
|
|
2
|
+
|
|
3
|
+
Create a declaration in the current scope with the given namekey. Only works with basic scopes. Import `decl` from a specific language library for declaring language-specific symbols.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { decl } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function decl(namekey: Namekey): import("../runtime/component.js").ComponentCreator<{}>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ------- | ------- | - |
|
|
16
|
+
| namekey | Namekey | |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
import(”../runtime/component.js”).[ComponentCreator](../../types/componentcreator/)<{}>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# defaultProps
|
|
2
|
+
|
|
3
|
+
Applies default values to a props object. Reactive props are handled properly by ensuring that their value is not accessed by `defaultProps`, avoiding any unintended side effects.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { defaultProps } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function defaultProps<T extends {}>(props: T, defaults: Partial<T>): T;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| -------- | ----------- | - |
|
|
16
|
+
| props | T | |
|
|
17
|
+
| defaults | Partial\<T> | |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
T
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# effect
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { effect } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function effect<T>(fn: (prev?: T) => T, current?: T, options?: EffectOptions): void;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| ------- | ---------------------- | - |
|
|
14
|
+
| fn | (prev?: T) => T | |
|
|
15
|
+
| current | optional T | |
|
|
16
|
+
| options | optional EffectOptions | |
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
| | | |
|
|
21
|
+
| ----- | -------------------------------------------------------------- | - |
|
|
22
|
+
| debug | optional [EffectDebugOptions](../../types/effectdebugoptions/) | |
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
void
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# emitDiagnostic
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { emitDiagnostic } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function emitDiagnostic(input: DiagnosticInput): DiagnosticHandle;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| ----- | --------------- | - |
|
|
14
|
+
| input | DiagnosticInput | |
|
|
15
|
+
|
|
16
|
+
## Returns
|
|
17
|
+
|
|
18
|
+
[DiagnosticHandle](../../types/diagnostichandle/)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# emitSymbol
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { emitSymbol } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function emitSymbol(symbol: OutputSymbol | Ref<OutputSymbol | undefined>): void;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| ------ | ----------------------------------------------- | - |
|
|
14
|
+
| symbol | OutputSymbol \| Ref\<OutputSymbol \| undefined> | |
|
|
15
|
+
|
|
16
|
+
## Returns
|
|
17
|
+
|
|
18
|
+
void
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# ensureIsEmpty
|
|
2
|
+
|
|
3
|
+
Ensure that a context has an isEmpty ref, creating one if needed. Only call this when you need to reactively observe isEmpty (e.g., ContentSlot, mapJoin). Most contexts don’t need an isEmpty ref.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { ensureIsEmpty } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function ensureIsEmpty(context: Context): Ref<boolean>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ------- | ------- | - |
|
|
16
|
+
| context | Context | |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
Ref\<boolean>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# findCurrentEffectId
|
|
2
|
+
|
|
3
|
+
Walk up the context owner chain to find the nearest effect ID. Used to attribute reactive mutations to the effect that caused them.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { findCurrentEffectId } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function findCurrentEffectId(): number | undefined;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| |
|
|
15
|
+
| - |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
number | undefined
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# findKeyedChild
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { findKeyedChild } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function findKeyedChild(children: Children[], tag: symbol): ComponentCreator<import("./runtime/component.js").Props> | null;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| -------- | ----------- | - |
|
|
14
|
+
| children | Children\[] | |
|
|
15
|
+
| tag | symbol | |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
[ComponentCreator](../../types/componentcreator/)\<import(”./runtime/component.js”).[Props](../../types/props/)> | null
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# findKeyedChildren
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { findKeyedChildren } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function findKeyedChildren(children: Children[], tag: symbol): ComponentCreator<import("./runtime/component.js").Props>[];
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| -------- | ----------- | - |
|
|
14
|
+
| children | Children\[] | |
|
|
15
|
+
| tag | symbol | |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
[ComponentCreator](../../types/componentcreator/)\<import(”./runtime/component.js”).[Props](../../types/props/)>\[]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# findUnkeyedChildren
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { findUnkeyedChildren } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function findUnkeyedChildren(children: Children[]): Children[];
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| -------- | ----------- | - |
|
|
14
|
+
| children | Children\[] | |
|
|
15
|
+
|
|
16
|
+
## Returns
|
|
17
|
+
|
|
18
|
+
[Children](../../types/children/)\[]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# formatReactivePropertyLabel
|
|
2
|
+
|
|
3
|
+
Build a human-readable label for a reactive property like `symbolName.prop`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { formatReactivePropertyLabel } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function formatReactivePropertyLabel(target: object, key: string | number): string;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| | | |
|
|
15
|
+
| ------ | ---------------- | - |
|
|
16
|
+
| target | object | |
|
|
17
|
+
| key | string \| number | |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
string
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# getAssignmentSymbol
|
|
2
|
+
|
|
3
|
+
Get the symbol being defined.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { getAssignmentSymbol } from "@alloy-js/core";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function getAssignmentSymbol(): OutputSymbol | undefined;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| |
|
|
15
|
+
| - |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
[OutputSymbol](../../types/outputsymbol/) | undefined The symbol currently being defined, or `undefined` if no symbol is being defined.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# getContextForRenderNode
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { getContextForRenderNode } from "@alloy-js/core";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function getContextForRenderNode(node: RenderedTextTree): Context | undefined;
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
| | | |
|
|
13
|
+
| ---- | ---------------- | - |
|
|
14
|
+
| node | RenderedTextTree | |
|
|
15
|
+
|
|
16
|
+
## Returns
|
|
17
|
+
|
|
18
|
+
[Context](../../types/context/) | undefined
|