web / UseBlocksVisibility
Interface: UseBlocksVisibility ​
Defined in: composables/useBlocksVisibility/types.ts:14
Return type for the useBlocksVisibility composable
Properties ​
clearRegistry() ​
clearRegistry: () =>
void
Defined in: composables/useBlocksVisibility/types.ts:34
Clear all registered blocks from the visibility registry Should be called when the page unmounts
Returns ​
void
isHydrationComplete ​
isHydrationComplete:
Ref<boolean>
Defined in: composables/useBlocksVisibility/types.ts:39
Ref tracking when hydration is complete and runtime registry can be used
registerBlockVisibility() ​
registerBlockVisibility: (
uuid,hasData) =>void
Defined in: composables/useBlocksVisibility/types.ts:28
Register a block's runtime visibility state
Parameters ​
uuid ​
string
Block's meta.uuid
hasData ​
boolean
Indicates if block has data to display
Returns ​
void
shouldShowBlock() ​
shouldShowBlock: (
block,isEditorModeEnabled?) =>boolean
Defined in: composables/useBlocksVisibility/types.ts:21
Determine if a block should be shown based on static content and runtime state
Parameters ​
block ​
Block
The block to check
isEditorModeEnabled? ​
boolean
Whether editor mode is active (shows all blocks when true)
Returns ​
boolean
true if block should be visible