@nordcraft/core 1.0.78 → 1.0.80

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.
Files changed (62) hide show
  1. package/dist/api/ToddleApiV2.d.ts +2 -2
  2. package/dist/api/apiTypes.d.ts +1 -1
  3. package/dist/component/component.types.d.ts +1 -1
  4. package/dist/component/schemas/action-schema.d.ts +3 -0
  5. package/dist/component/schemas/action-schema.js +169 -0
  6. package/dist/component/schemas/action-schema.js.map +1 -0
  7. package/dist/component/schemas/api-schema.d.ts +3 -0
  8. package/dist/component/schemas/api-schema.js +174 -0
  9. package/dist/component/schemas/api-schema.js.map +1 -0
  10. package/dist/component/schemas/attribute-schema.d.ts +3 -0
  11. package/dist/component/schemas/attribute-schema.js +12 -0
  12. package/dist/component/schemas/attribute-schema.js.map +1 -0
  13. package/dist/component/schemas/component-schema.d.ts +6 -0
  14. package/dist/component/schemas/component-schema.js +132 -0
  15. package/dist/component/schemas/component-schema.js.map +1 -0
  16. package/dist/component/schemas/context-schema.d.ts +3 -0
  17. package/dist/component/schemas/context-schema.js +20 -0
  18. package/dist/component/schemas/context-schema.js.map +1 -0
  19. package/dist/component/schemas/event-schema.d.ts +4 -0
  20. package/dist/component/schemas/event-schema.js +25 -0
  21. package/dist/component/schemas/event-schema.js.map +1 -0
  22. package/dist/component/schemas/formula-schema.d.ts +5 -0
  23. package/dist/component/schemas/formula-schema.js +203 -0
  24. package/dist/component/schemas/formula-schema.js.map +1 -0
  25. package/dist/component/schemas/node-schema.d.ts +3 -0
  26. package/dist/component/schemas/node-schema.js +159 -0
  27. package/dist/component/schemas/node-schema.js.map +1 -0
  28. package/dist/component/schemas/route-schema.d.ts +3 -0
  29. package/dist/component/schemas/route-schema.js +88 -0
  30. package/dist/component/schemas/route-schema.js.map +1 -0
  31. package/dist/component/schemas/variable-schema.d.ts +3 -0
  32. package/dist/component/schemas/variable-schema.js +8 -0
  33. package/dist/component/schemas/variable-schema.js.map +1 -0
  34. package/dist/component/schemas/workflow-schema.d.ts +3 -0
  35. package/dist/component/schemas/workflow-schema.js +23 -0
  36. package/dist/component/schemas/workflow-schema.js.map +1 -0
  37. package/dist/component/schemas/zod-schemas.d.ts +26 -3
  38. package/dist/component/schemas/zod-schemas.js +4 -1081
  39. package/dist/component/schemas/zod-schemas.js.map +1 -1
  40. package/dist/styling/theme.js +1 -0
  41. package/dist/styling/theme.js.map +1 -1
  42. package/dist/types.d.ts +1 -1
  43. package/dist/utils/collections.d.ts +1 -1
  44. package/dist/utils/collections.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/api/apiTypes.ts +1 -1
  47. package/src/component/component.types.ts +1 -1
  48. package/src/component/schemas/action-schema.ts +258 -0
  49. package/src/component/schemas/api-schema.ts +255 -0
  50. package/src/component/schemas/attribute-schema.ts +15 -0
  51. package/src/component/schemas/component-schema.ts +174 -0
  52. package/src/component/schemas/context-schema.ts +21 -0
  53. package/src/component/schemas/event-schema.ts +35 -0
  54. package/src/component/schemas/formula-schema.ts +299 -0
  55. package/src/component/schemas/node-schema.ts +259 -0
  56. package/src/component/schemas/route-schema.ts +135 -0
  57. package/src/component/schemas/variable-schema.ts +11 -0
  58. package/src/component/schemas/workflow-schema.ts +30 -0
  59. package/src/component/schemas/zod-schemas.ts +4 -1493
  60. package/src/styling/theme.ts +1 -0
  61. package/src/types.ts +1 -1
  62. package/src/utils/collections.ts +4 -1
@@ -132,6 +132,7 @@ export const getThemeCss = (
132
132
  .map((themeV2) => {
133
133
  return `
134
134
  ${Object.entries(themeV2.propertyDefinitions ?? {})
135
+ .filter(([, property]) => isDefined(property))
135
136
  .map(([propertyName, property]) =>
136
137
  renderSyntaxDefinition(
137
138
  propertyName as CustomPropertyName,
package/src/types.ts CHANGED
@@ -159,7 +159,7 @@ export interface Comment {
159
159
 
160
160
  export interface NordcraftMetadata {
161
161
  '@nordcraft/metadata'?: Nullable<{
162
- comments: Nullable<Partial<Record<string, Comment & { index: number }>>>
162
+ comments?: Nullable<Partial<Record<string, Comment & { index: number }>>>
163
163
  }>
164
164
  }
165
165
 
@@ -69,7 +69,10 @@ export const filterObject = <T>(
69
69
  f: (kv: [string, T]) => boolean,
70
70
  ): Record<string, T> => Object.fromEntries(Object.entries(object).filter(f))
71
71
 
72
- export function get<T = any>(collection: T, [head, ...rest]: string[]): any {
72
+ export function get<T = any>(
73
+ collection: T,
74
+ [head, ...rest]: Array<string | number>,
75
+ ): any {
73
76
  const headItem = isDefined(head) ? (collection as any)?.[head] : undefined
74
77
  if (rest.length === 0) {
75
78
  return headItem