UNPKG

@nolebase/vitepress-plugin-page-properties

Version:

A VitePress plugin that renders frontmatter as page properties, and makes them editable.

40 lines (39 loc) 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "InjectionKey", { enumerable: true, get: function () { return _constants.InjectionKey; } }); Object.defineProperty(exports, "NolebasePageProperties", { enumerable: true, get: function () { return _PageProperties.default; } }); Object.defineProperty(exports, "NolebasePagePropertiesEditor", { enumerable: true, get: function () { return _PagePropertiesEditor.default; } }); exports.NolebasePagePropertiesPlugin = NolebasePagePropertiesPlugin; var _PageProperties = _interopRequireDefault(require("./components/PageProperties.vue")); var _PagePropertiesEditor = _interopRequireDefault(require("./components/PagePropertiesEditor.vue")); var _constants = require("./constants"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const components = { NolebasePageProperties: _PageProperties.default, NolebasePagePropertiesEditor: _PagePropertiesEditor.default }; function NolebasePagePropertiesPlugin() { return { install(app, options) { if (typeof options !== "undefined" && typeof options === "object") app.provide(_constants.InjectionKey, options); for (const key of Object.keys(components)) app.component(key, components[key]); } }; }