@wdprlib/ast 1.0.0 → 1.1.1

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/index.js CHANGED
@@ -191,6 +191,39 @@ function isParagraphSafe(element) {
191
191
  return false;
192
192
  }
193
193
  }
194
+ // packages/ast/src/constants.ts
195
+ var STYLE_SLOT_PREFIX = "\x00__IFTAGS_SLOT__";
196
+ // packages/ast/src/settings.ts
197
+ function createSettings(mode) {
198
+ switch (mode) {
199
+ case "page":
200
+ return {
201
+ mode,
202
+ enablePageSyntax: true,
203
+ allowLocalPaths: true,
204
+ useTrueIds: true,
205
+ allowStyleElements: true
206
+ };
207
+ case "draft":
208
+ return {
209
+ mode,
210
+ enablePageSyntax: true,
211
+ allowLocalPaths: true,
212
+ useTrueIds: false,
213
+ allowStyleElements: false
214
+ };
215
+ case "forum-post":
216
+ case "direct-message":
217
+ return {
218
+ mode,
219
+ enablePageSyntax: false,
220
+ allowLocalPaths: false,
221
+ useTrueIds: false,
222
+ allowStyleElements: false
223
+ };
224
+ }
225
+ }
226
+ var DEFAULT_SETTINGS = createSettings("page");
194
227
  export {
195
228
  text,
196
229
  paragraph,
@@ -207,8 +240,11 @@ export {
207
240
  isAlignType,
208
241
  horizontalRule,
209
242
  heading,
243
+ createSettings,
210
244
  createPosition,
211
245
  createPoint,
212
246
  container,
213
- bold
247
+ bold,
248
+ STYLE_SLOT_PREFIX,
249
+ DEFAULT_SETTINGS
214
250
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdprlib/ast",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "AST types for Wikidot markup",
5
5
  "keywords": [
6
6
  "ast",