package.dist.chunks.mermaid.esm.chunk-FKTRZSYK.mjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
The newest version!
import {
AbstractMermaidTokenBuilder,
AbstractMermaidValueConverter,
ArchitectureGeneratedModule,
EmptyFileSystem,
MermaidGeneratedSharedModule,
__name as __name2,
createDefaultCoreModule,
createDefaultSharedCoreModule,
inject,
lib_exports
} from "./chunk-46UCTVYF.mjs";
import {
__name
} from "./chunk-DLQEHMXD.mjs";
// ../parser/dist/chunks/mermaid-parser.core/chunk-FF7BQXOH.mjs
var ArchitectureTokenBuilder = class extends AbstractMermaidTokenBuilder {
static {
__name(this, "ArchitectureTokenBuilder");
}
static {
__name2(this, "ArchitectureTokenBuilder");
}
constructor() {
super(["architecture"]);
}
};
var ArchitectureValueConverter = class extends AbstractMermaidValueConverter {
static {
__name(this, "ArchitectureValueConverter");
}
static {
__name2(this, "ArchitectureValueConverter");
}
runCustomConverter(rule, input, _cstNode) {
if (rule.name === "ARCH_ICON") {
return input.replace(/[()]/g, "").trim();
} else if (rule.name === "ARCH_TEXT_ICON") {
return input.replace(/["()]/g, "");
} else if (rule.name === "ARCH_TITLE") {
return input.replace(/[[\]]/g, "").trim();
}
return void 0;
}
};
var ArchitectureModule = {
parser: {
TokenBuilder: /* @__PURE__ */ __name2(() => new ArchitectureTokenBuilder(), "TokenBuilder"),
ValueConverter: /* @__PURE__ */ __name2(() => new ArchitectureValueConverter(), "ValueConverter")
}
};
function createArchitectureServices(context = EmptyFileSystem) {
const shared = inject(
createDefaultSharedCoreModule(context),
MermaidGeneratedSharedModule
);
const Architecture = inject(
createDefaultCoreModule({ shared }),
ArchitectureGeneratedModule,
ArchitectureModule
);
shared.ServiceRegistry.register(Architecture);
return { shared, Architecture };
}
__name(createArchitectureServices, "createArchitectureServices");
__name2(createArchitectureServices, "createArchitectureServices");
export {
ArchitectureModule,
createArchitectureServices
};