{"record":{"id":"27197aaa0aaa7aa9","repo":"HelloZeroNet/ZeroNet","slug":"provide-a-transitions-object-to-the-projectionopti-27197a","errorCode":null,"errorMessage":"Provide a transitions object to the projectionOptions to do animations","messagePattern":"Provide a transitions object to the projectionOptions to do animations","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"plugins/UiConfig/media/js/lib/maquette.js","lineNumber":74,"sourceCode":"    };\n    var appendChildren = function (parentSelector, insertions, main) {\n        for (var i = 0; i < insertions.length; i++) {\n            var item = insertions[i];\n            if (Array.isArray(item)) {\n                appendChildren(parentSelector, item, main);\n            } else {\n                if (item !== null && item !== undefined) {\n                    if (!item.hasOwnProperty('vnodeSelector')) {\n                        item = toTextVNode(item);\n                    }\n                    main.push(item);\n                }\n            }\n        }\n    };\n    // Render helper functions\n    var missingTransition = function () {\n        throw new Error('Provide a transitions object to the projectionOptions to do animations');\n    };\n    var DEFAULT_PROJECTION_OPTIONS = {\n        namespace: undefined,\n        eventHandlerInterceptor: undefined,\n        styleApplyer: function (domNode, styleName, value) {\n            // Provides a hook to add vendor prefixes for browsers that still need it.\n            domNode.style[styleName] = value;\n        },\n        transitions: {\n            enter: missingTransition,\n            exit: missingTransition\n        }\n    };\n    var applyDefaultProjectionOptions = function (projectorOptions) {\n        return extend(DEFAULT_PROJECTION_OPTIONS, projectorOptions);\n    };\n    var checkStyleValue = function (styleValue) {\n        if (typeof styleValue !== 'string') {","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/HelloZeroNet/ZeroNet/blob/454c0b2e7e000fda7000cba49027541fbf327b96/plugins/UiConfig/media/js/lib/maquette.js#L56-L92","documentation":"Identical to error 0: in the standalone maquette library bundle, missingTransition is the default placeholder for animations in projectionOptions. When a vnode's enterAnimation/exitAnimation fires during DOM creation or removal and no transitions object was provided, this stub throws.","triggerScenarios":"Rendering or updating vnodes carrying enterAnimation/exitAnimation (or transition helpers) via dom.append/merge/createDom or projector.append without passing { transitions: ... } in projectionOptions.","commonSituations":"Using CSS-transition animations from maquette examples but omitting the transitions helper from projectionOptions; building projectionOptions ad hoc in one call site while animations were added elsewhere.","solutions":["Pass transitions: maquette.createCSSTransitionsAnimationHelper() in the projectionOptions used for append/merge/createDom.","Remove enterAnimation/exitAnimation properties if animations are not wanted.","Register the transitions object globally via maquette.setProjectionOptions({ transitions: ... }) before rendering."],"exampleFix":"// before\nmaquette.dom.append(el, h('div', { exitAnimation: 'fadeOut' }, []));\n// after\nvar opts = { transitions: maquette.createCSSTransitionsAnimationHelper() };\nmaquette.dom.append(el, h('div', { exitAnimation: 'fadeOut' }, []), opts);","handlingStrategy":"validation","validationCode":"function assertTransitions(projectionOptions) {\n  if (projectionOptions && !projectionOptions.transitions) {\n    throw new Error('projectionOptions.transitions is required when using enter/exit animations');\n  }\n}\n// call before dom.append/merge/createDom on the standalone maquette bundle","typeGuard":"function hasTransitions(opts) {\n  return typeof opts === 'object' && opts !== null && typeof opts.transitions === 'object' && opts.transitions !== null;\n}","tryCatchPattern":"try {\n  projection = maquette.dom.append(el, vnode, projectionOptions);\n} catch (e) {\n  if (e.message.indexOf('transitions object') !== -1) {\n    projectionOptions.transitions = maquette.createCSSTransitionsAnimationHelper();\n    projection = maquette.dom.append(el, vnode, projectionOptions);\n  } else { throw e; }\n}","preventionTips":["Bootstrap maquette.setProjectionOptions({ transitions: createCSSTransitionsAnimationHelper() }) at app start.","Use a single shared projectionOptions factory throughout the app.","Only attach enterAnimation/exitAnimation to vnodes when transitions are configured.","Document animation requirements next to any helper that builds animated vnodes."],"tags":["maquette","animation","configuration","virtual-dom"],"backgroundTag":"missing-transition-options","analyzedSha":"454c0b2e7e000fda7000cba49027541fbf327b96","analyzedAt":"2026-09-02T19:46:57.278Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}