@dosgato/templating 0.0.146 → 1.0.0

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/dist/component.js CHANGED
@@ -111,7 +111,9 @@ export class Component extends ResourceProvider {
111
111
  if (!Array.isArray(components))
112
112
  components = this.renderedAreas.get(components) ?? [];
113
113
  const wrap = opts?.wrap ?? defaultWrap;
114
- if (opts?.skipBars || opts?.skipEditBars)
114
+ if (opts?.skipContent && !this.editMode)
115
+ return '';
116
+ if (opts?.skipBars || opts?.skipEditBars || !this.editMode)
115
117
  return components.map((c, indexInArea) => wrap({ ...c, content: c.output, bar: '', indexInArea })).join('');
116
118
  return components
117
119
  .map((c, indexInArea) => {
@@ -146,7 +148,7 @@ export class Component extends ResourceProvider {
146
148
  const full = !!(opts?.max && ownedComponentCount >= opts.max);
147
149
  const wrap = opts?.wrap ?? defaultWrap;
148
150
  let output = this.renderComponents(components, { ...opts, editBarOpts: { ...opts?.editBarOpts, disableDelete: ownedComponentCount <= (opts?.min ?? 0), disableDrop: full } });
149
- if (!opts?.skipBars && !opts?.skipNewBar) {
151
+ if (!opts?.skipBars && !opts?.skipNewBar && this.editMode) {
150
152
  let bar;
151
153
  if (full) {
152
154
  if (!opts.hideMaxWarning) {
package/dist/links.d.ts CHANGED
@@ -31,6 +31,7 @@ export interface PageLink {
31
31
  siteId: string;
32
32
  linkId: string;
33
33
  path: string;
34
+ hash?: string;
34
35
  }
35
36
  /**
36
37
  * When looking up a page by linkId, the context matters. For instance, if I'm
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.146",
3
+ "version": "1.0.0",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {