common_keywords.cljs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. (ns frontend.common-keywords
  2. "There are some keywords scattered throughout the codebase."
  3. (:require [frontend.schema-register :include-macros true :as sr]))
  4. (sr/defkeyword :block/uuid
  5. "block's uuid"
  6. :uuid)
  7. (sr/defkeyword :block/name
  8. "block name, lowercase, only page-blocks have this attr"
  9. :string)
  10. (sr/defkeyword :block/type
  11. "block type"
  12. [:enum "page" "property" "class" "whiteboard" "hidden"])
  13. (sr/defkeyword :block/parent
  14. "page blocks don't have this attr")
  15. (sr/defkeyword :block/order
  16. "
  17. - page blocks don't have this attr
  18. - some no-order blocks don't have this attr too,
  19. TODO: list these types")
  20. (sr/defkeyword :block/title
  21. "Title or content string of the blocks.
  22. in db-version, page-references(e.g. [[page-name]]) are stored as [[~^uuid]]."
  23. :string)
  24. (sr/defkeyword :block/raw-title
  25. "like `:block/title`,
  26. but when eval `(:block/raw-title block-entity)`, return raw title of this block"
  27. :string)
  28. (sr/defkeyword :kv/value
  29. "Used to store key-value, the value could be anything, e.g. {:db/ident :logseq.kv/xxx :kv/value value}"
  30. :any)
  31. (sr/defkeyword :class/parent
  32. "A class's parent class")
  33. (sr/defkeyword :class/schema.properties
  34. "Class properties that all of its objects can use, notice that it's different from this class's own properties.")
  35. (sr/defkeyword :block/closed-value-property
  36. "The property that this closed value (an Entity) belongs to.")
  37. (sr/defkeyword :property/schema.classes
  38. "The classes that this property value must to sastify (being an object of a class)")