Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dosgato/templating

Package Overview
Dependencies
Maintainers
2
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dosgato/templating - npm Package Compare versions

Comparing version 0.0.144 to 0.0.145

21

dist/apitemplate.d.ts

@@ -105,2 +105,23 @@ import type { ComponentData, DataData, PageData } from './component.js';

/**
* Copying components around is a core feature in DosGato, but sometimes the data stored
* is not suitable for copying, for example unique identifiers generated by FieldIdentifier
* should be regenerated during a copy.
*
* Provide this function to do work like that. It will only be called when content is being
* copied, i.e. the original still exists.
*
* The pageCopy parameter will be true when an entire page is being copied, and false when a
* component or data entry is being copied. Sometimes you will want to behave differently in
* those cases. For instance, if you generate a unique id and then make references to it on
* the same page, you would not want to regenerate those ids during a full page copy because
* all the references would break, but you would want to regenerate id on an in-page copy
* because you need new ids for the new objects.
*
* workspace is an initially empty object that onCopy methods from various components can use
* as shared memory. You would need this to do something like regenerating ids and also
* updating references. You would keep a map of original id -> new id in workspace.mynamespace
* and set it any time you encounter an id or reference.
*/
onCopy?: (data: DataType, pageCopy: boolean, workspace: Record<string, any>) => void;
/**
* The available component list in the main content area can get very long, among others. Therefore, each

@@ -107,0 +128,0 @@ * template may set a displayCategory and any templates that share a displayCategory will be grouped together

2

package.json
{
"name": "@dosgato/templating",
"version": "0.0.144",
"version": "0.0.145",
"description": "A library to support building templates for dosgato CMS.",

@@ -5,0 +5,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc